Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code sets itself as the default xdg-mime inode/directory application. Makes applications use it for "browse to folder" function. #188634

Closed
Veprovina opened this issue Jul 24, 2023 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) triage-needed

Comments

@Veprovina
Copy link

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.80.1 (flatpak)
  • OS Version: Arch linux

I'm not sure where to report this so apologies if it's the wrong place.
VS Code sets itself as the default application for "browse to folder" functions for apps that use xdg.

In terminal:
xdg-mime query default inode/directory

returns com.visualstudio.code.desktop.

This makes Steam use VS code instead of the native file browser when using the "browse to folder" function (right click on game, manage, browse to folder).

To fix this, i needed to set nautilus back to being default by this command:
xdg-mime default org.gnome.Nautilus.desktop inode/directory

This breaks the functionality, as i can't do much with files in VS code in that context. VS code shouldn't be used as a file manager app.
I'm not sure how this happened, and i've found a fix, but i thought i'd report it, in case you want to review the flatpak app, and why it was setting itself as the default file browser for "browse to" function.

Firefox and other native apps were unaffected.
The only affected apps were Steam and Unity. Probably because they use xdg.

Steps to Reproduce:

  1. Install VS Code flatpak version on linux
  2. Open Steam and use browse to folder function
@Tyriar
Copy link
Member

Tyriar commented Jul 27, 2023

/duplicate #114425

@Tyriar Tyriar closed this as completed Jul 27, 2023
@VSCodeTriageBot VSCodeTriageBot added the *duplicate Issue identified as a duplicate of another issue(s) label Jul 27, 2023
@hgfernan
Copy link

hgfernan commented Aug 9, 2023

That's a disgusting feature of the vscode installer. Since it's primarily a code editor, why should it try to replace some specialized inode/directory viewer ?

I've tried not to use the words bug, bug by design, Microsoft style...

@Tyriar
Copy link
Member

Tyriar commented Aug 9, 2023

@hgfernan see the linked issue #114425 (comment), all we do is register ourselves as an app that can open directories. To me this always seemed like a bug on certain distro sides as it works as expected on some but not others, but regardless it needs an expert to help.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) triage-needed
Projects
None yet
Development

No branches or pull requests

4 participants