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

NOTE: This is an update to my original post on this problem when I 1st encountered it in Ubuntu 9.04.

Background

This one threw me for a bit but I finally realized that when I had Compiz enabled on an Ubuntu 10.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, as well as a couple of workarounds to get Remote Desktop Sharing working.

Solution #1

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 &

Solution #2

Invoke gconf-editor on the Ubuntu box, and navigate to this location in the tree: /desktop/gnome/remote_access. Check the box next to disable_xdamage. This will disable the XDamage extension of X.org which apparently doesn’t work well with some video drivers when using 3D effects. It will degrade the render performance so option #1 may still be preferable. This solution was discussed in this thread on launchpad.

gconf-editor: disable_xdamage

Useful Links

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

This entry was posted in GNOME, one-liner, remote desktop, server, Syndicated, tips & tricks, Ubuntu, VNC. Bookmark the permalink.

Comments are closed.