FS#67869 - [tigervnc] vncserver: Couldn't find suitable Xsession.
Attached to Project:
Community Packages
Opened by Just Glats (glats) - Thursday, 10 September 2020, 19:32 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 12 November 2020, 20:43 GMT
Opened by Just Glats (glats) - Thursday, 10 September 2020, 19:32 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 12 November 2020, 20:43 GMT
|
Details
Description:
trying to initialize vncserver shows: vncserver: Couldn't find suitable Xsession. Additional info: package version(s) -- tigervnc-1.11.0-2-x86_64 Reading the code https://github.com/TigerVNC/tigervnc/blob/1aceb7045b424494c984bac195c18ad9555c237f/unix/vncserver/vncserver.in#L441 it try to find this two directories: "/etc/X11/xinit/Xsession", "/etc/X11/Xsession" and I think archlinux doesn't have those directories. Steps to reproduce: run as normal user $ vncserver :1 vncserver: Couldn't find suitable Xsession. |
This task depends upon
die "$prog: Couldn't find suitable Xsession.\n";
and can be removed.
should we open an issue on github?
extra/gdm 3.36.3-6 (gnome)
etc/gdm/Xsession
extra/lightdm 1:1.30.0-4
etc/lightdm/Xsession
extra/sddm 0.18.1-3 [installed]
usr/share/sddm/scripts/Xsession
extra/xorg-xdm 1.1.12-3 [installed]
etc/X11/xdm/Xsession
community/lxdm 0.5.3-7 (lxde) [installed]
etc/lxdm/Xsession
community/lxdm-gtk3 0.5.3-7 (lxde-gtk3)
etc/lxdm/Xsession
Mentioned Xsession is usually part of xorg-xinit package in other distros.
I see two options:
- open an issue on github asking what's the best option.
- patch the code and change Xession for xinit or something like that.
In case you do not want to install DM, you can create one line bash script that just starts what you need.
What are your thoughts for a dependency as such?
From an strace, it seems it looks here:
[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)
I believe that no package is currently providing `/etc/X11/xinit/Xsession` which is one of the files tigervnc is looking for... we could provide one there?
The Xsession that lightdm provides works on my machine for this purpose. I attached it here for reference.
/etc/systemd/system/vncserver@.service
--------------------------------------
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
User=user
WorkingDirectory=/home/user
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver %i -geometry 1440x900 -alwaysshared -localhost no
ExecStop=/usr/bin/vncserver -kill %i
[Install]
WantedBy=multi-user.target
Since the last update I also got the "vncserver: Couldn't find suitable Xsession" problem.
with the Xsession from the thread here, I can start tigervnc again on the command line / SSH.
Unfortunately I can't get an autostart via systemd to run anymore.
I get the following errors:
Sep 14 09:36:01 WS-MAK vncserver[454]: Failed to connect to bus: Datei oder Verzeichnis nicht gefunden
Sep 14 09:36:01 WS-MAK vncserver[455]: dbus-update-activation-environment: error: unable to connect to D-Bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
Sep 14 09:36:01 WS-MAK vncserver[452]: X session wrapper complete, running session mate-session
Sep 14 09:36:08 WS-MAK vncserver[452]: mate-session[452]: WARNING: Could not make bus activated clients aware of XDG_CURRENT_DESKTOP=MATE environment variable: Verbindung ist gescheitert: Verbindungsaufbau abgelehnt
Sep 14 09:36:08 WS-MAK vncserver[452]: mate-session[452]: WARNING: Could not make bus activated clients aware of DISPLAY=:1 environment variable: Verbindung ist gescheitert: Verbindungsaufbau abgelehnt
Sep 14 09:36:08 WS-MAK vncserver[452]: mate-session[452]: WARNING: Could not make bus activated clients aware of MATE_DESKTOP_SESSION_ID=this-is-deprecated environment variable: Verbindung ist gescheitert: Verbindungsaufbau abgelehnt
Sep 14 09:36:08 WS-MAK mate-session[452]: WARNING: Could not make bus activated clients aware of XDG_CURRENT_DESKTOP=MATE environment variable: Verbindung ist gescheitert: Verbindungsaufbau abgelehnt
Sep 14 09:36:08 WS-MAK mate-session[452]: WARNING: Could not make bus activated clients aware of DISPLAY=:1 environment variable: Verbindung ist gescheitert: Verbindungsaufbau abgelehnt
Sep 14 09:36:08 WS-MAK mate-session[452]: failed to commit changes to dconf: Verbindung ist gescheitert: Verbindungsaufbau abgelehnt
Sep 14 09:36:08 WS-MAK mate-session[452]: WARNING: Could not make bus activated clients aware of MATE_DESKTOP_SESSION_ID=this-is-deprecated environment variable: Verbindung ist gescheitert: Verbindungsaufbau abgelehnt
Sep 14 09:36:08 WS-MAK vncserver[452]: mate-session[452]: WARNING: Could not make bus activated clients aware of SESSION_MANAGER=local/WS-MAK:@/tmp/.ICE-unix/452,unix/WS-MAK:/tmp/.ICE-unix/452 environment variable: Verbindung ist gescheitert: Verbindung>
Sep 14 09:36:08 WS-MAK mate-session[452]: WARNING: Could not make bus activated clients aware of SESSION_MANAGER=local/WS-MAK:@/tmp/.ICE-unix/452,unix/WS-MAK:/tmp/.ICE-unix/452 environment variable: Verbindung ist gescheitert: V
Does anyone have a currently working systemd unit?
I had already skimmed the thread in the forum, but I hadn't noticed that the approach works completely without an own systemd unit file.
Now everything runs again. ( I installed lightdm and removed the XSession from this thread )
So a display manager is mandatory now? not optimal for a server
And I took the pill lightdm, to get a maintained Xsession file. (The display manager is not running)
How many distros doesn't provide Xession as default? Depending on that perhaps the developers could consider taking it as mandatory
I mean everything needed in the build to be installed and configured on a local machine.
The decision is quite hard for what I'm seeing. Keep archlinux free from Xession or break the structure a bit and add it.
# pacman -U /var/cache/pacman/pkg/tigervnc-1.10.1-2-x86_64.pkg.tar.zst
warning: downgrading package tigervnc
...
And it will stay downgraded through future updates until you reinstall the current package.