* Feature Request: provide easy way to configure background images
@ 2010-03-18 8:29 Mario Vazquez
2010-04-09 15:45 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 2+ messages in thread
From: Mario Vazquez @ 2010-03-18 8:29 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 502 bytes --]
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
[-- Attachment #2: background-image-in-mkconfig.patch --]
[-- Type: text/x-patch, Size: 1404 bytes --]
diff -urN grub-1.98.orig/util/grub.d/00_header.in grub-1.98/util/grub.d/00_header.in
--- grub-1.98.orig/util/grub.d/00_header.in 2010-03-10 20:30:56.319608325 -0400
+++ grub-1.98/util/grub.d/00_header.in 2010-03-10 23:01:20.856612701 -0400
@@ -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
diff -urN grub-1.98.orig/util/grub-mkconfig.in grub-1.98/util/grub-mkconfig.in
--- grub-1.98.orig/util/grub-mkconfig.in 2010-03-10 20:30:56.319608325 -0400
+++ grub-1.98/util/grub-mkconfig.in 2010-03-10 20:34:00.689582261 -0400
@@ -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 \
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Feature Request: provide easy way to configure background images
2010-03-18 8:29 Feature Request: provide easy way to configure background images Mario Vazquez
@ 2010-04-09 15:45 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-04-09 15:45 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 859 bytes --]
> 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 remembe=
r from.
> https://savannah.gnu.org/bugs/index.php?29252
> =20
I've applied youre patch with some fixes.
> -----------------------------------------------------------------------=
-
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
--=20
Regards
Vladimir '=CF=86-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-09 15:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-18 8:29 Feature Request: provide easy way to configure background images Mario Vazquez
2010-04-09 15:45 ` Vladimir 'φ-coder/phcoder' Serbinenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.