
How to set up automatic login in Linux with GDM
April 9, 2023
First, make sure you are using the GDM display manager:
systemctl status display-manager
Line
gdm.service - GNOME Display Manager
confirms that this OS uses GDM.
Logging into Linux with GDM (style and background images may vary on other Linux distributions):
To enable automatic login with GDM, open the /etc/gdm3/daemon.conf file:
sudo gedit /etc/gdm3/daemon.conf
Find the lines in it:
# Enabling automatic login # AutomaticLoginEnable = true # AutomaticLogin = user1
Uncomment the second and third lines.
Then, on the third line, replace user1 with the Linux OS username that you want to be automatically logged in. You can find out the username with the following command:
echo $USER
In my case, the username is mial, then the lines look like this:
# Enabling automatic login AutomaticLoginEnable = true AutomaticLogin = mial
Reboot – after that, you should be automatically logged in without entering a password.
Related articles:
- How to enable automatic login in Linux (GDM, LightDM, SDDM) (100%)
- How to change Display manager and login screen in Linux (100%)
- How to migrate from X11 to Wayland? (100%)
- How to set up automatic login in Linux with SDDM (70%)
- How to set up automatic login in Linux with LightDM (70%)
- Error “trid: loadlocale.c:129: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed” (SOLVED) (RANDOM - 50%)