Closed silocoder closed 3 years ago
Additional info:
Tested using Linux Mint 20 (also Ubuntu based) and works fine with visual code opens up nemo.
Here are the xdg
~$ xdg-mime query default inode/directory
nemo.desktop
~$ cat /usr/share/applications/mimeinfo.cache | grep inode/directory
inode/directory=code.desktop;nemo.desktop;org.gnome.Nautilus.desktop;org.gnome.baobab.desktop;org.kde.dolphin.desktop;
~$ xdg-open ~/Documents # works
Found the problem. Seems to be the packaging/installation when using Snap. If I use apt install works. Below are the meta data. Versions are the same.
Also if I change /snap/bin/code with /usr/share/code/code exec then it works.
Any thoughts?
==========
#code_code.desktop
-------------------
[Desktop Entry]
X-SnapInstanceName=code
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/code_code.desktop /snap/bin/code --force-user-env --no-sandbox --unity-launch %F
Icon=/snap/code/42/meta/gui/com.visualstudio.code.png
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;
Actions=new-empty-window;
Keywords=vscode;
[Desktop Action new-empty-window]
Name=New Empty Window
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/code_code.desktop /snap/bin/code --force-user-env --no-sandbox --new-window %F
Icon=/snap/code/42/meta/gui/com.visualstudio.code.png
# version
------------
Version: 1.48.2
Commit: a0479759d6e9ea56afa657e454193f72aef85bd0
Date: 2020-08-25T10:56:10.074Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.4.0-45-generic snap
==========
# code.desktop
------------
[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/code/code --no-sandbox --unity-launch %F
Icon=com.visualstudio.code
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;
Actions=new-empty-window;
Keywords=vscode;
X-Desktop-File-Install-Version=0.24
[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/usr/share/code/code --no-sandbox --new-window %F
Icon=com.visualstudio.code
# version
---------
Version: 1.48.2
Commit: a0479759d6e9ea56afa657e454193f72aef85bd0
Date: 2020-08-25T10:56:10.074Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.4.0-45-generic
I am sorry but I do not know how the snap install could cause this. Maybe @joaomoreno would know And I can keep this issue open for the community to chime in with potential solutions
I added it to snapd bugsite
Steps to Reproduce:
Does this issue occur when all extensions are disabled?: Yes
P.S. This same open containing folder works with Sublime-Text 3 AND Kate (the default Kubuntu text editor)
Here is mime stuff: