 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

28th April 2012, 11:16 AM
|
|
Registered User
|
|
Join Date: Jun 2011
Location: Mumbai, India
Posts: 34

|
|
|
Re: Grub Splash, For those interested
Hurray! Thanks to your script, it worked. I now have the theme. Looks cool - only the font should be bigger - 12pt can hardly be seen on my monitor. Does the starfield.tar.gz have to be in the same folder as the script? and what about LiberationSansRegular.ttf how can I try that?
__________________
Pentium(R) Memory 1.0 GiB / 10" LCD / F18 - Windows 7 HP notebook
|

28th April 2012, 11:29 AM
|
 |
Un-Retired Administrator
|
|
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,974

|
|
|
Re: Grub Splash, For those interested
For the font size I'd just use the instruction in jakes document where you create a font. Just use a larger size. Then run the grub2-mkconfig command again.
You can substitute LiberationSansRegular. It should work just fine. Do the same thing as above but use LiberationSansRegular in place of DejaVuSans.
Starfield.tar.gz is not needed once you have finished with the script or jakes instructions.
Glad to hear that someone used the script and that it was a success.
__________________
Glenn
The Bassinator © ®
Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
|

28th April 2012, 12:22 PM
|
|
Registered User
|
|
Join Date: Jun 2011
Location: Mumbai, India
Posts: 34

|
|
|
Re: Grub Splash, For those interested
There are some corrections to be made in jake's instructions. He instructed to add x lines before when it is supposed to be after; at least in two places. One is in the /etc/default/grub file and the other in the 10_linux file.
Glenn your script is proper and entered those lines in the correct places. That is how it got corrected for me.
So my advice for those who want to theme grub to use the script instead of manually doing so.
Another issue is the icons. The fedora icon shows up in the menu. I also have LinuxMint and Ubuntu on other partitions but the icons do not show up in the menu
__________________
Pentium(R) Memory 1.0 GiB / 10" LCD / F18 - Windows 7 HP notebook
Last edited by jeffrey; 28th April 2012 at 01:14 PM.
Reason: Line was added
|

28th April 2012, 01:54 PM
|
 |
Un-Retired Administrator
|
|
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,974

|
|
|
Re: Grub Splash, For those interested
If there is a typo or errors in jakebpg's how-to he needs to know about it. I'll PM him when I have time. To keep the record straight, he helped me with parts of the script so I can't take full credit for it. A few others also helped with things that were above my bash scripting experience level.
Can you point out the errors?
__________________
Glenn
The Bassinator © ®
Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
|

30th April 2012, 07:45 AM
|
|
Registered User
|
|
Join Date: Oct 2010
Posts: 3

|
|
|
Re: Grub Splash, For those interested
It looks attractive!
|

2nd May 2012, 11:30 AM
|
|
Registered User
|
|
Join Date: Feb 2009
Location: Northeast
Posts: 292

|
|
Re: Grub Splash, For those interested
Sorry guys for being AWOL for so long. Still dealing with other issues.
Jeff I haven't completed the section to add those Icons in yet. Once that section is done I'll post an update to my original post as I have done previously so that you don't have to wade through all the posts to see if that section has been completed yet.
To all using the written instructions. Please use glennzo's install script. Much easier that way and NO chance of errors whether it be from typos or difficult to follow instructions.
I'll try to correct the written instructions as soon as I can. I hope to have the final section(for additional OS icons not being picked up) done to add to the written instructions.
|

4th May 2012, 10:28 AM
|
 |
"Shells" (of a sub world)
|
|
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,647

|
|
|
Re: Grub Splash, For those interested
Dang i had started writing a script either, but glennzo was faster
I'll share it regardless and hope it'll be of use either:
PHP Code:
#!/bin/bash # | # | Tweak grub2 script, Mai 4th 2012 by sea # | Requires: chmod +x sea-tweak-grub2 # | # | Edit your background picture here, as you (as i guess) wont change that often # | But since you probably have to play with the resolution and font size, # | this script lets you easy change those values. # | # | This script is written with best intention to help, # | but there is NO warranty and I deny ANY responsiblity # | that may or may not affect your system. # | # | Lisence: GPL v3 # | Author: Simon A. Erat (sea) # | Release Date: 2012 May 4th script_version="0.2" # | Resource URL: # | Release URL: # | # | Variables test ! "0" = "$UID" && echo "This script should be run as root.." && exit 1 press() { echo -e "\n---------------------------";read -p "--- >> ENTER << ---" buffeer;} bg_pic="/usr/share/backgrounds/verne/default/wide/verne.png" # Default bg_pic=/home/simon/Pictures/hubble-eldorado_1280_780.jpg fontdir=/usr/share/fonts fonts=$(find $fontdir/ -name *.ttf|grep Mono ) grubdir=/boot/grub2 grubfile=/etc/default/grub tmpfile=/tmp/grub fontsizes="12 14 16 18 20 22 24" gfxmodes="auto 640x480 800x600 1024x600 1024x768 1280x800 1280x1024 1440x900 1600x900" cdepth="auto 8 16 32" ; depth="" replTasks="FONT GFXM GFXP BACK left" # | # | Backup cat $grubfile > $grubfile.bak # | # | Get input clear echo -e "\n\nsea's \tTweak GRUB2 slpash screen script ($script_version)\n\n"
echo "Please choose a font:" select font in $fonts do fontbase=$(dirname $font) font=$(basename $font) echo "Select a font size for $font:" font="${font:0: ( -4 ) }.pf2" select fsize in $fontsizes;do break;done # # Actualy create the font echo "Generating font: $(basename $font)" sudo grub2-mkfont --output=$grubdir/$font --size=$fsize $fontbase/${font:0: ( -3 )}ttf break done echo "Select your display resolution" select gfxmode in $gfxmodes; do if [ ! "auto" = "$gfxmode" ] then echo "Please choose color depth:" select depth in $cdepth;do break;done fi if [ ! "" = "$depth" ] && [ ! "auto" = "$depth" ] then colorsstring="$gfxmode"x"$depth" else colorsstring="$gfxmode" fi break done echo echo -e "The background image will be changed to: \t $bg_pic" echo "Press \"y\" to change or leave empty to keep." read -n1 newBG # | # | Generate output test "y" = "$newBG" && select bg_pic in $(find /home/ -name *.jpg );do break;done grep TIMEO $grubfile > $tmpfile grep DISTR $grubfile >> $tmpfile grep CMDLI $grubfile >> $tmpfile grep DEFAU $grubfile >> $tmpfile cat >> $tmpfile << EOF GRUB_FONT=/boot/grub2/$font GRUB_GFXMODE=$colorsstring GRUB_GFXPAYLOAD_LINUX=keep GRUB_BACKGROUND=$bg_pic EOF # | # | Present it and save ? echo echo -e "\tGRUB2:\t new" cat $tmpfile echo echo "The above outpout matches your expection?" echo "Hit enter to save, or CTRL+C to abort/cancel" press cat $tmpfile > $grubfile && echo "Saved successfully" && \ sudo grub2-mkconfig -o /boot/grub2/grub.cfg || echo -e "Error writing: $tmpfile \t to \t $grubfile"
Last edited by sea; 4th May 2012 at 12:16 PM.
|

4th May 2012, 11:42 AM
|
 |
Un-Retired Administrator
|
|
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,974

|
|
|
Re: Grub Splash, For those interested
Sea, nice job! I tried your script on Fedora 16 installed under VirtualBox. It worked perfectly! I did run into 2 issues that you may want to look into.
1. Need to run this script as root or with sudo / su. Permisison denied when the script tried to run grub2-mkconfig as regular user.
2. The list of fonts was so long it scrolled off of the screen. I don't know if you can or want to correct this. It's a minor issue but one that would cause the user to have to scroll up/down to examine all possible choices.
__________________
Glenn
The Bassinator © ®
Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
|

4th May 2012, 12:28 PM
|
 |
"Shells" (of a sub world)
|
|
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,647

|
|
|
Re: Grub Splash, For those interested
Thanks Glenn.
1) Now aborts if script is not run as user, as the sudo obviously didnt step in 
2) enlarged the scan to all fonts, but restricted selection to mono (fixed-size) fonts only.
EDIT:
updated code and attachment in above post.
---------- Post added at 11:28 AM ---------- Previous post was at 11:13 AM ----------
There's only 1 thing that still disturbs me...
After the grub menu with the modified splash screen... it disapears after "loading initramfs...".
Meaning the screen 're-calibrates' itself and looses those settings, but i'd like to keep the splashscreen during the boot procedure...
The playmouth screen was set to "details" and the initrd was rebuilt either...
PHP Code:
#!/bin/bash # | # | Plymouth script, Mai 4th 2012 by sea # | Requires: chmod +x sea-plymouth # | # | Lets you easy change the plymouth screen. # | Very helpfull if you want to change GRUB2 splash screen. # | # | This script is written with best intention to help, # | but there is NO warranty and I deny ANY responsiblity # | that may or may not affect your system. # | # | Lisence: GPL v3 # | Author: Simon A. Erat (sea) # | Release Date: 2012 May 4th script_version="0.1" # | Resource URL: # | Release URL: # | # | Variables setTheme=$(which plymouth-set-default-theme) plyDir=$(dirname $setTheme) themes=$(ls /usr/share/plymouth/themes) curTheme=$($setTheme) # | # | output echo "Current theme is: $curTheme" echo "If you want more themes, run: # yum install plymouth-them*" echo "Please select a new theme..." select theme in $themes NONE do test "NONE" = "$theme" && break echo "Do you want to rebuild initrd, eventhough this may take a while? (y/n)" read -n1 rebuild if [ "y" = "$rebuild" ] then sudo $setTheme $theme --rebuild-initrd else sudo $setTheme $theme fi break done
And ideas how to solve this 'recalibrate-issue' of the boot procedure?
Last edited by sea; 4th May 2012 at 03:19 PM.
|

31st May 2012, 02:56 AM
|
 |
Registered User
|
|
Join Date: Nov 2006
Location: Detroit
Posts: 4,723

|
|
|
Re: Grub Splash, For those interested
It doesn't look like jakebpg's Grub theme made it into F17. At least the icons aren't there. What happened?
Also, I don't know if anyone's noticed but in F17 the dejavu.pf2 font files in both /boot/grub2/themes/system and /boot/grub2/themes/starfield are not fonts! They are virtually empty files containing no real font information, only 150 bytes in size. It seems like whoever made those files forgot to use the corresponding TrueType font as input to the grub2-mkfont command, as mentioned in this thread (see PabloTwo's post). It should produce a file somewhere around 20-35KB in size for most fonts. So my guess is that those two themes are using some default Grub font.
I ended up copying the starfield theme (and called the new theme "fedora"  ) and used a different background and a different font with different colors. It looks pretty good; I'll have to figure out a way to take a decent picture of it.
__________________
OS: Fedora 18 x86_64 | CPU: AMD64 3700+ 2.2GHz | RAM: 2GB PC3200 DDR | Disk: 160GB PATA | Video: ATI Radeon 7500 AGP 64MB | Sound: Turtle Beach Santa Cruz CS4630 | Ethernet: Realtek 8110SC
|

31st May 2012, 03:40 PM
|
|
Registered User
|
|
Join Date: Feb 2009
Location: Northeast
Posts: 292

|
|
Re: Grub Splash, For those interested
Quote:
Originally Posted by RupertPupkin
It doesn't look like jakebpg's Grub theme made it into F17. At least the icons aren't there. What happened?
Also, I don't know if anyone's noticed but in F17 the dejavu.pf2 font files in both /boot/grub2/themes/system and /boot/grub2/themes/starfield are not fonts! They are virtually empty files containing no real font information, only 150 bytes in size. It seems like whoever made those files forgot to use the corresponding TrueType font as input to the grub2-mkfont command, as mentioned in this thread (see PabloTwo's post). It should produce a file somewhere around 20-35KB in size for most fonts. So my guess is that those two themes are using some default Grub font.
I ended up copying the starfield theme (and called the new theme "fedora"  ) and used a different background and a different font with different colors. It looks pretty good; I'll have to figure out a way to take a decent picture of it.
|
If you have the space just create a vm then simply take a screen shot of the vm booting. That's how I got the original screen shots for this post. Never took notice to the font file size as I created my own and have been using that instead of the one included with F17. Oh and by the way I'm not the creator of the splash that comes with F17. I just found it on the install and figured out how to make it work correctly. and that is the reason that there are no icons included on the default install.Not to mention the changes I made to the splash and numerous other files to make the icons available for the splash screen.
If you read through all of my posts you'll see that I gave credit to the original creator of the grub splash theme. And I also changed my back ground to something I like better then the starfield that was included which I used as a starting point to get the grub splash actually working.
|

31st May 2012, 07:38 PM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 267

|
|
|
Re: Grub Splash, For those interested
Totally awesome! Can the text be another color?? (Experience with a system forced upon us at work as well as research: blue/black are not terrific foreground/background colors). That aside, OUTSTANDING!!
|

1st June 2012, 05:55 PM
|
 |
Registered User
|
|
Join Date: Nov 2006
Location: Detroit
Posts: 4,723

|
|
|
Re: Grub Splash, For those interested
Ok, I managed to take a picture of my monitor with the custom GRUB theme I made (modified from the starfield theme):
__________________
OS: Fedora 18 x86_64 | CPU: AMD64 3700+ 2.2GHz | RAM: 2GB PC3200 DDR | Disk: 160GB PATA | Video: ATI Radeon 7500 AGP 64MB | Sound: Turtle Beach Santa Cruz CS4630 | Ethernet: Realtek 8110SC
|

1st June 2012, 07:06 PM
|
 |
"Registered User" T-Shirt Winner
|
|
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,141

|
|
|
Re: Grub Splash, For those interested
Quote:
Originally Posted by lightman47
Totally awesome! Can the text be another color?? (Experience with a system forced upon us at work as well as research: blue/black are not terrific foreground/background colors). That aside, OUTSTANDING!!
|
I'm not running F17, still happy to stay with F16 a good bit longer. The graphic image I chose for a grub2 menu background image had a lot of white fluffy clouds at the top of the scene, and with the default white text, that wasn't working so good. I did some looking at some theme configuration files as used on Ubuntu, and came up with this:
Created the file: /etc/grub.d/05_font_color
The file contents are:
Code:
#!/bin/sh
cat <<EOF
set root='(hd0,msdos5)'
if [ -f /grub/farcry_3-1440x900.jpg ]; then
set menu_color_normal=black/black
set menu_color_hightlight=white/dark-gray
set color_normal=black/black
set color_highlight=white/dark-gray
fi
EOF
The "if" test is there in case I should want to use a different background image where black text wouldn't be appropriate. If that was the case, I'd simply relocate the specified image from that directory and the font color would default back to white, without having to remove, disable or edit the file.
The line "set menu_color_normal=black/black" is what sets the text color to black.
I would imagine F17 already has some sort of "theme" configuration file in /etc/grub.d/, so you'd probably just do a modification to the existing theme file to change text colors.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 22:57 (Wednesday, 19-06-2013)
|
|
 |
 |
 |
 |
|
|