Two different browsers open downloaded files in same wrong program

Forum rules
Before you post please read how to get help
Post Reply
RonC
Level 4
Level 4
Posts: 219
Joined: Mon Mar 19, 2012 8:21 pm
Location: Funchal

Two different browsers open downloaded files in same wrong program

Post by RonC » Sun Dec 24, 2017 9:28 am

Both Firefox and Chrome have started opening downloaded files in Mirage, when 'Open Containing Folder' icon is clicked, in browser's download context menu. Because two completely different browsers are affected in the same way, I suspect a problem in KDE settings, possibly a corrupt mime entry -- but where to look, and under which entry?
:?: How can I get this icon to run Dolphin, as it used to?

This is on the system running 17.3
LinuxMint 17.3 Rosa / KDE (32-bit), and
Linuxmint 18.0 Sarah /KDE (32-bit)

User avatar
Flemur
Level 15
Level 15
Posts: 5935
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Two different browsers open downloaded files in same wrong program

Post by Flemur » Sun Dec 24, 2017 11:11 am

Ah, the wonders of the freedesktop.org mime implementation ...

This might be the answer:
https://unix.stackexchange.com/question ... ing-folder
basically add
"inode/directory=nautilus.desktop;" (or whatever file-browser)
to
~/.local/share/applications/mimeapps.list

Or...when that doesn't work, modify the system file
/usr/share/applications/mimeinfo.cache
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

User avatar
phd21
Level 16
Level 16
Posts: 6564
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Two different browsers open downloaded files in same wrong program

Post by phd21 » Sun Dec 24, 2017 11:15 am

Hi "RonC"

It would help to be more specific, like what type of files are you downloading? Can you provide a screenshot or two?

...
Phd21: Mint KDE 17.3 & 18.3, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

RonC
Level 4
Level 4
Posts: 219
Joined: Mon Mar 19, 2012 8:21 pm
Location: Funchal

Re: Two different browsers open downloaded files in same wrong program

Post by RonC » Sun Dec 24, 2017 11:42 am

Flemur wrote:...
basically add
"inode/directory=nautilus.desktop;" (or whatever file-browser)
to
~/.local/share/applications/mimeapps.list
...
Hi @Flemur, @phd21, thanks to both for the rapid responses!

Actually, the boldfaced part in Flemur's reply, inode/directory, was the key factor in solving it.

I did it without (directly) editing system files, through File Associations - System Settings. Then, inode/directory goes into the Configure File Associations box. On the right-hand panel, Dolphin was moved to the top of the list, headed Application Preference Order. For reasons unknown, Mirage had gotten to the top of the list and Dolphin was in third place.

After fixing the sequence, the problem disappeared.
LinuxMint 17.3 Rosa / KDE (32-bit), and
Linuxmint 18.0 Sarah /KDE (32-bit)

lmuserx4849
Level 5
Level 5
Posts: 800
Joined: Wed Dec 17, 2014 2:55 am

Re: Two different browsers open downloaded files in same wrong program

Post by lmuserx4849 » Sat Dec 30, 2017 2:03 am

RonC wrote:Both Firefox and Chrome have started opening downloaded files in Mirage, when 'Open Containing Folder' icon is clicked, in browser's download context menu. Because two completely different browsers are affected in the same way, I suspect a problem in KDE settings, possibly a corrupt mime entry -- but where to look, and under which entry?
:?: How can I get this icon to run Dolphin, as it used to?

This is on the system running 17.3
I'm on LM 17.3/KDE too, and I think I agree :-) I wouldn't say corrupted, but perhaps it has changed to a value you do not want.

Since you specifically mentioned Firefox, go to Firefox's Preference (File -> Edit -> Preferences). This next step may vary depending on the version of FF you have. You are looking for Applications. See the image. I'm thinking you will see Mirage on the right hand side and the file type on the left hand side. If you select the line, and click the down arrow on the right hand side, there will be a dropdown. See image again. Change it to "Always Ask" or "Use Other' and select dolphin. Repeat the process in Chrome.

I think the above will solve your issue, otherwise you are looking at KDE Menu -> System Settings -> File Associations.

First, I don't know Mirage (I use gwenview) , but does it have any preferences that says make default or use to open files of some type. If not, continue.

Go to the command line and type:file --mime-type FILE, where FILE is one of the files that Mirage is opening.

Now go to System Settings -> File Associations and look for that mimetype in the left hand side. You can expand the tree by clicking on the right pointing arrow. When you find it, click it and the right hand side will change. There will be a list of programs. You can either change the order, add, or remove.

You can get directly to this kde4 module via the command: kcmshell4 filetypes &.

Here's an image of KDE's file association module.
Attachments
firefox-preference-app.jpg
Firefox Preferences Applications

lmuserx4849
Level 5
Level 5
Posts: 800
Joined: Wed Dec 17, 2014 2:55 am

Re: Two different browsers open downloaded files in same wrong program

Post by lmuserx4849 » Sat Dec 30, 2017 9:49 pm

Flemur wrote:Ah, the wonders of the freedesktop.org mime implementation ...

This might be the answer:
https://unix.stackexchange.com/question ... ing-folder
basically add
"inode/directory=nautilus.desktop;" (or whatever file-browser)
to
~/.local/share/applications/mimeapps.list

Or...when that doesn't work, modify the system file
/usr/share/applications/mimeinfo.cache
I wonder, if in KDE4, if SystemSettings -> Default Applications -> File Manager would have changed that (inode). HHmmm.... Tried it. Yep. :-) I looked at inode.. ~/.local/share/applications/mimeapps.list. It was dolphin, selected gwenview, looked again and it was gwenview.

Just a little tip I find educational. When I make a config change, I'll immediately execute the command find -newermt "2 minute ago" to see what files were updated. In this case it was ./.local/share/applications/mimeapps.list.

Update:
I just have to say: This question, the ability to easily read text config files, the enjoyment of jumping in and finding something, learning, growing, and the answer is soooo much better than Window's Registry and the confinement. I do feel, in some sense, it may be changing... but I'm going to keep looking and supporting for the freedom.

Thank you for the question and the responses. It was fun.
Attachments
default-app.jpg
SystemSetting -> Default Applications
default-app.jpg (16.5 KiB) Viewed 266 times
Last edited by lmuserx4849 on Sun Dec 31, 2017 6:30 am, edited 2 times in total.

aes2011
Level 4
Level 4
Posts: 473
Joined: Wed Jul 06, 2011 10:39 pm

Re: Two different browsers open downloaded files in same wrong program

Post by aes2011 » Sat Dec 30, 2017 11:08 pm

lmuserx4849 wrote:... Just a little tip I find educational. When I make a config change, I'll immediately execute the command find -newermt "2 minute ago" to see what files were updated. In this case it was ./.local/share/applications/mimeapps.list.
Nice!

I use ! -path and ! -name to eliminate entries from ~/.cache, my browser profiles, and other files and folders I'm not interested in.

Post Reply

Return to “KDE”