xfce over vnc

One of the issues I had to deal with when I switched to xfce as my desktop on CentOS was how to get a remote vnc session going. The answer depends on what you’re looking for. Do nothing and you’ll see the default minimal twm window manager with a grey background and aquamarine colored window bars. But if you want to actually see the graphical desktop, including any background image, read on.

Let me start out by saying that I initially used the following configuration change because I thought it was necessary to do vnc at all. Once I realized I could use the default twm display instead, I reversed this change and went back to it. That’s mostly because I’m often accessing the machines involved over a pretty low bandwidth connection (1.5 mb/s on the far end) and so any graphics at all negatively impacts my productivity. Still, if you really want to see all that eye candy, or need to because you’re going to need some graphical tool that you can’t find without the program menu, then try this.

Just uncomment a couple of lines in ~/.vnc/xstartup:

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc