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?)
You can use
Example: Say If I have to open a tar file. I can use the command
The sample output will be something like this
When you choose the 3rd option, you will be asked to enter a command which is capable of opening a tar file.