You are not logged in.
Hello,
Visual Studio Code somehow took over opening folder paths. E.g. I go into Transmission > Open Folder (of torrent) and that folder opens in Visual Studio Code, instead of my file manager Dolphin. Or in Gnome Disks, clicking the mount point of a drive also opens in VS Code.
In Firefox, however, clicking "Show in Folder" of a downloaded file does open in Dolphin.
How would I fix this?
Last edited by OrakMoya (2022-12-24 16:07:51)
Offline
Uninstall vscode. /sarcasm
Is it the repo version or some flatschpak?
cat /usr/share/applications/code-oss-url-handler.desktop
cat /usr/share/applications/code-oss.desktop
cat /usr/share/applications/org.kde.dolphin.desktop
For reference: https://wiki.archlinux.org/title/XDG_MIME_Applications
Online
It is the AUR visual-studio-code-bin package.
Relevant line I believe in order:
MimeType=x-scheme-handler/vscode;
MimeType=text/plain;inode/directory;application/x-code-workspace;
MimeType=inode/directory;
In System Settings' File Association page, VS Code is last in order of preference for opening the inode/directory, as well as everything else inside the inode category.
Last edited by OrakMoya (2022-12-24 16:01:25)
Offline
Using the selectdefaultapplication-git package I found on the wiki page you linked, I set dolphin as the default for opening inode/directory type and that fixed the problem. Not sure why System Settings showed Dolphin already first on the list for that type but it looks like it somehow got desynced.
Offline
MimeType=text/plain;inode/directory
MimeType=inode/directory;
That is in one of the code-oss*.desktop files?
Or is the last one from dolphin?
(Please don't post excerpts out of context - you know the context and believe to know what's relevant. We don't and tehrefore also cannot judge the relevance)
In System Settings' File Association page
You can forget about that, it'll apply to KDEs stuff, but most tools will probably use xdg-open
xdg-mime query default "inode/directory"
This is probably down to the aur package you're using, the repo package doesn't register for inode/directory
Online
Modifiy the appropiate line in /usr/share/applications/mimeinfo.cache switching the order of "code" and "nautilus".
From:
inode/directory=code.desktop;org.gnome.Nautilus.desktop;
To
inode/directory=org.gnome.Nautilus.desktop;code.desktop;
Last edited by chalo (2023-07-11 06:04:15)
Offline
The real fix is to set the default locally properly for your user in the appropriate mime config files. The cache file is that, a cache file. It will get overwritten the next time you install something that claims inode/directory and/or rebuilts the mime cache - which is everytime you install something with new associations.
Offline