Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

On login screen i have two options: my default user (let's say User1) and "Other User". When i work as "Other user" and make "Log out", on logon screen the 'active' one is "Other User". I wish that after every log out/reboot/start the active one is my default user. Is it possible to set default user on login screen? Thx for help in advance.

Regards, A

share|improve this question
    
I'm not sure I understand what you're trying to do. Do you want to automatically login as a user? You can do that by setting up automatic login. OR you want that every time you logout, you want the login screen to display only your user account? If that's what you want, why not just remove the other user accounts and set a single user account? –  Peachy Jul 4 '12 at 8:13

1 Answer 1

Seems like you posted this on Ubuntu forums too... I am not sure whether there's a proper solution to this question. One thing is obvious that we have to mess with lightdm configuration files in /etc/lightdm to get this done, at least to some extent.

I have tried messing with users.conf file, but so far I had no luck in doing it. I tried it with Guest, but may be you could have some luck in case of other users, especially if this user you want to have as default has more permissions and access than others.

What I did was this:

This is the how my original users.conf file looked like:

# User accounts configuration
#
# NOTE: If you have AccountsService installed on your system, then #LightDMwill
# use this instead and these settings will be ignored
#
# minimum-uid = Minimum UID required to be shown in greeter
# hidden-users = Users that are not shown to the user
# hidden-shells = Shells that indicate a user cannot login
#
[UserAccounts]
minimum-uid=500
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/sbin/nologin

I tried changing it to something like this:

# User accounts configuration
#
# NOTE: If you have AccountsService installed on your system, then LightDM will
# use this instead and these settings will be ignored
#
# minimum-uid = Minimum UID required to be shown in greeter
# hidden-users = Users that are not shown to the user
# hidden-shells = Shells that indicate a user cannot login
[UserAccounts]
uid < 1001
IncludeAll = true
Include = myuserhere
hidden-users=guest Guest

The UID for my account was 1000, so I used 1001 over there...

You can use

id

command to check your own uid and may be you can set the settings in the file like this too:

uid=1000

I am not sure whether this would work or not.

However, the above configuration didn't work. I think we have to tweak something little more over there to get what you want. Please look at this question to get some idea how to configure these files: How can I change the default user shown in the login screen?

The above question is about gdm and not lightdm, but the settings must be pretty much similar. So, you are on your own after that. Refer to this manual before you change them: http://people.ubuntu.com/~robert-ancell/lightdm/reference/

Also, make sure you take a backup of those conf files, because messing with lightdm sometimes kills your time better than anything else. Make sure you change to CLI using Alt + F2/F1 etc. and restore your backup if you break the whole thing.

Good luck!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.