jasonwryan.com

Miscellaneous ephemera…

Changing Karmic's Login Screen

With Ubuntu 9.10, Karmic Koala, they have dispensed with the GDM in order to accelerate boot time. This has made for a faster boot, but a side effect has been that there is no longer a straightforward way to theme your login - and the default isn’t just ugly, it’s fugly…

Fear not. It can be fixed.

The first thing you want to do is replace the background image. You can find it at /usr/share/images/xsplash.

Before doing anything rash, make a copy of the directory:

1
sudo cp -r /usr/share/images/xsplash ~/xsplash-backup

Then delete all of the images that begin with bg_:

1
sudo rm /usr/share/images/xsplash/bg_*

Use the gimp to create a background image for your desktop and save it into this directory, and name it bg_2560x1600.jpg …irrespective of the resolution of your screen. Leave the other images as they are: the logo and the marvellously named throbber will sit over your new background as you boot up…

Next you can change the colours of the login box to complement your new background. This is all controlled in /usr/share/themes/HumanLogin/gtk-2.0/gtkrc.

Again, make a copy:

1
2
sudo cp /usr/share/themes/HumanLogin/gtk-2.0/gtkrc \
/usr/share/themes/HumanLogin/gtk-2.0/gtkrc-backup

Then open the file and edit the relevant lines of code at the beginning of the file:

1
sudo vim /usr/share/themes/HumanLogin/gtk-2.0/gtkrc

As you can see, the colour scheme I have chosen uses dark grey to match my desktop. Feel free to experiment, you can’t really break anything…

Customized Karmic Login Screen

Simple, really.

Install .otf Fonts in OpenOffice

OpenOffice won’t recognize TrueType fonts with the extension .otf, so you need to convert them to .ttf in order to use them in that suite.

1
sudo apt-get install fontforge

If all the .otf files are in the same folder, then you are good to go.

First, you need the conversion script, which I found in this post:

otf2ttf.sh
1
2
3
4
5
6
7
#!/usr/local/bin/fontforge
# Quick and dirty hack: converts a font to truetype (.ttf)
Print("Opening "+$1);
Open($1);
Print("Saving "+$1:r+".ttf");
Generate($1:r+".ttf");
Quit(0);

Save it as otf2ttf.sh into the folder with the .otf files.

Then run:

1
for i in *.otf; do fontforge -script otf2ttf.sh $i; done

Move all the converted fonts to your your shared directory:

1
sudo mv *ttf /usr/share/fonts/truetype/myfonts/

And then change the permissions and reload the cache:

1
2
3
sudo chmod go+rx /usr/share/fonts/truetype/myfonts/
sudo chmod go+rx /usr/share/fonts/truetype/myfonts/*.ttf
sudo fc-cache -f -v

And the fonts will now appear in OpenOffice. Easy.