You are not logged in.

#1 2020-09-10 14:00:07

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

TigerVNC does not start after update

I updated to latest version with pacman -Syu and vncserver fails to start. There is no log file created.

$ pacman -Q tigervnc 
tigervnc 1.11.0-2
$ vncserver
vncserver: Couldn't find suitable Xsession.
$ cat .vnc/*.log
cat: '.vnc/*.log': No such file or directory

As a temporary solution, I downgraded to previous version:

# pacman -U /var/cache/pacman/pkg/tigervnc-1.10.1-2-x86_64.pkg.tar.zst
$ pacman -Q tigervnc 
tigervnc 1.10.1-2
$ vncserver

This version works fine.
Anyone else updated to version 1.11.0-2, how did it go?

Offline

#2 2020-09-10 14:32:11

post-factum
Member
From: /cz
Registered: 2008-09-12
Posts: 149
Website

Re: TigerVNC does not start after update

Same question here hmm.


uname == latest pf-kernel

Offline

#3 2020-09-10 14:57:34

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: TigerVNC does not start after update

Offline

#4 2020-09-10 16:32:28

waitnsea
Member
From: France
Registered: 2013-02-10
Posts: 57

Re: TigerVNC does not start after update

loqs wrote:

It was with 1.11.0-1 version, an install/update bug in usr/sbin instead of /bin.
The 1.11.0-2 corrected the bug, and Tigervnc works fine on my machine

Offline

#5 2020-09-10 17:17:50

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: TigerVNC does not start after update

waitnsea wrote:
loqs wrote:

It was with 1.11.0-1 version, an install/update bug in usr/sbin instead of /bin.
The 1.11.0-2 corrected the bug, and Tigervnc works fine on my machine

https://bugs.archlinux.org/task/67861#comment192542
I was wondering if the libexec change I suggested could have been the cause.

Offline

#6 2020-09-10 19:03:23

Glats
Member
Registered: 2014-12-24
Posts: 34

Re: TigerVNC does not start after update

waitnsea wrote:
loqs wrote:

It was with 1.11.0-1 version, an install/update bug in usr/sbin instead of /bin.
The 1.11.0-2 corrected the bug, and Tigervnc works fine on my machine

hmm doesn't work for me.
Actually reading the code it try to find this two directories: "/etc/X11/xinit/Xsession", "/etc/X11/Xsession" and I think archlinux doesn't have those directories.

My question is: do you have one of those two directory in your system?

Update: https://bugs.archlinux.org/task/67869 I opened an issue tho.

Last edited by Glats (2020-09-10 20:03:36)

Offline

#7 2020-09-11 00:51:38

Glats
Member
Registered: 2014-12-24
Posts: 34

Re: TigerVNC does not start after update

mico wrote:

I updated to latest version with pacman -Syu and vncserver fails to start. There is no log file created.

$ pacman -Q tigervnc 
tigervnc 1.11.0-2
$ vncserver
vncserver: Couldn't find suitable Xsession.
$ cat .vnc/*.log
cat: '.vnc/*.log': No such file or directory

As a temporary solution, I downgraded to previous version:

# pacman -U /var/cache/pacman/pkg/tigervnc-1.10.1-2-x86_64.pkg.tar.zst
$ pacman -Q tigervnc 
tigervnc 1.10.1-2
$ vncserver

This version works fine.
Anyone else updated to version 1.11.0-2, how did it go?

My workaround is create a file in /etc/X11/Xsession

Offline

#8 2020-09-11 02:51:36

waitnsea
Member
From: France
Registered: 2013-02-10
Posts: 57

Re: TigerVNC does not start after update

Sorry, my bad
I used vncviewer to control remote machines and it works as they launched :

$ x11vnc -many -rfbauth ~/.vnc_passwd -auth /home/.../.Xauthority -display :0 

but I have same output than yours if I use :

$ vncserver
vncserver: Couldn't find suitable Xsession. 

The problem for me was impossibility to update with 1.10.1-1 which tried to install in /usr/sbin, solved with 1.10.1-2

Last edited by waitnsea (2020-09-11 02:53:11)

Offline

#9 2020-09-11 06:55:12

lateparty
Member
Registered: 2019-09-29
Posts: 3

Re: TigerVNC does not start after update

$ pacman -Qi tigervnc
Name            : tigervnc
Version         : 1.11.0-2
Description     : Suite of VNC servers and clients. Based on the VNC 4 branch of TightVNC.
Architecture    : x86_64

Fails to work for me. I tried to “touch /etc/X11/Xsession” and also make a directory called Xsession in that path, and touch a file inside but both fail.

The joys of running a rolling release.

Offline

#10 2020-09-11 12:30:19

Glats
Member
Registered: 2014-12-24
Posts: 34

Re: TigerVNC does not start after update

lateparty wrote:

$ pacman -Qi tigervnc
Name            : tigervnc
Version         : 1.11.0-2
Description     : Suite of VNC servers and clients. Based on the VNC 4 branch of TightVNC.
Architecture    : x86_64

Fails to work for me. I tried to “touch /etc/X11/Xsession” and also make a directory called Xsession in that path, and touch a file inside but both fail.

The joys of running a rolling release.

In my case i did:

$ doas nvim /etc/X11/Xession  # I added #!/bin/sh in the top of the file

then

$ doas chmod 755 /etc/X11/Xesseion

finally

$ vncserver :1

Offline

#11 2020-09-11 15:31:33

post-factum
Member
From: /cz
Registered: 2008-09-12
Posts: 149
Website

Re: TigerVNC does not start after update

I think I've grokked what happened.

New tigervnc moved from custom script-based session launch to a Xsession-based launch, making vncserver command as well as ~/.vnc/xstartup file obsolete. Again: vncserver must not be used directly!

Instead, xorg-xinit should be installed, /etc/tigervnc/vncserver.users should be modified with appropriate user-to-screen mapping, ~/.vnc/config should be created (at least with

session=foobar

string, where "foobar" can be "lxqt" for instance) and then vncserver@:X systemd-wide unit should be started.

What tigervnc package does wrong, IMO:

  • it still contains references to SELinux as it is in upstream, and this causes PAM errors

  • it doesn't depend on xorg-xinit, thus mysterious daemonization errors pop up

  • it messes up with .service files; instead, a stock one should be used only

I've prepared my own tigervnc build here: https://build.opensuse.org/package/show … m/tigervnc. If it works fine (and so far it does), I may create a bug against Arch package in order to accommodate those fixes.


uname == latest pf-kernel

Offline

#12 2020-09-11 15:35:52

Glats
Member
Registered: 2014-12-24
Posts: 34

Re: TigerVNC does not start after update

post-factum wrote:

I think I've grokked what happened.

New tigervnc moved from custom script-based session launch to a Xsession-based launch, making vncserver command as well as ~/.vnc/xstartup file obsolete. Again: vncserver must not be used directly!

Instead, xorg-xinit should be installed, /etc/tigervnc/vncserver.users should be modified with appropriate user-to-screen mapping, ~/.vnc/config should be created (at least with

session=foobar

string, where "foobar" can be "lxqt" for instance) and then vncserver@:X systemd-wide unit should be started.

What tigervnc package does wrong, IMO:

  • it still contains references to SELinux as it is in upstream, and this causes PAM errors

  • it doesn't depend on xorg-xinit, thus mysterious daemonization errors pop up

  • it messes up with .service files; instead, a stock one should be used only

I've prepared my own tigervnc build here: https://build.opensuse.org/package/show … m/tigervnc. If it works fine (and so far it does), I may create a bug against Arch package in order to accommodate those fixes.

did you see the bug I reported?
here https://bugs.archlinux.org/task/67869 in case you missed

Offline

#13 2020-09-11 15:38:23

post-factum
Member
From: /cz
Registered: 2008-09-12
Posts: 149
Website

Re: TigerVNC does not start after update

Yes, I've seen that, and despite having pkg -3, there are still issues with both package and users understanding how new release works.


uname == latest pf-kernel

Offline

#14 2020-09-11 16:53:53

Glats
Member
Registered: 2014-12-24
Posts: 34

Re: TigerVNC does not start after update

post-factum wrote:

Yes, I've seen that, and despite having pkg -3, there are still issues with both package and users understanding how new release works.

Lol. I was confused. Ignore my last comment.

Last edited by Glats (2020-09-11 17:01:32)

Offline

#15 2020-09-11 19:18:22

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: TigerVNC does not start after update

@post-factum - So the user service is worthless now?  BTW, I followed your steps above but starting the system-level service does nothing.

% cat /etc/tigervnc/vncserver.users
:2 graysky

% cat ~/.vnc/config
geometry=1920x1080
session=lxqt
localhost
alwaysshared
# systemctl start vncserver@:2
# systemctl status vncserver@:2
● vncserver@:2.service - Remote desktop service (VNC)
     Loaded: loaded (/usr/lib/systemd/system/vncserver@.service; disabled; vendor preset: disabled)
     Active: inactive (dead)

Sep 11 14:16:38 media systemd[1]: Starting Remote desktop service (VNC)...
Sep 11 14:16:38 media systemd[1]: Started Remote desktop service (VNC).
Sep 11 14:16:38 media systemd[1]: vncserver@:2.service: Succeeded.

Last edited by graysky (2020-09-11 19:18:46)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#16 2020-09-11 19:26:56

post-factum
Member
From: /cz
Registered: 2008-09-12
Posts: 149
Website

Re: TigerVNC does not start after update

graysky wrote:

@post-factum - So the user service is worthless now?

Yes.


graysky wrote:

BTW, I followed your steps above but starting the system-level service does nothing.

% cat /etc/tigervnc/vncserver.users
:2 graysky

I believe you'd want it with "=":

:2=graysky

If nothing helps, try to find out what error it bails out with. I couldn't invent anything more clever than:

$ sudo strace -ff /usr/bin/vncsession pf :1

uname == latest pf-kernel

Offline

#17 2020-09-11 19:32:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: TigerVNC does not start after update

@post-factum - Sorry, had the = sign in there... just didn't xclip the file when I posted (I typed it by hand).  Edited.

Here is the strace log.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#18 2020-09-11 19:36:16

post-factum
Member
From: /cz
Registered: 2008-09-12
Posts: 149
Website

Re: TigerVNC does not start after update

graysky wrote:

@post-factum - Sorry, had the = sign in there... just didn't xclip the file when I posted (I typed it by hand).  Edited.

OK.

graysky wrote:

Here is the strace log.


This:

[pid 28122] stat("/etc/X11/xinit/Xsession", 0x55938c6bd4b8) = -1 ENOENT (No such file or directory)
[pid 28122] stat("/etc/X11/Xsession", 0x55938c6bd4b8) = -1 ENOENT (No such file or directory)
[pid 28122] stat("/etc/X11/xdm/Xsession", 0x55938c6bd4b8) = -1 ENOENT (No such file or directory)
[pid 28122] stat("/usr/share/sddm/scripts/Xsession", 0x55938c6bd4b8) = -1 ENOENT (No such file or directory)
[pid 28122] stat("/etc/gdm/Xsession", 0x55938c6bd4b8) = -1 ENOENT (No such file or directory)
[pid 28122] stat("/etc/lightdm/Xsession", 0x55938c6bd4b8) = -1 ENOENT (No such file or directory)
[pid 28122] stat("/etc/lxdm/Xsession", 0x55938c6bd4b8) = -1 ENOENT (No such file or directory)
[pid 28122] write(2, "vncserver: Couldn't find suitabl"..., 44) = 44

is why it fails. If you don't have any DM installed, try to feed some dummy or hand-crafted script to it (I don't know your actual use-case). Some Xsession to be present is a requirement now.


uname == latest pf-kernel

Offline

#19 2020-09-11 19:42:33

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: TigerVNC does not start after update

@post-factum - Odd... I have lxqt installed but as you say, not a DM.  Perhaps xorg-xdm is the most lightweight solution.

EDIT: nope, still bombs out.

My use case is to run a headless session.  I have no need for a DM.

% pkgfile Xsession
extra/gdm
extra/lightdm
extra/sddm
extra/xorg-xdm
community/lxdm
community/lxdm-gtk3

I guess I need to try one of those.

EDIT2: lightdm (for my system) is only 1.44 MB (libxklavier and lightdm) and it works with that onboard.  I almost wonder if all of our DM packages need to provide GENERIC-DM or the like and GENERIC-DM could be added to tigervnc?

Last edited by graysky (2020-09-11 19:49:19)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#20 2020-09-12 09:23:01

lateparty
Member
Registered: 2019-09-29
Posts: 3

Re: TigerVNC does not start after update

Thanks for all of your help above.

I updated to 1.11.0-4 and now it "works" but it always ONLY launched into gnome-classic.

Have tried to change:
1. /var/lib/AccountsService/users/<myuser> : XSession=   | variable   ----- per https://wiki.archlinux.org/index.php/GD … rg_backend
2. ~/.xinitrc        --------------- per https://docs.fedoraproject.org/en-US/qu … e-session/
3. /etc/gdm/custom.conf : DefaultSession=     | variable     ------- per https://wiki.archlinux.org/index.php/GN … g_sessions


If they aren't set to default or blank, when it attempts to launch anything other than gnome-classic it simply fails to start citing the error below. When I revert back 1.10 I can use vncserver and it launches gnome-xorg.

HOWEVER......I didn't want to post this until I knew for 100% sure that I couldn't fix it and it turns out I did.
Using the guide here:
https://unix.stackexchange.com/question … -leap-42-2

I ran "sudo ln -s /usr/share/xsessions/gnome.desktop /usr/share/xsessions/default.desktop" and voila.

The systemctl status page is not as pretty and detailed as when I don't have that shortcut setup, but I get a usable VNC Session that ACTUALLY starts with a systemctl call. Happy days.

Offline

#21 2020-09-12 11:48:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: TigerVNC does not start after update

@post-factum - Do not think our user service is worthless actually.... once setup, you can start this manually from the shell without systemd at all:

% vncserver :2
Using desktop session lxqt

New 'media:2 (facade)' desktop is media:2

Starting desktop session lxqt


Xvnc TigerVNC 1.11.0 - built Sep 11 2020 15:59:52
Copyright (C) 1999-2020 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12008000, The X.Org Foundation


Sat Sep 12 06:47:21 2020
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on local interface(s), port 5902
 vncext:      created VNC server for screen 0
xinit: XFree86_VT property unexpectedly has 0 items instead of 1
Running X session wrapper
Loading profile from /etc/profile
Loading xinit script /etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module.sh
Loading xinit script /etc/X11/xinit/xinitrc.d/50-systemd-user.sh
X session wrapper complete, running session startlxqt
isPrimaryInstance
no cached wallpaper. generate a new one!
...

I think we just need to adjust it to use /usr/bin/vncserver rather than /usr/bin/vncsession-start

EDIT: I tried it and does load but systemd eventually times out and kills it.  Not sure why though because I can run it from the shell (just vncserver :2) and it runs fine.

% systemctl --user status vncserver@:2.service
● vncserver@:2.service - Remote desktop service (VNC)
     Loaded: loaded (/usr/lib/systemd/user/vncserver@.service; disabled; vendor preset: enabled)
     Active: failed (Result: timeout) since Sat 2020-09-12 06:55:58 CDT; 45s ago
    Process: 44321 ExecStart=/usr/bin/vncserver :2 (code=exited, status=1/FAILURE)

Sep 12 06:55:55 media lxqt-panel[44350]: The X11 connection broke: I/O error (code 1)
Sep 12 06:55:55 media vncserver[44350]: XIO:  fatal IO error 4 (Interrupted system call) on X server ":2"
Sep 12 06:55:55 media vncserver[44350]:       after 868 requests (755 known processed) with 0 events remaining.
Sep 12 06:55:56 media vncserver[44321]: xinit: unexpected signal 15
Sep 12 06:55:56 media systemd[469]: vncserver@:2.service: Control process exited, code=exited, status=1/FAILURE
Sep 12 06:55:56 media lxqt-panel[44350]: unable to write into socketpair: Bad file descriptor
Sep 12 06:55:57 media lxqt-session[44331]: lxqt-session: Module lxqt-panel.desktop won't terminate ... killing.
Sep 12 06:55:57 media lxqt-session[44331]: QProcess: Destroyed while process ("lxqt-panel") is still running.
Sep 12 06:55:58 media systemd[469]: vncserver@:2.service: Failed with result 'timeout'.
Sep 12 06:55:58 media systemd[469]: Failed to start Remote desktop service (VNC).

Here is the service unit I used:

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=forking
ExecStart=/usr/bin/vncserver %i
PIDFile=/run/vncsession-%i.pid

[Install]
WantedBy=multi-user.target

EDIT: https://github.com/TigerVNC/tigervnc/issues/1096

Last edited by graysky (2020-09-12 12:15:15)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#22 2020-09-12 23:39:35

Hackerpcs
Member
Registered: 2020-09-12
Posts: 1

Re: TigerVNC does not start after update

I also couldn't start VNC after the update to tigervnc 1.11.0-4.

This is how I fixed it and moved to the new method, with a lot of help from post-factum on IRC:

- You probably have an old /etc/pam.d/tigervnc, you need to delete that and rename the newest tigervnc.pacnew to tigervnc, otherwise vncsession-start fails ("Failure daemonizing"/"pam_open_session failed: 28 (Module is unknown)")
- Delete your previous own created unit (likely is like the wiki instructed here), package has one on its own now and that's the one that works and doesn't use vncserver directly like before but vncsession-start. Don't forget to systemctl daemon-reload, /etc/systemd/system has priority so systemd should be using that instead of the package supplied one in /usr/lib/systemd/system
- You need a display manager, xorg-xdm DOESN'T work so lightdm must be used. I didn't use one before at all (headless machine, connecting to VNC via SSH tunnel) so I installed lightdm, otherwise TigerVNC can't start (No Xsession file available, vncsession-start just exits with status 0). Just install it, you don't need to configure it with a greeter or something else. I tried starting lightdm out of curiosity and it failed (status 1/FAILURE) but it doesn't matter for TigerVNC.
- Add your user and display on /etc/tigervnc/vncserver.users, otherwise the unit doesn't know which display and user to use ("No user configured for display :1")

And that's it, you should be able to connect with your client like before.

~/.vnc/config isn't needed to be edited with session parameter or something else but if you used geometry, depth, etc in your vnc systemd unit that's where you can put those parameters (e.g. I put securitytypes=none,TLSNone to not require a password)

~/.vnc/xstartup isn't used at all

Last edited by Hackerpcs (2020-09-13 02:26:15)

Offline

#23 2020-09-13 11:20:52

post-factum
Member
From: /cz
Registered: 2008-09-12
Posts: 149
Website

Re: TigerVNC does not start after update

Welcome smile. Glad it finally worked.


uname == latest pf-kernel

Offline

#24 2020-09-13 20:58:21

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: TigerVNC does not start after update

I too got it working. I followed the vnc wiki which has been updated today.
I had issues with using ~/.vnc/config from previous version where I have set X509 certificate to be used. The catch was that paths to the private key and the certificate have to be without the tilde sign if you put them somewhere in your home directory because now we are starting vnc server via systemd and not by running vncserver as user. For example, I had to change:

x509cert=~/foo

to

x509cert=/home/johndoe/foo

To complete transition of ~/.vnc/config, I added also session, geometry, and alwaysshared options.

To sum up other files:
~/.vnc/passwd remains unchanged
~/.vnc/xstartup is obsolete
On the client, nothing has to be changed.

Offline

#25 2020-09-14 02:41:37

sirarch
Member
Registered: 2013-07-19
Posts: 23

Re: TigerVNC does not start after update

Thanks for posting the solution! For me it worked without installing lightdm possibly because I use the old LXDE (running in a VM and wanted the lightest thing a few years ago) and I already have an /etc/lxdm/Xsession

I still noticed a problem, the session starts fine, but when I try to start LXTerminal it now puts me in "/" (root dir) instead of $HOME. LXTerminal shortcut that starts it has a preference "working dir" but even if I set it to "/home/<user>" bash still ends up in "/" when it starts which is weird. Env vars seem correct, user id, $HOME, etc.

Does anything else need to happen in the systemd unit or elsewhere to change the working dir to the user's $HOME before the session starts?

Last edited by sirarch (2020-09-14 02:44:36)

Offline

Board footer

Powered by FluxBB