SUMMARY When starting a seconds X11 session (with the same user that started the kde desktop) for example via startx then I cannot logout anymore from the plasma desktop. Following error pops up in the journalctl: ksmserver-logout-greeter[4361]: qt.qpa.xcb: could not connect to display :1 STEPS TO REPRODUCE 1. login to plasma and do a systemctl --user show-environment -> note down DISPLAY and XAUTHORITY 2. startx from another tty as the same user 3. switch to plasma and do a systemctl --user show-environment -> env variables have changed 4. try to logout or restart the computer -> nothing happens OBSERVED RESULT I cannot logout or restart EXPECTED RESULT I can logout or restart SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.1.0 Qt Version: 6.7.0 ADDITIONAL INFORMATION Maybe a easy fix is doing a systemctl --user import-environment XAUTHORITY DISPLAY just after the user clicks on logout,restart etc. So that the ksmserver-logout-greeter has no chance of using the wrong env variables.
This may be a bug, but it's definitely not something we formally support. I estimate it to have a very low chance of being fixed unless you can provide a patch. Would you ve interested in doing so?
(In reply to Nate Graham from comment #1) > This may be a bug, but it's definitely not something we formally support. I > estimate it to have a very low chance of being fixed unless you can provide > a patch. Would you ve interested in doing so? Sure I can try to come up with something. Can you point me into the right direction? I think it should happen before the ksmserver-logout-greeter binary is invoked. Or maybe it should be fixed by systemd? If KDE does not handle the DISPLAY and XAUTHORITY variables at all then maybe it should not start doing so?
I'm afraid that can't be me. I don't know anything about how X11 stuff works.
Adding the x11-only keyword