Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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?)… – 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


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.