Black screen on VNC

General support questions
Post Reply
mahmood
Posts: 120
Joined: 2017/06/04 12:21:09

Black screen on VNC

Post by mahmood » 2019/10/06 17:07:22

I have pasted the following lines of ~/.vnc/xstartup file according to [1], however, as I login with vncviewer, I see black screen only.

Code: Select all

#!/bin/sh
# Add the following line to ensure you always have an xterm available.
( while true ; do xterm ; done ) &
# 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 &
Any idea to debug more?
Process is running on desktop :1

Code: Select all

$ ps ux | grep Xvnc
mahmood   8091  0.0  0.0 112712   956 pts/3    S+   20:32   0:00 grep --color=auto Xvnc
mahmood  13407  5.9  0.0 317716 31240 pts/3    Sl   20:31   0:02 /usr/bin/Xvnc :1 -auth /home/mahmood/.Xauthority -desktop hpc.scu.ac.ir:1 (mahmood) -fp catalogue:/etc/X11/fontpath.d -geometry 1300x900 -pn -rfbauth /home/mahmood/.vnc/passwd -rfbport 5901 -rfbwait 30000
[1] https://wiki.centos.org/HowTos/VNC-Serv ... 6222171172

pjsr2
Posts: 468
Joined: 2014/03/27 20:11:07

Re: Black screen on VNC

Post by pjsr2 » 2019/10/07 06:35:32

In your xstartup file you are attempting to start xterm and twm.

Do you have xterm installed?

Code: Select all

sudo yum install xterm
The window manager twm is not availble in CentOS-7. (it was in CentOS-6). If you have the Gnome desktop installed on your machine, use gdm instead of twm. The instructions you are following are outdated.

Post Reply

Return to “CentOS 7 - General Support”