Bug 435468

Summary: XDG_SESSION_ID no longer honored by KWin
Product: [Plasma] kwin Reporter: Martin Flöser <mgraesslin>
Component: coreAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, vlad.zahorodnii
Priority: NOR Keywords: regression
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Martin Flöser 2021-04-07 14:09:45 UTC
SUMMARY

KWin used to support XDG_SESSION_ID to specify the session to start on. Since https://invent.kde.org/plasma/kwin/-/commit/ade861d6de185cff9e49ec08dd95704f338eff4f this is no longer supported. This is a very useful way to launch KWin through ssh in gdb or through ssh on embedded hardware during the development face. Please see also my older blog post introducing this: https://blog.martin-graesslin.com/blog/2016/04/starting-kwinwayland-on-another-virtual-terminal/

STEPS TO REPRODUCE
1. Use weird vivante hardware which crashes KWin on startup
2. Set XDG_SESSION_ID to a started session
3. Launch KWin through gdb in ssh

OBSERVED RESULT
KWin doesn't start.


EXPECTED RESULT
KWin starts on the specified logind session.
Comment 1 Bug Janitor Service 2021-04-07 16:38:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/835
Comment 2 David Edmundson 2021-04-26 09:37:36 UTC
Git commit 799db613817a458d9399f683f44b82d141746999 by David Edmundson.
Committed on 26/04/2021 at 09:37.
Pushed by davidedmundson into branch 'master'.

Restore following XDG_SESSION_ID env if set

Testing done:
Ran on a VT with an XDG_SESSION_ID from another terminal, ensured it
switched

M  +13   -5    src/session_logind.cpp

https://invent.kde.org/plasma/kwin/commit/799db613817a458d9399f683f44b82d141746999