You are not logged in.

#1 2023-12-06 20:51:58

pepper
Member
Registered: 2017-12-09
Posts: 116

[solved] tigervnc service can't start

hello, I have a local server where I connect to using a reverse ssh:

ssh -L 5902:localhost:5901 davide@192.168.1.30

and after that I use a vnc command inside the ssh tunnel:

vncviewer -SecurityTypes VncAuth,TLSVnc -passwd ~/.vnc/passwd localhost:2

this worked for years but today I logged out my user account (xfce) while I was inside a vnc session, so I restarted the machine and I can connect using the reverse ssh but vnc doesn't work anymore because the service can't be started.
vnc pop up error when I try to connect: the connection was dropped by the server before the session could be established
error that is printed in the ssh console after the vnc error: channel 3: open failed: connect failed: Connection refused

journalctl -xe | grep vnc

Dec 06 21:41:42 mulo systemd[1]: Created slice Slice /system/vncserver.
░░ Subject: The unit vncserver@:1.service is beginning the start-up phase
░░ The unit vncserver@:1.service has started the start-up phase.
Dec 06 21:41:47 mulo vncsession[801]: pam_unix(tigervnc:session): session opened for user davide(uid=1000) by davide(uid=0)
░░ Subject: The unit vncserver@:1.service has finished the start-up phase
░░ The unit vncserver@:1.service has finished the start-up phase.
Dec 06 21:41:47 mulo vncsession[801]: vncsession: vncserver exited with status=255
Dec 06 21:41:47 mulo vncsession[801]: pam_unix(tigervnc:session): session closed for user davide
Dec 06 21:41:47 mulo systemd[1]: vncserver@:1.service: Deactivated successfully.
░░ Unit vncserver@:1.service entered the 'dead' state successfully.
Dec 06 21:41:54 mulo dbus-daemon[669]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.30' (uid=0 pid=1052 comm="sudo systemctl status vncserver@:1.service")
Dec 06 21:41:57 mulo sudo[1052]: davide : TTY=pts/0 ; PWD=/home/davide ; USER=root ; COMMAND=/usr/bin/systemctl status vncserver@:1.service

systemctl status vncserver@:1.service

○ vncserver@:1.service - Remote desktop service (VNC)
     Loaded: loaded (/usr/lib/systemd/system/vncserver@.service; enabled; preset: disabled)
     Active: inactive (dead) since Wed 2023-12-06 21:41:47 CET; 7min ago
   Duration: 54ms
    Process: 775 ExecStart=/usr/bin/vncsession-start :1 (code=exited, status=0/SUCCESS)
   Main PID: 801 (code=exited, status=0/SUCCESS)
        CPU: 28ms

Dec 06 21:41:46 mulo systemd[1]: Starting Remote desktop service (VNC)...
Dec 06 21:41:47 mulo systemd[1]: Started Remote desktop service (VNC).
Dec 06 21:41:47 mulo systemd[1]: vncserver@:1.service: Deactivated successfully.

of course systemctl start vncserver@:1.service doesn't work.

journalctl -b: https://0x0.st/H3ia.txt

What can be the problem?

EDIT: it was a passwd problem because I canged permissions over that file
fix -> chmod 0600 ~/.vnc/passwd

Last edited by pepper (2023-12-07 10:06:17)

Offline

Board footer

Powered by FluxBB