emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .desktop file for emacs


From: Ulrich Mueller
Subject: Re: .desktop file for emacs
Date: Sat, 8 Dec 2007 09:36:14 +0100

>>>>> On Fri, 07 Dec 2007, Dan Nicolaescu wrote:

> I added an emacs.desktop file.
> Reviewing for correctness would be greatly appreciated

Checking the file with "desktop-file-validate" (available at
<http://www.freedesktop.org/software/desktop-file-utils/>) results in
the following output:

   $ desktop-file-validate emacs.desktop
   emacs.desktop: error: value "emacs_32.png" for key "Icon" in group
      "Desktop Entry" is an icon name with an extension, but there
      should be no extension as described in the Icon Theme
      Specification if the value is not an absolute path
   emacs.desktop: warning: value "Application;Development;TextEditor;"
      for key "Categories" in group "Desktop Entry" contains a
      deprecated value "Application"
   emacs.desktop: warning: key "Encoding" in group "Desktop Entry" is
      deprecated

Also, the argument given to the "Exec" command should probably be "%F"
instead of "%f" since more than one filename argument is allowed.
Patch for the above is attached.

One could also change the tooltip to say "Emacs is the extensible,
customizable, self-documenting real-time display editor" instead of
"Edit text", but this is of course a matter of taste.

> as would figuring out how to install it correctly.

Basically, the desktop entry should go to /usr/share/applications/ and
the icon(s) either to /usr/share/pixmaps/emacs_32.png or (preferred)
to $XDG_DATA_DIRS/icons/hicolor/{16x16,24x24,32x32,48x48}/emacs.png
(where XDG_DATA_DIRS is most likely just /usr/share), as described in
<http://standards.freedesktop.org/icon-theme-spec/latest/ar01s03.html>.

Ulrich

--- etc/emacs.desktop~  2007-12-08 02:39:15.000000000 +0100
+++ etc/emacs.desktop   2007-12-08 09:03:31.000000000 +0100
@@ -1,12 +1,11 @@
 [Desktop Entry]
 Name=Emacs
 GenericName=Text Editor
 Comment=Edit text
 
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
-Exec=emacs %f
-Icon=emacs_32.png
+Exec=emacs %F
+Icon=emacs_32
 Type=Application
 Terminal=false
-Categories=Application;Development;TextEditor;
-Encoding=UTF-8
+Categories=Development;TextEditor;
 StartupWMClass=Emacs

reply via email to

[Prev in Thread] Current Thread [Next in Thread]