From 8deb29686e266b7ca8aeebc549c93f5fb53b34f7 Mon Sep 17 00:00:00 2001 From: "Steven L. Speek" Date: Wed, 21 Aug 2024 14:31:20 +0200 Subject: [PATCH] gnome shortcuts in live --- Makefile | 4 +- bin/live-build.sh | 3 +- package-lists/desktop | 1 - package-lists/essential-cli-tools | 3 -- package-lists/machine-label | 2 + package-lists/printing | 1 + .../lib/live/config/1040-gnome-shortcuts | 48 +++++++++++++++++++ scripts/install-appindicator.sh | 6 +-- scripts/install-firefox-extensions.sh | 7 ++- 9 files changed, 62 insertions(+), 13 deletions(-) create mode 100644 package-lists/machine-label create mode 100644 package-lists/printing create mode 100755 resource/live/includes.chroot/lib/live/config/1040-gnome-shortcuts diff --git a/Makefile b/Makefile index 4b22e47..2024d0e 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ BATS_CMD=docker run -i --rm --init -v "$(PWD):/code" -u $(USER_ID) $(BATS_IMAGE) LATE_CMD_LOGGING_DIR=/var/log/installer-preseed/late-cmd MINIMAL_PACKAGE_LISTS=essential-cli-tools,desktop,desktop-extra,dutch-desktop,multimedia -ALL_PACKAGE_LISTS=essential-cli-tools,cli-tools,desktop,desktop-extra,developer,dutch-desktop,docker,firewall,games,graphic,multimedia,upgrades,video-editing,virusscanner,virtmanager +ALL_PACKAGE_LISTS=essential-cli-tools,cli-tools,desktop,desktop-extra,developer,dutch-desktop,docker,firewall,games,graphic,machine-label,multimedia,printing,upgrades,video-editing,virusscanner,virtmanager MINIMAL_LATE_CMDS=chrome-remote-desktop,error-prompt,earth-pro,firefox-extensions,google-chrome,no-gnome-initial,short-grub-pause,sudo-nopasswd,tmux-conf COMPLETE_LATE_CMDS=$(MINIMAL_LATE_CMDS),docker,dotnet,gists,golang,megasync,prepare-education-box,uu-add-origins,uu-activate,vscode INTERPOLATION_CMD=LATE_CMD_LOGGING_DIR=$(LATE_CMD_LOGGING_DIR) interpolate-preseed.sh @@ -109,7 +109,7 @@ live_gnome_complete: prepare $(LIVE_BUILD_CMD) -u $(DEFAULT_USER) -p $(ALL_PACKAGE_LISTS) -n gnome-complete -t gnome -c gists,error-prompt,firefox-extensions,golang,google-chrome,chrome-remote-desktop,vscode,dotnet,tmux-conf live_gnome: prepare - $(LIVE_BUILD_CMD) -u $(DEFAULT_USER) -p essential-cli-tools,desktop,dutch-desktop -n gnome -t gnome -c gists,firefox-extensions,error-prompt,golang,google-chrome,chrome-remote-desktop,vscode,dotnet,tmux-conf + $(LIVE_BUILD_CMD) -u $(DEFAULT_USER) -p essential-cli-tools,desktop,dutch-desktop -n gnome -t gnome -c firefox-extensions,error-prompt,vscode,tmux-conf lives: live_server live_gnome_complete live_gnome diff --git a/bin/live-build.sh b/bin/live-build.sh index 3b34fff..952fa58 100755 --- a/bin/live-build.sh +++ b/bin/live-build.sh @@ -60,7 +60,7 @@ lb config noauto \ --distribution bookworm \ --parent-archive-areas "main contrib non-free non-free-firmware" \ --bootappend-live "boot=live components locales=nl_NL.UTF-8 username=${DEFAULT_USER} \ - user-fullname=${DEFAULT_USER_FULLNAME}" \ + user-fullname=${DEFAULT_USER_FULLNAME} timezone=Europe/Amsterdam" \ "$@" EOF export DEFAULT_USER @@ -84,6 +84,7 @@ cp -r ../auto . mkdir -p config/includes.chroot/etc/skel/.config && echo yes > config/includes.chroot/etc/skel/.config/gnome-initial-setup-done mkdir -p config/includes.chroot/etc/live/config.conf.d/ echo "LIVE_USER_DEFAULT_GROUPS=\"audio cdrom dip floppy video plugdev netdev powerdev scanner bluetooth fuse docker\"" > config/includes.chroot/etc/live/config.conf.d/10-user-setup.conf +# cp ../includes.chroot/lib/live/config/1040-gnome-shortcuts config/includes.chroot/etc/live/config.conf.d/ EOF chmod +x $LIVE_BUILD_SCRIPT diff --git a/package-lists/desktop b/package-lists/desktop index 4fa85a5..96992d3 100644 --- a/package-lists/desktop +++ b/package-lists/desktop @@ -1,3 +1,2 @@ eog nvidia-detect -printer-driver-all diff --git a/package-lists/essential-cli-tools b/package-lists/essential-cli-tools index 9eaf28f..d02e0e7 100644 --- a/package-lists/essential-cli-tools +++ b/package-lists/essential-cli-tools @@ -3,11 +3,8 @@ curl debconf-utils extrepo fonts-terminus -hw-probe memtest86+ patch -pipx -qrencode software-properties-common sudo tmux diff --git a/package-lists/machine-label b/package-lists/machine-label new file mode 100644 index 0000000..8cff643 --- /dev/null +++ b/package-lists/machine-label @@ -0,0 +1,2 @@ +hw-probe +qrencode diff --git a/package-lists/printing b/package-lists/printing new file mode 100644 index 0000000..05eac57 --- /dev/null +++ b/package-lists/printing @@ -0,0 +1 @@ +printer-driver-all diff --git a/resource/live/includes.chroot/lib/live/config/1040-gnome-shortcuts b/resource/live/includes.chroot/lib/live/config/1040-gnome-shortcuts new file mode 100755 index 0000000..4fb5ba8 --- /dev/null +++ b/resource/live/includes.chroot/lib/live/config/1040-gnome-shortcuts @@ -0,0 +1,48 @@ +#!/bin/sh + +. /lib/live/config.sh + +## live-config(7) - System Configuration Components +## Copyright (C) 2016-2020 The Debian Live team +## Copyright (C) 2006-2015 Daniel Baumann +## +## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +## This is free software, and you are welcome to redistribute it +## under certain conditions; see COPYING for details. + + +#set -e + +Cmdline () +{ + # Reading kernel command line + for _PARAMETER in ${LIVE_CONFIG_CMDLINE} + do + case "${_PARAMETER}" in + live-config.username=*|username=*) + LIVE_USERNAME="${_PARAMETER#*username=}" + ;; + esac + done +} + +Init () +{ + # Checking if package is installed or already configured + if component_was_executed "gnome-shortcuts" + then + exit 0 + fi + + echo -n " gnome-shortcuts" +} + +Config () +{ + sudo -u $LIVE_USERNAME dbus-run-session -- /usr/local/bin/set-shortcuts.sh + touch /var/lib/live/config/gnome-shortcuts +} + +Cmdline +Init +Config diff --git a/scripts/install-appindicator.sh b/scripts/install-appindicator.sh index 0a3c72d..8b5a0ca 100755 --- a/scripts/install-appindicator.sh +++ b/scripts/install-appindicator.sh @@ -1,8 +1,6 @@ #!/usr/bin/env bash set -e -pipx install gnome-extensions-cli --system-site-packages +sudo apt-get install --yes gnome-shell-extension-appindicator +gnome-extensions enable appindicatorsupport@rgcjonas.gmail.com -pipx ensurepath - -$HOME/.local/bin/gext install 615 # AppIndicator and KStatusNotifier Support diff --git a/scripts/install-firefox-extensions.sh b/scripts/install-firefox-extensions.sh index c084839..606d689 100755 --- a/scripts/install-firefox-extensions.sh +++ b/scripts/install-firefox-extensions.sh @@ -7,7 +7,6 @@ EXTENSTION_URLS=( \ "https://addons.mozilla.org/firefox/downloads/file/4326974/adblock_for_youtube-0.4.8.xpi" \ "https://addons.mozilla.org/firefox/downloads/file/4202634/i_dont_care_about_cookies-3.5.0.xpi" \ "https://addons.mozilla.org/firefox/downloads/file/4320550/adblocker_ultimate-3.8.26.xpi" \ - "https://web.archive.org/web/20231126113521id_/https://addons.mozilla.org/firefox/downloads/file/3857142/archive_page-0.6.0.xpi" \ ) TEMPDIR=$(mktemp -d) @@ -17,4 +16,8 @@ do wget --no-verbose "$i" install-mozilla-extension-globally.sh $(basename "$i") # or do whatever with individual element of the array -done \ No newline at end of file +done + +wget --no-verbose "https://web.archive.org/web/20231126113521id_/https://addons.mozilla.org/firefox/downloads/file/3857142/archive_page-0.6.0.xpi" + +mv archive_page_0.6.0.xpi /usr/share/mozilla/extensions/\{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}/\{5b22cb75-8e43-4f2a-bb9b-1da0655ae564\}.xpi