Is there a way to 'switch user' with i3? How do you handle a system with multiple users when using a standalone wm?
My entire question basically is in the title. What's the best way to switch user so that all open applications and files remain open and so that I can switch back later?
About this post
- Posted
- Archived
- Score
- 21 ยท 100% up
- Kind
- Text
- ID
- 5cedk5
16 comments
Standard Linux TTY switching method:
[ALT]+[CTRL]+ function key 1 to 7
This opens a new session, to which new user must log in. The old session is still open in TTY1 [F1].
There are modules you can install to password lock a session so other users cannot access it.
๐๐ฝ This. I use this every day even to have 2 separate sessions as one user.
Doesn't your desktop already give you multiple workstations/desktops? Why would you use another session?
Deleted before we saved it.
Modules such as?
I think i3 has i3-lock or something like that. I remember using it in College.
I like xscreensaver. It's got a thing that hooks into systemd so it can start with the system and assist in system suspension. I run openbox with LXDE and it has a hibernate mode that use xscreensaver as a screen lock.
If you want to do this more often, why not use something like lightDM do manage logins?
https://wiki.archlinux.org/index.php/LightDM
Depends on the login manager you're using.
Setup a shortcut that runs the following:
lxdm: lxdm -c USER_SWITCH
lightdm: dm-tool switch-to-greeter
gdm: gdmflexiserver
kdm: kdmctl reserve
You can also use xscreensaver to setup a lockscreen with a "new login" button and specify those above for the action adding "xscreensaver.newLoginCommand" on .Xresources.
to d this properly you need a display manager like lightdm or gdm. If you just swap ttys, some one can swap to the tty you started x from, hit control c, and run whatever they want as you.
Pretty sure nowadays X starts in the tty you started it from.
Deleted before we saved it.
Does that save the session so it can be reopened later, at will? OP wants multiple sessions at the same.
It doesn't. The proper way to handle this is to lock the session via i3-lock and then switch via TTY. Log in as a different user then startx back into i3. It's a kludge; I feel that i3 wasn't really intended for the setup he wants in a nice clean manner. We're just merely giving him a kludge to do it.