How can I change the order of the users in the login screen?

I have several user accounts on a machine my mother uses most of the time. How can I sort the users so that her account shows up first in the list?

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

The login screen doesn’t simply sort by name. In fact, in lucid, the default login screen sorts first by usage frequency, and by display name as a fallback. So your mother will show up first after a few times.

Solution 2

I had the same problem, so I did an inquiry:

gdm simple greeter uses ConsoleKit for obtaining the list of users. you can check the list (in the gdm order) by running:

$ ck-history --frequent --seat='Seat1'
user1    148
user2    145
gdm      143

if ‘Seat1’ is not working, enter seat values from ‘ck-list-sessions’.

I do not know of a way to hand edit the ck-history list, but you can easily increase the frequency number for a logged in user e.g. by running (when user2 is logged in):

$ for n in `seq 1 10`; do echo exit|ck-launch-session; done

the numbers will change to

$ ck-history --frequent --seat='Seat1'
user2    155
user1    148
gdm      143

and the login screen user list will be reordered in the same way.

Solution 3

In response to both Gilles and Arancaytar’s solutions: they might both be right. I had the same problem as Arancaytar. The account I logged into most frequently was strangely at the bottom of the list. But after reading Gilles solution, I tried logging in not by clicking on my name in the user list, but by clicking on “Others”, manually typing my username, and then my password. After that I logged out to check, and my name was on the top of the user list. It seems like the login screen, for some strange reason, only records the frequency of logins when you manually enter your username. I haven’t confirmed this definitely though.

In short, for those still having problems, do this:

  1. Log out.
  2. Don’t log in by clicking your name in the list.
  3. Click on “Others” instead.
  4. Log in by manually entering your username.
  5. Log out to check if your name is now on top of the list.
  6. If not, repeat step 4 a few more times, and hopefully it’ll work.

Comment to say if this is successful for anyone else who still has problems!

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply