how does a browser choose how to download

I am wondering how a browser in KDE, whether it is 15.1, 15.2, 15.3, or tumbleweed decides which file manager to open up when you go to save a file from the internet? My system used to choose Dolphin as the default for KDE, but after the last update, it suddenly switched to where it is opening up Gnome’s file manager to save files. I would like to change it back without having to uninstall Gnome. The browsers that were affected are both Chrome and Brave, though Firefox still chooses to use Dolphin.

First thing to check is you can reproduce it using “xdg-open” on the command line, “xdg-open /home/$USER” does open Dolphin with my home directory on Tumbleweed. (it spits out also warnings but that is not the point)

Also try it using dbus:

dbus-send --session --print-reply --dest=org.freedesktop.FileManager1 --type=method_call /org/freedesktop/FileManager1 org.freedesktop.FileManager1.ShowItems array:string:"file:///home/$USER" string:""
method return time=1631170051.349615 sender=:1.93 -> destination=:1.92 serial=25 reply_serial=2

For me that gives Dolphin in /home with my user directory selected.

Ok thanks… I will have to come back to this - I had to leave on a business trip and this is only happening on my desktop at home, not my laptop. So when I get back I will try that out.

back now…
I tried both those methods, and Dolphin is what is opened.

But when I download a file using chrome, like a pdf file, it defaults to Gnome’s file manager. Can’t figure out how to change that back to Dolphin. It only happens on my desktop, as my laptop, which uses Tumbleweed and has gnome installed, still defaults to Dolphin.

So the indications are that it should be using Dolphin, but instead it opens Gnome’s file manager.

I have a clue about what is happening… when looking at system activity, when I hit the ‘save’ icon to save a pdf file that has been loaded, chrome opens this:‘xdg-desktop-portal-gtk’.

That is when the save dialog pops up, and it is the gtk based save dialog. To be honest, I don’t know which file manager it is. It is not nautilus or pcmanfm, because I don’t have either of those installed. If I could at least isolate what file manager it is using when it opens the save dialog, then I might be able to look that up and see what is calling that process. But I can’t tell what file manager it is using - it seems to be just some kind of generic gtk file manager.

So I am thinking either look up the different gtk file managers and see if any of them are being called? Any other ideas?

The gtk based file manager dialog that pops up when I try and save something off of chrome looks like what Thunderbird used to use when saving attachments. But now Thunderbird uses dolphin.

The pop-up that opens when your browser decides that it should ask you want to do (because it can not by itself render a page from it) is something provided by the desktop you use. It is NOT a file manager.

It should tell you things like what MIME type the file is and ask what to do. Either open it directly or store it somewhere. When you choose for storing, it will pop-up a window to browse through the directory tree (probably starting at a predefined point like ~/Downloads, or at a point where earlier storing was done) and give you the change to browse to the directory (map or folder in desktop speak) where you want it and to decide about the file name to be used.

It is specifically this pop-up window that I am asking about. The pop-up window that chrome pops up, which is used to browse the directories and choose where to store the file, on my laptop is a Dolphin file manager pop-up. It is not a full independent instance of Dolphin, but I know it is Dolphin because the shortcuts that I set in Dolphin are there and also you can tell it is Qt graphics.

On my desktop, however, the pop-up window that is used to save the file is a gtk-based file manager. It is not Qt, the Dolphin shortcuts are not there, and the manner in which you save is slightly different.

On my desktop, chrome used to use Dolphin, then for some unknown reason it switched to the gtk-based file manager for saving files. The change had an effect on the efficiency of some of the ways I do things during the day. I would like to switch it back.

Sorry if I am not very clear in how I am describing the problem. It is a bit nuanced, but I kind of just don’t really know what to do.

I understand what you mean. The pop-up is certainly related to a file manager on your system (because of shared functionality). And you want it to be related to your default browser. I only wanted to avoid confusion by everybody including you) about what the subject is.

In KDE I know the place where to change the default manager, but I am not a Gnome user, sorry.

When no better answer is coming forward, you could remove Dolphin from the system and check if the destop falls back to what you want.

Another thing is to check with another (best newly created) user to see if it reproduces itself there. When not, it is in the users configuration somewhere.

Sorry, but more try-end-error hints then a real solution.

Think the OP is a KDE user, but may have also installed gnome this may be the problem ie gnome took over LOL

I believe the OP is referring to KDE’s save dialog, the same used by Dolphin, not Dolphin itself.
That’s probably not it, but the only thing I can think of is to check system-settings>app stile>configure gnome/GTK style. In a 15.2 KDE box here GTK3 theme is set to Breeze.

Yes, same here. I have the GTK3 theme set to Breeze. But no change.