The place for all photography and linux fans


by Jacek Góźdź


    This is a second part of "Building a linux photo PC" article, this time about software. I will not review all the available software here, or give exact configurations that are "the best". I rather collect some thoughts and hints one can use installing linux. Please do not start any flame war - I write about my preferences, my workflow and my point of view. If anybody uses different setup, please consider this article as another voice in a discussion.
    Linux I want to have is simple to use, fast and stable. I use the PC presented in previous (hardware) part of this article. If you have different configuration (or laptop instead of a desktop) some of my suggestions may be not the best ones.

    Choosing distribution

    If you expect simple answere like - distribution X is the best for photographers - you won't find it here. In fact every distribution is good if you know it. If you are using (for example) slackware and you know how to configure and manage it - stick to it. The problems starts when you want to change the distribution or simply do not have any favourite one. Here are some of my thoughts about few distributions I tried:
    • Ubuntu is generally a good choice. If there is binary package of an application available there is 99% chance that it is compiled for ubuntu what is really convenient. Ubuntu is simple to install and set, unfortunately slow. Yes, all ubuntu fans will hate me but I find it slow. It uses GNOME and its applications what is a nice but RAM consuming and generally not the fastest selection of software. I still recommend ubuntu over debian, especially for not experienced users (or for laptops).

    • Xubuntu is a differnt version of ubuntu with selection of more lightweight software. Worth a try.

    • Ubuntu studio is yet another ubuntu version, this time suited for artists. Sounds interesting? Well, maybe for musicians, not for photographers as the selection of applications is not really impressive in this category.

    • Zenwalk is my personal pick. It is slackware based distribution that is very simple to install and worked on all my PCs out of a box. It is really lightweight and quite fast while all the features and most important packages (for example precompiled nvidia drivers) are there. The only problem with Zenwalk is its limited repository and need to compile kernel manually to have full support of 4+ GB RAM (this is a general problem as kernels are build to be compatible with older CPUs).

    • Gentoo is a source based distribution what means that user compiles the system from the ground. It allows to tune it according to one needs and get really fast environment. I do not recommend it to novice users and I personally never could tune everything to work without any glitches while speed increase was not that impressive comparing to i486 compiled Zenwalk.

    • Grafpup I found this distribution on the net but never testet it myself. It is a puppet linux fork tuned for computer graphics.

    • ArtistX is a live, debian based, distribution. Good if one wants to test some software before switching to linux.

    QT or GTK?

    Why not both? The real question is: how many and how important photo applications are using QT or GTK libraries and do I need to install KDE or GNOME to use them? Imagine you want to use f-spot under KDE. Not only KDE is not the smallest and fastest desktop environment but you also need to upload another bloated desktop - GNOME, plus complete mono framework. This is not efficient way of working. Try to find out which applications are essential for you and try do not mix both desktops.
    So what is the answere - KDE, GNOME or maybe none of them? Lets briefly discuss available software. All commercial applications do not care about your desktop as they are using their own libraries. If you are using those it does not matter what kind of desktop you have. There are few applications that uses QT (Digikam, QtPfsGui, Immix, DCRaw-assist, Krita). Digikam is a big application, with lots of features, that is a part of KDE desktop. DCRaw-assist and Krita needs it too. If you want to use any of them - install KDE, but my personal preferences are different. I do not like Digikam. It is slow and it's GUI is frustrating. I know that it looks great on screenshots but I don't find it any usefull in real life. From the mentioned applications only Immix and QtPfsGui draw my attention but both do not need KDE (jus QT libraries).
    How about GNOME? There is one application that explicitly needs GNOME: f-spot. In fact it is not worth much. I did not expected that but it turned out to be worse than Picasa while it needs whole GNOME and MONO framework. In other words there is no big need to install GNOME either. All most important applications do not need it (ok, some optional Hugin dependencies does).
    In fact RawTherapee, Raw Studio, UFRaw and GIMP - the most important applications for photographer (especially for RAW shooting photographer) are using GTK and do not need GNOME desktop. Install light environment like XFCE and use all of them. Then add QT libraries and play with Immix and QtPfsGui. You will save a lot of hard drive space and RAM for your images, not bloated desktops. This option has only one weak point - there is no good open source DAM application that fits here (maybe jBrout?). That's why I am waiting for Geeqie and Bibble 5.
    Final conclusion: as long as you do not need advanced photo management stick to GTK based environments and try to avoid GNOME. When it comes to open source DAM - try f-spot or Digikam.

    Don't forget to install...

    HAL (Hardware Abstraction Layer) allows to mount removable media (like flash cards, external hard drives, cameras) automatically while they are plugged in. No need for manual mounting. It really works and makes ones life much easier. Nearly all distributions supports HAL.
    RAW files thumbnailers are not that common as HAL. There is no problem if you are using one of the major desktops (XFCE, GNOME, KDE) and their file managers - proper thumbnailing works by default or after downloading additional thumbnailers. If you are using other software, please check if it supports your camera RAW files, this will really make your life easier. If you can choose between DCRaw and raw-thumbnailer, choose the second one - it is much faster.
    Don't forget about backup. First of all install DVD burning software (there is huge selection of such applications available), then one of the backup utility application. GRsync seems to be reasonable choice. Even if you do not plan to backup right now it is good to have everything prepared.
    A set of command line tools - I know that not everybody loves scripts, but ImageMagick and DCRaw are usually other photographic software dependencies. Even if they are not I strongly recommend to invest some time to write or adopt someones else scripts as they can save a lot of time. If you don't know where to start go here.

    Suggested setting

    Here I present my version of workflow. I use some commercial software (Bibble and Lightzone) but here I would like to stick to free software as long as possible. I installed Zenwalk therefore I had a working set of applications out of the box. DVD burner, card reader, external hard drives (including Epson P-2000 multimedia viewer) and my camera were all supported. There was also no problem with RAID (mdadm is preinstalled and supported by the kernel) and my nVidia video card (there are precompiled drivers available in the repository). The only problem I had was connected to RAM - I have 4 gigabytes and kernel was able to use only 3.2 gigabyte of it. That's because default kernel is compiled without memory extension support. I downloaded kernel sources from Zenwalk repository and used configuration file of the original Zenwalk kernel. After changing settings to support 64 gigabytes RAM, compiling and installing the kernel I now have 3985 megabyts of available RAM what is more or less the right value. The default desktop is XFCE therefore only 85 megabytes of RAM are used after system startup. Overall system performance is impressive too (as for distribution that is not compiled from sources).
    Time to tweak the system. I downloaded and manually installed Thunar-thumbnailers (I hope it will be available in next Zenwalk release) so I have thumbnails of my RAW files. Now I need a good image viewer - Zenwalk comes with GQview, a fast and fully featured image browser. I really like it but it is unmaintained so I decided to try out Geeqie, a new version of GQview, still in alpha. Don't worry about the alpha - it works the same as GQview but has more features. Need a basic photo management? Geeqie uses shared thumbnails, so if Thunar created them for my RAW files - they are available in Geeqie (still my minolta .mrw files are available only as thumbnails, no actual image preview, see supported RAW formats here). I can browse my folders watching the thumbnails, having easy access to EXIF data as well as histogram of images (not sure if it is true for supported RAW files). This application is a little more than a simple image browser. There are tools for finding duplicates, creating collections, comparing up to 4 images, color management and a great "pan view" (timeline, folder and calendar based). All of that in a small and fast application that needs only GTK2, LCMS and EXIV2 libraries. I really look forward the next release just to see what else will become available.
    We can see the RAW thumbnails but how about watching a RAW file in its full glory? I decided to install UFRaw because of two reasons. First - it is small and fast application therefore can be used as default RAW viewer (there is one big problem with it - the biggest zoom is 50%). I associated UFRaw with my RAW files and now whenever I click one - UFRaw starts. Second reason - it allows to process RAW files using the GIMP. Ufraw is available in Zenwalk repository but I decided to compile it myself because of some extra features that were not included in the binary package. If lack of 100% zoom is not a big issue for you UFRaw should be enough. If it is, think about RAWstudio. It is small, fast and allows 100% zoom but works a little different than UFRaw. It does not open one file but creates thumbnails of the whole folder (if you have lots of images there it may take a while before the application start), so it is more like Geeqie. It shows histogram and very basic EXIF data, allows to set files priority, navigate folders and do few basic manipulations. I suggest to use UFRaw as single RAW viewer and RAWstudio if one likes to navigate folders. Both applications may be used for very simple RAW developing (I prefere UFRaw as it allows to tweak the image a little bit more).
    Time for some searious RAW processing. If you want to stick to open source, the only solution is Digikam. This is the matter of needs and preferences but I personally do not recommend it. I'd rather make a 5 € donation to RawTherapee - another quite small, reasonably fast (if used on multi core CPU) GTK application. It brings the best demosaicing and sharpening algorithms as well as one of the best highlight recovery. The one and only disadvantage of it is lack of batch processing (scheduled for upcoming 2.4 release). If you don't like RawTherapee or need to process large number of files fast - invest 69$ or 129$ in Bibble (Lite and Pro respectively). It not only has native linux version but also ships with state of the art NoiseNinja noise removal algorithm. If you don't like it's interface or quality, check out some informations about upcoming Bibble 5. It will have better image quality, speed and is going to have selective editing. Still not convinced? How about Lightzone? Costs 200$ and has many unique features (as well as bugs ;) ). Unfortunately there is no open source RAW developer that has quality matching any of those two.
    After processing images there is time for printing. The easiest way is to install PhotoPrnt. A GTK, simple application that allows easy contact sheet and CD covers printing with color management. If that does not siut your needs there is Phatch. Still not happy? Maybe investing in worth 30 € TurboPrint is the right choice?

    swap partition or swap file?

    A typical rule is to create a swap partition that is two times larger than installed RAM. This was a good rule in times when PCs had 16 or 64 megabytes of RAM but now it becomes more and more outdated. Many users do not create swap partition and experience no problems as typical PC has at least one gigabyte RAM, what is enough even for complex tasks. In my case, even very intense processing never consumed more than 3 GB while I got 4. In other words swap is not that important if only one user is logged in (and launches one application at time). Unfortunately some batch processing scripts have problems with memory management and use as much of it as they can. In those rare cases swap is important. What to do? There is simple and elegant solution. If you don't know how much swap space you need (if you need it) or simply forgotten to partition the hard drive right - create swap file. I placed it in my home folder (remember that /home is mount point of my RAID 0 array, therefore swap file will benefit from its features). The good thing is that you can change the size of swap file (or even totally delete it) whenever you need. Here is the procedure of creating 2 gigabytes (2048 megabytes) swap file named swap.img and placed in /home (all the operations must be performed as root user or using sudo!).

    dd if=/dev/zero of=/home/swap.img bs=1024k count=2048
    mkswap /home/swap.img
    swapon /home/swap.img

    Now check if the swap works. Type top and see how much swap space there is (should be around 2048 megabytes). If everything seems ok you need to edit fstab to make swap active after reboot. Simply add the following line to the fstab file.

    /swap.img none swap sw 0 0


    Filesystems are tricky. I red many benchmarks and nearly all of them gave different results. Differences were huge so I can not tell you which file system is the best choice right now. Probably every major fs available in your distribution (EXT, RaiserFS, JFS, XFS) will give you the same overall performance level but there are some other important differences. EXT is well known and well tested fs. It is supported by every linux distribution and may be considered as a standard one. If you want to use PhotoRec - choose EXT. I personally do not like it as it performs periodical fsck. RaiserFS is fast but still considered experimental so I do not recommend it right now. JFS is fast, reliable and least CPU consuming. This is a very good choice if your CPU is not the strongest part of your PC. XFS is my personal pick. Few benchmarks pointed XFS as the most balanced and best performing file system on moderate size files (moderate size mean megabytes - the size of a photo).

    software RAID with mdadm

    Creating software RAID using mdadm is really simple (there is great article that explains RAID configuration, I give here just a short version of the procedure, please read the article carefully before proceeding). Imagine you want to combine two partitions into one RAID 0 array (what nearly doubles the bandwidth). First of all you need to prepare two partitions. Make sure they are created on different disks and that they are the same size (the difference in size will be not used so make sure it is as small as possible). In my case they were hda2 and hdb2. Now you need to:
    unmount partitions you have prepared
    change the partition type to linux raid autodetect
    to create RAID 0 called md0 use command: mdadm  --create  --verbose  /dev/md0  --level=0  --raid-devices=2  /dev/hda2  /dev/hdb2 . Remember to modify the command if you need different RAID type or have different partition names.
    check if everything is ok and create filesystem on the newly created md0
    Create mdadm.conf file typing mdadm --detail --scan --verbose > /etc/mdadm.conf
    Add md0 to fstab and mount it. It is ready to use.


Copyright 2008, Jacek Góźdź
template by : David Herreman