Don’t worry. This blog isn’t turning into a tech tips blog. I’ve just been dreaming about 3D desktops for years and then it all comes at once along with everything else that Ubuntu has to offer. A working copy of Compiz is installed from the distro CD. It is setup to provide a change desktop animation which will probably be enough for most people. Here it is with a few other things turned on.
Your basic “cube” showing all available desktops.
NASA TV in 3D. Could it be called “virtualised TV” ? That’s full frame video running there, not a thumbnail. It’s a live window.
At a watchable size.
I didn’t know it could do this until I had to resize a maximised window. Peek at what’s underneath :P
The 3D windows from another perspective.
Your classic desktop view with the 3D tastefully visible in the background. You can just see the menu that is open, visible on one of the other desktops on the right.
So no more “Living in a box…. I’ve been living in a cardboard box !” as that 80’s song goes.
3D movement is almost completely free as long as the middle mouse button is held down over the desktop. But it won’t stay in that position once the mouse button is released (grrrr!), and will snap back to whatever desk is nearest. This just seems such a shame as I can’t admire this work of beauty with it’s virtualised video and everything. So after looking into accessibility options I found a way of locking the middle mouse button down.
It’s a bit of a hack, but it does use a legitimate way of altering X server mouse behaviour. I wonder if there’s a way of doing this already built into Compiz ? If there is, no one would tell me. Google would not find it.
In Ubuntu … (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 …
Identifier "Configured Mouse"
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.
Users with more than three buttons can set the lock toggle button to an unused mouse key and won’t have this problem. Just set the second number to whatever mouse button you want to use.
Addendum: If you do use a multi button mouse then make sure you use one number in the “lock” field (see above). Click that button and then the next button you press will lock. It’s a toggle lock, so the next time you click that button the lock will be cancelled.