3

Since some time ago I have no menu entry for Emacs anymore on my Debian system. The same happens on two different machines -- one running testing and one running unstable. I have tried switching window managers, and creating a brand new user to see if the new user would have an Emacs entry in his menu, but that didn't help.

Here's an image of the Debian menu, without an entry for Emacs 24:

Emacs is missing from the menu

The entry for Emacs24 is not anywhere in the menus. The image was captured with Openbox running, but when I switch to sawfish or Fluxbox the menu entry is still missing. I also ran update-menus, both as user and as root.

I have not found anything on the Debian bug tracking system either...

edit: I have checked the $XDG_DATA_DIRS variable, and it is not set; this is my /usr/share/applications/emacs24.desktop:

[Desktop Entry]
Version=1.0
Name=GNU Emacs 24 (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/emacs24
Exec=/usr/bin/emacs24 %F
Icon=emacs24
Type=Application
Terminal=false
Categories=Utility;Development;TextEditor;
StartupWMClass=Emacs
Keywords=Text;Editor;

Is there something I missed? What else can I try?

1

Menu should be generated from the $XDG_DATA_DIRS/applications/*.desktop files, where $XDG_DATA_DIRS usually points to at least one directory: /usr/share. Each file describes several menu entry's properties such as its name, program to be run, icon, categories, etc. This file should be generated during program installation, so probably something went wrong during that process in your case.

Anyway you can create this file by yourself. The easiest way is to just copy one of already existing file and change only "Name" and "Exec" entries. After all just restart your wm, new file should be read.

Here is my emacs.desktop, just for reference:

[Desktop Entry]
Type=Application
Version=1.0
Name=GNU Emacs
GenericName=Emacs
Comment=Emacs is the extensible, customizable, self-documenting real-time display editor
Comment[de]=Emacs ist der erweiterbare, anpassbare, selbst-dokumentierende Echtzeit-Editor
Comment[es]=Emacs es un editor ampliable, adaptable, mismo documentado, de tiempo real
Comment[fr]=Emacs est l'éditeur plein écran avancé, auto-documenté, personnalisable et extensible
Icon=emacs
TryExec=/usr/bin/emacs
Exec=/usr/bin/emacs %F
Terminal=false
MimeType=text/css;text/english;text/html;text/plain;text/x-c;text/x-chdr;text/x-csrc;text/x-c++;text/x-c++hdr;text/x-c++src;text/x-java;text/x-makefile;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;
Categories=Development;TextEditor;
StartupWMClass=Emacs

As you can see in my case emacs is placed itself into two menu categories: "Development" and "TextEditor". You may adjust these names according to your already existing menu categories.

  • Thank you! I have edited my post and included my emacs24.desktop, however it seems to be ok... – Jay Nov 22 '15 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.