[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1094494: xorg-common: 20x11-common_process-args: fails on xsession executable with args



Package: xorg-common
Version: 1:7.7+24
X-Debbugs-CC: debian-xfce@lists.debian.org

(Cc debian-xfce on the off-chance this will get considered a lightdm
bug, but as far as i can tell i'd consider it an xorg-common one)

The change[0] switching from `which` to `command -v` for looking up the
selected X session executable made some more simplifications, among
them removing `${1%% *}`, i.e. a bash expansion to only use the first
word of `$1`.

This causes login for sessions that have arguments in their start
invocation to fail; in my case that's with

 - lightdm 1.32.0-6+b1
 - herbstluftwm 0.9.5-3+b1


Herbstluftwm has `Exec=herbstluftwm --locked` in its
`/usr/share/xsessions/herbstluftwm.desktop`, i.e. a parameter in
addition to the executable name itself. I read somewhere that only
single-dash options may be allowed in .desktop files, but the issue is
the same with just `-l` as argument. Also i guess there's more window
managers that are started with parameters.

Since Debian has `/etc/X11/Xsession` as "session-wrapper" (at least
that's the lightdm term), i.e. script that gets called with the actual
window manager as parameter, we get all of that `Exec=` value in
`argv[1]`, no splitting is done; see  [1].

In effect, since the simplifications done in [0] and released to sid in
1:7.7+24, 20x11-common_process-args now does
`which "herbstluftwm --locked"`, finds there is no command
"herbstluftwm --locked" and goes to the fallback session.

This worked before, up to and including in xorg-common 1:7.7+23.2. I
would suggest to re-introduce the "${1%% *}" expression in
20x11-common_process-args. I haven't researched what other display
managers and window managers do, if this really is unique to the
herbstluftwm/lightdm combination, this might instead be a lightdm bug,
and the fix might be to do parameter splitting before launching the
session wrapper script.


[0] https://salsa.debian.org/xorg-team/xorg/-/commit/2e1755166a88c8631d1ed88fac4f7f63b05f29dd
[1] https://github.com/canonical/lightdm/blob/main/src/seat.c#L940

best,
   dario


Reply to: