Running KDE apps out of tree

I’ve tried a couple of times over the last few weeks to build amaroK out of subversion so that I can help with their GStreamer 0.10 powered backend.

My usual method of developing stuff is to have a checkout somewhere under ~/devel. If the project supports running uninstalled, I’ll just work with it there. If it requires installation (as amaroK seems to), I like to install to ~/install.

Under no circumstances will I install to /usr, because it puts the package management system into weird states and it’s always a PITA to recover later. Plus, it makes thomasvs haemorrhage nastily.

How is this relevant? Well, I was given the impression that KDE apps absolutely need to be installed in the same prefix – unless I felt like building ALL of KDE in another prefix, I would need to install amaroK into /usr.

Armed with this knowledge, I tried building packages of an SVN snapshot. For some reason (again, I’m told) creating a snapshot tarball of amaroK’s SVN requires an active svn account, which I don’t have because I’m not a KDE developer. Hence, I would have to rely on someone else’s SVN snapshot tarballs to build packages from. In addition, building a package and installing it takes a relatively long time and would severely hamper my speed. I gave it up as a bad approach after spending around an hour to get a build package of amaroK 1.4.0-RC1 , and went off to do something productive.

About a week later, I tackled the problem again. This time, markey mentioned a variable called KDEDIRS. It turns out that by doing:


all my problems magically go away – I can run ‘amarokapp’ manually, debug it etc, and it correctly finds all its resources and whatnot in my preferred prefix.

So now, I have that exported from my ~/.xsession-vars file, along with all my normal PATH, LD_LIBRARY_PATH, PYTHONPATH and friends and everything just works.