LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 10-23-2013, 06:30 PM   #1
Lantzvillian
Member
 
Registered: Oct 2007
Location: BC, Canada
Distribution: Fedora, Debian
Posts: 210

Rep: Reputation: 41
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?
 
Old 10-23-2013, 07:39 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
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
 
1 members found this post helpful.
Old 10-23-2013, 08:32 PM   #3
aus9
Guru
 
Registered: Oct 2003
Posts: 5,056

Rep: Reputation: Disabled
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

Last edited by aus9; 10-23-2013 at 08:53 PM.
 
1 members found this post helpful.
Old 10-23-2013, 09:32 PM   #4
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: infinity; (randomly born:) Milwaukee, WI, US, Earth
Distribution: any UNIXish that works well on my cheapest with mostly KDE, Xfce, JWM or CLI but open ;-)
Posts: 1,334
Blog Entries: 2

Rep: Reputation: 347Reputation: 347Reputation: 347Reputation: 347
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

Last edited by jamison20000e; 10-23-2013 at 09:34 PM.
 
Old 10-23-2013, 11:57 PM   #5
aus9
Guru
 
Registered: Oct 2003
Posts: 5,056

Rep: Reputation: Disabled
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
 
Old 10-24-2013, 08:17 AM   #6
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: infinity; (randomly born:) Milwaukee, WI, US, Earth
Distribution: any UNIXish that works well on my cheapest with mostly KDE, Xfce, JWM or CLI but open ;-)
Posts: 1,334
Blog Entries: 2

Rep: Reputation: 347Reputation: 347Reputation: 347Reputation: 347
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+
 
Old 10-24-2013, 11:49 AM   #7
Lantzvillian
Member
 
Registered: Oct 2007
Location: BC, Canada
Distribution: Fedora, Debian
Posts: 210

Original Poster
Rep: Reputation: 41
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.
 
Old 10-24-2013, 12:03 PM   #8
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: infinity; (randomly born:) Milwaukee, WI, US, Earth
Distribution: any UNIXish that works well on my cheapest with mostly KDE, Xfce, JWM or CLI but open ;-)
Posts: 1,334
Blog Entries: 2

Rep: Reputation: 347Reputation: 347Reputation: 347Reputation: 347
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

Last edited by jamison20000e; 10-24-2013 at 12:28 PM.
 
Old 10-24-2013, 01:41 PM   #9
Lantzvillian
Member
 
Registered: Oct 2007
Location: BC, Canada
Distribution: Fedora, Debian
Posts: 210

Original Poster
Rep: Reputation: 41
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.

Last edited by Lantzvillian; 10-24-2013 at 02:59 PM. Reason: Added in lock screen
 
1 members found this post helpful.
Old 10-24-2013, 01:50 PM   #10
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: infinity; (randomly born:) Milwaukee, WI, US, Earth
Distribution: any UNIXish that works well on my cheapest with mostly KDE, Xfce, JWM or CLI but open ;-)
Posts: 1,334
Blog Entries: 2

Rep: Reputation: 347Reputation: 347Reputation: 347Reputation: 347
technically also a hack but fair enough although I think ones safer

Last edited by jamison20000e; 10-24-2013 at 02:04 PM.
 
Old 10-24-2013, 05:44 PM   #11
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,179

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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.
 
2 members found this post helpful.
Old 11-18-2013, 12:58 PM   #12
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: infinity; (randomly born:) Milwaukee, WI, US, Earth
Distribution: any UNIXish that works well on my cheapest with mostly KDE, Xfce, JWM or CLI but open ;-)
Posts: 1,334
Blog Entries: 2

Rep: Reputation: 347Reputation: 347Reputation: 347Reputation: 347
Quote:
Originally Posted by Lantzvillian View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Span debian CD images into DVD images Christopher2222 General 3 09-01-2008 11:25 AM
Changing GRUB-GRUB, GRUB-LILO and vice versa andreas_skw Linux - Newbie 1 06-05-2008 06:40 AM
Trouble with changing gdm and kdm Rick069 Linux - Software 1 02-10-2006 08:50 AM
GDM changing permission of Garnome-script lamekain Linux - Software 2 11-05-2003 10:32 AM
changing GDM, xinit, etc. contrasutra Linux - Software 2 04-27-2003 09:53 PM


All times are GMT -5. The time now is 06:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration