Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to write my own "open with" GUI for Ubuntu. In Ubuntu, is it possible to get a list of applications that can open a specified file (from the command line?)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can use mimeopen command to list the applications which is capable of opening the file.

Example: Say If I have to open a tar file. I can use the command

mimeopen -d test.tar

The sample output will be something like this

$mimeopen -d test.tar 
Please choose a default application for files of type application/x-tar

    1) Archive Manager  (file-roller)
    2) Archive Mounter  (mount-archive)
    3) Other...

use application #

When you choose the 3rd option, you will be asked to enter a command which is capable of opening a tar file.

share|improve this answer
    
Is it possible to do this for applications in the Ubuntu Software Center (as well as already-installed applications?) askubuntu.com/questions/223924/… –  Anderson Green Nov 30 '12 at 17:01
    
Need to investigate. Will get back to you. –  devav2 Nov 30 '12 at 17:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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