Autologin and start X11

I have full disk encryption enabled and so don't want to have to type my disk encryption password and then log in as my user immediately afterwards.

Install xlogin

For Arch Linux it's in the AUR

systemctl enable xlogin@username

I found that this would not work, X wouldn't actually start. Examining the logs in /var/log/Xorg.0.log (or /var/log/Xorg.0.log.old if you manually start X before digging around) I could see that X11 couldn't find any display outputs. So I added a kludge: in /etc/systemd/system/x@.service.d/wait.conf (which you will need to create):

ExecStartPre=/bin/sleep 3

There's probably a better way to do this - maybe the x service needs some dependency it doesn't have? But this has worked fine for me for a long time.

↩ Home