Package: grub2-common
Version: 2.02~beta3-5
Severity: wishlist
Tags: patch
Manual setting of the GRUB background image used to be done by setting
${WALLPAPER}" "${COLOR_NORMAL}" "${COLOR_HIGHLIGHT} variables in
/etc/grub.d/05_debian_theme.
But these variable setting lines have been moved to
/usr/share/desktop-base/grub_background.sh which is provided by the
desktop-base package. It is managed by the alternatives system and the
pointed file is not in /etc and isn't user editable file. Adding extra
lines to set the GRUB background image in 05_debian_theme isn't an
intuitive solution.
This change caused bugs reported to grub2-splashimages:
https://bugs.debian.org/613724
https://bugs.debian.org/635545
https://bugs.debian.org/673088
Adding alternatives may be a solution for images provided by
grub2-splashimages. Even then, we still don't have an intuitive way to
manually set them.
We already had a not-so-advertised feature of ${GRUB_BACKGROUND} in
/etc/default/grub. So I propose to make this feature more visible and
extend it to set menu colors.
I am not quite sure about ucf system related md5sum line. Please review
this part.
But this should make it easy for people who want to set up a nice custom
back ground.
Also some personal taste issues such as https://bugs.debian.org/855581
may be solved.
Patch is against the git repo.
>From 35600dba52e0e44b2fa1674caa187ffb30c85c0d Mon Sep 17 00:00:00 2001
From: Osamu Aoki <[email protected]>
Date: Sun, 2 Jul 2017 22:35:46 +0900
Subject: [PATCH] Enable manual override of menu colors
Manual setting of the GRUB background image used to be done by setting
${WALLPAPER}" "${COLOR_NORMAL}" "${COLOR_HIGHLIGHT} variables in
/etc/grub.d/05_debian_theme.
But these variable setting lines have been moved to
/usr/share/desktop-base/grub_background.sh which is provided by the
desktop-base package. It is managed by the alternatives system and the pointed
file is not in /etc and isn't user editable file. Adding extra lines to set
the GRUB background image in 05_debian_theme isn't an intuitive solution.
This change caused bugs reported to grub2-splashimages:
https://bugs.debian.org/613724
https://bugs.debian.org/635545
https://bugs.debian.org/673088
Adding alternatives may be a solution for images provided by
grub2-splashimages. Even then, we still don't have an intuitive way to
manually set them.
We already had a not-so-advertised feature of ${GRUB_BACKGROUND} in
/etc/default/grub. So I propose to make this feature more visible and extend
it to set menu colors.
---
debian/default/grub | 8 ++++++++
debian/default/grub.md5sum | 2 ++
debian/grub.d/05_debian_theme | 3 ++-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/debian/default/grub b/debian/default/grub
index 7617f0131..014c1880f 100644
--- a/debian/default/grub
+++ b/debian/default/grub
@@ -30,3 +30,11 @@ GRUB_CMDLINE_LINUX=""
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
+
+# Uncomment to override the GRUB background and menu color settings of
+# "update-alternatives --config desktop-grub" provided by the desktop-base
+# package by setting them to a valid path to the *.{jpeg|jpg|png|tga} image file
+# and valid colors.
+#GRUB_BACKGROUND="/full/path/to/image.{jpeg|jpg|png|tga}"
+#GRUB_COLOR_NORMAL="white/black"
+#GRUB_COLOR_HIGHLIGHT="black/white"
diff --git a/debian/default/grub.md5sum b/debian/default/grub.md5sum
index e8265dc68..b582a5fc5 100644
--- a/debian/default/grub.md5sum
+++ b/debian/default/grub.md5sum
@@ -1,3 +1,5 @@
dfad90339e4227d432636ed7d4483744 experimental_1.96+20081129-1
e916b60d7de71969dd7bad5a809fb9dc lenny_1.96+20080724-16
965e5137eff659cded3adb640357c33d maverick_1.98+20100705-1ubuntu1
+b7d2e3ca5347d4be304223c2115d9127 stretch_2.02-1
+
diff --git a/debian/grub.d/05_debian_theme b/debian/grub.d/05_debian_theme
index 717258444..3be09b0a9 100755
--- a/debian/grub.d/05_debian_theme
+++ b/debian/grub.d/05_debian_theme
@@ -161,7 +161,8 @@ fi
# If so, try to use it. Don't try the other possibilities in that case
# (#608263).
if [ -n "${GRUB_BACKGROUND+x}" ]; then
- set_background_image "${GRUB_BACKGROUND}" || set_default_theme
+ set_background_image "${GRUB_BACKGROUND}" "${GRUB_COLOR_NORMAL}" \
+ "${GRUB_COLOR_HIGHLIGHT}" || set_default_theme
exit 0
fi
--
2.11.0