How can I change the default user shown in the login screen?

Yep that is easy :

Open the GDM custom configuration file :

gksudo gedit /etc/gdm/custom.conf

Should have a lot of comment and at the end look like this :

[daemon]

[security]

[xdmcp]

[gui]

[greeter]

[chooser]

[debug]

[servers]

You'll have to add few lines under greeter like this :

[daemon]

[security]

[xdmcp]

[gui]

[greeter]
# If true show all the users, if false show the last connected users
IncludeAll=false
# User to always show in the user list
Include=somebody,somebodyelse

[chooser]

[debug]

[servers]

Just replace "somebody,somebodyelse" by whatever you want, save the file and reboot and it should work.

More info here : http://library.gnome.org/admin/gdm/2.32/gdm.html


In 15.10, you can go:

  • System settings
  • User accounts
  • Unlock (top right corner)
  • Select user
  • Click automatic login

This unchecks automatic login for other users, and automatically logs into that user without a password.

If you are worried about not having a password, encrypt your disk instead (will ask for a password before login screen). If an attacker gets your hardware, the login password alone will be useless (he can just mount your partition).