fix switch back from touchscreen

This commit is contained in:
Christian Rotzoll 2019-07-03 13:23:34 +02:00
parent b7a1c1da49
commit 84097e3cb6

View file

@ -31,7 +31,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# switch to desktop login
sudo raspi-config nonint do_boot_behaviour B4
# set user pi as autologin for lightdm
# set user pi user for autostart
sudo sed -i "s/^autologin-user=.*/autologin-user=pi/g" /etc/lightdm/lightdm.conf
sudo sed -i s'/--autologin root/--autologin pi/' /etc/systemd/system/getty@tty1.service.d/autologin.conf
sudo sed -i s'/--autologin admin/--autologin pi/' /etc/systemd/system/getty@tty1.service.d/autologin.conf
@ -77,6 +77,10 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
# switch back to console login
sudo raspi-config nonint do_boot_behaviour B2
# set user pi user for autostart
sudo sed -i s'/--autologin root/--autologin pi/' /etc/systemd/system/getty@tty1.service.d/autologin.conf
sudo sed -i s'/--autologin admin/--autologin pi/' /etc/systemd/system/getty@tty1.service.d/autologin.conf
# move back old LXDE autostart config
sudp rm /etc/xdg/lxsession/LXDE-pi/autostart
sudo mv /etc/xdg/lxsession/LXDE-pi/autostart.bak /etc/xdg/lxsession/LXDE-pi/autostart