You are not logged in.
Hi, up until now I've been the only person using my desktop and I simply logged in from getty and started my WM (openbox) with xinit. However in the near future I will be sharing my desktop with another person, and I'd like it to be possible for one of us to leave his X session locked, and when the other goes to the computer he should be able to login in his own X session, leaving the first one unaltered - i.e. when the second user locks the screen or logs out, the first can put his password and find his session as he left it. Is that even possible? I guess I need a display manager for this at the least... what do you recommend?
I'd also like to try out some DEs, mainly xfce and kde - so the display manager should have the possibility to configure different session types, but I'd like to be able to do the above in a DE agnostic way - i.e. I don't want to depend on kde's own display manager for instance, because I may want to uninstall kde
Offline
First it's definitely possible. Second, no display manager is needed, but the approach you take may differ substantially depending on whether you want to use a DM or not. Without a display manager, you'd just need a screen lock program and perhaps a couple short scripts to automate logging in and locking.
Example:
- User A logs on to tty1 and launches x. a script may be handy here make sure that startx/xinit are ran with "exec" so that the x session replaces the tty session and tty1 is freed up for logging in again. This script may also manage the display number (see below).
- User A is now in their x session on tty7 (by default at least with a normal inittab setup) until they use the screen lock script which will lock the screen and change back to tty1 which is now asking for a user name to login.
- User B logs in to tty1 (locked x session is still running on tty7).
- User B runs script to start x which executes something like `exec xinit -- :1` where the "1" is the next display number. Perrhaps the script would determine this itself, I can imagine a few straightforward ways to do this. User B would then be logged into their x session on tty8.
- User B could lock their session, user A would then switch back to tty7 and enter their password to unlock their session.
No display manager needed.
If you *want* a display manager for other purposes, this can be done too. There have been threads on doing just this. But a display manager adds what I see as an unneeded layer of complexity.
Edit: there was an older thread I was trying to dig up that discussed doing essentially what you are looking for with LXDM as the display manager. I just looked for the thread, but it wasn't turning up quickly. If you're interested I'll let you test your google-fu on finding it. I believe graysky had started the thread, and I had posted in it. Looking in our post histories may help find it. I found a couple of those threads, it turns out they aren't as relevant as I was thinking.
Last edited by Trilby (2012-08-07 12:03:41)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
thanks for your time trilby. I like your approach, though I must admitt I'd prefer having a DM that takes care of at least some of these details - I'm not that confident with scripting and I would probably manage to do it but it would A take me several hours and B the result would probably be some horrible hack that would sooner or later break.
Offline