From 3d6d47f8fd09b871cc8ef4d7d4e997e3c10c4b65 Mon Sep 17 00:00:00 2001 From: Fayaaz Date: Mon, 27 Jul 2020 18:36:31 +0100 Subject: [PATCH] Fix the autologin to desktop --- stage3/01-install-packages/00-packages-nr | 2 +- stage3/02-tweaks/01-run.sh | 2 +- stage3/02-tweaks/files/autologin.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stage3/01-install-packages/00-packages-nr b/stage3/01-install-packages/00-packages-nr index 7bbc9e1..333655c 100644 --- a/stage3/01-install-packages/00-packages-nr +++ b/stage3/01-install-packages/00-packages-nr @@ -2,5 +2,5 @@ git xserver-xorg-video-fbdev xserver-xorg xinit xserver-xorg-video-fbturbo xserver-xorg-legacy xscreensaver lxde lxtask menu-xdg # gksu xdg-utils gvfs-backends gvfs-fuse -lightdm gnome-themes-standard-data gnome-icon-theme +lightdm gnome-themes-standard-data gnome-icon-theme i3 i3status liblo7 liblo-dev libasound-dev libjack-jackd2-dev diff --git a/stage3/02-tweaks/01-run.sh b/stage3/02-tweaks/01-run.sh index 684f4ee..816c060 100755 --- a/stage3/02-tweaks/01-run.sh +++ b/stage3/02-tweaks/01-run.sh @@ -5,11 +5,11 @@ touch ${ROOTFS_DIR}/boot/ssh on_chroot << EOF 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=.*/autologin-user=pi/" EOF install -m 644 files/autologin.conf ${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d/autologin.conf - # Set up sudoers.d for user patch rm -f ${ROOTFS_DIR}/etc/sudoers.d/010_pi-nopasswd install -m 440 files/010_pi-nopasswd ${ROOTFS_DIR}/etc/sudoers.d/ diff --git a/stage3/02-tweaks/files/autologin.conf b/stage3/02-tweaks/files/autologin.conf index 951657a..327185b 100644 --- a/stage3/02-tweaks/files/autologin.conf +++ b/stage3/02-tweaks/files/autologin.conf @@ -1,3 +1,3 @@ [Service] ExecStart= -ExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM +ExecStart=-/sbin/agetty --autologin pi --noclear %I $TERM