Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to using linux and would like to setup vnc - it used to work but I don't know what has happened and now it doesn't seem to be working. Any suggestions would be greatly appreciated. thanks.


I have added this to the '/etc/sysconfig/vncservers'

VNCSERVERARGS[1]="-geometry 800x600"

and my /home/admin/.vnc/xstartup file looks like


# Uncomment the following two lines for normal desktop:
# 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" & 
gnome-session &

/usr/sbin/ss5 -m -t &

env LC_CTYPE=zh_TW.utf8 WINEPREFIX="/home/admin/.wine" wine "C:\ \Program Files\\uTorrent\\uTorrent.exe" &

However when I try and connect I get

alt text

And the /home/admin/.vnc/inverses:1.log file looks like

Sat Sep 26 17:44:15 2009
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on port 5901
 vncext:      Listening for HTTP connections on port 5801
 vncext:      created VNC server for screen 0
error opening security policy file /usr/lib/xserver/SecurityPolicy
Could not init font path element /usr/share/X11/fonts/TTF/, removing from list!
Could not init font path element /usr/share/X11/fonts/OTF, removing from list!
Could not init font path element /usr/share/X11/fonts/CID/, removing from list!
Could not init font path element /usr/share/X11/fonts/100dpi/, removing from list!
Could not init font path element /usr/share/X11/fonts/75dpi/, removing from list!
sh: /home/admin/.vnc/xstartup: Permission denied
share|improve this question

You could alternatively setup VNC to run as part of the XVNC startup by enabling the module in the X config as follows:

Edit your XF86conig file located here:


Modify the Module section to enable VNC as follows:

Section "Module"
Load "vnc"
End Section

You can then enable security by adding the following to the Screen Section

Section "Screen"
Option "SecurityTypes" "VncAuth"
Option "UserPasswdVerifier" "VncAuth"
Option "PasswordFile" "/root/.vnc/passwd"

Lastly log in as root using su and create your VNC passwords using the following command:


Restart X or the machine and this should give you VNC access to X-Windows.


share|improve this answer
Thank you for such a detailed response. I Managed to kinda resolve my problem by deleting the xstartup file which I am sure I've done many times to try and fix it and add gnome-session to the end line of the default script. The only problem now is: – Malachi Sep 27 '09 at 13:04
Never encountered that problem before. I ended up using the above method since it works best in most of my environments. – BinaryMisfit Sep 27 '09 at 13:12

You need to run the /etc/init.d/vncserver restart command as the root user, try:

$ sudo /etc/init.d/vncserver restart
share|improve this answer
How can I configure a display to use for the vncserver? – Malachi Sep 25 '09 at 11:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.