Type=Application and Type=Service .desktop files

David Faure faure at kde.org
Wed Aug 23 12:20:08 BST 2006


It seems to be a bit strict and a bit unclear at the same time in kde3:

Type=Application desktop files must be installed under the "apps" resource, and must specify Exec=
Type=Service desktop files must be installed under the "services" resource,
 and can have either Exec or Library or both.

What's a bit strict is that installing a Type=Application under "services" leads
to an invalid service, E.g. in kdebase trunk kfontview.desktop, installktheme.desktop, 
KControl.desktop, kinfocenter.desktop, ScreenSavers/kblank.desktop and ScreenSavers/krandom.desktop
 are all invalid because of that.

Duplication of information (installation dir + Type key) is bad because it creates such problems,
it's easy to get a mismatch.

Why do we have a Type key? Well I don't know, we just do. Because of mimetype/servicetype files
which also have a strict Type required and a strict installation dir required, to avoid mixups I guess.

I see two solutions:
- being flexible, i.e. allowing Type=Application in "services"
  [but not Type=Service in apps since parts of "apps" are shared with non-kde code]
- changing the meaning of Type, by saying that
   Type=Application means an executable, and Type=Service means a library,
   but that is also somewhat information duplication (cf Exec and Library keys)
   and it actually prevents having both in the same file. That is a migration problem
   but it's actually good, since having both in the same file makes it difficult to configure
   user preferences later on, so it's actually better to separate them.

OK so the easy/sensible solution is the first one, allowing Type=Application in "services"

Any objections against that? I know that Type=Application is often used in trader
queries, but that's exactly the point, those -should- see applications that are 
defined under "services" (i.e. those that don't appear in the K menu, and only 
exist to be associated with certain mimetypes).

There has always been the possibility to use NoDisplay=true for such apps too...
and that's a more standard mechanism, too, since it would work out of kde....
So maybe we should just drop applications (Exec=) from the "services" dir?
Not sure what's best.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list