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:

[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 

# 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

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.

  • One alternate option I done is switched from GNOME to Xfce
    – Arun
    Dec 7, 2021 at 0:50

1 Answer 1


TigerVNC server installed in CentOS 7 will try two desktop servers:

  1. gnome-classic-session
  2. KDE

Gnome is usually preinstalled in your system, but not the classic desktop. However, VNC log will not notice you the lack of this component. You may try to yum install gnome-classic-session and re-run your vncserver, see if the problem remains.

  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Mar 16, 2022 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.