Feature Request: provide easy way to configure background images
Grub 1.98 include code in 00_header.in and grub-mkconfig.in to add theme entries to /boot/grub.cfg, but it does not provide a similar method for adding background images (wallpapers).
The patch included adds some lines just over GRUB_THEME entriens in 00_header.in to handle the background image. It will also look for the image format and insert the module required by it.
I got parts of this patch (code) from somewhere else, but can't remember from.
https://savannah.gnu.org/bugs/index.php?29252
util/grub.d/00_header.in +14 -0
@@ -104,6 +104,20 @@ terminal gfxterm fi EOF +if [ x$GRUB_BACKGROUND != x ] && [ -f $GRUB_BACKGROUND ] \ + && is_path_readable_by_grub $GRUB_BACKGROUND; then + echo "Found background: $GRUB_BACKGROUND" >&2 + case $GRUB_BACKGROUND in + *.png) reader=png ;; + *.tga) reader=tga ;; + *.jpg|*.jpeg) reader=jpeg ;; + esac + prepare_grub_to_access_device `${grub_probe} --target=device $GRUB_BACKGROUND` | sed -e "s/^/ /" + cat << EOF + insmod $reader + background_image (\$root)`make_system_path_relative_to_its_root $GRUB_BACKGROUND` +EOF +fi if [ x$GRUB_THEME != x ] && [ -f $GRUB_THEME ] \ && is_path_readable_by_grub $GRUB_THEME; then echo "Found theme: $GRUB_THEME" >&2
util/grub-mkconfig.in +1 -0
@@ -220,6 +220,7 @@ GRUB_DISABLE_LINUX_UUID \ GRUB_DISABLE_LINUX_RECOVERY \ GRUB_GFXMODE \ + GRUB_BACKGROUND \ GRUB_THEME \ GRUB_GFXPAYLOAD_LINUX \ GRUB_DISABLE_OS_PROBER \
Quoted 9 lines
Grub 1.98 include code in 00_header.in and grub-mkconfig.in to add theme entries to
/boot/grub.cfg, but it does not provide a similar method for adding background images (wallpapers).The patch included adds some lines just over
GRUB_THEMEentriens in 00_header.in to handle the background image. It will also look for the image format and insert the module required by it.I got parts of this patch (code) from somewhere else, but can't remembe=
r from.
Quoted 2 lines
I've applied youre patch with some fixes.
Quoted 1 line
-----------------------------------------------------------------------=
-
Quoted 5 lines
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
--=20
Regards
Vladimir '=CF=86-coder/phcoder' Serbinenko