Ubuntu technical problems and solutions reference, a modern cookbook.
What if you want to add a new application in the “Open With Other Application…” section? Maybe you want to add that particular application as the default application to open certain type of files.
Here is an example of how I can add Vim as an option to open a text file. Vim will open the file in a new terminal session.
An .desktop file needs to be created in ~/.local/share/applications
So, let’s use vim for this purpose, it is just appropriate.
Press i to enter in edit mode and type in the following:
[Desktop Entry] Categories=; Comment=Edit file in Vim Exec=vim %f GenericName=Process Viewer Hidden=false Icon=vim Name=Vim Terminal=true Type=Application Version=1.0
after that, press ESC to exit the edit mode and type :wq to write to the file and quit.
That’s it. Now when you right click on a file, vim will be present in the list of Open With Other Application section, and you can add it as a default application.
Thanks for this answer to Marty Fried