This forum has been archived. All content is frozen. Please use KDE Discuss instead.

how to log out of a user started from the shell?

Tags: None
(comma "," separated)
User avatar
shmu26
Registered Member
Posts
25
Karma
0
I am on Plasma 5.19 (Kubuntu 20.10).
To switch to another user, I use ctrl+alt+F2, and then in the shell, I enter "startx" to get a GUI session.
This works fine, and I can switch back to the first user with ctrl+alt+F1.
The problem comes when I want to sign out of user 2. It puts me back into the shell, with no apparent way to return to the first user. If I enter the user name for the first user, it starts another session for that user, which is not what I want. I want to get back to the original session.
How to get user 2 signed out, and safely return to the open session of user 1?
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
Hi!

You can use `loginctl` on systems using systemd, depending on how you want to handle user processes. With kill-user every process of this user would be killed. Just a logout is terminate-session, which will kill all processes used by this login.
User avatar
claydoh
Registered Member
Posts
1170
Karma
9
OS
Using ctrl-alt-f1 does not work to switch back to the original session?

By using startx, you are bypassing the login manager (SDDM) altogether. Normally, you should be able to switch users from the Leave options graphically, and switch between them, logout, etc via the GUI. There is even a widget you can add that can be used for this.


claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
User avatar
shmu26
Registered Member
Posts
25
Karma
0
claydoh wrote:Using ctrl-alt-f1 does not work to switch back to the original session?

By using startx, you are bypassing the login manager (SDDM) altogether. Normally, you should be able to switch users from the Leave options graphically, and switch between them, logout, etc via the GUI. There is even a widget you can add that can be used for this.

ctrl-alt-f1works great, as long as I am still in a GUI session. That's not exactly the problem. The problem is how to log out of the second user completely, and get back to the original session.
Switching users graphically does not currently work in Plasma 19, you need to completely log out in order to log into a different user. That issue is fixed in Kubuntu 21.04, which I think uses Plasma 20. It was already fixed in Manjaro, when they upgraded the Plasma version, if I remember correctly.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]