Saturday, December 22, 2012

Specifying Opera defaults

I love the Opera browser and it's the default web browser on my Linux distro. However something strange started happening once I installed a program called Comix. Now, Comix is a comic book reader and it reads CBR files or zipped image files. The problem occurred when I right clicked a downloaded file in Opera and requested that it be opened in the folder it was saved in. Instead of calling Nemo (the file manager in Linux Mint Cinnamon edition), Comix was called! So I faced a black screen in full-screen mode every time I did this. I tried to edit the Opera default program settings, but to no avail. More infuriating is the fact that I don't have an inkling of what parameters Opera takes into account to decide which programs are decided as the defaults and which are decided as secondary.

Finally, after a lot of searching in the forums, I found the answer. Close all instances of Opera on your system. Then, open your Home folder and hit Control+H to reveal your hidden files. Navigate to /home/user/.local/share/applications and open the mimeinfo.cache file as root in a text editor (gedit, pluma, nano among others) using gksudo. There you will see that the file types (pdf, mp3 and so forth) are listed with the applications that open them separated by semicolons. The first application is the default that Opera uses. So you can do two things: you can cut and paste the secondary program ahead of the erstwhile primary program or you can simply delete the default (offending) program (at your risk). Save the file and exit the text editor. Restart the browser and it should be opening the files with the correct applications.

Note that I'm new to Linux (six months and counting), so please take measures of caution before trying any of the tips I've mentioned.

No comments: