desktop file utilities

Havoc Pennington hp at redhat.com
Thu May 9 16:42:59 BST 2002


Hi,

I created a new package desktop-file-utils, find it at:
 http://www.freedesktop.org/software/desktop-file-utils/

Right now it has two tools:

 - desktop-file-validate takes one desktop file on the command line, 
   and prints warnings and fatal errors about spec violations 
   to stderr. If a fatal error occurs, the command exits with 
   a failure status.

 - desktop-file-install installs a desktop file to
   prefix/share/applications, the location in the proposed
   "vfolder" setup (see
   https://listman.redhat.com/pipermail/xdg-list/2001-November/000196.html)

   When installing a file, it currently does the following:
     - ensures the filename has a namespace prefix, to avoid 
       collisions with other desktop files
     - fixes the file to have an Encoding field, if it 
       lacks one
     - optionally allows you to add/remove Categories and 
       OnlyShowIn entries, useful in spec files if distributions
       want to rearrange the upstream menus a bit
     - validates the final file and exits with a failure 
       code if the file does not validate

The code in here was mostly written by Alex Larsson, I added the
desktop-file-install utility and packaged it up.

desktop-file-validate is hopefully useful to people who are developing
desktop files. I wrote desktop-file-install for Red Hat spec files, so
we can validate and namespace all desktop files in %install, and
optionally tweak the menu categories a bit. But it's certainly useful
for other packaging systems as well.

If anyone has suggestions or patches, I opened a bug component on
http://bugzilla.gnome.org; hopefully the fact that it's on gnome.org
won't deter anyone, bugzilla instances are nontrivial to set up and so
I used an existing one.

Havoc




More information about the kde-core-devel mailing list