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?

1
  • 2
    For setting it globally see /usr/share/glib-2.0/schemas or use an "override" file and new users: askubuntu.com/questions/65900/… 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, 2016 at 8:50

1 Answer 1

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.

4
  • you may want to add Terminal=false option. Jul 30, 2016 at 8:39
  • 1
    @Serg Terminal=false is the default :) Jul 30, 2016 at 8:42
  • @Jacob Vlijm Thank you! :) It was very helpful :)
    – Krzysztof
    Jul 30, 2016 at 9:22
  • @Krzysztof you are very welcome :) Jul 30, 2016 at 9:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .