Monday, February 14, 2011

Change Grub background image in Squeeze

This is the first post of two on how to get rid of the SpaceFun theme. Obviously the first step is to change the desktop background. After that, it gets more difficult. Squeeze uses GDM (Gnome display manager) 3, which unlike GDM2 has no easy GUI to change backround image, and Grub (GNU GRand Unified Bootloader) 2, which also requires a bit of hacking to change the background image.
After following a dead end or two, I found a method for changing the Grub background image that seems to work on the Debian Forum. It involves editing the file /etc/grub.d/05_debian_theme and changing the name of the file in the line set_background_image (not WALLPAPER) as described in the link, followed by running update-grub as root.
I found a grub background image here. (Open the file with GIMP [or Inkscape], resize to fit your monitor and save with a .png extension. Drop the file in /usr/share/images/desktop-base as root and edit the 05_debian_theme file above to point to it.
Next: change the GDM2 background image.

[EDIT: The resize step is unnecessary. I'd changed the monitor resolution in Grub to get Plymouth working, but that proved to be unnecessary. The size for grub images is 640x480. Inkscape is probably a better program for editing the .svg templates/examples on the site above.]

Update: There's another method to change the background image in GRUB that I discovered today (after making an ass of myself on the Debian forum).

Edit /etc/default/grub and add this line:
GRUB_BACKGROUND=/usr/share/images/desktop-base/moreblue-orbit-grub.png
Changing the location and file name as appropriate, of course, as described here, or use the location used on the Debian forum if you've installed grub2-splashimages and want to use one of those images.

I've been looking into the nature of /etc/grub.d/05_debian_theme and /etc/default/grub, what they do and which might be the best method to change the GRUB background image. Here's what I found:
The standard way of changing the configuration is execution of shell scripts in directory (such as /etc/grub.d)... Many distros provide a centralized configuration file (e.g. /etc/default/grub), but shell scripts are free to use any means to draw their information or defaults.
GRUB Wiki Manual
/etc/grub.d/ - This is the directory that contains the GRUB script files. When you run update-grub these scripts generate grub.cfg
/etc/default/grub - This file contains menu settings that are read by the GRUB scripts. It is here that you would change the default timeout.
Howto: Customize your boot menu in GRUB 2
‘GRUB_BACKGROUND’
Set a background image for use with the ‘gfxterm’ graphical terminal. The value of this option must be a file readable by GRUB at boot time, and it must end with .png, .tga, .jpg, or .jpeg. The image will be scaled if necessary to fit the screen.
GRUB Manual

In my Debian Squeeze /etc/grub.d/05_debian_theme file, the script looks for a GRUB_BACKGROUND image in /etc/default/grub, and if it finds one, will not use the set_background_image in /etc/grub.d/05_debian_theme, which means that an image set in /etc/default/grub will have priority over one set in /etc/grub.d/05_debian_theme.
However, /etc/grub.d/05_debian_theme scripts seem to vary a lot between Linux distributions and versions. Bear in mind the quote above: shell scripts are free to use any means to draw their information or defaults.
In the event of this guide failing- consult appropriate distro guide or forum.

The boot

Debian is the only major Linux distro I've used to still have a verbose boot, as opposed to a graphical boot- a black screen fills with lines of text informing the user about what is going on during the boot process. The text scrolls up the screen so fast that most of it is illegible; most of what you can read would mean something to only a Linux geek.
Distros like Mandrive, Fedora, PCLinuxOS and of course Ubuntu show you a logo and an indicator of how the boot is going, on a colourful screen with a nice background image.

Here's an example from YouTube (with slightly comical messianic musical accompaniment).



I'm sure that new users of Linux would be more comfortable with a graphical boot. Even quite experienced users like me can't get much from it.
But Debian is first and foremost a stable distribution (graphical boots can be unreliable), and aimed more at experienced Linux users than "newbies", so a graphic boot is not a priority, or even disdained by some users.
I looked into the possibility of a graphical boot in Lenny some time ago, but it seemed to require a lot of hacking, which I'm not really into.
Something yesterday reminded me of the graphical boot program Plymouth, and upon checking, I found it in the Debian repository.
I installed it and rebooted- still the old text-based boot.
I really hate hacking Linux- because the solutions you find on the internet are often out of date and don't work any more, and trying different solutions designed for older packages or configuration settings can mess up a system. The beauty of Debian is, after all, stability.
However, I did manage to get Plymouth working. Here's how.
I came across this post on the Debian forum which says that if you're not using a propriety graphics card driver, all you need to do is install plymouth. OK, sounds promising, but didn't work for me.
Then I found the Debian Plymouth Wiki, which looked a bit off putting, but was simple enough to follow.
All I really needed to do was to edit my Grub configuration file and change my screen resolution:
GRUB_GFXMODE=1280x800
Modify this line to add splash:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
[Update: going back and checking, it seems only the second step below was really necessary.]

And then update Grub using this command as root:
update-grub2
Upon rebooting, I had a graphical boot screen (and the change to the screen resolution setting had fixed a problem with the Grub background image!)

There doesn't seem to be a GUI for selecting and previewing Plymouth themes in Debian (located in /usr/share/plymouth/themes). The Wiki link above gives the command line method of changing themes. Probably the best way to preview themes is to look on YouTube: there seems to be a video for just about every theme on every major distro.

[Update: Ubuntu users have a nice GUI available. See this YouTube demonstration.
I found a useful command to preview Plymouth themes in the readme file of the theme below.]

It's easy to install new themes too. I ended up using this simple dark theme from opendesktop.org.

Sunday, February 13, 2011

A theme is for life, not just for Christmas!

I'd been using the beta version of Debian Squeeze for some time before the final release last weekend. The new theme (Spacefun) arrived before Christmas last year. It's sparkly spaceship trail was very Christmassy. But over the coming weeks, the new theme began to offend, as welcome as the carcass of the Christmas Turkey when it hangs around too long.
Somebody on the Debian forum said it looks like something a ten year old might have on his bedroom wall, which sums it up exactly.
Opinion I've come across is divided, with some liking the new theme and some hating it.
Put me in the second camp, obviously. The theme is juvenile, nerdy, and in stark contrast to themes used by Mandriva, Fedora and of course Ubuntu, which try to be aesthetically pleasing and professional.
Spacefun seems to appeal to those Debian users who are nerdy and dismissive of attractive themes and even GUI's in general. These users are probably happy if new users are put off using Debian by the childish theme- they prefer it anyway as a more elite operating system, used only by the nerdiest of nerds.
Now there a lot of Debian users like that- the level of emotional intelligence among many contributors to the Debian forum is strikingly low.
But Debian is a very usable operating system, and there's no reason it shouldn't look professional and attract new users. Standby for a series of posts on how to make it so- first of all of course, bye bye Spacefun!

Wednesday, January 19, 2011

Wednesday, January 12, 2011

Debian Squeeze release candidate available

My previous post seems to have been a little premature- a poster on the same thread points out that Lenny was released two months after base-files was updated.
However, Squeeze has gone from being a beta to a release candidate. There's a download link on the thread.

Saturday, January 8, 2011

Debian Squeeze release imminent?

It looks very much as though Squeeze has gone stable and the official release is imminent.

Thursday, December 9, 2010

Group open windows in Gnome panel

I've been using Linux for four years, all that time the thought has been at the back of my mind that the bottom panel gets a bit full when I have multiple open windows. Something made me remember today that Windows used to group open windows when the taskbar was getting full. I quick Google search and I found that this is also possible in Gnome, although it's not the default. It's even possible to specify that windows are always grouped.
Simply right-click the little vertical "grip" bar to the left of the window list, and select preferences, as described here.
Doh!