Summary: | Logout sometimes(!!) not possible | ||
---|---|---|---|
Product: | [Unmaintained] ksmserver | Reporter: | Andreas Hartmann <andihartmann> |
Component: | general | Assignee: | David Edmundson <kde> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | erecio, f.alexander.wilms, plasma-bugs |
Priority: | NOR | ||
Version: | 5.26.4 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
qdbus org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.DBus.Properties.Get org.freedesktop.systemd1.Manager Environment > qdbus.txt
env > env.txt |
Description
Andreas Hartmann
2022-12-28 16:04:33 UTC
Given the workaround works, the only remaining explanation is the dbus activation environment has got out of sync and lost DISPLAY/XAUTHORITY env vars. A good test would be to compare: ``` qdbus org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.DBus.Properties.Get org.freedesktop.systemd1.Manager Environment ``` and ``` env ``` Assuming DISPLAY / XAUTHORITY are different, we need to work out why, though all signs point away from Plasma Thanks for your hint! Problem appeared again - and there was no difference in environment compared to before, as it was working. Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! I now know what happens. I moved ksmserver-logout-greeter and added instead a small bash script which logs the environment to a log file. And voila, the culprit is: ... DISPLAY=localhost:10.0 SSH_CONNECTION=192.168.1.59 35858 192.168.1.6 22 ... What happened? Before that, I remotely logged in via ssh to this machine with ssh -XC 192.168.1.6 konsole This obviously completely breaks the environment! But why? It's even more easy to reproduce it (assuming there is a ssh server running on localhost): just do a ssh -X localhost and the problem can be seen. Btw: if you do it like described above, there is a warning: dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.InvalidArgs: Invalid environment assignments The actual workaround is to replace /usr/lib/ksmserver-logout-greeter with a script which explicitly sets DISPLAY to :0 and afterwards start the original ksmserver-logout-greeter. The exactly same behavior can be seen running KDE under Wayland. Further investigation showed: manually changing the activation-environment after the login has been performed on a local tty, things are working again, too: dbus-update-activation-environment DISPLAY XAUTHORITY Doing the same with a "broken" DISPLAY environment breaks the logout window again (not surprising). The question for me is: Why does a simple ssh -X - login changes the global environment - even for the local running user (at least for processes started by dbus)? This doesn't make any sense to me! Ok, I found the problem: openSuSE 15.4 comes with /etc/profile.d/openssh-dbus.sh as part of openssh-server: if test -n "$SSH_CONNECTION" -a -n "$DISPLAY" then dbus-update-activation-environment --systemd --all fi Deactivating this file makes it working again. OpenSuSE Bug 1206739 - Latest update to systemd causes "theft" of X's dbus session by ssh session for user with same UID https://bugzilla.opensuse.org/show_bug.cgi?id=1206739 Started to happen repeatedly in the last few days for me. Operating System: openSUSE Tumbleweed 20230307 KDE Plasma Version: 5.27.2 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 Kernel Version: 6.2.1-1-default (64-bit) Graphics Platform: X11 Created attachment 157126 [details]
qdbus org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.DBus.Properties.Get org.freedesktop.systemd1.Manager Environment > qdbus.txt
Created attachment 157127 [details]
env > env.txt
|