Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 2802  / 2 Years ago, tue, january 25, 2022, 2:47:46

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:



!


More From » unity-2d

 Answers
1

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.


[#27983] Thursday, January 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mentpengu

Total Points: 148
Total Questions: 114
Total Answers: 119

Location: Anguilla
Member since Sun, Aug 7, 2022
2 Years ago
mentpengu questions
Sun, Apr 17, 22, 18:09, 2 Years ago
Fri, Aug 12, 22, 01:35, 2 Years ago
Tue, Jul 26, 22, 14:52, 2 Years ago
;