From 2dc746410a2d0d5548d8665be86508a9c5c995b3 Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 24 Mar 2019 22:07:32 +0000 Subject: [PATCH] autostart fix for display --- build_sdcard.sh | 7 ++++--- dietpi/boot/dietpi.txt | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 5f143bf..59906c8 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -157,9 +157,10 @@ if [ "${baseImage}" = "raspbian" ]; then fi if [ "${baseImage}" = "dietpi" ]; then - sudo bash -c "echo '[Service]' >> /etc/systemd/system/getty@tty1.service.d/dietpi-autologin.conf" - sudo bash -c "echo 'ExecStart=' >> /etc/systemd/system/getty@tty1.service.d/dietpi-autologin.conf" - sudo bash -c "echo 'ExecStart=-/sbin/agetty --autologin pi --noclear %I 38400 linux' >> /etc/systemd/system/getty@tty1.service.d/dietpi-autologin.conf" + # set DietPi to boot up automatically with user pi (for the LCD) + # requires AUTO_SETUP_AUTOSTART_TARGET_INDEX=7 in the dietpi.txt + # /DietPi/dietpi/dietpi-autostart overwrites /etc/systemd/system/getty@tty1.service.d/dietpi-autologin.conf on reboot + sudo sed -i 's/agetty --autologin root %I $TERM/agetty --autologin pi --noclear %I 38400 linux/' /DietPi/dietpi/dietpi-autostart fi # change log rotates diff --git a/dietpi/boot/dietpi.txt b/dietpi/boot/dietpi.txt index 7809172..fd6136c 100644 --- a/dietpi/boot/dietpi.txt +++ b/dietpi/boot/dietpi.txt @@ -102,7 +102,7 @@ AUTO_SETUP_WEB_SERVER_INDEX=-2 # DietPi-Autostart | Requires AUTO_SETUP_AUTOMATED=1 # After installation is completed, which program should the system boot to? # 0=Console 7=Console+auto root login | 1=Kodi 2=Desktops (LXDE/MATE etc) 5=DietPi-Cloudshell 6=Uae4ARM (Fastboot) 8=Uae4ARM (standard boot) 9=dxx-rebirth -AUTO_SETUP_AUTOSTART_TARGET_INDEX=0 +AUTO_SETUP_AUTOSTART_TARGET_INDEX=7 # 7=Console+auto root login is changed to pi in build_sdcard.sh # Language/Regional settings | Requires AUTO_SETUP_AUTOMATED=1 # Timezone eg: Europe/London America/New_York | Full list (TZ*): https://en.wikipedia.org/wiki/List_of_tz_database_time_zones