STEPS TO REPRODUCE 1. Configure Dolphin to open folders in a new tab 2. Open Dolphin 2. Go to disks & devices applet 3. Click on "Open in File Manager" for some entry OBSERVED RESULT The folder opens in Dolphin, but the Dolphin window isn't raised EXPECTED RESULT The Dolphin window is raised SOFTWARE/OS VERSIONS KDE Plasma Version: 5.26.0 KDE Frameworks Version: 5.99 Qt Version: 5.15.6-kde ADDITIONAL INFORMATION Dolphin itself doesn't support xdg-activation yet, https://invent.kde.org/system/dolphin/-/merge_requests/461 fixes that However the applet code is missing support for it too
We use KIO::CommandLauncherJob to execute kde-open5 (good!), but we don't pass a desktop file name, so xdg-activation doesn't work. The problem here is that we don't know* which application is going to be launched. It could be Dolphin, or Krusander, or Nautilus etc. *we could query for the default file manager, but that requires special casing the "Open in Filemanager" action somehow
It almost sounds like we need something KIO::openDefaultFileManagerJob encapsulate that logic. Or even a more generic KIO::openDefaultApplicationForUrlJob?
> Or even a more generic KIO::openDefaultApplicationForUrlJob? That's exactly what KIO::OpenUrlJob is. That can easily be used to open the file manager The problem here is that the device action abstraction in the applet gets in the way so we probably have to work around that. That doesn't require any new jobs though
The problem is somewhat generic for all actions. It's less noticeable there because for e.g. the gweview import we don't expect single-instance behavior, but e.g. startup feedback is broken in that case. To fix that we need to know what desktop entry should be launched for each action, so maybe we need to extend the action desktop file with that information
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2206
Git commit 88f8af29da700f9d553371e3fbf71136ecceaf8f by Nate Graham, on behalf of Nicolas Fella. Committed on 15/10/2022 at 16:15. Pushed by ngraham into branch 'master'. [applets/diskanddevices] Add xdg-activation support to device ations We need to know what app is launched so that CommandLauncherJob can apply xdg-activation When opening in the file manager we query what the default file manager is and use that When invoking other actions read a new action metadata key that specifies what is launched M +16 -0 dataengines/hotplug/deviceserviceaction.cpp https://invent.kde.org/plasma/plasma-workspace/commit/88f8af29da700f9d553371e3fbf71136ecceaf8f
Git commit 1f6b9710e119770b948e440b2c3d5e70bfd0b58e by Nate Graham, on behalf of Nicolas Fella. Committed on 15/10/2022 at 17:12. Pushed by ngraham into branch 'Plasma/5.26'. [applets/diskanddevices] Add xdg-activation support to device ations We need to know what app is launched so that CommandLauncherJob can apply xdg-activation When opening in the file manager we query what the default file manager is and use that When invoking other actions read a new action metadata key that specifies what is launched (cherry picked from commit 88f8af29da700f9d553371e3fbf71136ecceaf8f) M +16 -0 dataengines/hotplug/deviceserviceaction.cpp https://invent.kde.org/plasma/plasma-workspace/commit/1f6b9710e119770b948e440b2c3d5e70bfd0b58e
This bug persists with Plasma 5.26.1 on Arch Linux. Operating System: Arch Linux KDE Plasma Version: 5.26.1 KDE Frameworks Version: 5.99.0 Qt Version: 5.15.6 Graphics Platform: Wayland
You need the Dolphin fix as well. That hasn't been released yet IIRC.