I am facing with an annoying issue while using tigervnc. I am working with CentOS Linux release 7.9.2009.
I tried with
$ vncserver -geometry 1920x1080
Warning: localhost.localdomain:1 is taken because of /tmp/.X11-unix/X1
Remove this file if there is no X server localhost.localdomain:1
New 'localhost.localdomain:2 (user)' desktop is localhost.localdomain:2
Starting applicaitons specified in /home/user/.vnc/xstartup
Log file is /home/user/.vnc/localhost.localdomain:2.log
$ vncserver -list
TigerVNC server session:
X DISPLAY # PROCESS ID
:2 17126
but when I tried to log in with my ip : 2, a notification poped up with 'Connection Closed. Connection to host ...:5902 was closed.'
I tried to debug with:
$ systemctl | grep vncserver
* vncserver@:1.service loaded failed failed. Remote desktop service (VNC)
system-vncserver.slice loaded active active system-vncserver.slice
please save me... I cannot change my pc and also have tried to reinstall centos a few times. vncserver just still does not work.