So, I recently installed the tigervnc package on Arch Linux (uname -r 4.18.10-arch1-1-ARCH). I'm trying to get the VNC server to run trough SSH tunnels, so I'm starting the server on localhost only with -localhost on vncserver.
The problem is, after I start my .service file for vncserver with systemctl start vncserver@:1, the VNC server doesn't respond, and actually, the Xvnc process isn't even running.
I tried troubleshooting this, first with systemctl status vncserver@:1 which gave me this:
● vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2018-10-10 20:57:46 EEST; 10min ago
Process: 4936 ExecStop=/usr/bin/vncserver -kill :1 (code=exited, status=2)
Process: 4897 ExecStart=/usr/bin/vncserver :1 -fg -alwaysshared -localhost :1 (code=exited, status=0/SUCCESS)
Process: 4891 ExecStartPre=/usr/bin/dbus-launch (code=exited, status=0/SUCCESS)
Process: 4885 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill :1 > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
Main PID: 4897 (code=exited, status=0/SUCCESS)
Oct 10 20:57:41 JUHANPELIKONE-L systemd[1]: Starting Remote desktop service (VNC)...
Oct 10 20:57:42 JUHANPELIKONE-L systemd[4885]: pam_unix(login:session): session opened for user juha by (uid=0)
Oct 10 20:57:42 JUHANPELIKONE-L systemd[4891]: pam_unix(login:session): session opened for user juha by (uid=0)
Oct 10 20:57:42 JUHANPELIKONE-L systemd[1]: Started Remote desktop service (VNC).
Oct 10 20:57:42 JUHANPELIKONE-L systemd[4897]: pam_unix(login:session): session opened for user juha by (uid=0)
Oct 10 20:57:46 JUHANPELIKONE-L systemd[1]: vncserver@:1.service: Control process exited, code=exited status=2
Oct 10 20:57:46 JUHANPELIKONE-L systemd[1]: vncserver@:1.service: Failed with result 'exit-code'.
I then tried to diagnose it with journalctl -xe, and found some pam errors and then a segfault backtrace for Xvnc.
I've tried adding a dbus launch command to the service file (it's currently there), changing the window manager, removing and adding parameters to the vncservice call in the service file, running this from the terminal emulator directly, and reinstalling tigervnc.
The .service file is up on pastebin, along with my journalctl -x output and other stuff, to prevent clutter.