Automatically register Raspberry Pi without etc / inittab

I would like to configure my Raspberry Pi to automatically log in to a specific user. I googled this, and the solutions that I found concerned editing the / etc / inittab file. My problem now, I do not have this file, it seems to be missing in my version of Raspbian. Is there any other way to do this?

+7
raspberry-pi raspbian
source share
4 answers

I assume you are using the latest Raspian-Image (jessie). This is based on Debian 8 (jessie), where the init-system changed from sysvinit to systemd. I think this may have something to do with your problem. If you google: raspbian jessie auto login , you should find a solution to your problem.

pe 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 $username is your username

Then reboot.

Additionally:

If you want to start X-Server automatically, just add the following line at the end of your ~ / .profile

 [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx 
+4
source share

My autologin.conf file is displayed below. Pay attention to %I , my pi hangs differently:

 [Service] ExecStart= ExecStart=-/sbin/agetty --autologin pi --noclear %I 38400 linux 
+4
source share

I found this and this is the only thing that worked for me.

Auto Login for LightDM

Open a terminal and first make a backup copy of the file that we will edit:

 su - gedit /etc/lightdm/lightdm.gedit /etc/lightdm/lightdm.conf.back 

Now edit 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 this command now for the change to take effect:

 dpkg-reconfigure lightdm 
+1
source share

I am using raspi-config :

 pi@raspberrypi :~ $ sudo raspi-config Created symlink /etc/systemd/system/default.target → /lib/systemd/system/graphical.target. 

Here a menu appears in which you select Boot Options , then something along the lines of B1 Boot Desktop Options and finally, you select several options for automatic login.

See: https://raspberrypi.stackexchange.com/questions/48241/auto-login-in-jessie-how

0
source share

All Articles