Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VNC black screen with a X cursor on Red Hat Enterprise Linux Server release 5.3 (Tikanga) [closed]

Tags:

Starting VNC server using vncserver :1, client can connect to the server but it shows only a black screen with a X curser.

Contents of .vnc/xstartup is:

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

Is it a problem with this?

like image 848
user2656114 Avatar asked Oct 28 '13 15:10

user2656114


People also ask

How do I know if Vncserver is running?

You can use netstat to see if there is an established connection on the port your VNC server is listening on. try netstat -an | find "ESTABLISHED" | find ":5900" on Windows at the command prompt. There'll be a line entry for it if someone is connected.


1 Answers

That has happened to me 2x, and I have been able to repair it 2x. It's very likely only step 2. then 3. are required, but once I've found a way that works I'm loath to change...

  1. The .vnc/xstartup file was owned by root, so I changed ownership to user:
    chown user /home/user/.vnc/xstartup
  2. The .vnc/xstartup file was 664 (-rw-rw-r--.) - I assume vnc uses the 'other' permissions to connect and allow interactions, so I changed the permissions to 755:
    chmod 755 /home/user/.vnc/xstartup
  3. Restart the vncserver daemon:
    service vncserver stop; service vncserver start
like image 132
Christian Avatar answered Oct 03 '22 23:10

Christian