Linux Things and Stuff
Random tech ramblings, mostly related to Linux.
Monday, September 7, 2015
Logout: Recording video from an IP-enabled camera on Linux...
Monday, July 14, 2014
SOAP Can't import schema
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
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:
- Remove the default binding for the button. To do this, go to Settings > keyboard > launchers > search and remove it.
-
Install the necessary tools:
sudo apt-get install xbindkeys xdotool
-
Create default config file
xbindkeys --defaults > ~/.xbindkeysrc
-
Comment out all example bindings in the file and add this:
# Middle mouse button "xdotool mousedown 2" XF86Search "xdotool mouseup 2" Release + XF86Search
-
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.