jogonjr
February 20th, 2011, 11:51 AM
Hi again. I am trying to put a background image in my grub but am unsuccessful. I am using Ubuntu 10.04. I was able to set the resolution to 1366x768 but the background remains black and if I do sudo update-grub, it wont even say Found Background image as it is supposed to according to some guides in the forums. I have tried for so long yet still not working so I am posting again. Here is my 05_theme file.
#!/bin/bash -e
source /usr/lib/grub/grub-mkconfig_lib
# this allows desktop-base to override our settings
f=/usr/share/desktop-base/grub_background.sh
if test -e ${f} ; then
source ${f}
else
WALLPAPER="/usr/share/images/desktop-base/leafscreen.png"
COLOR_NORMAL="black/black"
COLOR_HIGHLIGHT="magenta/black"
fi
set_mono_theme()
{
cat << EOF
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
EOF
}
# check for usable backgrounds
use_bg=false
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
for i in {/boot/grub,/usr/share/images/grub,/home/drs/mysplash}/BonsaiTridentMaple.{png,tga,jpg,jpeg}; do
if is_path_readable_by_grub $i ; then
bg=$i
case ${bg} in
*.png) reader=png ;;
*.tga) reader=tga ;;
*.jpg|*.jpeg) reader=jpeg ;;
esac
if test -e /boot/grub/${reader}.mod ; then
echo "Found background image: `basename ${bg}`" >&2
use_bg=true
break
fi
fi
done
fi
# set the background if possible
if ${use_bg} ; then
prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
cat << EOF
insmod ${reader}
if background_image `make_system_path_relative_to_its_root ${bg}` ; then
set color_normal=white/black
set color_highlight=brown/black
else
EOF
fi
# otherwise, set a monochromatic theme for Ubuntu
if ${use_bg} ; then
set_mono_theme | sed -e "s/^/ /g"
echo "fi"
else
set_mono_theme
fi
Thanks for any help.
#!/bin/bash -e
source /usr/lib/grub/grub-mkconfig_lib
# this allows desktop-base to override our settings
f=/usr/share/desktop-base/grub_background.sh
if test -e ${f} ; then
source ${f}
else
WALLPAPER="/usr/share/images/desktop-base/leafscreen.png"
COLOR_NORMAL="black/black"
COLOR_HIGHLIGHT="magenta/black"
fi
set_mono_theme()
{
cat << EOF
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
EOF
}
# check for usable backgrounds
use_bg=false
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
for i in {/boot/grub,/usr/share/images/grub,/home/drs/mysplash}/BonsaiTridentMaple.{png,tga,jpg,jpeg}; do
if is_path_readable_by_grub $i ; then
bg=$i
case ${bg} in
*.png) reader=png ;;
*.tga) reader=tga ;;
*.jpg|*.jpeg) reader=jpeg ;;
esac
if test -e /boot/grub/${reader}.mod ; then
echo "Found background image: `basename ${bg}`" >&2
use_bg=true
break
fi
fi
done
fi
# set the background if possible
if ${use_bg} ; then
prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
cat << EOF
insmod ${reader}
if background_image `make_system_path_relative_to_its_root ${bg}` ; then
set color_normal=white/black
set color_highlight=brown/black
else
EOF
fi
# otherwise, set a monochromatic theme for Ubuntu
if ${use_bg} ; then
set_mono_theme | sed -e "s/^/ /g"
echo "fi"
else
set_mono_theme
fi
Thanks for any help.