This simple tutorial shows how to automatically login a user account in Ubuntu 24.04 and its flavors, such as KUbuntu 24.04, XUbuntu 24.04, Ubuntu MATE 24.04, and Ubuntu Unity 24.04.
The auto login feature is handled by the display manager service in most Linux. It varies depends on your desktop environment and user configuration.
Here I’m going to show you how to enable this feature, either using graphical setting option or by editing config file from command line. Choose either one that you prefer.
Most Desktop Environments provide their own setting options for enable this behavior.
For the default GNOME Desktop, simply press Super (Windows Logo) + S to trigger top-right system status menu (aka Quick Settings), then click open “Settings”.
Then, navigate to System in left, and click on Users in right. Click “Unlock” and type your password to authenticate. Finally, select the user account and turn on the “Automatic Login” option for it.
For Ubuntu 22.04 and earlier, “Users” setting is available in left rather than ‘System’ page.
For Ubuntu MATE 24.04, just launch Control Center from start menu. When it opens, navigate to Administration -> MATE User Manager.
In the next dialog, choose your user account, click “Unlock” and authenticate with your password, finally turn on the “Automatic login” toggle option.
For KUbuntu and Ubuntu Studio with Plasma Desktop, launch System Settings then search & open Login Screen from left.
Then click Behavior button in bottom, finally turn on “Automatically log in” checkbox, choose username and session. For choice, you may enable “Log in again immediately after logging off”.
For the Unity desktop, open Settings and navigate to User Accounts. In pop-up dialog, click “Unlock” (need authenticate with user password), choose user from left, and finally turn on “Automatic Login” toggle option.
For Cinnamon Desktop environment, open System Settings and click Login Window under Administration section.
In pop-up dialog, switch to Users tab. Under “Automatic login”, inset the username you want to login automatically, and type a number if you want to delay the login with a few seconds.
For XUbuntu, LUbuntu, and other Linux Desktop that you cannot find a graphical option, here’s how to enable auto login by editing the config file.
Each desktop environment has its own default display manager. They are:
In case you’ve changed something, you can press Ctrl+Alt+T to open terminal, and run command to check which display manager is currently in use:
systemctl status display-manager
1. For gdm3 display manager that’s in use by default in GNOME Desktop, open up a terminal window (press Ctrl+Alt+T in Ubuntu), and run command to edit the config file:
sudo editor /etc/gdm3/custom.conf
Replace editor with your system text editor, or use nano that works in most Linux.
2. When file opens in text editor, add following line (or un-comment the lines by removing # at the beginning) under [daemon] section (replace user “ji” to yours):
AutomaticLoginEnable = true AutomaticLogin = YOUR_USERNAME
Or, use the lines below instead that auto-login with delay:
TimedLoginEnable = true TimedLogin = YOUR_USERNAME TimedLoginDelay = 10
Finally, press Ctrl+S to save file, Ctrl+X to exit. The change will apply in next boot.
1. For LightDM that is default in XUbuntu, Ubuntu MATE, Ubuntu Unity, and Ubuntu Cimmaon, open terminal (Ctrl+Alt+T) and run command:
sudo editor /etc/lightdm/lightdm.conf.d/autologin.conf
The command will create a “autologin.conf” file (change name to whatever as you want) under /etc/lightdm/lightdm.conf.d directory, and edit with system default command line nano text editor.
2. When file opens, add following lines and save it:
[SeatDefaults] autologin-user=YOUR_USER_NAME autologin-user-timeout=5
Here autologin-user-timeout=5 is optional to show login-screen for 5 seconds until auto-login, in case you want to log into another user. When done editing, press Ctrl+S to save, and Ctrl+X to exit.
1. For SDDM display manager that is default in KUbuntu, Ubuntu Studio, LUbuntu, run the command (Ctrl+Alt+T) below instead to edit config file:
sudo editor /etc/sddm.conf.d/auto-login.conf
Or edit /etc/sddm.conf if your system have it out-of-the-box.
2. When file opens, in text editor add following lines (skip [Autologin] if already exist):
[Autologin] User=YOUR_USER_NAME Relogin=true
Here Relogin=true is optional feature that automatically log in back once you log out. Sadly, SDDM seems not supporting auto-login delay at the moment of writing. See this request page.
When done editing the file, press Ctrl+S to save file and Ctrl+X to exit. Auto-login will apply at next boot.
The post Enable Automatic Login in Ubuntu 24.04 & Flavors appeared first on Osgrove.
Previously I have written about how useful public cloud storage can be when starting a…
This is Part 2 of the "Karafka to Async Journey" series. Part 1 covered WaterDrop's…
For many software teams, documentation is written after features are built and design decisions have…
With the release of the FIPS 140-3 certified cryptographic modules for Ubuntu 22.04 LTS, Canonical…
Open source libraries are repositories of code that developers can use and, depending on the…
Last year, we had the opportunity to speak at Regent’s UX Conference (Regent’s University London’s…