Logout from KDE Plasma not really logging out?

Hi,

had this experience today. Had to add my user to a group (vboxusers), so I did that and then wanted to logout and log in again to be sure to find my user also associated to the new group.

To my surprise, logging out via the plasma logout button and logging in again with sddm did not result in an actual logout-login experience, and I found my user in an environment where it was not associated to the new group.

Got on a virtual console, logged in there, and in this case the user was associated to the new group.

So what actually happens when you logout from KDE plasma? Why does the login session remain alive so that at the next login one is still in it and not in a new session? Is there a way to truly log out and log in again to the DE, so that changes in the user configuration (e.g. groups) is actually applied? Is what I observed specific to KDE plasma or common to all DEs?

Update:

I think the issue is the one described in https://unix.stackexchange.com/questions/508151/logout-login-not-enough-to-update-group-membership. Question is: should it be considered a bug? Where?

It’s because sddm (and Plasma) run in a specific and separate environment, in which a logout and subsequent login are not enough for reloading the environment. One would have to restart the graphical session for it to fully reload the environment.

It’s not a bug, but merely a property of how the system was designed.

Found some more discussion at https://askubuntu.com/questions/1045993/after-adding-a-group-logoutlogin-is-not-enough-in-18-04.

It’s not a bug, but merely a property of how the system was designed

I now understand and this would not be a problem per se, but for the fact that it is quite unexpected on multiple levels:

  • it makes the DE logout work in a quite different way from the virtual console or ssh logout;
  • il appears in contrast with the literal meaning of “log out”;
  • according to the “ask ubuntu” post it makes the behavior sensitive to how long you wait between the logout and the subsequent login;
  • because the amount of time to way for the old session not to be reused depends on the exiting of some processes and at times these processes don’t exit at all as they should after a bunch of seconds, the behavior may become a little unpredictable.

My two cents: whether lingering processes are left around after logout or not should be configurable (with an explicative tooltip) from the KDE system settings → startup and shutdown → desktop session configuration screen on a per user basis rather than just in some (obscure) systemd (loginctl) config file systemwide. This would also be a nice way to document this behavior.

No, it’s not, but in a tty, your login process is handled by logind directly, while with sddm, the login process is handled by sddm and then relayed through logind.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.