In spite of setting auto-login in the Xubuntu settings (XFCE/System/Users and Groups) I have to login each time when I start up the computer. How can this be changed?
In spite of setting auto-login in the Xubuntu settings (XFCE/System/Users and Groups) I have to login each time when I start up the computer. How can this be changed?
Type in a terminal (e.g. Xubuntu, Ubuntu Server with XCFE (e.g. Raspberry PI 3):
sudo -e /etc/lightdm/lightdm.conf
(Better than
sudo nano /etc/lightdm/lightdm.conf
orsudo mousepad /etc/lightdm/lightdm.conf
, see below the reasoning* - Thank you red_trumpet for the hint)Add these lines to the file:
You could use e.g. file /etc/lightdm/lightdm.conf.d/autologin-xubuntu.conf, instead, but then you should make sure settings in another file in that directory or in file /etc/lightdm/lightdm.conf do not override it.
For GDM-Users
The config file is located
/etc/gdm3/custom.conf
(according to the other answer, please vote Arbuntu's answer up if you found it helpful):Uncomment the following lines (delete the
#
) and fill in your user name:Extra:
To remove password on resume, right-click the system tray power icon then Preferences. This brings up the XFCE power manager (Alternatively you can navigate to XFCE/Settings/Settings Manager/Power Manager). Click Extended in the left pane. Uncheck Lock screen when going for suspend/hibernate.
The last place is XFCE/System/Users and Groups. If it's set "Password: Asked on login" you can change it, and thereafter, if you logout or switch user, you can get back without entering password.
*Reason for using sudo -e instead of the editor directly:
sudo -e copies the file with user privileges, and opens it with your preferred editor. After saving, the file gets copied back to the original file. In this way, the editor does not obtain root privileges, which is a security improvement. (And if configured correctly, your preferred editor is chosen automatically, which is quite convenient).
Sources: lightdm/Read.me, Ubuntu Forum, SuperUser
Click on Settings --> Users and Groups
Next to Password, click on Change
Click on Don't ask for password on login
Things appear to have changed a bit since the accepted answer was written. Under Xubuntu 16.04 the settings have moved to
and they look like this
In Ubuntu 20.04 with Xubuntu Minimal Desktop
Open a terminal and paste this, it is the same route that you have put @phil294 in an answer above
We will find these lines
You just have to paste this autologin with your username (in lowercase)
It will look like this
To save in the nano editor
Ctrl + o ==> Enter
To exit the editor
Ctrl + x
The next time you log in, the LightDM window will no longer appear
After following @Filbuntu's answer, I had to do two more things to make this work.
First, I thought the
autologin-session
parameter was just an alias name so I just putxubuntu
, but turns out it should be a valid xsession name. You can see the ones available as files inside/usr/share/xsessions
. The session name should be the filename without the.desktop
part. In my case I had the following files inside/usr/share/xsessions
:My
lightdm.conf
file ended up like this:The second thing, I am not sure if it is required or not, but I looked in LightDM's logs (
journalctl -u lightdm
) and saw the following line:So to fix it I added my user to this group:
Now autologin works as expected.
I'm using xubuntu with GDM so the config file is located below
Find out below lines then uncomment them and fill out your user name
Mine is a GUI answer to the Auto Login question.
The sequence is Settings/Details/Users.
To get into Settings, click in the top right corner of your screen. A small box will open with three icons across the bottom.
Settings is on the left, it resembles a mosquito but is actually a crossed wrench and screwdriver.
When Settings opens you might be anywhere in the system. Look at the top. If it doesn't say Settings, click on the Left Arrow (<) in the top left of the screen. That will take you to Settings. Details is at the bottom of the left hand column. Users is the third option down. To make any changes you need to Unlock the screen by clicking on the Unlock button in the top right corner, enter your password to enable changes. You can add Users, change the password, and turn Auto Login ON or Off.
auto login is described here:
Not an answer to the question but related for folks in this thread: if you want to turn this OFF: make a backup of lightdm.conf, then change lightdm.conf to:
Why this can't be in the GUI, I don't know.