[Linux-Biella] Curiosità su agiungere una foto al grub

Igor Alba igoralba74 a vodafone.it
Sab 22 Maggio 2010 22:44:29 CEST


Salve, leggevo che è possibile, mettere una foto sullo sfondo del grub, lo
so non è rilevante ma solo una curiosità.

Apporto modifiche sul file etc/grub, ma al riavvio lo schermo resta nero.
Credo che non accetti la modifica perche c'è un errore nel file.

Ora posto il file qualcuno sarebbe in grado di rilevarmi l'errore?
Grazie.

#!/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,usr/share/images/grub/Moraine_Lake_17092005.png.tga,jpg,jpeg
  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/`basename ${WALLPAPER}` ${WALLPAPER} ; 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=${COLOR_NORMAL}
  set color_highlight=${COLOR_HIGHLIGHT}
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
-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: http://ml.bilug.linux.it/pipermail/linux/attachments/20100522/a44b843d/attachment.html 


Maggiori informazioni sulla lista Linux