Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1098  / 2 Years ago, sat, june 25, 2022, 2:45:47

In file explorer (Nautilus) under Ubuntu, I can select a file and right click and scroll to:




open with other application




My question is how can I add emacs to that list of "other application"


More From » 12.04

 Answers
3

After we had installed emacs Install emacs we may not yet have a .desktop file to integrate it with the desktop environment.



We then can copy the emacs23.desktop file if located in /usr/share/applications or we can create a custom emacs.desktop file in ~.local/share/applications, e.g. with the following content (add further options at your needs).



[Desktop Entry]
Name=Emacs 23
Comment=
Exec=/usr/bin/emacs23 %F
Icon=
Terminal=true
Type=Application


We can then select Emacs in the list of "Open With Other Applications -> Show other applications" on right click of a file with a content we want to associate Emacs with.



enter image description here



After having selected the now present Emacs (note that there is no icon defined yet if using a custom dektop file, give the path to an icon in your emacs.desktop above) we can then choose to "Open with Emacs" in the Nautilus context menu:



enter image description here



To undo this we simply right click on the Emacs entry in the menu that pops up after having selected "Open With Other Application..." and say "Forget association":
(Forget association option does not exist for Ubuntu 16.04 and later)
enter image description here


[#31681] Monday, June 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
utonmbo

Total Points: 134
Total Questions: 104
Total Answers: 118

Location: Argentina
Member since Mon, Jan 3, 2022
2 Years ago
;