3

I'm trying to customize my Ubuntu installation using gsettings but upon new changes nothing happens using the gsettings command.

For example I go to the terminal and I type

gsettings set org.gnome.desktop.login-screen disable-user-list true

This should disable the user list at login screen so users have to manually input both their username and password in order to login. Upon logging out I see there has been no changes. Upon adding sudo to the start of the command, still nothing. I even downloaded dconf-editor GUI using

apt-get install dconf-editor

to see if I could change settings that way through the GUI, still nothing. Although the changes seemed to register, there was no changes to the login screen, a user list was still available upon logging in.

I then stumbled upon a RedHat guide (here) that explained doing this a different way. It mentions manually creating/editing files in order to change settings. This involved creating a new profile in /etc/dconf/profile followed by creating a new database in /etc/dconf/db/gdm.d/00-login-screen. I had to create several files/folders that otherwise were not here to get to this point. I then updated dconf using the dconf update command. I logged out and the changes had been made.

My question is;

Why did it work changing gsettings manually as opposed to simply typing in the command into the terminal? How can I make such changes with a one line command like gsettings set org.gnome.desktop.login-screen disable-user-list true? Upon experimentation with other settings I found I can change the wallpaper using the seemingly more simpler gsettings command and I did not have to create files/folders and do more work. I'm not against the latter method. In fact I found it refreshing.

I'm just wondering why this happened? Why did it only work this way around?

pomsky
  • 68,507
customcup
  • 351
  • I think it should be gsettings set org.gnome.login-screen disable-user-list true – nobody May 05 '20 at 16:36
  • 2
    You have to remember that Unix/Linux is inherently a multi-user / multi-seat OS. It wouldn't really make sense for an individual's dconf settings to affect things "above" their session, such as the display manager login screen. For some insight into the database hierarchy see for example https://developer.gnome.org/dconf/unstable/dconf-overview.html – steeldriver May 05 '20 at 16:40

1 Answers1

3

You were changing configuration using gsettings for your user. GDM doesn't run as your user, but uses an account made for it (usually called gdm). That setting has to be changed for the gdm user.

Something like

# as root, or with sudo
su --shell /bin/bash --login gdm
# in gdm's shell
dbus-launch --exit-with-session gsettings set org.gnome.login-screen disable-user-list true
muru
  • 197,895
  • 55
  • 485
  • 740