Monday, September 7, 2015

Logout: Recording video from an IP-enabled camera on Linux...

Logout: Recording video from an IP-enabled camera on Linux...: Here's a little Bourne shell script that I put together to monitor a Foscam FI8904W IP-enabled outdoor camera from a Linux host.  The sc...

Monday, July 14, 2014

SOAP Can't import schema

I recently ran into an issue while testing a PHP/SOAP application. The application would work perfectly in some environments and not others. This was the error that was being thrown: PHP Fatal error: SOAP-ERROR: Parsing Schema: can't import schema from 'definitions.xsd' Turns out that the problem is related to the path where the project lived. If the path has any spaces, the SOAP functions won't be able to find the file.

Tuesday, February 18, 2014

How to change the color of Chrome's scroll bar under Cinnamon 2.0

The default theme that comes with Cinnamon 2.0 is pretty good, and it's the one I use, but I have come to hate the color scheme for the scroll bars. The contrast is too low. I normally use the scroll wheel on my mouse, but when I don't, it gets annoying to have to scan all over the right side of the screen to find the scroll control. The first step to fixing this is creating a new theme:
mkdir ~/.themes
cp -R /usr/share/themes/Mint-X ~/.themes/mytheme

Now, find this file inside the mytheme directory open it: gedit gtk-2.0/Apps/chrome.rc
Find these settings and change the value to the RGB color of your choice (use gcolor2 for a quick and easy color selector): ChromeGtkFrame::scrollbar-slider-prelight-color = "#50AFFF" ChromeGtkFrame::scrollbar-slider-normal-color = "#40AAFF" Now open the system settings > themes > other settings > controls and select your theme. Enjoy high-contrast, hassle-free scroll bar controls.

Sunday, September 8, 2013

How to get the middle mouse button of a Logitech MX Revolution to work under Linux Mint/Cinnamon

The Logitech MX Revolution is my favorite mouse of all time. So good in fact, that when I heard it was being discontinued, I bought three of them. Unfortunately, getting this mouse to work under Linux is not so straightforward. At first, it was easy to configure using btnx, but now that's been discontinued as well. After a quick google search, I was able to get most of the buttons working, but the middle/search button turned out to be a pain to configure.

It turns out that The MX Revolution is seen by the OS as two separate devices. One of them is a typical mouse, but the other is some kind of keyboard emulation. I think they did this so that the search button would work out of the box in MS Windows. Is it really that necessary to have a search button on your mouse? Maybe it's just me, but I can't imagine it being that useful. I prefer to use it as a middle mouse button.

These are the necessary steps to achieve this:

  1. Remove the default binding for the button. To do this, go to Settings > keyboard > launchers > search and remove it.
  2. Install the necessary tools: sudo apt-get install xbindkeys xdotool
  3. Create default config file xbindkeys --defaults > ~/.xbindkeysrc
  4. Comment out all example bindings in the file and add this: # Middle mouse button "xdotool mousedown 2" XF86Search "xdotool mouseup 2" Release + XF86Search
  5. You know how if you press and hold most keys on the keyboard, the key will be sent multiple times? We need to disable this using xset: xset -r 225 The number 225 is the keycode for the search button. We are excluding it from the auto repeating keys.

And that's it! You now have a working middle mouse button for your Logitech MX Revolution.