Ubuntu – switch between two users in a single click


I share my home computer with my wife, and we often switch between our two accounts.
I'm considering using Ubuntu on my next computer, and I'm evaluation different desktop environments (E.g. Gnome, Unity, or Xfce).
Fast user switching is a deal breaker for me on most of the desktop environments. In Unity it is best – you always have a menu with all users, and you can switch with a single click (assuming no passwords):

Unity user switching

On Gnome and Xfce it's quite bad. I need to click on "Switch User", select the other user, and click "Login" – all involving tiny buttons on different positions of the screen.

Is there a way of switching users quickly – preferably with a single click and/or a hotkey? Is there anything that would work regardless of desktop environment?

I've found a similar question: Keyboard shortcut to switch user accounts – but it only goes as far as the display manager. I want to skip it and switch to the other user's session.

Best Answer

  • Not a single click, but I can give you a keyboard shortcut solution.

    Go into the menu to set custom keyboard shortcuts

    and add a new one with this command:

    dm-tool switch-to-user suzi

    Assuming suzi is your wife's username, and set a shortcut of your choice by clicking where is says "disabled" and then pressing the key combination you want to use (for example, super+alt+S if the user's initial is S). Set another shortcut to switch to your own account (with your own username in the command).