Associating file to an perticular application through command line

We can select which program will open a particular type of document from terminal command line using mimeopen command. This tool is very useful if your program is not showing up in right click and open with option (like in case of program installed through PlayOnLinux). If you know full command how to open the program you can use mimeopen to associate particular document type with that program. 

So first open a terminal. Then navigate to the perticular folder where your file is. And then run the following command.
$ mimeopen -d filename.ext
And then it will show all option that can open that document. As a last option there will be an option other. You can select any option, just enter the corresponding number and enter. If you choose other option then it will show you option the command. Enter the full command (may be with full path some time) and then that program will open that file. From now on when ever you double click on that file type, it will always open with the same program. And it will also show that program with right click open with option. 




Hope this will be helpful.

Cheers
A.Paul

Comments

Popular posts from this blog

Changing caption width in latex

Subtitle in latex

Placing float (table or figure) at the top of the page in otherwise empty page in LaTeX