Custom Themes

Kdebase
Clearlooks
Klearlook
Tango

This section covers applying themes to both Gnome (gtk) and KDE (qt). By applying Gnome and KDE themes we can modify the look of the majority of applications. In order to apply KDE themes we will need to install kdebase. Clearlooks (gtk) and Klearlook (qt) are both attractive themes we can apply. Finally, Tango is a project which strives to have a uniform icon set across desktop environments. Although neither Gnome or KDE currently implement it, we can take advantage of the concept icon set.

Kdebase

Sadly, we need to install the entire KDE base just to apply KDE themes. Nevertheless, we'll carry on. Because this is rather large, I recommend using packages rather than ports.

pkg_add -r kdebase

Now that the base is installed, we can launch the theme editor.

konqueror &

Yes, we need to use a web browser to change our settings. But in its defence, Konqueror isn't a bad browser at all. Anyway, let's "Conquer our Desktop." Go to settings, and then Appearance & Themes. Make note of Style and Icons - we will use them both later on. Anyway, this is the last tool that we needed.

Clearlooks

Clearlooks is my theme of choice for gtk, and it is conveniently located in ports.

cd /usr/ports/x11-themes/clearlooks-themes
make install clean

Now to edit our configuration:

vi ~/.gtkrc-2.0

Add the following line:

include "/usr/X11R6/share/themes/Clearlooks/gtk-2.0/gtkrc"

Klearlook

Klearlook is the "qt counterpart" of Clearlooks, if you will. Unfortunately, it is not located in ports, so we'll have to do things manually. Fortunately for you, I've already gone through the trouble of making things work, and you just need to follow along. First things first, let's download the source. By scrolling down a little on the page, it should be easy enough to find. These instructions are for 0.9.9.2. I can't make any guarantees for later versions, but the process should be relatively the same. Now it's time to unpack this source:

tar -xf 31717-klearlook-0.9.9.2.tar.bz2

Now cd to the source directory:

cd klearlook-0.9.9.2

Now we can run configure.

env CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure
ln -fs /usr/local/bin/libtool libtool

We needed to pass a few arguments to configure because our layout is not the same in FreeBSD as in Linux. Finally, there is a libtool error with the included libtool, so we just replace it with a link to our system libtool. There is one more thing we must do before we make however.

cd kde/config
uic -o klearlookconfigbase.h klearlookconfigbase.ui
uic -o klearlookconfigbase.cpp -i klearlookconfigbase.h klearlookconfigbase.ui
cd ../..

I believe this is due to something happening improperly during configure...I'm not really sure. Either way, that will fix things up so we can make.

make
make install

Now that everything is installed, we fire up Konqueror.

konqueror &

Now browse through Settings, Appearance & Themes, Style. Choose Klearlook as your widget style, and apply.

Tango

The Tango Desktop Project aims for a consistent look across the entire desktop. We're going to install these icons now. The naming spec is not used by either of the leading desktop environments yet, so we'll need to install a utility for modifying the icon names.

cd /usr/ports/x11-themes/icon-naming-utilities
make install clean

Now we can begin by installing the Gnome icons.

cd /usr/ports/x11-themes/icons-tango
make install clean

Now we'll just fire up a text editor to set the new icon theme.

vi ~/.gtkrc-2.0

Add this line:

gtk-icon-theme-name = "Tango"

It's time to install the KDE icons, which once again happen not to be in ports, and require a bit more work to install (oh well, it's worth the effort). First let's download the icon library. Now let's get this show on the road.

tar -xf tango-icon-theme.tar.gz
cd tango-icon-theme

Time to make:

env CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --enable-png-creation
gmake

To avoid patching and recompiling our kde libs, we will instead use a slight workaround. In index.theme we need to change every instance of Context=Something, with Context=FileSystems. With vi we can do this in a flash.

vi index.theme

Now use this command (type it in verbatim).

:%s/Context=\w*/Context=FileSystems/g

Save and exit, and you're good to go.

gmake install

Once again, fire up Konqueror and head over to Appearances & Themes. This time go to icons. I hope you're pleased with these very attractive icons for your KApps.