Subdirectories in share/applications/ ?

Jaap Karssenberg j.g.karssenberg at
Tue Jun 20 21:32:57 EEST 2006

Hi all,

I just noticed that it is allowed to have subdirectories in the 
"DATA_DIR/applications/" directory. I was quite surprised to find that 
update-desktop-database handles this by replacing the directory 
separator '/' with a dash '-' when hashing the desktop files.

So when I have a "share/applications/kde/foo.desktop" this file is 
listed in "share/applications/mimeinfo.cache" as "kde-foo.desktop".

Since I am the maintainer of a perl module to find appropriate programs 
for a mimetype I would like to know the details of this behavior.

I have two questions about it.
1) Is this naming scheme in any of the XDG specifications? If not, in 
which spec does it belong - I would certainly expect it in the desktop 
entry spec since it discusses the "mimeinfo.cache" file already.

2) How do I resolve a desktop file from the mimeinfo.cache file ? 
Obvious replacing dashes by '/' isn't going to work since I find things 
like "xterm-usercreated.desktop" in my ".local/share/applications/" 

-- Jaap Karssenberg <pardus at>

More information about the xdg mailing list