Page 1 of 4 123 ... LastLast
Results 1 to 10 of 40

Thread: PART 1: Customizing the graphics in Grub, Usplash, Xsplash and GDM.

  1. #1
    Join Date
    Dec 2009
    Beans
    286

    PART 1: Customizing the graphics in Grub, Usplash, Xsplash and GDM.

    UPDATE:

    This tutorial has become too large to post on the forums. I have instead created a 58 page PDF file comprising the entire tutorial. The tutorial includes screenshots and sample files that can be used for testing. All of the files, including the PDF file are archived in a .tar.gz file. It can be downloaded from this link:

    http://www.mediafire.com/file/2yimyo...ization.tar.gz

    This is my first tutorial, so any comments is appreciated. I will leave Part 1 posted but any questions and or comments on any part of the tutorial can be posted in this thread.

    DISCLAIMER:


    The procedures outlined below have been tested ONLY on Karmic. There is no guarantee that they will work on other versions of Ubuntu. If you decide to test on other versions, YOU DO SO AT YOUR OWN RISK. A lot of the customization is carried out at the command line and involves directly modifying system files. Of course, we all know the dangers associated with such actions, so if your system gets screwed, refuses to boot, catches afire, runs away or goes to sleep and never wakes up again, DO NOT BLAME ME. You have been FORE-WARNED.

    With all the prelimanaries out of the way, put on the coffee, send the kids to bed, put out the dog, kiss the wifey good-nite and let's get cracking.

    INTRODUCTION

    In my quest to fully customize the graphics in Ubuntu 9.10 (Karmic Koala) starting fom the Grub menu and working my way up to the desktop I've found bits and pieces of informations scattered throughout the threads. Most of these were not geared towards people new to Karmic. Also, a lot of the customization were not thorough enough, I wanted to do a lot more than what was given. This is when I decided to test the waters of customizing Karmic. The learning curve was very steep because I am also a beginner to Karmic and Linux on the whole. I decided to put everything I've learnt into what I hope will be a very comprehensive guide on customizing the graphics screens of Karmic starting from the Grub menu.

    This guide is written for beginners and so the more experienced users may fnd it a bit repetitive. Some may even say that there are programs available that allows you to do the customizations easily, but I've found that such programs just scratches the surface of what's possible.

    Open a Terminal window by clicking on Applications => Accessories => Terminal. Most of the commands that's used start with the sudo command. Sudo allows us to run a command with root privileges. For more information on sudo, open the Ubuntu Help Center and type 'man sudo' in the search box or have a look at the following links:

    http://ubuntuforums.org/showthread.php?t=261204
    http://ubuntuforums.org/showthread.php?t=723263
    http://ubuntuforums.org/showthread.php?t=292094
    http://en.wikipedia.org/wiki/Sudo

    Throughout this document, whenever I back-up fles, I append '_orig' to the original names. This applies to both files and directories. You may rename them whatever you like but, please try to be consistent.

    Gedit is used as the text editor throughout this document but, if you are more comfortable using another editor then please do.

    The different graphic screens during the boot-up sequence occur in this order:

    grub => usplash => xsplash => gdm (login screen) => xsplash => desktop

    I will go through the procedures for customizing each of these, starting with Grub.

    BTW, the graphics are meant to educate not entertain, so please.

    Finally, this tutorial has become too long to put into one post, so it's split up into four parts:

    Part 1: Customizing the graphics in Grub (shown in this post)
    Part 2: Customizing Xsplash
    Part 3: Customizing the graphics in GDM
    Part 4: Customizing Usplash


    PART 1: Customizing the graphics in GRUB

    The procedure listed below changes the Grub menu colors and adds a background image (Grub wallpaper). It was tested on Grub 1.97~beta4 ONLY.

    First, back-up the files that will be modified. The three files that will be modified are:

    1. /etc/grub.d/05_debian_theme
    2. /etc/grub.d/00_header, and
    3. /etc/default/grub

    Enter the following commands in the Terminal window:
    Code:
    sudo cp /etc/grub.d/05_debian_theme /etc/grub.d/05_debian_theme_orig
    sudo cp /etc/grub.d/00_header /etc/grub.d/00_header_orig
    sudo cp /etc/default/grub /etc/default/grub_orig
    To restore the original files, enter the following commands:
    Code:
    sudo cp /etc/grub.d/05_debian_theme_orig /etc/grub.d/05_debian_theme
    sudo cp /etc/grub.d/00_header_orig /etc/grub.d/00_header
    sudo cp /etc/default/grub_orig /etc/default/grub
    Menu Colors:

    The text colors for Grub's menu are specified in the 05_debian_theme file. Open this file for editing with gedit:
    Code:
    gksudo gedit /etc/grub.d/05_debian_theme
    Locate the following two lines at the beginning of the file:
    Code:
    set menu_color_normal=white/black
    set menu_color_highlight=black/white
    The color format is: foregroundcolor/backgroundcolor. For a list of possible colors that can be used, have a look at:
    http://www.gnu.org/software/grub/man...lor.html#color

    Set the menu colors to green text on a black background and reverse it for the selected item in the menu:
    Code:
    set menu_color_normal=green/black
    set menu_color_highlight=black/green
    Save the changes and exit gedit. Grub must be updated for the changes to take effect.

    Enter this command in the Terminal window:
    Code:
    sudo update-grub
    This updates the /boot/grub.cfg file. Reboot to see the new menu colors. Here's a screenshot of what it looks like.

    Click image for larger version. 

Name:	grub_colored_menu.jpg 
Views:	385 
Size:	111.1 KB 
ID:	152220

    Notice the Grub title and help text are still white. To change these colors, do the following:

    Open /etc/grub.d/05_debian_theme for editing:
    Code:
    gksudo gedit /etc/grub.d/05_debian_theme
    Add the following line (shown in red) beneath the set menu_color_highlight line:
    Code:
    set menu_color_normal=green/black
    set menu_color_highlight=black/green
    set color_normal=green/black
    The beginning of the /etc/grub.d/05_debian_theme file should now look something like this:
    Code:
    set_mono_theme()
    {
      cat << EOF
    set menu_color_normal=green/black
    set menu_color_highlight=black/green
    set color_normal=green/black
    EOF
    }
    Save the changes and exit gedit. Update Grub to reflect the changes.
    Code:
    sudo update-grub
    Reboot to see the changes.

    Now that we can change the menu colors, let's add a backgound image.

    Background:

    Grub's default screen dimension is 640x480. Grub does not scale the background image to fit the screen's dimension so the image used should have the same size as the screen's dimension. At this point in the tutorial, copy the image file to /usr/share/images/desktop-base/moreblue-orbit-grub.png. Grub wll accept either a png or tga format image file.

    Assuming your image file is in your Documents directory and named mygrubimage.png, enter (in the Terminal window):
    Code:
    sudo cp ~/Documents/mygrubimage.png /usr/share/images/desktop-base/moreblue-orbit-grub.png
    Grub can also use a different menu color when a background image is displayed. Open /etc/grub.d/05_debian_theme for editing and locate the following lines:
    Code:
    if background_image `make_system_path_relative_to_its_root ${bg}` ; then
      set color_normal=black/black
      set color_highlight=magenta/black
    else
    Change the colors:
    Code:
    if background_image `make_system_path_relative_to_its_root ${bg}` ; then
      set color_normal=green/black
      set color_highlight=black/blue
    else
    Save the changes, exit gedit and update Grub to reflect the changes:
    Code:
    sudo update-grub
    Can I use images from another directory? Yes, you can. This is how it's done:

    Open /etc/grub.d/05_debian_theme for editing and locate the line:

    Code:
    for i in {/boot/grub,/usr/share/images/desktop-base}/moreblue-orbit-grub.{png,tga} ; do
    Add the directory with the image to this line like this (assuming that the name of the directory is /home/towheed/Documents/images):
    Code:
    for i in {/boot/grub,/usr/share/images/desktop-base,/home/towheed/Documents/images}/moreblue-orbit-grub.{png,tga} ; do
    Next, assuming the name of the image is shaded.png, replace moreblue-orbit-grub with shaded. The line should now look similar to this:
    Code:
    for i in {/boot/grub,/usr/share/images/desktop-base,/home/towheed/Documents/images}/shaded.{png,tga} ; do
    Remember, the dimensions of the image file must be 640x480.

    Update Grub to reflect the changes.
    Code:
    sudo update-grub
    Reboot to see your new background.

    Grub can use images of different dimensions for its background. Before this is done though, the video mode that Grub uses must be changed. Grub may not necessarily support all of the video modes of a particular graphics card. To determine which modes Grub support, follow this simple procedure:

    1. Reboot
    2. When the Grub menu shows, press 'c' to go the Grub command line. Your prompt should be 'sh.grub>'.
    3. At the prompt type 'vbeinfo'. A list of video modes will be displayed.
    4. Take note of the mode you would like to use, i.e.: 1024x768, 1280x1024 etc.
    5. Press <ESC> to return to the menu.
    6. Boot your menu choice and continue from below.

    Open /etc/default/grub for editing:
    Code:
    gksudo gedit /etc/default/grub
    Locate this line:
    Code:
    #GRUB_GFXMODE=640x480
    The hash (#) symbol indicates this line is a comment. Uncomment the line by deleting the hash and replace the 640x480 with the mode that you noted in Step 4 above. If 1024x768 was chosen the line should look like this:
    Code:
    GRUB_GFXMODE=1024x768
    Grub will now use this video mode and an image this size can now be used for the background.

    When finish editing, save the file, close gedit and update Grub. Reboot to see the menu and background image in the new video mode.

    If after rebooting, the menu is still shown at 640x480, the file /etc/grub.d/00_header must be edited.

    Open the file for editing:
    Code:
    gksudo gedit /etc/grub.d/00_header
    Locate the following line:
    Code:
      set gfxmode=640x480
    Change it to:
    Code:
      set gfxmode=${GRUB_GFXMODE}
    Save the file, close gedit, update Grub and reboot.

    NOTE: Whenever we modify these files (or any of Grub's configuration files) we must update Grub for the changes to take effect.

    For those interested in customizng other aspects of Grub take a look here:
    http://ubuntuforums.org/showthread.p...u+entries+grub

    Last edited by towheedm; April 22nd, 2010 at 05:00 AM.

  2. #2
    Join Date
    Dec 2009
    Beans
    286

    Re: PART 1: Customizing the graphics in Grub, Usplash, Xsplash and GDM.

    I see the file has been downloaded 85 times. Anyone care to post any comments or remarks? I am thinking of expanding it to include Lucid and Plymouth. I would like to know whether there's enough interest in it before I invest any time into it.

    Thanks.

  3. #3
    Join Date
    Feb 2010
    Location
    /proc/sys
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Smile Re: PART 1: Customizing the graphics in Grub, Usplash, Xsplash and GDM.

    Thanks towheedm! Your guide is very well written and easy to follow. I've been looking for months for info on how to customize the new evil GDM and almost gave up... until someone sent me a link to your guide =D>

    Now i can avoid the useless gdm2setup...

  4. #4
    Join Date
    Dec 2009
    Beans
    286

    Re: PART 1: Customizing the graphics in Grub, Usplash, Xsplash and GDM.

    Quote Originally Posted by 9tails
    Hi, I followed your guide and was able to fully customize my Lucid-based system to my liking, so THANKS for your work!

    I was wondering if there is a way to change the system name appearing below the icon on the login screen (just above the optional banner message). I don't want to change my system's name, I just need a way to specify a different message. Do you know if it is possible?

    Oh and if there is a way to hide the bottom bar (on the login screen) it would be awesome
    To answer your first question, there is no easy way to change this message. This message has two values: the computer's name and the OS version. You can click on the message to toggle between these two values. Unfortunately, both are hard coded into the simple-greeter source code. I looked into this when I was writing the guide and the only way I could see of changing this would be to re-code GDM. Not a simple task for the average user.

    The bottom bar is the panel, similar to the panel on your desktop. I'm not sure about this one, but again, it appears to be hard coded into GDM. This is at the top of my TODO list because I would also like to get rid of the panel. A work around though might be to make it completely transparent using Compiz. I have not put much effort into it though as I've been testing Lucid.

    Thanks again for your wonderful comments.

  5. #5
    Join Date
    Feb 2010
    Location
    /proc/sys
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: PART 1: Customizing the graphics in Grub, Usplash, Xsplash and GDM.

    Hi towheedm, thanks for your reply.

    I saw there was an option in the gdm configuration to specify a different welcome message, at least according to http://projects.gnome.org/gdm/docs/2...iguration.html

    So I added a [greeter] section to /etc/gdm/custom.conf and used DefaultWelcome = false and Welcome = SOMETHING, but I guess it's only for older GDMs as it didn't work

    Even the "OS version" message is hardcoded instead of reading /etc/issue dynamically. Unbelievable.

    I'm tempted to alter the source code of GDM 2 and recompile it, but then again perhaps it's not a good idea as this new GDM is probably going to receive lots of updates and bugfixes (or at least I hope so... the new gdm is ugly!)
    Last edited by 9tails; May 11th, 2010 at 09:11 AM.

  6. #6
    Join Date
    Dec 2009
    Beans
    286

    Re: PART 1: Customizing the graphics in Grub, Usplash, Xsplash and GDM.

    Yes, version 2.28 is completely different than previous versions when it comes to theming. One way I tried to change the simple-greeter window was to build a completely new simple-greeter. Unfortunately, most of the objects in the simple-greeter are controlled by the simple-greeter source code. These cannot be left out because when GDM looks for them and cannot find them, it simple hangs. Even naming the objects the same and hiding them is useless bacause GDM shows then when it needs to.

    Let's say for instance, you've disabled the user list. You may noticed that GDM prompts you first for your username and then for your password using the same input box. That's bacause there's only one text entry box named 'auth-input-box' in the simple-greeter that GDM uses to collect authentication information. So you cannot create a greeter with seperate username and password entry boxes.

    So again, to redo the simple-greeter would involve modifying the simple-greeter.c source code file. My present knowledge (or lack of it) of GTK2.0 controls prevents me from taking this further.

  7. #7
    Join Date
    Feb 2010
    Location
    /proc/sys
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: PART 1: Customizing the graphics in Grub, Usplash, Xsplash and GDM.

    Quote Originally Posted by towheedm View Post
    So again, to redo the simple-greeter would involve modifying the simple-greeter.c source code file. My present knowledge (or lack of it) of GTK2.0 controls prevents me from taking this further.
    Anyway as I said before I don't think it would be worth the trouble. In its present state the new GDM looks more like an alpha release than a finished product. No wonder there are lots of discussions around on how to downgrade to the older version. I guess it's going to be improved and functionality (e.g. theming) is going to be added, but that means we'd have to patch its code again and again, so I think I'll just wait for now.

  8. #8
    Join Date
    Feb 2010
    Beans
    11

    Re: PART 1: Customizing the graphics in Grub, Usplash, Xsplash and GDM.

    Quote Originally Posted by towheedm View Post
    To answer your first question, there is no easy way to change this message. This message has two values: the computer's name and the OS version. You can click on the message to toggle between these two values. Unfortunately, both are hard coded into the simple-greeter source code. I looked into this when I was writing the guide and the only way I could see of changing this would be to re-code GDM. Not a simple task for the average user.
    compiling gdm needs all sorts of -dev libraries and i really don't want to install them on my pc... however i would REALLY appreciate an edited version of the gdm-binary... one that lets you choose a string to display instead of your hostname, or at least one that doesn't show the distro name when you accidentally click on it.

    thanks from me too for the awesome guide!

  9. #9
    Join Date
    Jun 2005
    Location
    the dying blue planet
    Beans
    136

    Re: PART 1: Customizing the graphics in Grub, Usplash, Xsplash and GDM.

    Quote Originally Posted by towheedm View Post
    I see the file has been downloaded 85 times. Anyone care to post any comments or remarks? I am thinking of expanding it to include Lucid and Plymouth. I would like to know whether there's enough interest in it before I invest any time into it.
    Just downloaded. Am impressed with what you have compiled in the PDF. I had all this worked out for previous distros - Grub, Usplash, GDM etc. - but now will have to start from scratch if I want to go with Lucid. Very frustrating. But at least with your guide, I should eventually be able to do the customizations I want. In the meantime, I think I'll be sticking with Hardy until Lucid's kinks (and there are MANY) get worked out.

  10. #10
    Join Date
    Feb 2010
    Location
    Cobourg
    Beans
    163

    Re: PART 1: Customizing the graphics in Grub, Usplash, Xsplash and GDM.

    hey, I was wondering how to disable the splash screens when Ubuntu loads.In the pdf I see it shows the files here '/usr/share/images/xsplash/' but I don't see any images there.
    Not a huge issue, but just want to be rid of it so it looks like it goes from POST straight thru to the Ubuntu desktop.

    oh btw, interesting PDF file, will go thru it more when I can get my reader to zoom in beyond 400%. I use my TV as a monitor and PDF's are a bit hard to see on here for some reason.
    Last edited by JohnnyC35; May 18th, 2010 at 04:11 PM. Reason: fixed not having to chose the kernel before boot up by installing the Startup Manager


Page 1 of 4 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •