Desktop entry Icons: filename extensions?

Alexander Larsson alexl at redhat.com
Wed Aug 18 11:06:40 EEST 2004


On Tue, 2004-08-17 at 16:46, Ville Skyttä wrote:
> On Tue, 2004-08-17 at 10:15, Alexander Larsson wrote:
> > On Tue, 2004-08-17 at 00:45, Ville Skyttä wrote:
> [...]
> > > I assume that the filename extension should be included in the value of
> > > the .desktop file's Icon key.  Correct?  If so (or if not), perhaps this
> > > could be clarified in some of the specs?
> > 
> > If you're using icon themed icons you should not give the extension. Its
> > likely that another theme could use another file format for your icon
> > (say .svg instead of .png). 
> 
> Let's say I have written an app and wish to include a freedesktop.org
> compatible .desktop file for launching it in the distribution tarball +
> one PNG icon for it.  I have of course no idea whether the people
> installing this app have themed icons or not.  What would you recommend,
> should I include Icon in the .desktop entry with or without ".png"?

I think without the suffix makes more sense.

> What about when packaging software for eg. Fedora Core 2 (or 3), should
> one include the extension or not?  Some stats: on my FC2 box, there are
> 95 .desktop entry files in /usr/share/applications which have the Icon
> key.  Of those, only 8 do not have an extension in the Icon value.  Yet
> I have the impression that icon theming works (not really verified right
> now; oh, and I use KDE).

In practice, both current desktops strip any existing suffix before
applying the icon themeing machinery.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl at redhat.com    alla at lysator.liu.se 
He's a scrappy moralistic master criminal who must take medication to keep him 
sane. She's a brilliant French-Canadian nun with an MBA from Harvard. They 
fight crime! 




More information about the xdg mailing list