Ubuntu 11.10 come cambiare sfondo e colori di GRUB2 e lo splash screen

Personalizzazione grafica del sistema: icone, temi, sfondi, suoni, eccetera.
Avatar utente
K-slo
Prode Principiante
Messaggi: 88
Iscrizione: giovedì 26 novembre 2009, 21:40

Ubuntu 11.10 come cambiare sfondo e colori di GRUB2 e lo splash screen

Messaggio da K-slo »

Ciao a tutti!
Ho aspettato il rilascio di Ubuntu 11.10 per installarlo sul mio nuovo notebook. Ora, io ho l'usanza di personalizzare un po' la grafica di ubuntu, soprattutto adesso che il colorino viola a preso il sopravvento... Dunque, vorrei capire come cambiare lo sfondo al grub e i colori delle voci. Ho smanettato finora senza avere risultati, pur seguendo varie guide... Anche lo splash screen mi da problemi: non voglio animazioni, ma una semplicissima immagine statica al posto dello sfondo violetto con la scritta bianca. Mi potete aiutare?

Per il GRUB ho dato da terminale

Codice: Seleziona tutto

sudo gedit /etc/grub.d/05_debian_theme
ma non capisco quali voci devo modificare, dato che le voci (cito da questa guida: http://www.megalab.it/6374/modificare-c ... -in-grub-2)
   Else  
   WALLPAPER="/usr/share/images/desktop-base/moreblue-orbit-grub.png"  
   COLOR_NORMAL="black/black"  
   COLOR_HIGHLIGHT="magenta/black"  
   Fi  
non riesco a trovarle...

Per lo splash... plymouth è un maledetto, ma su ubuntu 10.10 avevo risolto (non ricordo più come).

Grazie in anticipo!
Ultima modifica di Anonymous il sabato 15 ottobre 2011, 17:15, modificato 1 volta in totale.
...oggi l'essenziale accade nell'astratto, e l'irrilevante accade nella realtà... (R. Musil, L'uomo senza qualità)
Avatar utente
Braun
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 789
Iscrizione: sabato 8 maggio 2010, 21:48
Desktop: Unity
Distribuzione: Ubuntu 16.10 - x86_64
Sesso: Maschile

Re: Ubuntu 11.10 come cambiare sfondo e colori di GRUB2 e lo splash screen

Messaggio da Braun »

Prova installando grub-customizer !  ;)
Ubuntu user # 35184
Avatar utente
K-slo
Prode Principiante
Messaggi: 88
Iscrizione: giovedì 26 novembre 2009, 21:40

Re: Ubuntu 11.10 come cambiare sfondo e colori di GRUB2 e lo splash screen

Messaggio da K-slo »

Ciao! Ho provato grub-customizer, ma non è cambiato nulla... Ho reimpostato lo sfondo e i colori, ma le scritte sono sempre bianche sull'orribile sfondo violetto...

Per facilitare il compito a chi vuole aiutarmi, posto il contenuto del mio /etc/grub.d/05_debian_theme:
#!/bin/sh
set -e

# grub-mkconfig helper script.
# Copyright (C) 2010  Alexander Kurtz
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see .

# Include the GRUB helper library for grub-mkconfig.
. /usr/lib/grub/grub-mkconfig_lib

# We want to work in /boot/grub/ only.
test -d "${GRUB_PREFIX}"; cd "${GRUB_PREFIX}"

# Set the location of a possibly necessary cache file for the background image.
# NOTE: This MUST BE A DOTFILE to avoid confusing it with user-defined images.
BACKGROUND_CACHE=".background_cache"

set_default_theme(){
# Set a monochromatic theme for Ubuntu.
echo "${1}set menu_color_normal=white/black"
echo "${1}set menu_color_highlight=black/light-gray"

if [ -e /lib/plymouth/themes/default.grub ]; then
sed "s/^/${1}/" /lib/plymouth/themes/default.grub
fi
}

set_background_image(){
# Step #1: Search all available output modes ...
local output
for output in ${GRUB_TERMINAL_OUTPUT}; do
if [ "x$output" = "xgfxterm" ]; then
break
fi
done

# ... and check if we are able to display a background image at all.
if ! [ "x${output}" = "xgfxterm" ]; then
return 1
fi

# Step #2: Check if the specified background image exists.
if ! [ -f "${1}" ]; then
return 2
fi

# Step #3: Search the correct GRUB module for our background image.
local reader
case "${1}" in
*.jpg|*.JPG|*.jpeg|*.JPEG) reader="jpeg";;
*.png|*.PNG) reader="png";;
*.tga|*.TGA) reader="tga";;
*) return 3;; # Unknown image type.
esac

# Step #4: Check if the necessary GRUB module is available.
if ! [ -f "${reader}.mod" ]; then
return 4
fi

# Step #5: Check if GRUB can read the background image directly.
# If so, we can remove the cache file (if any). Otherwise the backgound
# image needs to be cached under /boot/grub/.
if is_path_readable_by_grub "${1}"; then
rm --force "${BACKGROUND_CACHE}.jpeg" \
"${BACKGROUND_CACHE}.png" "${BACKGROUND_CACHE}.tga"
elif cp "${1}" "${BACKGROUND_CACHE}.${reader}"; then
set -- "${BACKGROUND_CACHE}.${reader}" "${2}" "${3}"
else
return 5
fi

# Step #6: Prepare GRUB to read the background image.
if ! prepare_grub_to_access_device "`${grub_probe} --target=device "${1}"`"; then
return 6
fi

# Step #7: Everything went fine, print out a message to stderr ...
echo "Found background image: ${1}" >&2

# ... and write our configuration snippet to stdout. Use the colors
# desktop-base specified. If we're using a user-defined background, use
# the default colors since we've got no idea how the image looks like.
# If loading the background image fails, use the default theme.
echo "insmod ${reader}"
echo "if background_image `make_system_path_relative_to_its_root "${1}"`; then"
if [ -n "${2}" ]; then
echo "  set color_normal=blue/black"
fi
if [ -n "${3}" ]; then
echo "  set color_highlight=black/light-green"
fi
if [ -z "${2}" ] && [ -z "${3}" ]; then
echo "  true"
fi
echo "else"
set_default_theme "  "
echo "fi"
}

# Earlier versions of grub-pc copied the default background image to /boot/grub
# during postinst. Remove those obsolete images if they haven't been touched by
# the user. They are still available under /usr/share/images/desktop-base/ if
# desktop-base is installed.
while read checksum background; do
if [ -f "${background}" ] && [ "x`sha1sum "${background}"`" = "x${checksum}  ${background}" ]; then
echo "Removing old background image: ${background}" >&2
rm "${background}"
fi
done <<EOF
648ee65dd0c157a69b019a5372cbcfea4fc754a5  debian-blueish-wallpaper-640x480.png
0431e97a6c661084c59676c4baeeb8c2f602edb8  debian-blueish-wallpaper-640x480.png
968ecf6696c5638cfe80e8e70aba239526270864  debian-blueish-wallpaper-640x480.tga
11143e8c92a073401de0b0fd42d0c052af4ccd9b  moreblue-orbit-grub.png
d00d5e505ab63f2d53fa880bfac447e2d3bb197c  moreblue-orbit-grub.png
f5b12c1009ec0a3b029185f6b66cd0d7e5611019  moreblue-orbit-grub.png
EOF

# Include the configuration of desktop-base if available.
if [ -f "/usr/share/desktop-base/grub_background.sh" ]; then
. "/usr/share/desktop-base/grub_background.sh"
fi

# First check whether the user has specified a background image explicitly.
# If so, try to use it. Don't try the other possibilities in that case
# (#608263).
if [ -n "${GRUB_BACKGROUND+x}" ]; then
set_background_image "${GRUB_BACKGROUND}" || set_default_theme
exit 0
fi

# Next search for pictures the user put into /boot/grub/ and use the first one.
for background in *.jpg *.JPG *.jpeg *.JPEG *.png *.PNG *.tga *.TGA; do
if set_background_image "${background}"; then
exit 0
fi
done

# Next try to use the background image and colors specified by desktop-base.
if set_background_image "${WALLPAPER}" "${COLOR_NORMAL}" "${COLOR_HIGHLIGHT}"; then
exit 0
fi

# If we haven't found a background image yet, use the default from desktop-base.
if set_background_image "/usr/share/images/desktop-base/desktop-grub.png"; then
exit 0
fi

# Finally, if all of the above fails, use the default theme.
set_default_theme
In sostanza quello che vorrei riuscire a ottenere è uno sfondo semplicemente nero. Secondo me è il tema di default che va eliminato, ma non vorrei causare nulla di irreparabile...
...oggi l'essenziale accade nell'astratto, e l'irrilevante accade nella realtà... (R. Musil, L'uomo senza qualità)
Avatar utente
K-slo
Prode Principiante
Messaggi: 88
Iscrizione: giovedì 26 novembre 2009, 21:40

Re: Ubuntu 11.10 come cambiare sfondo e colori di GRUB2 e lo splash screen

Messaggio da K-slo »

ok per i colori e lo sfondo del grub ho risolto non seguendo le guide, ossia non editando 05_debian_theme, bensì il file grub.cfg e cambiando lo sfondo con grub customizer (i colori non li cambiava). Ora rimane il problema dello splash... ho tolto quello di default, ma non sono riuscito a far partire l'immagine che volevo: all'avvio lo schermo resta nero e l'arresto è verboso... Qualche consiglio?
...oggi l'essenziale accade nell'astratto, e l'irrilevante accade nella realtà... (R. Musil, L'uomo senza qualità)
Ilgard
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 271
Iscrizione: mercoledì 11 novembre 2009, 18:45

Re: Ubuntu 11.10 come cambiare sfondo e colori di GRUB2 e lo

Messaggio da Ilgard »

Uso questo topic senza aprirne di nuovi perchè tanto l'argomento è sostanzialmente quello.

Allora, sono riuscito, con un po' di impegno, ad inserire un'immagine di sfondo nel grub2, tuttavia non vede come vorrei (è decentrata verso l'alto) e credo dipenda dal fatto che la risoluzione ha aspect ratio 4:3 mentre il mio monitor è 16:9. Ho provato a vedere con vbeinfo le risoluzioni supportate ma sono tutte in 4:3 ( o comunque non widescreen). C'è per caso un modo per migliorare la visualizzazione delle immagini?
Scrivi risposta

Ritorna a “Personalizzazione dell'ambiente desktop”

Chi c’è in linea

Visualizzano questa sezione: 0 utenti iscritti e 4 ospiti