Tuesday, 5 May 2009

Perfect Ubuntu Setup - Instructions

Hello,


in this post series, I will explain, step by step, how to customize Ubuntu 9.04 to, at least, my liking. I will show how to conserve vertical screen space, how to change the default colour scheme, how to clean up Firefox, how to easily install commonly used software, including Windows software, and how to make the most of the Gnome Panel. I will also introduce a program that lets You juice up that kludgy laptop pad mouse. The first post will deal with changing the look of Ubuntu to suit Your preferences.

The picture to the left shows some examples of Ubuntu themes. The same themes can be applied on any Linux system that uses the GNOME desktop.

As You might have guessed, this guide requires Ubuntu. Most of the things here do not require a very new version. I recommend Ubuntu 8.04 or newer. If You already have a previous Ubuntu version, You can fire up the Update Manager from System - Administration - Update Manager. It allows you to Upgrade the system to the new version. For those who do not have Ubuntu, the first step is to download and burn an Ubuntu LiveCD. This CD allows You to try Ubuntu and these instructions without touching your hard disk. It also has an easy to use installer, should You choose to install it. To get Ubuntu, go to the ubuntu download site. Choose a location, and click Begin download. This may take some time. After You have downloaded the CD image, use your favourite CD burning software to make a bootable CD out of it, or use some tool such as UNetbootin for making a bootable USB memory stick instead. Then boot with it, and start tweaking!

Themes, Firefox and OpenOffice

Some appearance themes
Some appearance themes

When I set up a new Ubuntu machine, the first thing that bugs me are the interface colours. I include here some of my favourite themes, from old to new. I currenly use the pleasant dark-coloured Murrine Wise Dark, found in the Murrine Colors theme package. To install it, download the package, go to System - Preferences - Appearance and click the Install option. Then point the file browser at the downloaded package and press Ok. The Murrine Colors themes specify an icon set preference to use with them. If You do not have the icon set installed, or prefer another, You can simply change the icon set from Customize - Icons. I use the Tango icon set. I recently used the black Slickness-black theme with white text, easy on the eyes, and SlicknesS for Openoffice: slickness-dark-theme.tar.gz. Previously, I used the pleasantly green combination of the Cillop-Mediterranean and Gilouche themes, with black text: cillopgreen-theme.tar.gz. Users of white text themes know that setting up a web browser to fix all the erroneous web pages with backgrounds set to white, and text colour unset, or text colour set to black, and backgrounds unset, can be a pain. I also include a firefox_userContent.css Firefox colour override file for input fields and boxes, for this purpose. In the old days when I used gentoo, my preference was minimal decorations around windows, and maximum space available for applications. The chaos-gtk theme, ripped off from the chaos fluxbox/blackbox theme, is such: chaos-all-theme.tar.gz. To install the themes, You double click them, and extract to the home directory. Hint: Your home directory is on the left side of the file browser window that appears after you click extract. It is named after your username. Installed themes appear in System - Preferences - Appearance. You can activate them by clicking on them. To install the firefox content override, You go to your firefox profile folder. To find it, go to your home folder, and press Ctrl-H (Show hidden files). Then double-click .mozilla. Hint: You can start typing the name of a file or folder when browsing. This brings you to that folder quickly. You can then press enter to activate it. Then double-click firefox, and finally the profile name, which is something like mfeoifngee.default. In there you will see a folder called chrome. Put the userContent.css file in that folder. Make sure it is called userContent.css (Yes, the uppercase C is required). The firefox content override activates when put in the folder, when firefox is next restarted. To remove it, you need to rename or remove the file that we just saved in the profile folder. The override makes all input boxes black, and their text white, as the picture below shows.

Firefox dark input boxes
Firefox dark input boxes

Some of my themes require extra theme engines, icon themes, and mouse cursor themes to be installed. The chaos themes require the pixbuf gtk2 engine, the slickness themes require the ubuntulooks engine, and the Murrine themes require, surprise, the Murrine theme engine. I recommend the oxygen mouse pointer suite; it has a wide variety of colours and stylish, well animated pointers. Regardless of theme, I also recommend the Tango icon set. Tango icons have a standard set of colours, and clear rules on what icons should look like. Their expressiveness and simplicity appeal to the eye.

To install these things, go to System - Administration - Synaptic Package Manager. It will ask you to input your password. The password will be remembered for the next 5 minutes, if you do other administration. The theme engines are found by the names gtk2-engines-pixbuf, gtk2-engines-murrine and gtk2-engines-ubuntulooks. Hint: You can click the right part of the window, where the package names are, and start typing a package name to find it quickly. If you know the program or type of sofware you want, but do not know the package name, you can use the search button at the top part of the window. The mouse pointer suite is called oxygen-cursor-theme, and the extra colours oxygen-cursor-theme-extra. The tango icon set is called tango-icon-theme. I also installed tango-icon-theme-extras. To install something, double-click it, or right-click and mark for installation. Some programs may require additional changes when marked; for example, the ubuntulooks gtk2 theme requires you to remove the Ubuntu default window decorations package, human-theme. Removing this is not too drastic, but if you ever try to install or uninstall something that would require you to remove dozens of packages, it is likely dangerous and will render Your system unusable. Luckily, nothing will be installed until you click the big green Apply button in the top part of the window. Always take care to review your choices before clicking apply. To do this, look on the bottom left of the window. Click Custom filters. Now you have several new filters visible on the top left of the window. Click Marked Changes to review the changes you have marked. If something looks wrong, You can always right-click it and choose unmark, or close the program altogether, without applying the changes. After you click apply, the system will download the new packages, and install, remove and upgrade the packages that you requested.



OpenOffice High Contrast misfeature


The most widely used, and Ubuntu recommended free office suite, called OpenOffice or OpenOffice.org, thinks that you want to lose all colours when your colour scheme has a white foreground and a dark background colour, as demonstrated by the first picture. This makes presentations look wrong, text documents lose colour markup, spreadsheets lose most printing options, and so on. To turn this horrible misfeature off, when you have a dark theme, you need to tell openoffice to use a lighter theme instead. Luckily, the SlicknesS GTK2 theme matches the SlicknesS-black in looks, but is light enough for OpenOffice. Use this fix only if you use the SlicknesS-black dark theme. It is not required on normal themes, nor is it required with Murrine Colors. There are two steps to the process of activating this fix:

  1. Making sure that updates do not remove the fix, and
  2. Adding one line in the OpenOffice startup script.

For me, the best way to ensure things are done correctly and to the letter according to instructions, is using command line programs to do things. This is also usually faster. To open the command line in Ubuntu, go to Applications - Accessories - Terminal. Then run these commands to fix OpenOffice colours:

cd /usr/lib/openoffice/program # go to OpenOffice directory
sudo dpkg-divert --rename --add $PWD/soffice # Divert openoffice startup script updates away from the modified file

awk 'BEGIN{ s=0 }
$0 == "" && s == 0{
print "export GTK2_RC_FILES=\"/usr/share/themes/DarkRoom/gtk-2.0/gtkrc\"";
s=1;
next;
}
{ print $0; }' soffice.distrib | sudo tee soffice # this will create the soffice copy with the GTK2_RC override line.
sudo chmod 755 soffice # make the copy executable for all

And we are done with the fix. Now, You can start OpenOffice with

openoffice.org

or select it from Applications - Office - OpenOffice.org Word Processor. The white - and - black look should be gone, but You should now have good icons and colours visible on documents. In The Openoffice Tools - Options menu You can fine-tune Appearance to Your liking.

This concludes the instructions for changing the look of Ubuntu. The rest of the customizations will follow in future posts; the next post will discuss making Firefox sleek, quick and powerful.

No comments: