Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

EDIT

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

VNCSERVERS="1:admin"
VNCSERVERARGS[1]="-geometry 800x600"

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

 #!/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" & 
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

2 Answers 2

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

Edit your XF86conig file located here:

/etc/X11/xorg.conf

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"
EndSection

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

vncpasswd

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

Source

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: i36.tinypic.com/2iuf9rn.jpg –  Malachi Sep 27 '09 at 13:04
1  
Never encountered that problem before. I ended up using the above method since it works best in most of my environments. –  Diago 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

 
discard

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.