Hello, I’m having some trouble trying to get tigervnc to start using systemd.
I’ve copied the systemd unit file like so:
sudo cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
I haven’t modified the unit file from the default:
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target systemd-user-sessions.service
[Service]
Type=forking
ExecStartPre=+/usr/libexec/vncsession-restore %i
ExecStart=/usr/libexec/vncsession-start %i
PIDFile=/run/vncsession-%i.pid
SELinuxContext=system_u:system_r:vnc_session_t:s0
[Install]
WantedBy=multi-user.target
I’ve added my user into /etc/tigervnc/vncserver.users
My ~/.vnc/config
looks like this:
session=gnome
geometry=2000x1200
securitytypes=vncauth,tlsvnc
localhost=0
alwaysshared
I’ve got my password set up.
When I run sudo systemctl start vncserver@:1
it returns without printing anything to stdout/stderr and has a 0 return code. I can see the following in journalctl -u vncserver
:
Jun 12 07:20:13 fedora systemd[1]: Starting vncserver@:1.service - Remote desktop service (VNC)...
Jun 12 07:20:13 fedora systemd[1]: Started vncserver@:1.service - Remote desktop service (VNC).
Jun 12 07:20:13 fedora systemd[1]: vncserver@:1.service: Deactivated successfully.
No log file is created in ~/.vnc
when this happens.
Interestingly, when I manually run sudo /usr/libexec/vncsession-start :1
everything works correctly and I can connect to the VNC session.
I’m not sure how to track down the issue here because there is no log file and journalctl doesn’t provide much info, but it seems to be systemd related maybe?