We are looking for a way to permanently remove the Switch User Account function from our install of Ubuntu Unity. Note, this function appears when you right or left click on the user name in the upper right-hand corner. It then displays a list of 5-10 users that have logged in along with the option to Switch User Account. We know that we can do this by defaulting to gnome, but we would like the option of using Unity as well, but without the Switch User Account option.

We have already tried dconf-editor, gsettings and several other options to remove the users name list, Switch User Account option from appearing in the drop-down list. We know this can be done for one user at a time, but we are wanting to do this for all users on roughly 160 workstations.

Some options that we have already tried are:

This is a visual of what we are trying to remove:


  • 1
    I'm not sure if this is what your looking for based on your question, but Ubuntu Tweak has a option that will let you remove the user indicator that you circled in red. – Paul Tanzini Dec 13 '13 at 22:27
  • This is a somewhat messy/incomplete workaround. If you enter the guest account directly from the active account, then exit the guest account, you are able to login to a different user. – user365207 Jan 6 '15 at 18:46

Have you tried editing the /usr/share/glib-2.0/schemas/com.canonical.indicator.session.gschema.xml file simply changing this:

<key type="b" name="user-show-menu">
  <summary>Determine the visibility of the User Menu</summary>
  <description>Allow for the user menu to be hidden by the user.</description>
</key> </code>

to this (true to false):

<key type="b" name="user-show-menu">
  <summary>Determine the visibility of the User Menu</summary>
  <description>Allow for the user menu to be hidden by the user.</description>

Then make a backup of /usr/share/glib-2.0/schemas/gschemas.compiled Then run

sudo glib-compile-schemas /usr/share/glib-2.0/schemas

Normally this would set it as default for all users.


Florian Diesch pointed out in the comments that it is better to write an override file, because the .xml could be overwritten in an update, thus or settings will be lost. So instead of directly modifying the gschema.xml make a /usr/share/glib-2.0/schemas/myoverride.gschema.override file with the following contents:


The rest is the same: backup and compile.

| improve this answer | |
  • 2
    Better use an override file instead of editing the .xml file as a package update may overwrite the .xml file. – Florian Diesch Dec 14 '13 at 0:43
  • @FlorianDiesch Thx for that info. – falconer Dec 14 '13 at 6:41
  • This seems to have done the trick for all users that are logging in for us. Thank you! – jnlickey Dec 16 '13 at 15:45
  • Note, we did the override file option. – jnlickey Dec 16 '13 at 16:03

This is slightly different in 14.04 Unity (3D):


And sysadmins probably want to set it in /etc/dconf, maybe even lock it. See dconf System Administrator Guide for more.

| improve this answer | |

Colleague of mine just figured out a workaround for this in Ubuntu 16.04 LTS, by appending the following to /etc/bash.bashrc

gsettings set com.canonical.indicator.session user-show-menu false

This way when any user login occurs the switch user menu does not appear.

| improve this answer | |

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.