From 9ca0333bf4066216e3056c5d7e44a6eeff1dbb17 Mon Sep 17 00:00:00 2001 From: Fayaaz Date: Mon, 27 Jul 2020 00:56:50 +0100 Subject: [PATCH] Try and enable autologin to the desktop --- stage3/01-install-packages/00-packages-nr | 12 ++++++------ stage3/02-tweaks/01-run.sh | 14 ++++++++++++++ stage3/02-tweaks/files/010_pi-nopasswd | 1 + stage3/02-tweaks/files/autologin.conf | 3 +++ 4 files changed, 24 insertions(+), 6 deletions(-) create mode 100755 stage3/02-tweaks/01-run.sh create mode 100644 stage3/02-tweaks/files/010_pi-nopasswd create mode 100644 stage3/02-tweaks/files/autologin.conf diff --git a/stage3/01-install-packages/00-packages-nr b/stage3/01-install-packages/00-packages-nr index ffc324b..333655c 100644 --- a/stage3/01-install-packages/00-packages-nr +++ b/stage3/01-install-packages/00-packages-nr @@ -1,6 +1,6 @@ -xserver-xorg-video-fbdev xserver-xorg xinit xserver-xorg-video-fbturbo -mousepad -lxde lxtask menu-xdg -zenity xdg-utils -gvfs-backends gvfs-fuse -lightdm gnome-themes-standard-data gnome-icon-theme +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 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 new file mode 100755 index 0000000..2779683 --- /dev/null +++ b/stage3/02-tweaks/01-run.sh @@ -0,0 +1,14 @@ +# Enable ssh. +touch ${ROOTFS_DIR}/boot/ssh + +# Boot to gui by default +on_chroot << EOF + systemctl set-default graphical.target + ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service +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/010_pi-nopasswd b/stage3/02-tweaks/files/010_pi-nopasswd new file mode 100644 index 0000000..63b3566 --- /dev/null +++ b/stage3/02-tweaks/files/010_pi-nopasswd @@ -0,0 +1 @@ +pi ALL=(ALL) NOPASSWD: ALL diff --git a/stage3/02-tweaks/files/autologin.conf b/stage3/02-tweaks/files/autologin.conf new file mode 100644 index 0000000..951657a --- /dev/null +++ b/stage3/02-tweaks/files/autologin.conf @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM