Bug 438006 - Directories open in VS Code instead of Dolphin, Dolphin is set as default in Settings
Summary: Directories open in VS Code instead of Dolphin, Dolphin is set as default in ...
Status: REPORTED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_componentchooser (show other bugs)
Version: 5.21.90
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-02 17:42 UTC by Lyubomir
Modified: 2021-12-21 16:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
~/.config/mimeapps.list (1.30 KB, text/plain)
2021-06-09 17:48 UTC, Lyubomir
Details
/usr/share/applications/mimeinfo.cache (23.22 KB, text/plain)
2021-06-09 17:50 UTC, Lyubomir
Details
Default apps (31.52 KB, image/png)
2021-06-11 13:59 UTC, Lyubomir
Details
inode/directory settings (138.38 KB, image/png)
2021-06-13 06:12 UTC, Lyubomir
Details
image/jpeg settings (86.29 KB, image/png)
2021-06-13 06:16 UTC, Lyubomir
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lyubomir 2021-06-02 17:42:50 UTC
SUMMARY
The system settings either fails to show VS Code as default application for Files, or the system opens VS Code erroneously in conflict with the default setting.

There is a bug report for VS Code here: https://github.com/Microsoft/vscode/issues/41037
It mentions that this is an OS/distro issue and not an issue with VS Code, so i file a bug here.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 21.04
KDE Plasma Version: 5.21.90
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Kernel Version: 5.11.0-17-lowlatency (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 7,6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Comment 1 Nate Graham 2021-06-08 22:22:00 UTC
When you right-click on a folder in Dolphin and mouse over to "Open With", what does it show?
Comment 2 Lyubomir 2021-06-09 10:49:07 UTC
It shows:
Gwenview
Visual Studio Code
Comment 3 Nate Graham 2021-06-09 15:09:03 UTC
Thanks. So when you left-click on a folder in Dolphin, it opens in VSCode?
Comment 4 Lyubomir 2021-06-09 16:48:31 UTC
No. If i select "View Timeshift logs" in Timeshift, it opens the folder in VS Code. In System settings i have set the folders to open in Dolphin by default.
Comment 5 Nate Graham 2021-06-09 17:10:48 UTC
So the bug only happens when you open a folder from the Timeshift app? Not any other apps?
Comment 6 Lyubomir 2021-06-09 17:26:34 UTC
No. "Open Directory" from about:support in Firefox also opens in VS Code.
For comparison when i download a file in Firefox and select "Open containing folder" it opens Dolphin.

There might be some useful info in the VS Code report above.
Comment 7 Nate Graham 2021-06-09 17:41:27 UTC
Please attach the following files:

~/.config/mimeapps.list

/usr/share/applications/mimeapps.list

/usr/share/applications/kde-mimeapps.list

/usr/share/applications/gnome-mimeapps.list
Comment 8 Lyubomir 2021-06-09 17:47:36 UTC
I do not have:
/usr/share/applications/mimeapps.list
/usr/share/applications/kde-mimeapps.list
/usr/share/applications/gnome-mimeapps.list

I am uploading:
~/.config/mimeapps.list
/usr/share/applications/mimeinfo.cache
Comment 9 Lyubomir 2021-06-09 17:48:30 UTC
Created attachment 139154 [details]
~/.config/mimeapps.list
Comment 10 Lyubomir 2021-06-09 17:50:03 UTC
Created attachment 139155 [details]
/usr/share/applications/mimeinfo.cache
Comment 11 Nate Graham 2021-06-09 21:05:22 UTC
Okay, so the problem has become obvious. Your /usr/share/applications/mimeinfo.cache has:

inode/directory=code.desktop;org.kde.dolphin.desktop;org.kde.gwenview.desktop;

Which means that the system thinks VSCode should be the preferred app to open folders.

Your ~/.config/mimeapps.list file lacks any line with "inode/directory=[something]" on it. So the system is falling back to an alphabetical list of all apps capable of opening folders, and VSCode's .desktop file randomly happens to have a reverse-DNS-style identifier that is alphabetically first. If that wasn't the case, Dolphin would be used instead and no one would be the wiser. :)

By contrast, my ~/.config/mimeapps.list file has this in it, in the [Default Applications] group:

inode/directory=org.kde.dolphin.desktop;

Can you send screenshot of how the "Default Applications" page in System Settings looks for you?
Comment 12 Lyubomir 2021-06-11 13:59:07 UTC
Created attachment 139230 [details]
Default apps
Comment 13 Lyubomir 2021-06-13 06:12:30 UTC
Created attachment 139274 [details]
inode/directory settings

I've also got this.
Comment 14 Lyubomir 2021-06-13 06:16:20 UTC
Created attachment 139275 [details]
image/jpeg settings

I also have a related issue. I've downloaded an "image/jpeg" to the Desktop. If i open it from the list of downloads in Firefox (the down arrow near the address bar) it opens in Google Chrome, not in Gwenview. If i open it from the desktop icon it opens in Gwenview.
Comment 15 Nate Graham 2021-06-14 19:27:13 UTC
Can you do me a favor and set the default file manager to something else, click apply, and then set it back to Dolphin, and see if that fixes it?
Comment 16 Lyubomir 2021-06-14 21:28:04 UTC
I tried both first changing to Ark and then back to Dolphin (without ticking "Remember application association for types inode/directory"), and also changing to Ark and back to Dolphin (with ticking "Remember application association for types inode/directory" on each change) - it didn't work. I haven't logged out and in though.
Comment 17 Nate Graham 2021-06-14 21:29:32 UTC
Welp, I'm confused.
Comment 18 Lyubomir 2021-12-21 16:37:39 UTC
Since then I've completely clean reinstalled and moved to Arch, respectively newer versions of KDE software.
It is interesting that now i have an HTML file on my Desktop, which when i open by double-clicking first opens the Konqueror browser but does not load in it, instead after Konqueror is opened then Firefox opens side-to-side and the file is shown in Firefox. Right clicking on the file properties says "Open with: Konqueror". But in System Settings -> Default applications it shows "Web browser: Firefox".
Comment 19 Lyubomir 2021-12-21 16:38:17 UTC
Operating System: Arch Linux
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Kernel Version: 5.15.10-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 7,6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620