Vivaldi doesn't use default file manager
-
Suddenly Vivaldi is using the Thunar file manager when it auto-opens the folder of a screen cap, whereas the default, and the one it used to open, is Dolphin.
I'm on MX Linux (Debian 10) with the KDE Plasma desktop. I've been into Settings and I jogged the default file manager setting, but to no avail.
-
@Gwen-Dragon said in Vivaldi doesn't use default file manager:
Thanks. This confirms Dolphin as the default:
$ xdg-mime query default inode/directory
org.kde.dolphin.desktop
This file is zero bytes:
cat .local/share/applications/mimeapps.list
I have another unit with MX/kde, though not the same build source, and it does not have this problem. So it might be the system. I'm not sure of the inner workings of V in this matter; I assume it's trying to use the default prog.
-
@paul1149 If .local/share/applications/mimeapps.list is empty, you most likely have others in the system, like ~/.config/mimeapps.list and /usr/share/applications/mimeapps.list (or /usr/share/applications/kde-mimeapps.list).
The "xdg-mime query default inode/directory" you performed shows that in the "xdg-mime land" your default file manager is indeed Dolphin as it should be, regardless of which mimeapps.list file contains the setting. So you should be all set.
The "problem" is that modern applications use dbus to open files and directories and fall back on xdg-mime only if the dbus call fails. So even if you have Dolphin set up in the "xdg-mime land" (via mimeapps.list), you can still end up with files and directories opened in Thunar.
I have no access to KDE, so I cannot give you "copy-and-paste instructions". I run MATE which has caja (a fork of Nautilus from Gnome 2). So you will have to adjust these instructions with your findings since I cannot know correct filenames or contents of the service files in a KDE system.
Find out what the correct filename is for FileManager1.service (you'll notice "mate" in mine, yours could be org.kde.dolphin.FileManager1.service or org.kde.FileManager1.service or just org.freedesktop.FileManager1.service):
$ locate FileManager1 /usr/share/dbus-1/services/org.mate.freedesktop.FileManager1.service
Peek inside:
$ cat /usr/share/dbus-1/services/org.mate.freedesktop.FileManager1.service [D-BUS Service] Name=org.freedesktop.FileManager1 Exec=/usr/bin/caja --no-default-window
The Exec line looks correct to me, in my system (should show Dolphin in yours), so...
Create a symlink to the service file and place it in your user space (in a directory that most likely doesn't exist, so it has to be created first):
$ mkdir -p ~/.local/share/dbus-1/services/ $ ln -s /usr/share/dbus-1/services/org.mate.freedesktop.FileManager1.service ~/.local/share/dbus-1/services/org.mate.freedesktop.FileManager1.service
Test.
Let us know how it went. It's early morning and I haven't had enough coffee yet, so maybe I overlooked something or simply fecked up
-
@samuvuo thanks very much for that very astute reply.
Over here I found the spec:
/usr/share/dbus-1/services/org.kde.dolphin.FileManager1.service
Running that brought this:
cat /usr/share/dbus-1/services/org.kde.dolphin.FileManager1.service [D-BUS Service] Name=org.freedesktop.FileManager1 Exec=/usr/bin/dolphin --daemon
I made the directory as you said, and ran this command:
ln -s /usr/share/dbus-1/services/org.kde.dolphin.freedesktop.FileManager1.service ~/.local/share/dbus-1/services/org.kde.dolphin.freedesktop.FileManager1.service
...not really knowing what I'm doing at this point.It produced
org.kde.dolphin.freedesktop.FileManager1.service
in that folder.But it didn't change anything with Vivaldi, even on fresh login.
-
@paul1149 said in Vivaldi doesn't use default file manager:
I made the directory as you said, and ran this command:
ln -s /usr/share/dbus-1/services/org.kde.dolphin.freedesktop.FileManager1.service ~/.local/share/dbus-1/services/org.kde.dolphin.freedesktop.FileManager1.service
...not really knowing what I'm doing at this point.Sorry, my bad, forgot to explain that bit. The purpose was to create a preference, a "default" if you will, in case there are multiple service files in the global directory (/usr/share/dbus-1/services/) that implement the FileManager1 interface.
Placing a symlink in local dbus-1 directory pointing to our preferred service file (that of Dolphin) should do just that. Or so I thought. So it's back to the drawing board...
Just out of curiosity: are there other service files containing FileManager1.service in the global directory?
$ grep FileManager1 /usr/share/dbus-1/services/*
I guess we'll also have return to "xdg-mime land" and chase down all the instances of mimeapp.list and make sure Thunar is not set to open inode/directory by default in any of them.
$ locate mimeapps.list
Then, for each found file:
$ grep 'inode/directory' <filename>
Note: command "xdg-mime default org.kde.dolphin.desktop inode/directory" sets the default and place the configuration in ~/.config/mimeapps.list. This entry is most likely already there, since the xdg-mime query you performed earlier showed Dolphin as default.
There should also be global files /usr/share/applications/mimeapps.list (or DE related name, ie. /usr/share/applications/mate-mimeapps.list) and /usr/share/applications/defaults.list. I believe defaults.list is used last, if no other mime settings are found, since mine shows "nautilus-folder-handler.desktop" and not "caja-folder-handler.desktop" as it should (Nautilus is not installed, caja is a fork of Nautilus).
Stupid question: is Thunar used for anything in KDE? Why is it there to begin with? Does Dolphin handle desktop and/or Trash or is Thunar needed for that?
-
I did understand conceptually what you were doing, it was just that I could only copy and paste the command rather dumbly as to the specifics.
I should have mentioned this from yesterday, as it seems ripe for conflict:
locate FileManager1 /home/paul/.local/share/dbus-1/services/org.kde.dolphin.freedesktop.FileManager1.service /usr/share/dbus-1/services/org.kde.dolphin.FileManager1.service /usr/share/dbus-1/services/org.xfce.Thunar.FileManager1.service
And indeed:
grep FileManager1 /usr/share/dbus-1/services/* /usr/share/dbus-1/services/org.kde.dolphin.FileManager1.service:Name=org.freedesktop.FileManager1 /usr/share/dbus-1/services/org.xfce.Thunar.FileManager1.service:Name=org.freedesktop.FileManager1
For the various mimeapps.lists I have:
locate mimeapps.list /home/paul/.config/mimeapps.list /home/paul/.kde/share/config/mimeapps.list /home/paul/.local/share/applications/mimeapps.list paul@mx:~ $ grep 'inode/directory' /home/paul/.config/mimeapps.list inode/directory=org.kde.dolphin.desktop;kfmclient_dir.desktop;org.kde.gwenview.desktop;org.kde.kaffeine.desktop;pcmanfm.desktop;vlc.desktop; inode/directory=org.kde.dolphin.desktop; paul@mx:~ $ grep 'inode/directory' .local/share/applications/mimeapps.list paul@mx:~ $ grep 'inode/directory' /home/paul/.kde/share/config/mimeapps.list inode/directory=org.kde.dolphin.desktop;kfmclient_dir.desktop;org.kde.gwenview.desktop;org.kde.kaffeine.desktop;pcmanfm.desktop;vlc.desktop; paul@mx:~ $ grep 'inode/directory' /home/paul/.local/share/applications/mimeapps.list
I installed thunar a few weeks ago when I discovered that Dolphin's network samba share support is very lacking. Dolphin is the best FM I've ever used, but it has this shortcoming, while thunar handles shares and usb cameras very well.
Thanks again for your very knowledgeable help!
-
The dbus-1 stuff looks right: you have two filemanagers installed (Dolphin and Thunar), so you have two FileManager1.service files in /usr/share/dbus-1/services - one for each. There is no "default" in service files, they are "equal", so the symlink in your local "override" directory ~/.local/share/dbus-1/services/ was meant to communicate your preference of Dolphin to modern, dbus using applications. But for some reason it didn't work as I expected.
So it's back to the mime stuff. From what you have posted, Dolphin is listed as the first or only entry for inode/directory, so it is correctly set as default (which your earlier test with "xdg-mime query default inode/directory" already showed).
I'm puzzled. I need to think about this. Maybe there are some KDE specific settings that override things? I know there are KDE users in here, any ideas?
-
The only thing I can offer is that this is an unofficial "respin" of MX Linux with KDE Plasma. I have found a few things broken due to the author trying to strip things down. At some point, probably soon, I intend on converting to the new official MX-kde, the only concern being it is designed for advanced hardware, which this most definitely is not. I probably will install it on a newer machine first, and install an older kernel on it as an option, to ensure I can boot up here.
-
@samuvuo FYI, after upgrading from Xubuntu LTS 18.04 to 20.04 I am experiencing the exact same issue. The file manager that was selected in XFCE as "preferred" gets ignored in favour of the "factory default" Thunar. Hence, it is not KDE-specific. GTK3 seems to suffer of it too.
Very annoying.
I would rather prefer a field in the Vivaldi settings where I could simply enter the path to the file manager executable. Keep it simple and stupid (KISS). That is more fail proof.
-
@Gwen-Dragon No, it did not. The issue is caused by the fact that GTK3-based desktop environments (including now XFCE 4.14, previously GTK2) are gradually moving away from the
inode/directory
system in favour of ad-bus
services system.Vivaldi supports this, and so does XFCE 4.14 (e.g. Xubuntu 20.04 LTS) for the Thunar file manager.
However, many XFCE users are not happy with the mediocre Thunar file manager and define another preferred file manager under Settings → Preferred Applications.The XFCE 4.14 Preferred Applications applet only affects the
inode/directory
and not thed-bus
services configuration.
Apart from that, there are many file managers around that cannot be exposed as ad-bus
service, e.g. the popular SpaceFM.
This is the crux of the problem.It took me until now to find a solution to this problem.
Solution 1 of this answer did the trick for me with SpaceFM.Anyhow, I cannot see how most mortal souls would be editing
/etc
system configuration files to get this working. It would obviously much easier if Vivaldi would offer a field to define the command to the preferred file browser, or at least a check mark option to switch offd-bus
support in favour ofinode/directory
.I hope above answer will help out more lost and mortal souls…
-
THANKS!!!
The link method works great. I have added that to my ansible scripts.Here in case you want to add it to your own ansible task:
- name: Create .local/share/dbus-1/services file: path: "/home/{{ item }}/.local/share/dbus-1/services" owner: "{{ item }}" group: "{{ item }}" mode: "0770" state: directory with_items: - "{{DESKTOP_USERS}}" - "{{DEVELOPERS}}" when: ENABLE_KDE_DOLPHIN_AS_DEFAULT tags: - dolphin - name: Symlink local to global dbus services so vivaldi and co will use the dolphin file: path: "/home/{{ item }}/.local/share/dbus-1/services/org.kde.dolphin.FileManager1.service" src: "/usr/share/dbus-1/services/org.kde.dolphin.FileManager1.service" force: true state: "link" with_items: - "{{DESKTOP_USERS}}" - "{{DEVELOPERS}}" when: ENABLE_KDE_DOLPHIN_AS_DEFAULT tags: - dolphin
In defaults add this:
ENABLE_KDE_DOLPHIN_AS_DEFAULT: true DEVELOPERS: DESKTOP_USERS:
And somewhere you need to fill the lists with members:
Either in group_vars or host_vars.# just examples, use your real users DESKTOP_USERS: - user1 - cleaner DEVELOPERS: - devuser1 - cleaner
I hope it might help someone.
Many regards, Dieter -
@fauthd I have the same problem, need to have Dolphin in Vivaldi like defoult file menager. I am not so much friendly with linux scripts or ansible task, plese if you can explane me how did you make this. Thank zou
-
@paul1149 said in Vivaldi doesn't use default file manager:
Suddenly Vivaldi is using the Thunar file manager when it auto-opens the folder of a screen cap
Not exactly the subject of this thread:
Where I can switch off this behaviour?
I mean: to open a screenshot in a file explorer. -
I had this same issue in Ubuntu (where I use the Plasma desktop instead of Gnome). I also have some other desktops installed. I went and renamed the mimeapps and dbus services for the desktops I'm not using to get Vivaldi a little less confused about what it should launch and now the folders open in Dolphin as expected.
sudo mv /usr/share/applications/x-cinnamon-mimeapps.list /usr/share/applications/x-cinnamon-mimeapps.list.disabled
...
sudo mv /usr/share/dbus-1/services/org.freedesktop.FileManager1.service /usr/share/dbus-1/services/org.freedesktop.FileManager1.service.disabled -
@3vi1 said in Vivaldi doesn't use default file manager:
I had this same issue in Ubuntu (where I use the Plasma desktop instead of Gnome). I also have some other desktops installed. I went and renamed the mimeapps and dbus services for the desktops I'm not using to get Vivaldi a little less confused about what it should launch and now the folders open in Dolphin as expected.
sudo mv /usr/share/applications/x-cinnamon-mimeapps.list /usr/share/applications/x-cinnamon-mimeapps.list.disabled
...
sudo mv /usr/share/dbus-1/services/org.freedesktop.FileManager1.service /usr/share/dbus-1/services/org.freedesktop.FileManager1.service.disabledThank you for this.. similar issue in Kubuntu
I have Nemo installed as a backup file manager because nextcloud integration is currently broken in Dolphin.
For nemo the files are:
/usr/share/applications/x-cinnamon-mimeapps.list.disabled
And
/usr/share/dbus-1/services/nemo.FileManager1.service.disabledit did not properly return to using Dolphin till I did the Dbus one