(Note: “\\” shows where I had to split the line. It should all be on one line.)
Make sure you have a backup of your X server config file.
sudo cp /etc/X11/xorg.conf \\
/etc/X11/xorg.conf.bak
Edit it …
sudo vim /etc/X11/xorg.conf
If you don’t like the command line you can use this …
gksudo gedit /etc/X11/xorg.conf
Find this section …
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
EndSection
Add this line …
Option "DragLockButtons" "3 2"
The section will now look like this …
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "DragLockButtons" "3 2"
EndSection
The first number after “DragLockButtons” is the button to be toggled. In this case button 3, the middle mouse button on my three button mouse. The second number is the mouse button to use to activate the toggle.
Save the xorg.conf file. Type “:”, then “wq”.
Logout of Ubuntu and then back in again. That will restart the x server without having to restart the entire system.
Now you can click the right mouse button over a clear area of desktop and the middle mouse button will lock allowing free rotation of the compiz cube. You can walk away and leave it in mid rotation. Hit the right mouse button again to let Compiz focus back to the active desktop.
There’s only one drawback here if you only have three mouse buttons. The defined lock button can no longer be used as a normal mouse button ! I just use the right click key on my keyboard.
Bookmarks