I am running an Ubuntu 12.04 system. While I am logged in using the i3 window manager how is it possible to login as another user (perhaps using a different window manager) without losing my i3wm session?

This is something I can easily do when I am using Unity (and then use Ctrl+F7 and Ctrl+F8 to switch between the two users) but I haven't figured a way to do this from i3wm.


You can ask your display manager to handle this, for instance:

  • lxdm: lxdm -c USER_SWITCH
  • lightdm: dm-tool switch-to-greeter
  • gdm: gdmflexiserver
  • kdm: kdmctl reserve

via edgardcastro on Reddit

So on Ubuntu 16.04 (that is i3 over LightDM), you could bind the following shortcut:

bindsym $mod+Shift+l exec dm-tool switch-to-greeter
  • The gdm version doesn't work with the versions that come with Ubuntu 18.04. – Raphael Jul 16 '18 at 13:53
  • See here for a workaround. – Raphael Nov 22 '18 at 8:44
  • I'm on 16.04, dm-tool switch-to-greeter worked like a charm. – Marcus Junius Brutus May 7 at 19:08

This doesn't really have anything to do with your window manager.

From any window manager, you can switch to a different TTY with ctrl + alt + f{1-8}, login as a user, and start a new graphical session (e.g. with startx).

  • When I try to do that I get: Fatal Server Error: Server is already active for display 0 – Marcus Junius Brutus Nov 8 '16 at 21:12
  • Try startx -- :1. This tells startx to open the new server on display 1 By default startx tries to start any new session on display 0, which is already occupied by the original session. Hence the error message. – Adaephon Nov 9 '16 at 9:52
  • 1
    yes, doing that started what looked like another Unity session in tty-8 but it wasn't functional (I couldn't see the dash, couldn't start a terminal window with Ctrl+Atl+T, etc.). It seems that the issue is more complicated: askubuntu.com/q/416825/89663 but I am upvoting the answer as it pointed to the right direction. – Marcus Junius Brutus Nov 12 '16 at 6:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.