The title of the feature, "Switch User Account", suggests that the current user's information is safe and can be restored. However, when I log back in to my account after a "Switch User Account", my session starts fresh.

How can I keep my original session running when the user is switched?

This has been asked for Ubuntu 13.04 but no answer was provided there. I am on Ubuntu 12.04.

UPDATE: Please note that I am not looking for a better way to "Switch User". I just want that when I accidentally do "Switch User" from the menu, I am not logged out.


You can use this command in terminal to switch user without logging-off :

dm-tool switch-to-greeter 

Try it and reply .

|improve this answer|||||
  • This will not switch users. this command will just switch to lightdm login window. – Maythux Mar 4 '14 at 11:27
  • Thanks. I do not want to "Switch User". I end up hitting it accidentally in hurriedly trying to bring up the calendar by clicking on the "Date and Time" widget next to the "User Accounts" widget. So, I just want that "Switch User", as in the menu, not perform the same functionality as "Log Out". – wsaleem Mar 4 '14 at 11:30
  • switch user should not logoff your user . – nux Mar 4 '14 at 11:46
  • What to do if it is logging me out? – wsaleem Mar 4 '14 at 11:56
  • did you try this command and log to the second user – nux Mar 4 '14 at 11:57

Try this command:

  switch-to-user USERNAME [SESSION]   

This will switch to a user session(Replace USERNAME with yours)

dm-tool --help shows these options:

  switch-to-greeter                   Switch to the greeter
  switch-to-user USERNAME [SESSION]   Switch to a user session
  switch-to-guest [SESSION]           Switch to a guest session
  lock                                Lock the current seat
  list-seats                          List the active seats
  add-nested-seat                     Start a nested display
  add-local-x-seat DISPLAY_NUMBER     Add a local X seat
  add-seat TYPE [NAME=VALUE...]       Add a dynamic seat
|improve this answer|||||
  • Thanks. I added an update to my original post to better explain my problem. As I commented on nux's answer above, I am not looking for a better way to "Swtich User". I just want the menu's "Swtich User" to not log me out. – wsaleem Mar 4 '14 at 11:53

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.