On Ubuntu 22.04, I'm using TigerVNC (via the tigervnc-standalone-server
package) to provide remote desktop access to a headless server.
For one user, the tigervncserver
service exits with no diagnostic message:
$ sudo systemctl restart tigervncserver@:2
$ sudo systemctl status tigervncserver@:2
○ tigervncserver@:2.service - Remote desktop service (VNC)
Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled)
Active: inactive (dead)
Jul 14 18:31:53 myserver systemd[1]: Starting Remote desktop service (VNC)...
Jul 14 18:31:53 myserver tigervncsession[14835]: pam_unix(tigervnc:session): session opened for user user2(uid=1002) by (uid=0)
Jul 14 18:31:53 myserver systemd[1]: Started Remote desktop service (VNC).
Jul 14 18:31:53 myserver tigervncsession[14835]: tigervncsession: tigervncserver exited with status=1
Jul 14 18:31:53 myserver tigervncsession[14835]: pam_unix(tigervnc:session): session closed for user user2
Jul 14 18:31:53 myserver systemd[1]: tigervncserver@:2.service: Deactivated successfully.
Even though tigervncserver
exits with status 1 the overall service does not show as failed.
In ~user2/.vnc/hostname:2.log
, it looks like it's asking for a password, which fails because it's running as a service and can't receive input:
You will require a password to access your desktops.
getpassword error: Inappropriate ioctl for device
Password:
I do have a ~user2/.vnc/passwd
file, but bizarrely it's being deleted when the service tries to start:
[pid 15789] unlink("/home/user2/.vnc/passwd") = 0
[pid 15789] write(1, "\nYou will require a password to "..., 55) = 55