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

6

20

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?

Procrustes answered 28/10, 2013 at 15:47 Comment(1)
Do yum install gnome and it will work.Citarella
J
17

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
Joiejoin answered 23/1, 2014 at 22:27 Comment(2)
For me, the step 2 was sufficient without need for 3rd step.Borstal
Step 3 needs to be used with care as it will disconnect other users from any running vnc sessionsBolick
I
4

I was facing the same issue and it got resolved by commenting the last line and adding the gnome line in /home//.vnc/xstartup file as shown below:

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

Note: my GUI session handler was gnome so it worked.

Inexpungible answered 29/6, 2015 at 11:1 Comment(0)
A
4

I had same issue with new redhat linux 6.4. Got it working by installing basic desktop by the command yum groupinstall basic-desktop

Antonomasia answered 22/11, 2015 at 7:31 Comment(1)
This worked for me on RHEL 6.7 but it installs a LOT of stuff so it shouldn't be the first solution for high performance servers.Furbelow
Z
2

In addition to the other answers here, I also had to modify my xstartup script using the following script:

#!/bin/sh

# Change "GNOME" to "KDE" for a KDE desktop, or "" for a generic desktop
MODE=""

#Uncommment this line if using Gnome and your keyboard mappings are incorrect.
#export XKL_XMODMAP_DISABLE=1

# Load X resources (if any)
if [ -e "$HOME/.Xresources" ]
then
xrdb "$HOME/.Xresources"
fi

# Try a GNOME session, or fall back to KDE
if [ "GNOME" = "$MODE" ]
then
if which gnome-session >/dev/null
then
gnome-session --session=ubuntu-2d &
else
MODE="KDE"
fi
fi

# Try a KDE session, or fall back to generic
if [ "KDE" = "$MODE" ]
then
if which startkde >/dev/null
then
startkde &
else
MODE=""
fi
fi

# Run a generic session
if [ -z "$MODE" ]
then
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startx &
fi

I used this site to help me on that: http://ubuntuforums.org/archive/index.php/t-2131958.html. But I had to adapt it to my case, since I'm using Rocks Cluster distro, which is based on CentOS.

Zaid answered 4/3, 2014 at 16:41 Comment(0)
S
0

Try deleting the xstarup file (/home/.vnc/xstartup) and retype in the vnc password to create a new xstartup file and the restart vnc server service: sudo rm xstartup vndpasswd Verify passwd sudo service vncserver restart

Shun answered 18/12, 2013 at 0:39 Comment(0)
E
-2

You might want to check that your server, you are trying to use vnc on, has some memory etc. available. I had memory leaking firefox open on my server and that was the reason for the vnc not working properly.

Escalate answered 2/2, 2016 at 6:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.