Bug 457507

Summary: KRunner launches either Dolphin or Thunar, depending where user clicks
Product: [Plasma] krunner Reporter: Lemuel Simon <lemuelsimon32>
Component: locationsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: alexander.lohnau, kde, lemuelsimon32, nate
Priority: NOR    
Version First Reported In: 5.25.4   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: KRunner launches non-default file manager (Thunar) with 'Open Containing Folder'.

Description Lemuel Simon 2022-08-05 05:27:05 UTC
Created attachment 151126 [details]
KRunner launches non-default file manager (Thunar) with 'Open Containing Folder'.

SUMMARY
The bug is difficult to describe. If I were to type the preferred folder in KRunner, it shows up as a 'Recent' location. If I click in the center of the drop-down list, it launches Dolphin (the default file manager). However, if I click the folder icon to 'Open Containing Folder' (Shift + Enter), it launches Thunar, the non-default file manager. 

STEPS TO REPRODUCE
1. Open KRunner.
2. Type location.
3. Press center of drop-down list to navigate to location.
4. Repeat steps 1-2, but press the folder icon (Open Containing Folder) instead.

OBSERVED RESULT
Can launch two different file manager (default and non-default) depending on where the drop-down list was clicked or the keys used to select the entry (Enter vs. Shift + Enter).

EXPECTED RESULT
Always launch the default file manager in KRunner locations.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Leap 15.4
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.14.21-150400.24.11-default (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-3320M CPU @ 2.60GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4000
Manufacturer: LENOVO
Product Name: 2347G2U
System Version: ThinkPad T430

ADDITIONAL INFORMATION
I have both XFCE and Plasma installed, but I used SDDM to start the session and the session environment variable reads 'KDE'. Dolphin is the default application for folder/inode in File Associations. I'm wondering if there was some black magic (Read: override) involved with the XFCE session. I've attached a video of the bug in action.
Comment 1 Nate Graham 2022-08-05 17:37:40 UTC
Unfortunately this is a longstanding bug in the freedesktop spec that governs opening the default filemanager. When more than one filemanager is installed, and neither is running, it opens a random one rather than the one you've selected as the default one. Fedora currently works around this by keeping a minimal Dolphin daemon constantly running when you're in a Plasma session so that Dolphin always opens.

Kai, do you remember any way for us to fix this on our end, or the URL a bug report upstream?