5

Ubuntu unity displays users list: enter image description here

I know that I can switch off this, using

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

or by using the dconf tools.

It works, but every user in the system has to do that, if he doesn't want to see all users list from system.

Do you know, how (and where) to set up this to not show users in menu as a default setting?

grooveplex
  • 2,486
  • 2
    For setting it globally see /usr/share/glib-2.0/schemas or use an "override" file and new users: http://askubuntu.com/questions/65900/how-can-i-change-default-settings-for-new-users For current users you could put a gsettings in autostart (and you can remove it after said users have logged in once). – Rinzwind Jul 30 '16 at 08:50

1 Answers1

5
  1. Copy the code below into an empty, file, save it as nouserinfo.desktop:

    [Desktop Entry]
    Type=Application
    Exec=/bin/bash -c "sleep 10 && gsettings set com.canonical.indicator.session user-show-menu false" 
    Name=NoUserInfo
    
  2. Copy the file to /etc/xdg/autostart

From now on, the default will be set to not show the users. The setting will be applied shortly after log in.

Explanation

  • The command to disable the list can be run on log in, by placing a .desktop file that runs your command in ~/.config/autostart. This will however only run for one user.
  • If you do the same, but put the .desktop file in /etc/xdg/autostart, the command will be run, equally what user logs in.
  • The sleep 10 is to make sure the command runs when the desktop is ready for it.

Exclude one user?

Simply put the file below in the user's ~/.config/autostart:

[Desktop Entry]
Type=Application
Exec=/bin/bash -c "sleep 15 && gsettings set com.canonical.indicator.session user-show-menu true"
Name=NoUserInfo

Local versions of global .desktop files will overrule the global ones, also on Startup Applications' .desktop files.

Jacob Vlijm
  • 83,767