Skip to content

Commit

Permalink
Fix gui module to boot to graphical.target and work with rpi-imager R…
Browse files Browse the repository at this point in the history
  • Loading branch information
guysoft committed Jul 21, 2024
1 parent e6756d3 commit c85213f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/modules/gui/end_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,19 @@ install_cleanup_trap
sed -i 's/#user-session=.*/user-session=guisession/g' /etc/lightdm/lightdm.conf
# This is now down as a systemd service to handle username conf on boot
sed -i 's/#autologin-user=.*/autologin-user=UID_1000_PLACEHOLDER/g' /etc/lightdm/lightdm.conf

systemctl enable update_lightdm_conf.service

# cancel-rename overrides auto login see https://github.com/RPi-Distro/pi-gen/issues/780
if [ "${BASE_DISTRO}" == "raspbian" ] || [ "${BASE_DISTRO}" == "raspios64" ] || [ "${BASE_DISTRO}" == "raspios" ]; then
mkdir -p /var/lib/userconf-pi
touch /var/lib/userconf-pi/autologin
fi

# set the gui to run the main script of the GUI session
sed -i "s@GUI_SESSION_PLACEHOLDEFR@${GUI_STARTUP_SCRIPT}@g" /opt/custompios/scripts/start_gui

# Set the boot target to use a gui
systemctl set-default graphical.target

rm -r /usr/sbin/policy-rc.d || true

0 comments on commit c85213f

Please sign in to comment.