You are not logged in.
I updated TigerVNC to the newest version (1.11.0-5) and can no longer start the service correctly. Following the wiki, I made the following changes:
/etc/pam.d/tigervnc
looks as follows:
#%PAM-1.0
session required pam_loginuid.so
session required pam_namespace.so
session optional pam_keyinit.so force revoke
session required pam_limits.so
-session optional pam_systemd.so
session required pam_unix.so
-session optional pam_reauthorize.so prepare
I ran
vncpasswd
to create a new password and edited
/etc/tigervnc/vncserver.users
to allow my user:
# /etc/tigervnc/vncserver.users
:1=MY_USERNAME
Finally, my
$HOME/.vnc/config
is
securitytypes=vncauth,tlsvnc
session=lxqt
geometry=1792x1008
#localhost
alwaysshared
I'm not sure if 'securitytypes' and 'localhost' should be enabled or not, but I can't run vnc service regardless of whether these options are on or off. I also disabled all custom vnc services and removed corresponding config files from
/etc/systemd/system
and restarted my machine. Now when I run
systemctl start vncserver@:1
and check status, I'm getting the following:
● vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/usr/lib/systemd/system/vncserver@.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Fri 2020-10-30 11:46:56 GMT; 15min ago
Process: 1298 ExecStart=/usr/bin/vncsession-start :1 (code=exited, status=0/SUCCESS)
Main PID: 1304 (code=exited, status=0/SUCCESS)
Oct 30 11:46:54 ****** systemd[1]: Starting Remote desktop service (VNC)...
Oct 30 11:46:54 ****** systemd[1]: Started Remote desktop service (VNC).
Oct 30 11:46:56 ****** systemd[1]: vncserver@:1.service: Succeeded.
I can't connect and 'ps' does not report any vnc process running. I tried to run
sudo strace -ff /usr/bin/vncsession server :1 &> trace.log
and the only suspicious lines in the log file are
connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
and at the very end:
write(2, "User \"server\" does not exist\n", 29User "server" does not exist
) = 29
exit_group(71) = ?
+++ exited with 71 +++
I don't have any user "server", but I don't see why would I need one.
What else can I do to debug this?
Last edited by mvymazal (2020-11-01 23:14:17)
Offline
The "server" user error is because that's what you told vncsession to do:
sudo strace -ff /usr/bin/vncsession server :1 &> trace.log
SYNOPSIS vncsession <username> <:display#>
Offline
I ran the strace command again, this time with correct user name. The log file has over 7000 lines now and grepping for errors mentioned ~/.xsession-errors, which in turn said that ~/.xinitrc could not be run. Making ~/.xinitrc executable allowed me to start tigervnc server correctly. Thank you @twelveeighty for pointing out the issue with my strace command.
Offline