Tag Archives | RaspberryPi

Raspberry Pi, Raspbian Jessie (based on Debian Jessie) disable AutoLogin GUI & Console

I did NOT want my Raspbian Jessie install to automatically boot into the GUI, and I did Not want it to autologin.

I know I can run raspi-config to change it, but I like to script things! I finally tracked down the code for the new raspi-config that supports systemd. It can be found here .

Here are the commands to change what used to be the run level.

Console

systemctl set-default multi-user.target
ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service

Console Autologin

systemctl set-default multi-user.target
ln -fs /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service

Desktop

systemctl set-default graphical.target
ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
sed /etc/lightdm/lightdm.conf -i -e "s/^autologin-user=pi/#autologin-user=/"

Desktop AutoLogin

systemctl set-default graphical.target
ln -fs /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
sed /etc/lightdm/lightdm.conf -i -e "s/^#autologin-user=.*/autologin-user=pi/"

 

Hope that helps someone.

Powered by WordPress. Designed by WooThemes