6

I installed Komodo earlier today and am unable to locate it in the "Open with other applications" dialog. The application works as intended other than this.

Using ubuntu 11.10

castis
  • 8,154
  • 4
  • 41
  • 63

2 Answers2

5

URL from answer is down

Here is how to do it:

Create file in ~/.local/share/applications named XXX.desktop e.g flashplayer.desktop

Content of file

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=/home/executable-path %f
Name=flashplayer
Comment=Custom definition for flashplayer
NoDisplay=true

Note: the %f after the path to the executable is necessary for the application to appear in the 'Open with' menu.

In nautilus,

- right click on file
- open with other applications
- show other applications
- select the one created e.g flashplayer

Also update the properties / open-with and set it as a default

Carl
  • 937
  • 10
  • 21
hbt
  • 1,011
  • 3
  • 16
  • 28
  • Thanks for this - the best answer I've found to this question. – alexleonard Feb 17 '14 at 05:25
  • 3
    The %f is the really important part. I've had a pre-made .desktop file which wasn't working because the %f was missing - it means that the application accepts file locations being passed to it. – Vadim Peretokin Apr 27 '14 at 22:14
1

In my case, I wanted to add an application to Ubuntu 20.04 to play SID-tunes. The solution was to add the missing %f as mentioned by @hbt, but in my case the path to the ".desktop"-files were different.

The path to my .desktop-files were: /usr/share/applications/

So, to add the application to the "Open With"-menu in Ubuntu, I ran:

sudo nano /usr/share/applications/zxTune.desktop

And then simply added the missing %f on the Exec line, and it worked like a charm!

[Desktop Entry]
Encoding=UTF-8
Name=ZX Tune
Comment=ZX Spectrum music player
Exec=zxtune-qt %f
Icon=zxtune.png
Terminal=false
Type=Application
Categories=Qt;AudioVideo;Audio;Player;
Tobias Holm
  • 251
  • 2
  • 6