March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031  
96

Categories

Archives

[one-liner]: Getting Remote Desktop Sharing & Compiz to play nice under Ubuntu 9.04 with GNOME

Background

This one threw me for a bit but I finally realized that when I had Compiz enabled on an Ubuntu 9.04 system, I couldn’t use VNC to connect via Remote Desktop Sharing in GNOME (aka. Vino, aka. VNC Server). Apparently this has been an issue going back since 2007 8-(, when Compiz is enabled. Since this is the first system that I actually bothered to enable Compiz I’m dealing with it for the first time.

The problem shows up when you try and connect remotely to a system that has Remote Desktop Sharing enabled –AND– Compiz. This thread on launchpad was helpful in showing the lineage of the problem, and the only real workaround to get Remote Desktop Sharing to work.

Solution

The workaround? If you’re coming at it remotely, and are too lazy to walk over to the remote system … ssh into the remote system and run these commands to effectively disable Compiz, and enable (re-enable?) the window manager Metacity.

1
2
3
ssh <remote system>
export DISPLAY=:0
nohup metacity --replace > /dev/null &

NOTE: I’m wrapping a “nohup … > /dev/null &” around the “metacity –replace” so that when/if I close the ssh connection, the metacity running in there doesn’t get inexplicably killed off. Additionally, this version of nohup (/usr/bin/nohup), likes to leave a nohup.out file lying around, which is just cruft in our case, so by sending all the output to /dev/null we are effectively disabling the creation of the nohup.out file.

Now you can do your work remotely with Compiz turned off. But now what to do when you’re all done and you want to turn Compiz back on? Easy. Do this:

1
2
3
ssh <remote system>
export DISPLAY=:0
nohup compiz --replace > /dev/null &

Useful Links

NOTE: For further details regarding my one-liner blog posts, check out my one-liner style guide primer.