Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Vnc viewer is showing black screen. Following are the configuration : Please figure out the issue ?

cat /root/.vnc/xstartup


# 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" &
twm &

vi /etc/sysconfig/vncservers


 VNCSERVERARGS[2]="-geometry 1024x768"


Run level :

chkconfig --list vncserver
vncserver       0:off   1:off   2:on    3:on    4:on    5:on    6:off
share|improve this question
Which distro is server running? Make sure that it is running at runlevel 5. – quanta Oct 6 '11 at 13:40
up vote 4 down vote accepted

I figured I should answer my own case anyone else runs into a similar problem. I just added localhost to xhost, and voila! took me a lot of hunting around to find this solution, so maybe this'll help a couple of you.

chmod 775 xstartup
share|improve this answer
Your solution helped. The question is why it's not executable by default??? – mist Dec 18 '15 at 13:59

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.