Package: lightdm
Version: 1.32.0-6+b2
Severity: important

Dear Maintainer,


Starting a plasma wayland session from lightdm fails and returns to the lightdm 
login screen. 

A respective error message can be found in the user's .xsession-errors log: 


---------- .xsession-errors ----------
Xsession: X session started for masch at Wed Aug 27 07:41:07 PM CEST 2025
dbus-update-activation-environment: setting 
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting XDG_CURRENT_DESKTOP=KDE
Xsession: unable to launch 
"/usr/lib/x86_64-linux-gnu/libexec/plasma-dbus-run-session-if-needed 
/usr/bin/startplasma-wayland" X session --- 
"/usr/lib/x86_64-linux-gnu/libexec/plasma-dbus-run-session-if-needed 
/usr/bin/startplasma-wayland" not found; falling back to default session.
xrdb: Can't open display ''
xhost:  unable to open display ""
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
$DISPLAY is not set or cannot connect to the X server.
--------------------------------------------------------------------------------

The error message can be traced back to 
/etc/X11/Xsession.d/20x11-common_process-args. 

It is triggered by the

"session-wrapper=/etc/X11/Xsession"

setting in /usr/share/lightdm/lightdm.conf.d/01_debian.conf which is
not compatible with the 

"Exec=/usr/lib/x86_64-linux-gnu/libexec/plasma-dbus-run-session-if-needed
/usr/bin/startplasma-wayland"

setting in /usr/share/wayland-sessions/plasma.desktop. 

Reason is that the Xsession wrapper is not able to handle commands
with arguments. The 20x11-common_process-args script that is sourced
by Xsession fails at 

'if command -v "$1" >/dev/null; then....'

because arguments are considered part of the cmd (note the double
quotes around $1) which cannot be found. This is related to bugs
#694832, #566825 #694832, #566825 which are raised against x11-common
and go partly back to 2010. While this issue could be resolved in the
x11-common package, alternative solutions can be considered in the
context of plasma-workspace or lightdm packages.


Possible solution that work for me are:


1) x11-common: Remove the double quotes in 20x11-common_process-args
   surrounding $1 argument.

I consider this only a workaround as this may break cases where 
whitespaces are part of the cmd. But then, who would use whitespaces 
in filenames of system executables? 

or

2) plasma-workspace: Remove the dbus wrapper call
   (plasma-dbus-run-session-if-needed) in
   /usr/share/wayland-sessions/plasma.desktop. 

Apparently, in my system that wrapper call is not needed. It also
seems not to be used when starting plasma-wayland from sddm but there 
may well be a reason why it was introduced.  Alternatively, it could be
wrapped in yet another wrapper script without arguments (not really
elegant).

or

3) lightdm: Replace the session wrapper call in
   /usr/share/lightdm/lightdm.conf.d/01_debian.conf. 
   [preferred solution]

An alternative wrapper that actually works for me is the one shipped
with sddm (/etc/sddm/wayland-session), but I would avoid to add a
dependency on sddm and rather prefer a separate version shipped with 
lightdm. Alternatively a common wayland wrapper could be created that
would be shared across display managers (would require further
reconciliation across maintainers). 

N.b. Actually, using an X11 wrapper script for a wayland session appears
strange. By using a wayland specific wrapper logs could also end up in
a wayland specific log file (instead of .xsession-errors).


Further relevant packages are
- x11-common           1:7.7+24    
(/etc/X11/Xsession.d/20x11-common_process-args)
- plasma-workspace     4:6.3.6-2   (/usr/share/wayland-sessions/plasma.desktop)


*** End of the template - remove these template lines ***


-- System Information:
Debian Release: 13.0
  APT prefers stable-updates
  APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990, 'stable')
Architecture: amd64 (x86_64)


Kernel: Linux 6.15.6-aragorn (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=C, LC_CTYPE=de_DE.utf-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled


Versions of packages lightdm depends on:
ii  adduser                                3.152
ii  dbus                                   1.16.2-2
ii  debconf [debconf-2.0]                  1.5.91
ii  libaudit1                              1:4.0.2-2+b2
ii  libc6                                  2.41-12
ii  libgcrypt20                            1.11.0-7
ii  libglib2.0-0t64                        2.84.3-1
ii  libpam-systemd [logind]                257.7-1
ii  libpam0g                               1.7.0-5
ii  libxcb1                                1.17.0-2+b1
ii  libxdmcp6                              1:1.1.5-1
ii  lightdm-gtk-greeter [lightdm-greeter]  2.0.9-1


Versions of packages lightdm recommends:
ii  xserver-xorg  1:7.7+24


Versions of packages lightdm suggests:
ii  accountsservice  23.13.9-7
ii  upower           1.90.9-1
pn  xserver-xephyr   <none>


-- Configuration Files:
/etc/lightdm/lightdm.conf changed [not included]
/etc/lightdm/users.conf changed [not included]
/etc/pam.d/lightdm changed [not included]


-- debconf information:
  lightdm/daemon_name: /usr/sbin/lightdm
* shared/default-x-display-manager: lightdm


Reply via email to