Procedure varies depending on which display manager is being used, but it's pretty simple in each case. For purposes of these instructions, I assume you're using the default display manager for your desktop.
GDM (Gnome Display Manager) - Gnome and Flashback. Autologin is an option under Settings > Users; admin password required to unlock the option. [Thanks, Pinhead, for the tip.] Alternatively, open /etc/gdm3/daemon.conf for editing.* Uncomment AutomaticLoginEnable = true (i.e., remove # at beginning of the line); uncomment next line (AutomaticLogin =) and add username of primary user. Save file, close text editor, and reboot to test.
LightDM - Cinnamon, Mate, XFCE, LXDE. Open /etc/lightdm/lightdm.conf for editing. Search for autologin-user=; uncomment line (remove #) and add username; also uncomment next line (autologin-user-timeout=0). Save file, close text editor, and reboot to test. As discussed below, it's not clear the second modification is needed, or even does anything, but it's the official Debian recommendation.
KDE - System Settings > Startup & Shutdown > Login Screen > Behavior (lower-center); also, blank password for KDE Wallet.
LXQt - Autologin can be set up manually. For example, sudo nano /etc/sddm.conf will create the file and open for editing. Add four lines per link. Save file and exit nano.
* For new users not familiar, Linux protects system files from inadvertent editing by requiring an administrative password. This can be done by switching to user-root or by prefixing the command with sudo (provided the user has admin privileges). One can switch to user-root with su - (enter root's password at the prompt), then (for example) nano /etc/gdm3/daemon.conf. Or, if sudo is enabled (default when installing with a live ISO, can be added post-installation with the standard installer), the command is sudo nano /etc/gdm3/daemon.conf. nano is a simple text editor, but adequate for config files and worth learning, as it's available in every Linux distribution and always works the same way. Navigate within the file with arrow keys; delete with backspace; type text the normal way. When done, type Ctrl-O (letter "O", for write-Out), tap Enter to confirm overwrite of filename, then Ctrl-X to exit nano. Alternatively, assuming sudo is enabled, each desktop permits config files to be edited with a GUI text editor, but details vary.
By the way, the Calamares installer used by the live ISOs has a check-box to enable autologin. Do not use this. I like the Calamares installer, but it has a bug on this point. Ticking that box creates a group called autologin which is assigned a group id (gid) of 1000, which should be the primary user's gid. Instead, you get a gid of 1001, which makes permissions of all your files non-standard. Takes less than a minute to enable autologin post-installation. Do it that way.
Edited to reflect feedback and to add a link for how to set up autologin manually in LXQt.
[HowTo] Enable Autologin
- pbear
- Posts: 564
- Joined: 2023-08-27 15:05
- Location: San Francisco
- Has thanked: 2 times
- Been thanked: 93 times
Re: [HowTo] Enable Autologin
Thanks, didn't see that in my research (Gnome isn't my primary desktop). To unpack it a little, autologin is an option under Settings > Users. Admin password required to unlock the option.
Interestingly (to me, at least), adds two lines to the config file, rather than editing the (commented out) lines already in place.
Interestingly (to me, at least), adds two lines to the config file, rather than editing the (commented out) lines already in place.
-
- df -h | participant
- Posts: 372
- Joined: 2021-08-06 12:45
- Location: Flanders
- Has thanked: 39 times
- Been thanked: 35 times
Re: [HowTo] Enable Autologin
Cinnamon : My “ default “ ??? settings Calamares installpbear wrote: 2024-04-09 04:59 .....
LightDM - Cinnamon, Mate, XFCE, LXDE. Open /etc/lightdm/lightdm.conf for editing with elevated privileges. Search for autologin-user=; uncomment line (remove #) and add username; also uncomment next line (autologin-user-timeout=0). Save file, close text editor, and reboot to test.
sudo nano /etc/lightdm/lightdm.conf
Code: Select all
greeter-session=lightdm-gtk-greeter
#greeter-hide-users=false
#greeter-allow-guest=true
#greeter-show-manual-login=false
#greeter-show-remote-login=true
user-session=cinnamon
#allow-user-switching=true
#allow-guest=true
#guest-session=
#session-wrapper=lightdm-session
#greeter-wrapper=
#guest-wrapper=
#display-setup-script=
#display-stopped-script=
#greeter-setup-script=
#session-setup-script=
#session-cleanup-script=
#autologin-guest=false
autologin-user=( my user name )
#autologin-user-timeout=0
#autologin-in-background=false
#autologin-session=
#exit-on-failure=false
1/ autologin-user= ( my user name ) is already “ uncommented .
2/ #autologin-user-timeout=0 not yet
Do you think I need to worry about anything?
ASUS GL753VD / X550LD / K54HR / X751LAB (1)
Firefox ESR / DuckDuckGo / Thunderbird / LibreOffice / eID Software
X751LAB (2)
assigned to Firefox ESR / Google Chrome / Printer&VueScan
Bookworm12.9_Cinnamon / Calamares Single Boot installations
Firefox ESR / DuckDuckGo / Thunderbird / LibreOffice / eID Software
X751LAB (2)
assigned to Firefox ESR / Google Chrome / Printer&VueScan
Bookworm12.9_Cinnamon / Calamares Single Boot installations
-
- Posts: 234
- Joined: 2021-08-13 19:55
- Location: Minnesota
- Has thanked: 9 times
- Been thanked: 44 times
Re: [HowTo] Enable Autologin
If you are not using a display manager and just running startx, you can use the following:
viewtopic.php?p=616305#p616305
viewtopic.php?p=616305#p616305
-
- Global Moderator
- Posts: 3252
- Joined: 2018-06-20 15:16
- Location: Colorado
- Has thanked: 69 times
- Been thanked: 288 times
Re: [HowTo] Enable Autologin
You can also mix this in a way I call 'by-tty'dlu2021 wrote: 2024-04-09 17:19 If you are not using a display manager and just running startx, you can use the following:
viewtopic.php?p=616305#p616305
It combines with my way of mounting auxiliary drives and tmpfs's according to user within ~/.profile, and having alternate user desktops available.
For example, a simple single user setup may be auto on tty1. For more variability tty1 could remain 'empty' for manual everything, but tty2+ can auto login a particular user. In some cases it's useful for multiple tty's to be active at once.
Mentioned before, since I always have a configuration suitable for the vm environment I dedicate tty2 to this common user with a desktop suited for a vm and tmpfs's for odd things like ~/Desktop or ~/Downloads.
I still haven't come up with a good reason for any DM.
Mottainai
- wizard10000
- Global Moderator
- Posts: 1333
- Joined: 2019-04-16 23:15
- Location: southeastern us
- Has thanked: 135 times
- Been thanked: 240 times
Re: [HowTo] Enable Autologin
Me neither
![Smile :)](./images/smilies/icon_smile.gif)
I add this to ~/.profile to startx on tty1:
Code: Select all
# startx if tty1
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
. startx
logout
fi
we see things not as they are, but as we are.
-- anais nin
-- anais nin
- pbear
- Posts: 564
- Joined: 2023-08-27 15:05
- Location: San Francisco
- Has thanked: 2 times
- Been thanked: 93 times
Re: [HowTo] Enable Autologin
Frankly, I got that part of the instructions from Debian Wiki and didn't test alternate settings. Will say, testing just now, commenting out the timeout=0 line (restoring the default) seems not to delay boot, which is what I assume uncommenting it is intended to prevent. That's booting a VM from SSD. Might be noticeable on a spinner. Or maybe the advice has become obsolete. Wouldn't expect it to be a problem in any event.