Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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:

!

share|improve this question
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-92711864 Dec 13 '13 at 22:27
add comment

1 Answer 1

up vote 2 down vote accepted

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">
  <default>true</default>
  <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">
  <default>false</default>
  <summary>Determine the visibility of the User Menu</summary>
  <description>Allow for the user menu to be hidden by the user.</description>
</key>

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.

UPDATE:

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:

[com.canonical.indicator.session]
user-show-menu=false

The rest is the same: backup and compile.

share|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! –  TUadmin Dec 16 '13 at 15:45
    
Note, we did the override file option. –  TUadmin Dec 16 '13 at 16:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.