Monday, 26 January 2009

Ubuntu Theme

I have done some research on the subject. And I have received lots of "good advice" Here are some results:

6 myths to go by

  1. Theming Gnome is hard to do: Well, actually it is pretty easy, once you understand how Gnome displays its windows and widgets
  2. There is no documentation around: It's true that the Gnome technical library is somewhat sparse, incomplete and sometimes error prone. However, there are some links to good documentation. And there is the source code of course.
  3. Better modify an existing theme: This is a definitive NO NO as far as I am concerned. You most likely add more junk to the underlying theme, making it even more unusable.
  4. There are no debugging tools around: While it is true that most tools advertised to be helpful are ancient and most likely not working properly, there are few tools that help you develop and test your theme (I will cover them later).
  5. One can download everything from the web: There is art.gnome.org. And - yes - there are window themes, icon themes, wallpaper, logon themes and bootsplash screens. But this does not make for great design. What's missing is a thorough and complete design. That cannot be downloaded.
  6. A good theme has to be better than Windows or Mac OSX: I'm afraid, the only thing a good theme can do is put Ubuntu / Linux on par with both former mentioned. Everything important was built into those GUIs and Linux mimics most of the style guides.
Some introductory material

This is a list of links that I found helpful:

Designing Metacity Themes - HOWTO
Understanding Metacity Themes
Metacity - Wikipedia, the free encyclopedia
GnomeArt/Tutorials
IconThemes
GtkThemes
GdmThemes
MetacityThemes
GtkEngines
Welcome | Murrine
Individuelle Metacity-Themen für GNOME
Understanding Metacity themes
Themes Blog
UsefulLinks

Useful tools

After experimenting with some tools that claim to help develop themes, I found these the most helpful:
  • metacity-theme-viewer: this shows the window frames for all 6 window types
  • metacity-window-demo: a tool to investigate gtkrc settings. It helps to optimize GTK layout
  • gconftool-2 (actually gconftool-2 --type=string --set /apps/metacity/general/theme themename): sets and resets themes
  • GTK_RC_FILES=~/.themes/mytheme/gtk-2.0/gtkrc Gnomeapp: this starts the gnome application with the corresponding gtkrc file. Helps to optimize GTK settings for applications and widgets.
  • gtk-chtheme: a small utility to select themes and preview the GTK widgets. Currently I have not found a better tool.
These tools were useless:
  • gtk-demo: even though it documents some of the widgets, it is outdated
  • The Widget factory: acclaimed to be the tool of choice to present themes on art.gnome.org, this is nothing more than a showcase. Outdated
  • gtk-theme-switch2: while not completely useless, it seems outdated. Some of the widgets are not shown (like scroll bars and handles). Use gtk-chtheme instead.
My first attempt in creating a theme was by (OK, I did it as well) copying a theme and modifying it to my needs. Unfortunately some of the code fragments did not make sense, so I developed a theme from scratch. It's not finished yet, but it is a starting point.

I will publish it on SourceForge when I have tested it more thoroughly.

I also plan to write a compendium in how to write your own theme and publish it under Creative Commons. This will take some time, but I keep up to it.

Comments are welcome, hints appreciated.

1 comment:

marnanel said...

I'm looking forward to seeing your compendium!