GNOME (GDM) equivalent to LightDM's "dm-tool"
Olivia Zamora
In my old Ubuntu 16.04 installation, I had the command
dm-tool switch-to-user <spouseusername>mapped to F1 so that my wife could easily jump onto her account on the family computer. Now having upgraded to 19.10 which uses GNOME, that command no longer works.
What is the equivalent CLI command on GNOME to jump into another user's session?
81 Answer
You can go to the GDM greeter by pressing Ctrl+Alt+F1 without logging out the current user. From there it's quite intuitive to login as another user.
To mimic this from the command-line you can use xdotool. First install it by running
sudo apt install xdotoolThen the following would mimic the aforementioned key-combination
xdotool key ctrl+alt+F1You can assign this command to the F1 key in the 'keyboard shortcuts' option in Settings.
2