From 1e09daa057006b8a93e83b74f1cfbf7b4e991864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ruiz=20de=20Alegr=C3=ADa?= Date: Mon, 15 Jun 2020 12:50:22 +0200 Subject: [PATCH] Use same background for grub theme and desktop-base grub image --- debian/kali-themes.postinst | 11 +++++++++++ share/grub/themes/kali/background.png | 1 + share/grub/themes/kali/theme.txt | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 120000 share/grub/themes/kali/background.png diff --git a/debian/kali-themes.postinst b/debian/kali-themes.postinst index cee4ae37..94b1fd11 100644 --- a/debian/kali-themes.postinst +++ b/debian/kali-themes.postinst @@ -81,6 +81,17 @@ if [ "$1" = "configure" ]; then # Copy grub theme to /boot mkdir -p /boot/grub/themes/kali cp -r /usr/share/grub/themes/kali/* /boot/grub/themes/kali/ + # Set grub theme background + # Use background with 16x9 aspect ratio for efi installations detected + # by the presence of grub-efi* packages (not the grub-efi*-bin which don’t + # necessary account for grub being the active bootloader). + if dpkg-query --list grub-efi* | grep -v "^... grub-efi[^[:space:]]*-bin" | grep -q "^[ih][HUFWti] " ; then + echo "grub-efi* packages found, using 16/9 as default grub background ratio" + ln -sf /boot/grub/themes/kali/grub-16x9.png /boot/grub/themes/kali/background.png + else + echo "No grub-efi* package found, using 4/3 as default grub background ratio" + ln -sf /boot/grub/themes/kali/grub-4x3.png /boot/grub/themes/kali/background.png + fi # Rebuild the grub configuration with our config changes if which update-grub >/dev/null; then update-grub || true diff --git a/share/grub/themes/kali/background.png b/share/grub/themes/kali/background.png new file mode 120000 index 00000000..c9b74bce --- /dev/null +++ b/share/grub/themes/kali/background.png @@ -0,0 +1 @@ +grub-16x9.png \ No newline at end of file diff --git a/share/grub/themes/kali/theme.txt b/share/grub/themes/kali/theme.txt index 3acefeb1..313d383f 100644 --- a/share/grub/themes/kali/theme.txt +++ b/share/grub/themes/kali/theme.txt @@ -1,7 +1,7 @@ # Global Property title-text: "" -desktop-image: "grub-16x9.png" +desktop-image: "background.png" desktop-color: "#2f5595" terminal-font: "Unifont Regular 16" terminal-left: "0"