Skip to content

Commit c85213f

Browse files
committed
Fix gui module to boot to graphical.target and work with rpi-imager RPi-Distro/pi-gen#780
1 parent e6756d3 commit c85213f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/modules/gui/end_chroot_script

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,19 @@ install_cleanup_trap
1111
sed -i 's/#user-session=.*/user-session=guisession/g' /etc/lightdm/lightdm.conf
1212
# This is now down as a systemd service to handle username conf on boot
1313
sed -i 's/#autologin-user=.*/autologin-user=UID_1000_PLACEHOLDER/g' /etc/lightdm/lightdm.conf
14+
1415
systemctl enable update_lightdm_conf.service
1516

17+
# cancel-rename overrides auto login see https://github.com/RPi-Distro/pi-gen/issues/780
18+
if [ "${BASE_DISTRO}" == "raspbian" ] || [ "${BASE_DISTRO}" == "raspios64" ] || [ "${BASE_DISTRO}" == "raspios" ]; then
19+
mkdir -p /var/lib/userconf-pi
20+
touch /var/lib/userconf-pi/autologin
21+
fi
22+
1623
# set the gui to run the main script of the GUI session
1724
sed -i "s@GUI_SESSION_PLACEHOLDEFR@${GUI_STARTUP_SCRIPT}@g" /opt/custompios/scripts/start_gui
1825

26+
# Set the boot target to use a gui
27+
systemctl set-default graphical.target
28+
1929
rm -r /usr/sbin/policy-rc.d || true

0 commit comments

Comments
 (0)