LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Changing Grub and GDM images in Debian 7.x (http://www.linuxquestions.org/questions/debian-26/changing-grub-and-gdm-images-in-debian-7-x-4175481919/)

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:

https://help.ubuntu.com/community/Grub2/Displays

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

aus9 10-23-2013 08:32 PM

Hi

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'
GRUB_GFXMODE=800x600

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
.jpg|*.JPG|*.jpeg|*.png|*.PNG|*.tga|*.TGA
under /boot/grub/background.<something>

(4) as root run
Code:

update-grub
eg
Code:

update-grub
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
done

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
Code:

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

jamison20000e

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

cheers

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:
Quote:

### 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
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### 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:
Code:

update-grub

Lantzvillian 10-24-2013 01:41 PM

Jamison,
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/grub_background.sh I found this:
Quote:

ALLPAPER=/usr/share/images/desktop-base/desktop-grub.png
COLOR_NORMAL=white/black
COLOR_HIGHLIGHT=black/white
Then run this command to update Grub:

Quote:

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

Quote:

[org.gnome.desktop.background]
picture-uri='file:///etc/alternatives/desktop-grub'
picture-options='zoom'
If you want to get rid of the Debian spiral, change these guys:

Quote:

[org.gnome.login-screen]
logo='/usr/share/icons/gnome/48x48/places/debian-swirl.png'
fallback-logo='/usr/share/icons/gnome/48x48/places/debian-swirl.png'
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.

Quote:

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

Quote:

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

Quote:

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;
/etc/gdm3/greeter.gconf-defaults

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;
Code:

#/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

Quote:

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 04:53 AM.