While executing vncserver
command getting below output but, no port is listing while trying vncserver -list
command.
[user1@localhost ~]$ vncserver
New 'localhost.localdomain:55 (user1)' desktop is localhost.localdomain:55
Starting applications specified in /home/user1/.vnc/xstartup
Log file is /home/user1/.vnc/localhost.localdomain:55.log
[user1@localhost ~]$ vncserver -list
TigerVNC server sessions:
X DISPLAY # PROCESS ID
[user1@localhost ~]$
Log says that it is killing newly created port:
[user1@localhost ~]$ cat /home/user1/.vnc/localhost.localdomain:56.log
Xvnc TigerVNC 1.8.0 - built Aug 9 2019 03:04:19
Copyright (C) 1999-2017 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12001000, The X.Org Foundation
Sat Nov 27 21:13:18 2021
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5956
vncext: created VNC server for screen 0
/home/user1/.vnc/xstartup: line 5: 31982 Trace/breakpoint trap (core dumped) /etc/X11/xinit/xinitrc
Killing Xvnc process ID 31890
xstartup
file under ~/vnc
folder is shown below
[user1@localhost ~]$ cat ~/.vnc/xstartup
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
/etc/X11/xinit/xinitrc
# Assume either Gnome or KDE will be started by default when installed
# We want to kill the session automatically in this case when user logs out. In case you modify
# /etc/X11/xinit/Xclients or ~/.Xclients yourself to achieve a different result, then you should
# be responsible to modify below code to avoid that your session will be automatically killed
if [ -e /usr/bin/gnome-session -o -e /usr/bin/startkde ]; then
vncserver -kill $DISPLAY
fi
My Observation:
If I comment vncserver -kill $DISPLAY
in xstartup
file, port is not getting killed. But while connecting via VNC Viewer it shows black screen.
switched from GNOME to Xfce