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

Possible disagreement between emacs and plasma in handling .desktop files - which one is right?



Hello list,

After recently updating emacs from 24.5+1-1 to 24.5+1-2 the application 
launcher menu (K-menu) entries for it have changed - instead of pointing to 
the GUI version they now start a version running in the terminal, but 
launching from Alt+F2 still starts the GUI version.

This appears to be due to a change in the package's .desktop file that gets 
put in /usr/share/applications/ - previously there was only a single [Desktop 
Entry] header pointing to the GUI, but now there are two, the first for the 
GUI and the second for the terminal version.  It appears that the application 
launcher menu only displays the last entry, possibly because any earlier 
entries get overwritten - testing with a homemade desktop file with multiple 
dummy entries has the same result.

Is this a bug in the emacs package, i.e. it should only have one [Desktop 
Entry] per file, or a bug in Plasma's application launcher, i.e. it should 
handle multiple [Desktop Entry] headers in one file?

The Spec (http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s02.html) states:
"The basic format of the desktop entry file requires that there be a group 
header named Desktop Entry. There may be other groups present in the file, but 
this is the most important group which explicitly needs to be supported. This 
group should also be used as the "magic key" for automatic MIME type 
detection. There should be nothing preceding this group in the desktop entry 
file but possibly one or more comments."

Which I would read as suggesting that a singular [Desktop Entry] is intended, 
but it's not explicitly clear and I'm not familiar with the spec.

Does anyone have any idea which is the correct approach?

I'm holding off submitting a bug report for now as I'm not sure which package, 
if either, are buggy.

Cheers,

Matt.


P.S: The .desktop file for the two package versions are listed below for 
comparison:

emacs24 24.5+1-1 
(https://sources.debian.net/src/emacs24/24.5%2B1-1/debian/emacsVER.desktop/)
--- File: debian/emacsVER.desktop ---
[Desktop Entry]
Version=1.0
Name=GNU Emacs @MENU_VERSION@
GenericName=Text Editor
Comment=View and edit files
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=/usr/bin/@DEB_FLAVOR@ %F
TryExec=@DEB_FLAVOR@
Icon=/usr/share/icons/hicolor/scalable/apps/@DEB_FLAVOR@.svg
Type=Application
Terminal=false
Categories=Utility;Development;TextEditor;
------

emacs24 24.5+1-2 
(https://sources.debian.net/src/emacs24/24.5%2B1-2/debian/emacsVER.desktop/)
--- File: emacsVER.desktop ---
[Desktop Entry]
Version=1.0
Name=GNU Emacs @MENU_VERSION@ (GUI)
GenericName=Text Editor
Comment=GNU Emacs is an extensible, customizable text editor - and more
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++;
TryExec=/usr/bin/@DEB_FLAVOR@
Exec=/usr/bin/@DEB_FLAVOR@ %F
Icon=@DEB_FLAVOR@
Type=Application
Terminal=false
Categories=Utility;Development;TextEditor;

[Desktop Entry]
Version=1.0
Name=GNU Emacs @MENU_VERSION@ (Terminal)
GenericName=Text Editor
Comment=GNU Emacs is an extensible, customizable text editor - and more
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++;
TryExec=/usr/bin/@DEB_FLAVOR@
Exec=/usr/bin/@DEB_FLAVOR@ -nw %F
Icon=@DEB_FLAVOR@
Type=Application
Terminal=true
Categories=Utility;Development;TextEditor;
------


Reply to: