Custom Icon on Mounted Volume

David Faure faure at kde.org
Thu Aug 16 05:04:22 PDT 2012


On Tuesday 14 August 2012 15:35:05 Kip Warner wrote:
> On Tue, 2012-08-14 at 14:21 +0000, David Faure wrote:
> > You could try a .directory file with
> > [Desktop Entry]
> > Icon=foo.png
> > 
> > (well, an icon from the icon theme would probably work better than a
> > relative one, not sure, try that first)
> 
> Hey David. I took a look through the fd.o spec for Desktop Entries and
> there isn't much written on the directory type. But when I created a
> foo.directory file, I noticed my Xfce shell manager (thunar) actually
> displayed the extension, as opposed to .desktop files where it
> completely hides the extension and gives a user friendly name.

Misunderstanding. I didn't mean "foo.directory", but ".directory". As the 
entire filename.
That makes the file hidden, too, by default, which is exactly what you want.

> So my questions then are two. First, is the .directory type supported by
> any desktop manager at present?

Yes, if you name the file correctly :-)

> Second, if I understand correctly, the following minimal dumped in the
> root directory of a mountable volume should be sufficient to display an
> icon for the user's volume manager, where supported?
> 
> [Desktop Entry]
> Encoding=UTF-8
> Type=Directory
> Version=1.0
> Name=Some Volume
> Icon=Icon.png

That's the idea, but whether it works correctly is for you to confirm :-)

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5



More information about the xdg mailing list