User switching in the Linux desktop

Jack Wallen
Aug 3, 2010
Updated • Dec 5, 2012

Linux is a true multi-user system. What that means is you can have multiple users logged in concurrently. There are so many advantages of this on so many levels. Many modern Linux desktops and distributions take advantage of this multi-user environment from bottom to top. The bottom level (at the kernel) is not so obvious to the naked eye. At the top level (the desktop) the use of multi-user becomes quite apparent.

One way this is used is the ability to quickly and easily switch between users. The switching back and forth between users does not require User A or B to log out of the system. In fact, they can keep all of their applications running and when the system is switched back to them, everything will be just as they left it. It's as if they just locked their screen, stepped away, and came back to work. In this article I am going to show you how this is done - as well as what it takes to make it happen.

What you need

Obviously you need more than one user. Without more than one user you can't switch users. To illustrate this task I created a second user (one that I now often use for writing on Ghacks). That user is "Olivia Dunham" (from my favorite TV show Fringe - as if you had to guess). If you are going to be doing this for testing purposes you will first need to know about creating users. This is actually quite easy. But there is one thing you will want to look out for.

When you create a new user on a Linux system, by default, that user does not have any administration privileges. In a Ubuntu system this means they are not in the /etc/sudoers file. That user will not be able to install applications or do anything that requires root access. That is fine and good for standard users, but if that user does need admin privileges you need to be able to give it to them. To do this click on System > Administration >  Users and Groups.

Figure 1

In this new window select the user you need to edit and then click Advanced Settings.  After you give your admin password you will see the Advanced User Settings window. In this window click on the User Privileges tab (see Figure 1). In this tab make sure you check everything this new user needs to be able to do and then click OK. The user should now have the privileges they need.

Now, back to the user switching.

Making the switch

If you click on the "Power" icon in the upper right hand corner of the GNOME desktop a new menu will appear (see Figure 2).

Figure 2

What you see, in Figure 2, is a menu that lists all usable users on the system. To switch to a different user all you have to do is select that user. What happens this is the following:

  1. The system will lock your current session.
  2. You will see the login screen with the user you selected ready to log in.
  3. You will be prompted for that users' password.
  4. After you enter the password you will be logged in.

As you can see, in Figure 2, there is a check by my name. That check means that that user is already logged in. That means the switch will be fairly fast. If the user isn't logged in that means the switch will be slowed down by the users' desktop having to be loaded. If you switch back and forth between users a lot, just leave those users logged in.

Final thoughts

The switching of users on the Linux desktop perfectly illustrates the value of the true multi-user system. It's a very easy way to allow multiple users on a system at once and allow for quick switching back and forth of desktops.


Previous Post: «
Next Post: «


  1. max said on November 14, 2013 at 2:53 am

    I’m using Mint14 Mate (ubuntu)?
    cat /etc/X11/default-display-manager

    max: Mate Desktop
    maxcinnamon: Cinnamon Desktop
    maxlxde: LXDE Desktop
    maxkde: KDE Desktop
    Only LXDE and KDE desktops allow me to switch users from the logout menu
    I can access all desktops with ALT Fn
    The Mate Desktop Login/Out Menu displays an option to switch users but when I try
    I am told I’m not currently using mdm or Gnome Display Manager.
    The Mate Cinnamon Desktop does not even have an option to switch users.
    Kdm is obviously capable of switching because users running lxde and kde de’s can switch, but mate and cinnamon cannot.
    The only display manager running is kdm as root, so its not like they are using different display managers.

    Anyone know what I need to look into to find out why Mate and Cinnamon desktops will not alow me to switch users from the login menu? Is it as simple as installing a different login manager specifically for Mate or Cinnamon?

  2. paul(us) said on August 3, 2010 at 9:41 pm

    Which Olivia Dunham from this or the other reality? The redhead or the blond? Really good t.v. program who is getting better and better every season.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.