Skip to content

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?

21 points14 comments
Open on Reddit
About this post
Posted
Archived
Score
21 ยท 100% up
Kind
Text
ID
5cedk5

Author

11
posts
18
comments
0
media
View profile

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.

25 points

๐Ÿ‘†๐Ÿฝ This. I use this every day even to have 2 separate sessions as one user.

7 points

Doesn't your desktop already give you multiple workstations/desktops? Why would you use another session?

4 points
unknown author

Deleted before we saved it.

-1 points

Modules such as?

2 points

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.

2 points

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.

5 points

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.

1 points

Pretty sure nowadays X starts in the tty you started it from.

2 points
unknown author2 hidden

Deleted before we saved it.

-6 points

Does that save the session so it can be reopened later, at will? OP wants multiple sessions at the same.

7 points

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.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

โ†orโ†’
Previous / next file
โ†‘orโ†“
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.