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.

Tuesday, 23 December 2008

Ext3 vs NTFS

During my bi-anual hard disk cleanup, I had a choice to make. Every two years (or so), I upgrade my backup disks to larger capacity. This year, I got several 1 TB hard disks from Samsung (they are fast, quite, reliable, and keep cool).

As I have been using Ubuntu for more than a year without any major problems, I thought of using a native linux file system on my backup disks. What would I want to use NTFS for anyway?

I formatted the first disk to ext3. Next I copied a full 250 GB hard disk to the drive. The whole drive took 3 1/2 hours to copy. The disk was evenly populated with small, medium and large size files. When I was finished, I was quite surprised that a 250 GB NTFS disk (233 GB netto data) would require something like 360 GB disk capacity on an ext3 formatted drive (including an offset ot 14 GB disk overhead).

There are ways to format hard disks specifically to ones needs, reducing overhead and tayloring meta information to a minimum. But using the tools offered by the GUI, you have to make do with the defaults.

In a second round, I formatted the same disk to NTFS. Used space was 233 GB (which would not surprise anyone).

So, if disk space on ext3 is used more freely, is the file system faster?

I timed the copying, using an idle notebook. Here are the results:

FSMB/secMB on Disk
ext315.2346
NTFS windows formated13.1233,5
NTFS ntfs-3g formated17.1233.5
Besides the fact that formating a 1 TB disk for ext3 takes some time as opposed to NTFS which takes just seconds, the NTFS file format seems to provide higher transfer rates on Ubuntu while maintaining a smaller footprint on the disk.

Further tests showed a degrading performance when the disk (or directory) gets filled up. After having filled 3/4 of the disk, transfer rates lay at around 4.5 MB/sec.

Conclusio

I have not looked into this in a statistically valid way. File system layout, file size and other aspects have not been covered. From the point of disk space usage, it seems that NTFS is more efficient.

If you want to share your own observations, I look forward to reading from you.

Sunday, 21 December 2008

Upgrading 8.04 Server -> 8.10

Ubuntu 8.04 is a Long Term Support (LTS) release. This implies that automatic upgrades to later releases are supressed in favour of having a stable system.

If one wants to upgrade from 8.04 to 8.10 (server edition) one has to edit the file
/etc/update-manager/release-upgrades
Search for the string:
Prompt=lts
and change it to:
Prompt=normal
(as described in the comments of the file). Now you should be able to run the upgrade utility:
sudo do-release-upgrade
This will start the upgrade process.

If you have followed previous hints on upgrade in this blog, you might have the upgrade-manager-core utility installed on your system (which includes do-release-upgrade). If not, you have to install it with sudo apt-get --install.

Upgrade takes approximately 20 mins on my server and requires a reboot to finalize the installation process.

Thursday, 20 November 2008

Theme Considerations

Here are my preferences:
I like my desktop to be bright and stimulating. I love a certain kind of blueish gray (or grayish blue as you like). The RGBs are #6B73A9.

I also like the aluminium decoration of the mac. It's clear, its clean and it does not distract from the task at hand. So probably brushed metal look will be nice.

I am not one to have a wild wallpaper desktop image. I prefer calm and quite abstract patterns. I get a kick out of mathematically motivated images.

Lets translate this into requirements:
  • Windows are white or very light gray
  • Borders are medium gray
  • Menus and tool bars are same medium gray
  • No separation lines between window title, menu bar and tool bars
  • Windows in the background are darker than windows in the front
  • Selections are my favorite gray-blue
  • Information windows, tool tips and hints are a faint yellow
  • Text is dark gray, not black (black is to hard on the eye)
  • Window corners are rounded
  • Tabs and panels should look like they are extruded a bit
  • Firefox and Thunderbird have corresponding themes
  • Icons are more photo realistic (however, harddrives do not have to look like the naked bare metal)
  • Prefer XML definition to images (slower loading)
I know that not everyone shares my taste. I think that there should be two themes, one bright and one dark.

I also consider positioning the window buttons (max, min, close) on the top left side. This minimizes the way, you have to move the mouse.

Creating a theme for Ubuntu


Let's face it: Linux themes are pretty ugly. Ubuntu's default theme beats most of them. The brown and orange might remind Mark Shuttleworth of his origins. I will spare you the details of what it reminds ME of.

Tangerine, ClearLooks and all the other prepacked themes are no better.

Ubuntu 8.10 comes with a new theme: DarkRoom. It makes one increasingly sucidal.

I've tried some stock themes from art.gnome.org and gnome-looks.org. The results are sobering (On the right is the most appealing window decoration I found so far. It's called Almond and was last updated in 2006).

I envy Mac users for their simple, visually appealing and intuitive interface. It seems that neither Microsoft nor the whole Linux community can come up with something that can compare to Apples GUI.

Is it really so hard? To find out will create my own theme.

... the Austrian Ubuntu Theme (AUT) ...

Here is my plan:
  1. Read into the subject: I have to understand how Gnome uses Metacity and rendering engines to draw the GUI.
  2. Define how the theme should look like
  3. Modify an existing theme to learn how things interact
  4. Create raw minimal theme: I have to figure out what is minimally required
  5. Resolve extras (Panels, awn)
  6. Learn how icons work
  7. Create a customized set of icons
  8. Make a .deb installer to install the theme on any machine
  9. Test on several machines runing Ubuntu (8.04.1 LTS and 8.10) and possibly Debian
  10. Write a HOW-TO that covers more than the bare Gnome tutorial
  11. Start a SourceForge project
I will post here regularly. Your recommendations are welcome.

Wednesday, 29 October 2008

Updating to Ubuntu 8.10 (64bit)

I recently described that upgrading to 8.10 beta was no pain at all. Today I upgraded my production notebook (as tomorrow will be the big day and I presume there will be no bandwidth available).
sudo update-manager -d
Here are some miscellaneous updates on my previous report:
  • VMware Workstation 6.5 offers a new dialog informing you that kernel drivers require updating. You can confirm and it does it automatically. (Hey, this is a feature I long waited for)
  • There is something with the new font in Mozilla. It is slightly slimmer (like Helvetica vs. Arial) and it gives a much nicer look on pages.
  • OpenOffice installation as described in my previous article works on 64bit equally well.
My thanks to Canonical (the Debian group, the Gnome fellows, the OpenOffice folks and all the others that participated). This edition of Ubuntu deserves to be called a desktop alternative.

Tuesday, 28 October 2008

Open Source tool to migrate Outlook calendar

When I moved from Windows to Ubuntu, I faced one mayor hinderance: Outlook.

In particular, migrating calendar entries from Outlook was near impossible.
  • OL2003 lets one export one single calendar item to iCal format (and you have to use a trick to even get there).
  • OL2007 lets you export more than one entry at once, if the entries are less than 1000 and do not span more than a 10 year periode (earliest to latest entry).
The last limit is particularly nasty, as birthdays will not migrate and if you have more than 1000 entries (which I had), you have to partition the export (which means you have to switch to list view, which also shows canceled and updated calendar entries).

FreeMiCal

Cut a long story short, I wrote a little program, available on SourceForge that exports all calendar items at once, regardlessly.

FreeMiCal comes as a source zip-package or just the executables (for easy use). It is written in C# and requires nothing more than a Windows machine with Outlook 2003/2007 and .NET 2.0 installed.

FreeMiCal was downloaded over 11.000 times in the last year. It seems to do the job and helps obliviate Outlooks calendar lock-in.