desktop-file-utils and XDG_DATA_DIRS
randy at linuxfromscratch.org
Wed Dec 15 12:54:26 PST 2004
Want to throw something out that everyone but me probably knows
about, but I'll ramble anyway.
GNOME and KDE both now are really hooked into the desktop-file-utils
program and XDG_DATA_DIRS envar. I found out the hard way.
I have an existing LFS-6.0 installation with a GNOME desktop built
in /opt/gnome-2.8. I am updating BLFS to KDE-3.3.2 and after building
aRts, kdelibs and kdebase in /opt/kde-3.3.2, I fire up the KDE desktop
and to my surprise, it's GNOME built on a QT platform. Well, not
exactly GNOME, it was KDE all right, but hardly any KDE applications
Not control center, desktop preferences, no KDE application in the
menu system, nothing. All I had in the menu system were GNOME apps!
After a bit of wasted time looking at the error messages and comparing
older KDE installs against my new 3.3.2, with no answers at all, I
played a hunch and updated the XDG_DATA_DIRS envar and ran
desktop-file-utils. Then cleaned up the home directory of any Desktop
and .kde entries and started KDE.
Everything back to normal. Everything works as it's supposed to.
KDE sweet as can be.
So, I suppose I need to update the desktop-file-utils page to include
notes about the XDG_DATA_DIRS envar. I put a mention about this envar
in the shared-mime-info instructions (though it needs to be updated to
include a mention of GNOME and KDE in installations other than /usr),
but didn't mention it in the desktop-file-utils instructions.
Both packages use this envar! Along with adding notes in the
shared-mime-info and desktop-file-utils packages, I think it would be
prudent to add a note to the "Configuring the core GNOME/KDE packages"
sections to ensure XDG_DATA_DIRS is set properly and to run the
In fact, there probably should be some mention in the KDE section
about installing the desktop-file-utils package.
What say the group?
And to answer a question DJ asked a few days ago about GNOME and KDE
using common .desktop files. Yes, absolutely.
You just have to make sure that if you're installing into prefixes
other than /usr, you must update XDG_DATA_DIRS and run the
Sorry for the long ramble....
More information about the blfs-dev