Skip to content


vnc4server on Ubuntu 704 server

Now I have my Gnome desktop running on my sever I’d like to be able to access it without using the vmware console. I installed vnc4server using synaptic. Under my user I type vncserver and then connect to the server using the vnc client from my Windows desktop. By default I get a plain grey X window and a basic xterm window.

To set up a better desktop, edit the file ~/.vnc/xstartup and uncomment the first two lines, as follows:

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

#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &

Thanks to a bug in the vnc4server version that is currently being distributed with 704 “Feisty Fawn”, you need to do two more things

1) sudo chmod +x /etx/X11/xinit/xinitrc

2) edit the vncserver script and add the “-extension XFIXES” line, as follows :

$cmd .= " -rfbauth $vncUserDir/passwd";
$cmd .= " -rfbport $vncPort";
$cmd .= " -pn";
$cmd .= " -extension XFIXES";

# Add font path and color database stuff here, e.g.:
#

See here and in particular here for more info on this bug.

To Start the vnc server just type:

$ vncserver

Assuming it started a session on :1, you can kill that session with

$ vncserver -kill :1

Posted in Linux.

Tagged with , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.



%d bloggers like this: