السلام عليكم،

On Sun, Jun 14, 2009 at 10:42:39PM +0200, jmehdi wrote:
> How to change grub2 image: 
> http://www.ubuntu-inside.me/2009/06/howto-change-grub2-grub-pc-splash-image.html
---end quoted text---

  It can be done without editing 05_debian_theme, you can add an 
  additional file (say 06_sabily_theme) which would then override 
  05_debian_theme. The one I made is attached with this email.

-- 
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7 (@ subkeys.pgp.net)
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8  B176 BC19 6A94 EDDD A1B7
#!/bin/bash -e

source /usr/lib/grub/update-grub_lib

set_blue_theme()
{
  cat << EOF
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
EOF
}

# check for usable backgrounds
use_bg=false
if [ "$GRUB_TERMINAL" = "gfxterm" ] ; then
  for i in /usr/share/images/grub/usplash_1024_768.png ; 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 Sabily background: `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=black/black
  set menu_color_normal=black/black
  set menu_color_highlight=magenta/black
else
EOF
fi

# otherwise, set the traditional Debian blue theme
if ${use_bg} ; then
  set_blue_theme | sed -e "s/^/  /g"
  echo "fi"
else
  set_blue_theme
fi
_______________________________________________
Mailing list: https://launchpad.net/~sabily.team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sabily.team
More help   : https://help.launchpad.net/ListHelp

رد على