-   Debian (
-   -   Changing Grub and GDM images in Debian 7.x (

Lantzvillian 10-23-2013 06:30 PM

Changing Grub and GDM images in Debian 7.x
Hi all,

I am trying to change the background for grub and the login screen in Debian 7.0. What steps do I need to take as the targets used by update-alternatives do not work like they did for 6.0?

andrewthomas 10-23-2013 07:39 PM

Instructions for changing the grub background are here:

I don't use gtk3 or GNOME so I don't know about the new gdm

aus9 10-23-2013 08:32 PM


ideally you should edit your post and split off gdm and start a new post for that pls

I will continue this post for grub only

look at your settings you can edit with root powers for file=/etc/default/grub for lines
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'

Now you probably have never pressed C for commmands at the grub menu stage?
but all graphics cards in recent 10 years can handle 800x600

so (1) edit that size if you want smaller font screens

so I like to use mtpaint to resize images to that resolution.
so depending on your currrent image (target image) you want to display
as non-root run mtpaint and check what your target image is.

(3) once happy put that image with its correct image extension as per list
under /boot/grub/background.<something>

(4) as root run


Generating grub.cfg ...
Found background image: background.jpeg
Found linux image: /boot/vmlinuz-3.11-3.dmz.2-liquorix-686
Found initrd image: /boot/initrd.img-3.11-3.dmz.2-liquorix-686

reboot and see if it worked

good luck

jamison20000e 10-23-2013 09:32 PM

For this I just looked at /boot/grub/grub.cfg to see

if background_image /usr/share/images/desktop-base/joy-grub.png; then
now the tricky part as 'sudo gimp' doesn't seem to work for me but I did not try until wanting to post this as my file-manager Dolphin has a plug-in for root actions so used that to open /usr/share/images/desktop-base/joy-grub.png in the Gimp and pasted over it :D

aus9 10-23-2013 11:57 PM


I am aware you are not the OP!

However I suggest you read again my suggestion to use mtpaint as a non-root user.

that is, if root powered gimp does not work,
start mtpaint as a non-root user

resize or rescale your target image to some size that matches your /etc/default/grub line for GRUB_GFXMODE

then use root powers to copy that new file into /boot/grub saved as background.png (in your case png)


I believe the OP wants to choose his own image and not some existimg package image.

I may be wrong


jamison20000e 10-24-2013 08:17 AM

my mistake not TLTR but I only skimmed, plus I did just paste a new image over the old (+resize) an option for the OP+

Lantzvillian 10-24-2013 11:49 AM

Thanks guys - and yes I have looked through Grub options before and I'm fairly competent with uboot too :P

Aus9 - there are very limited options available inside of the default grub option. Image extensions and a file name are not present. The GRUB_GFXMODE directive is about the only one present actually.

I did have a look at /boot/grub.grub.cfg and I found:

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 8e847c59-3d1e-4214-8f8b-e986994a6047
insmod png
if background_image /share/images/desktop-base/joy-grub.png; then
set color_normal=white/black
set color_highlight=black/white
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
This appears to be suggesting that the default may not be the place where certain directives are stored. I kind of don't want to just overwrite the images with a replacement.

jamison20000e 10-24-2013 12:03 PM

you can simply make a backup of /share/images/desktop-base/joy-grub.png if you ever want to undo and then paste a new image into it resizing selection to presumably 640 x 480 (what I did anyway) sure it's a hack but it works.

Edit\Add: p.s: most other changes to /boot/grub/grub.cfg should be done through /etc/grub.d/ and:


Lantzvillian 10-24-2013 01:41 PM

I like to do things the right way and not hack my way through stuff like most advice on the forums these days. I'm highly into racing and I see this "honda tuner" mentality everywhere which results only in eventual and catastrophic problems.

This is going to be distributed internally and as such - Aus9 showed professionalism... I appreciate your time; however, it is not a "good" solution to what I had asked.

Here is how you do what I asked in my original post:

Inside of /usr/share/desktop-base/ I found this:

Then run this command to update Grub:


sudo update-grub
I also uncommented and modified the following directive inside of /etc/gdm3/greeter.gsettings


If you want to get rid of the Debian spiral, change these guys:


If you want to change the lock screen image/background you have to create a file called: /usr/share/images/desktop-base/lockscreen.xml Inside of it add the following (adjusted for your background) && Note: You may have several images and sizes defined here.


<size width="1920" height="1200">/usr/share/images/desktop-base/desktop-background.png</size>
Create a symbolic link to the config the OS will load:


ln -sf /usr/share/images/desktop-base/lockscreen.xml /etc/alternatives/desktop-background.xml
Then run this command:


sudo dpkg-reconfigure gdm3
Logout and log back in to see your changes.

jamison20000e 10-24-2013 01:50 PM

technically also a hack but fair enough although I think ones safer :D

widget 10-24-2013 05:44 PM

If you read the /etc/grub.d/05_debian-theme you will find that the first place it looks of a background image for the grub screen menu is /boot/grub.

Simply putting a properly sized image there is all you need.

As with any change to grub you need to run update-grub.

As for the GDM log in screen background, this is controlled by;

in Squeeze (Debian 6). It is the first line in the file. I believe that the location in the gdm3 directory has changed and the file name may be somewhat altered but the line is the same;

#/desktop/gnome/background/picture_filename        /usr/share/images/desktop-base/login.png
Uncomment that line and put in any path you want or change the default image "login.png".

I don't see how this is some weird hack any more than changing the default wallpaper.

If your system is used on a network changing the default images seems to me to be the most sensible way of doing things. This is your system, the default images are place holders that make the system work when installed. They are not your images but they now belong to you. You can change them.

jamison20000e 11-18-2013 12:58 PM


Originally Posted by Lantzvillian (Post 5051664)
I like to do things the right way and not hack my way through stuff like most advice on the forums these days.

Without "hacking"\"""the right way""" (of witch u may misunderstand) we would not have Linux. ;)

All times are GMT -5. The time now is 02:25 PM.