I would like to settup my Raspberry Pi to auto login in a specific user. I googled this and the solutions that i found were about editing the /etc/inittab file. My problem is now i dont have that file, it appears to be missing in my version of Raspbian. Is there another way to do this?
-
what version of raspian do you have installed? what is the sessionmanager? – Tom Mekken Nov 17 '15 at 11:48
-
Raspbian GNU/LINUX 8 – ADTank Nov 17 '15 at 12:06
-
https://raspberrypi.stackexchange.com/questions/48241/auto-login-in-jessie-how – Hack-R Feb 12 '18 at 01:56
4 Answers
My autologin.conf file appears as below. Note the %I
, my pi hangs otherwise:
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin pi --noclear %I 38400 linux
-
3Not sure why this was downvoted. The solution @TomMekken 's solution didn't work for me, but @Steve 's did. For me the "extra" `ExecStart=` was critical. – Aaron Aug 23 '16 at 12:01
-
I assume you're using the latest Raspian-Image (jessie). This one is based on Debian 8 (jessie) where the init-system changed from sysvinit to systemd. I think that it could have something to do with your problem. If you google: raspbian jessie auto login
you should find a solution for your problem.
p.e. this link provides a possible solution:
$ sudo -i
# mkdir -pv /etc/systemd/system/getty@tty1.service.d
# nano /etc/systemd/system/getty@tty1.service.d/autologin.conf
insert the following text:
[Service]
ExecStart=-/sbin/agetty --autologin $username --noclear I 38400 linux
make sure that $username
is your username
Then reboot.
optional:
If you want to start the X-Server automatically, just add the following line at the end of your ~/.profile
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

- 1,019
- 1
- 12
- 27
-
3
-
Raspbian works a little differently, please see my answer and its link to the Raspberry Pi SE – Hack-R Feb 12 '18 at 02:03
I found this, which is the only thing that worked for me.
Automatic Login for LightDM
Open the terminal and make first a backup of the file we are going to edit:
su -
gedit /etc/lightdm/lightdm.gedit /etc/lightdm/lightdm.conf.back
Edit now this file:
gedit /etc/lightdm/lightdm.conf
or
nano /etc/lightdm/lightdm.conf
Uncomment these two lines:
autologin-user=USERNAME
autologin-user-timeout=0
Replace USERNAME with your own username. Save the file and exit. Run now this command so that changes are taken into effect:
dpkg-reconfigure lightdm

- 21
- 1
I use raspi-config
:
pi@raspberrypi:~ $ sudo raspi-config
Created symlink /etc/systemd/system/default.target → /lib/systemd/system/graphical.target.
There's a menu that comes up wherein you select Boot Options
then something along the lines of B1 Boot Desktop Options
and finally you select among several auto login options.
See: https://raspberrypi.stackexchange.com/questions/48241/auto-login-in-jessie-how

- 22,422
- 14
- 75
- 131
-
1This is by far the easiest option. Boot Options > Desktop / CLI > Console Autologin. The symlink wasn't necessary -- just launch raspi-config and select the option. – itnAAnti Jun 04 '18 at 15:49