I recently ran into the following problem with GNOME nautilus and VSCode: My default folder opens with VSCode!
xdg-mime query default inode/directory
This command will output code.desktop
, and then when I try to run open <dir_name>
in the fish shell, fish will use VSCode to open this directory, GNOME keyboard The shortcut key also opens the main directory with VSCode by default.
However, when choosing the way to open the directory in nautilus, there is no option to change the default (I think this may be to prevent nautilus from being damaged due to carelessness)
I think it might be because of this commit: Rename desktop files to match upstream
, since this happened to me recently.
I think this is definitely not expected, but I found a temporary workaround, you can run the following command to set the current user's default to normal:
xdg-mime default org.gnome.Nautilus.desktop inode/directory
Pinned Comments
dcelasun commented on 2017-11-15 06:20 (UTC) (edited on 2020-02-06 21:33 (UTC) by dcelasun)
FREQUENTLY ASKED QUESTIONS (read before flagging or commenting!)
This is the official binary distribution from Microsoft. The one in the community repo is an unofficial build made from source. Beyond the license difference and branding, there are some proprietary features not available in the open source version.
Please check this page before flagging as out-of-date. If there is no new version on that page, it's not yet released. A tag on Github is NOT a release! If you can see the new version on the updates page but the AUR package is still not updated, flag it and give it time. It's usually done within a day or two.
Sometimes AUR helpers do weird things. Download the tarball and install it manually with
makepkg -si
. If that works, report the problem to your AUR helper's upstream, not here.xdg-open
uses vscode, not my file manager! How do I fix this?Install shared-mime-info-gnome. Also see this reddit thread.
Just because $X is not required to open the app, doesn't mean there is nothing that depends on it. Always search the comment history on AUR to see if that dependency has been previously discussed before writing your own comment. Still nothing? Then use namcap to make sure it's really not needed. If namcap doesn't complain, please leave a comment here and I'll investigate.
The problem might be a packaging issue (wrong paths, dependencies, icons), so please write a comment here first. If you don't get a reply, or if someone says it's an upstream issue, you can report it on Github.
No, you won't get a reply. Please stop doing this. Leave a comment here instead and be patient.