https://bugs.kde.org/show_bug.cgi?id=474920
Bug ID: 474920 Summary: xdg-open prefers vscode over dolphin Classification: Plasma Product: xdg-desktop-portal-kde Version: git-stable-Plasma/5.27 Platform: Neon OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: plasma-b...@kde.org Reporter: thomaslukeduf...@hotmail.co.uk CC: aleix...@kde.org, jgrul...@redhat.com, n...@kde.org Target Milestone: --- SUMMARY When VSCode is installed, it prepends itself to the `/usr/share/applications/mimeinfo.cache` file of the host/sandbox. On GNOME this seems to be handled fine, but on KDE and some other DE's this appears to cause apps leveraging xdg-open to prefer VSCode over Dolphin. This manifests as either "open folder" buttons failing to launch any app at all (appearing broken) or opening VSCode instead of Dolphin/preferred file picker, which usually breaks application functionality. STEPS TO REPRODUCE 1. Install VSCode on a KDE system. 2. Attempt to open a folder via an app that relies on xdg-portals. (2 examples are gdlauncher and prism launcher if you're in your bi-annual Minecraft phase like I am) OBSERVED RESULT Nothing happens, or VSCode launches. Using `journalctl -f` you can observe failed launches of vscode. Appears that these happen mainly when VSCode is installed as a Snap (And possibly Flatpak but I didn't check) EXPECTED RESULT Dolphin opens. SOFTWARE/OS VERSIONS Operating System: KDE neon 5.27 KDE Plasma Version: 5.27.8 KDE Frameworks Version: 5.110.0 Qt Version: 5.15.10 Kernel Version: 6.2.0-33-generic (64-bit) Graphics Platform: X11 Processors: 12 × AMD Ryzen 5 4600H with Radeon Graphics Memory: 22.8 GiB of RAM Graphics Processor: NVIDIA GeForce GTX 1650 Ti/PCIe/SSE2 Manufacturer: Acer Product Name: Nitro AN515-44 System Version: V1.04 ADDITIONAL INFORMATION Issue on VSCode's repo: https://github.com/microsoft/vscode/issues/114425 The maintainers seem to believe they're doing what is believed to be standard practice when it comes to setting mimetypes. It could be that KDE and other distros are parsing this file incorrectly (or GNOME is doing it wrong and everyone has just assumed the outliers are wrong). Though I'm speculating on all fronts. As a suggestion, Plasma could do more to suggest which app should be used to attempt to open an xdg-mimetype when multiple apps are available like Android does. Right now, this is something only available in Dolphin via the "Open with..." dialog, but making this a cross-system option would help with UX in these fiddly edge-cases. -- You are receiving this mail because: You are watching all bug changes.