July 2010
M T W T F S S
« Jun    
 1234
567891011
12131415161718
19202122232425
262728293031  
86

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.

Remote Installing CentOS 5 using VNC

Last month I went about “upgrading” my old fileserver, an aging Redhat 9 system to something a little bit more modern 8-), and redeploy it as a more powerful firewall box. The hardware is still very usable by today’s standards, a 1.7GHz Athlon processor, so I set about to do the installation. This system has never had a monitor permanently attached to it so I took this opportunity to try out an installation method that I had only toyed with a few times before. I’m talking about using VNC to do a remote install.

To get started I poped the CentOS 5.3 DVD in and gave this system a quick reboot. Now you know how I said this system didn’t have a monitor permanently attached. Well I lied. It does sorta kinda sorta have a monitor but it’s through a KVM switch which just so happens to be the same KVM as my primary desktop/workstation, so I didn’t want to have to keep switching back and forth, hence why I decided to do the install via VNC.

On to the install …

To start I flipped the KVM over so I could view this system’s console just to get things started. Once I got to the initial CentOS install screen I gave it a boot command like this:

1
linux vnc vncconnect=<workstation's hostname>

I then switched the KVM back to the desktop/workstation’s console and started up ssvnc in listening mode. Here’s the Options dialog from ssvnc which will configure ssvnc to start in listening mode, without any encryption.

NOTE: If you’ve never heard of ssvnc then check it out. It’s a extremely nice VNC client/server that runs on Linux, Windows, and OSX!

screenshot-ssl-ssh-vnc-options

Once the Options dialog is set I clicked the Listen button in ssnvc’s main gui

screenshot-ssl-ssh-vnc-viewer

Finally you’ll be presented with ssvnc’s transcript window

screenshot-untitled-window

After all this I was finally presented with the initial CentOS 5 installation window.

For further details these links to dklevine.com & this redhat magazine article proved useful.