Ubuntu – Add application to “open with” list


I've looked through some of the answers to question close to mine, but none of them was satisfactory.

As one could guess from the title, I'm desperately trying to add to my "open with" list a certain application for a certain application type, namely I'm talking about .sgf files which I want to be opened with qgo. I could have gone with kigo or other Go applications, but qgo is the best to me. (talking about the board game GO, aka weiqi, aka baduk)

About those other answers which don't help with this problem of mine:

  1. I can't append any %F to the exec line in any
    /usr/share/applications/qgo.desktop or similar, since no such file
  2. I tried with ubuntu-tweak but it didn't work.
  3. qgo appears in my "luncher/dash" so the fourth answer
    doesn't work

Any help would really mean a lot.
Thank you very much!

P.s: i'm on LTS12.04

Best Answer

  • There's a command line method which might work for you:

    CLI Method to Change Application & Set Default:

    You can easily open a file with another application using the mimeopen command in the terminal. However, if the program isn’t already in the list of recommended applications, you’ll need to make it the default for that filetype first. Simply open a terminal in the folder where the file is and run a command like the following (substituting Recipes.pdf with the appropriate filename and filetype):

    mimeopen -d Recipes.pdf
    Please choose a default application for files of type application/pdf
    1) GIMP Image Editor (gimp)
    2) Adobe Reader 9 (AdobeReader)
    3) Document Viewer (evince)
    4) Other…
    use application #4
    use command: pdfedit

    Simply choose the number that corresponds to Other… (in this case it’s 4), then type the command of the program after use command: (you probably won’t need to specify the path, but if it doesn’t work without it, it should be something like /usr/bin/pdfedit).

    After that, you can switch default applications quite easily with the above command, or use the --ask option to just open the file in the desired app without changing the default (note there is no option to choose Other…, which is why you have to use the -d switch first):

    mimeopen --ask Recipes.pdf
    Please choose an application
    1) pdfedit (pdfedit-usercreated-2)
    2) GIMP Image Editor (gimp)
    3) Adobe Reader 9 (AdobeReader)
    4) Document Viewer (evince)
    use application #
  • Related Question