Bug#608263: /etc/grub.d/05_debian_theme: new 05_debian_theme doesn't allow no background image

Alexander Kurtz kurtz.alex at googlemail.com
Wed Jan 5 13:32:47 UTC 2011


Am Dienstag, den 04.01.2011, 01:04 +0100 schrieb Mario 'BitKoenig' Holbe:
> IMHO, 05_debian_theme should simply do nothing if GRUB_BACKGROUND is
> set (empty or not), because this one is for and handled by 00_header
> already (not as sophisticated as 05_debian_theme does it, but ...
> well...).

Well, I think that 05_debian_theme should keep handling $GRUB_BACKGROUND
at least for now because it
 a) can handle upper case file extensions (like DC01234567.JPEG from 
    digital cameras).
 b) can handle files which aren't directly readable by GRUB (for 
    example a picture in your encrypted home directory).
 c) keeps /boot/grub/ clean by only having *one* cache file. It even
    removes that cache file if it isn't necessary anymore.

> Btw: testing for an empty but set environment variable is not that
> easy... :) 'if env | grep -q ^GRUB_BACKGROUND=; then ...' comes to my
> mind...

Colin already answered that - it's actually really easy!

> IMHO, the same applies for the case where 05_debian_theme chooses the
> lexically first image in /boot/grub - just don't do it: if the user
> copied one there, he had to configure it somewhere anyways.

No, the whole point is that there is no extra configuration necessary,
simply doing this

	sudo cp foo.jpeg /boot/grub/ && sudo update-grub

should be enough. My intention was to
 a) allow the user to use a custom background image without thinking 
    much about it
 b) support what the user might have tried intuitively

It's all about the magic words "It Just Works™".

> Furthermore, the default colors set by 05_debian_theme for the three
> alternatives to grub_background.sh: GRUB_BACKGROUND, the lexically first
> image in /boot/grub, and for desktop-grub.png if no grub_background.sh
> exists are simply ... well, useless: black/black - hmmm :)

I've chosen those colors because
 a) that's what the old 05_debian_theme did and I wanted to stick as 
    close to that behavior as possible
 b) because they are usually sane - black font is readable almost always
    (unless you use a very dark background image) and magenta clearly 
    indicates the "highlighted character" of the selected entry.
 c) setting the second part of the colors (FIRSTPART/SECONDPART) to 
    black removes the "frame" (I don't know a better word) and makes 
    the entry transparent, which definitely looks better.

> Btw2: I guess, #581049 could be closed now where 05_debian_theme deals
> with the desktop-grub alternative.
Closed, thanks!

Best regards

Alexander Kurtz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20110105/74ced2aa/attachment.pgp>


More information about the Pkg-grub-devel mailing list