I'm running CentOS5.6 and am attempting to configure VNC. I edited /etc/sysconfig/vncservers to read as follows:

VNCSERVERS="2:paul 3:sid"
VNCSERVERARGS[2]="-geometry 800x600"
VNCSERVERARGS[3]="-geometry 800x600"

When I try to start or stop vncserver, I receive the message

starting VNC server 2:paul [FAILED]

I created xstartup as follows:

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

startx &
exec gnome-session &

What additional steps are required to successfully start vncserver and allow remote access to the GNOME desktop?

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

Maybe you have a problem with the init script. Login as paul or sid and start a separate VNC session with $ vncserver :2 or $ vncserver :3.

link|improve this answer
I logged in as both users and executed those commands. xauth: creating new authority file /home/sid/.Xauthority looks like default startup script was created and application started. Should I now be able to VNC with either user? – SidC Sep 29 '11 at 18:06
Sure, it would work. – quanta Sep 29 '11 at 18:09
So, I tried to VNC into the server's IP address from 2 separate systems. Both attempts were refused. Do I need to restart vncserver service for this to take effect? – SidC Sep 29 '11 at 18:14
No. Make sure that you connect to port 5902 or 5903. Are you running iptables? If so, open this ports. – quanta Sep 29 '11 at 18:20
So, I opened several ports in the 5900 series using iptables. I'm able to VNC but when I execute startx to start Gnome Desktop, I receive PAM Authentication failed, cannot start X server. – SidC Sep 29 '11 at 20:07
show 3 more comments
feedback

Your Answer

 
or
required, but never shown

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