diff --git a/debian/changelog b/debian/changelog index e19c66d1..e06d6e66 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ livecd-rootfs (24.04.13) UNRELEASED; urgency=medium * Drop support for building armhf+raspi images; as of noble these are arm64-only. + * live-build/ubuntu/hooks/020-ubuntu-live.chroot_early: move code here + from scripts/casper-bottom/61desktop_canary_tweaks that should be done + statically at image build time, not at boot. -- Steve Langasek Fri, 08 Dec 2023 18:35:20 -0800 diff --git a/live-build/ubuntu/hooks/020-ubuntu-live.chroot_early b/live-build/ubuntu/hooks/020-ubuntu-live.chroot_early index 042cc9a8..905cac96 100755 --- a/live-build/ubuntu/hooks/020-ubuntu-live.chroot_early +++ b/live-build/ubuntu/hooks/020-ubuntu-live.chroot_early @@ -17,3 +17,37 @@ EOF cat < /etc/initramfs-tools/conf.d/default-layer.conf LAYERFS_PATH=${PASS}.squashfs EOF + +# change settings to have an 'installer only' session by default +printf "[org.gnome.desktop.a11y]\nalways-show-universal-access-status=true\n" \ + >> /usr/share/glib-2.0/schemas/casper.gschema.override +# we can't unload the dock because the shell would enter the overview on login; +# https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1788 +printf "[org.gnome.shell.extensions.dash-to-dock:ubuntu]\ndock-fixed=false\nintellihide=false\n" \ + >> /root/usr/share/glib-2.0/schemas/casper.gschema.override +printf "[org.gnome.shell]\ndisabled-extensions=['ding@rastersoft.com']\n" \ + >> /root/usr/share/glib-2.0/schemas/casper.gschema.override + +glib-compile-schemas /usr/share/glib-2.0/schemas/ +# start the installer on session start, restore normal session on close + +cat > /usr/lib/systemd/user/ubuntu-desktop-installer.service << EOF + +[Unit] +Description=Ubuntu Desktop Installer +PartOf=graphical-session.target +After=graphical-session.target + +# Never run in GDM +Conflicts=gnome-session@gnome-login.target + +[Service] +Type=oneshot +ExecStart=/snap/bin/ubuntu-desktop-installer --try-or-install +ExecStopPost=sh -c "gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed true; gsettings set org.gnome.shell.extensions.dash-to-dock intellihide true; gnome-extensions enable ding@rastersoft.com" +Restart=no +EOF + +mkdir /etc/systemd/user/graphical-session.target.wants/ +ln -s /usr/lib/systemd/user/ubuntu-desktop-installer.service \ + /etc/systemd/user/graphical-session.target.wants/