finding directory icon
sgurin at montevideo.com.uy
Thu May 31 00:48:15 PDT 2007
El jue, 31-05-2007 a las 06:46 +0200, Thiago Macieira escribió:
> Sebastian Gurin wrote:
> >Hi all. This is my first message to this list. I'm just starting with
> >freedesktop's standars extending the xdg-utils shell scripts.
> >Well, my problem is the next: I would like to find the icon name that
> >represent a directory in a freedesktop based system.
> >At this moment, I'm able to find common file's icon's looking in
> >their .desktop file in $XDG_DATA_DIR/icons directories. But directories
> >("x-directory/normal" mimetype) seems not to have an asociated .desktop
> >file like "normal" files like .mp3, .html, etc. So the question is: how
> >can I obtain the icon's name of the mimetypes like
> >Last, I'm working with linux debian based systems.
> >Thanks in advance, and excuse me for my poor english. Any tip will
> Since you're talking about .desktop files for icons and mimetypes, I
> believe you're referring to KDE 3's MIME type system. That is not XDG's
> shared-mime system, which uses XML files instead.
Mmmm... I think I'm talking about .desktop files that are mencioned in
fact, I have not kde installed on this machine
For a given mimetype, I'm looking for its default application .desktop's
file in $XDG_DATA_HOME/applications/desfaults.list and in
Once I've found the .desktop file of the application I can look up for
its icon. Is this "algorithm" for finding a mimetype's icon right?
Well, my problem with directories is that there is no default
application (in my machine) for opening files "x-directory/normal"
registered in $XDG_DATA_HOME/applications/desfaults.list..
P/D: I'm tring to make a linux filemanager in java. At this moment my
priority is to guess a standar way of finding an icon that represents a
Thanks for reading.
 which in my case are $HOME/.local/share
and /usr/local/share/:/usr/share/ respectively. This path were taken of
> If that is so, you're looking for the wrong MIME type. Directories in KDE3
> are inode/directory. And that one works:
> $ grep Icon= $KDEDIR/share/mimelnk/inode/directory.desktop
More information about the xdg