Search code examples
linuxvisual-studio-codeflatpak

VSCode can't find files in Linux system


I have installed Visual Studio Code - OSS via flatpak. I changed

"terminal.integrated.shell.linux": "/usr/bin/zsh"

shell exist and working

$ which zsh
> /usr/bin/zsh

$ ls -l $(which zsh)
> -rwxr-xr-x 2 root root 865456 Feb  4 21:06 /usr/bin/zsh

$ zsh --version
> zsh 5.7.1 (x86_64-pc-linux-gnu)

$ echo $SHELL
> /usr/bin/zsh

When new terminal window is opened, and terminal window is closed right after following message is displayed in the terminal window.

execvp(3) failed.: No such file or directory 

I again installed vscodevim plugin and configured

"vim.enableNeovim": true,
"vim.neovimPath": "/usr/bin/nvim"

But, i get following error message.

Configuration: Invalid neovimPath. ENOENT: no such file or directory, stat '/usr/bin/nvim'.

But the nvim exist:

$ Configuration: Invalid neovimPath. ENOENT: no such file or directory, stat '/usr/bin/nvim'.
> -rwxr-xr-x 1 root root 3383384 Jan 14 03:41 /usr/bin/nvim

VS Code failed to find the system files it seems. How can i resolve this?

> Flatpak 1.3.2
> Visual Studio Code - OSS com.visualstudio.code.oss 1.33.1 stable x86_64 flathub  user

Solution

  • I could access "/usr/bin/zsh" in host by

    "terminal.integrated.shell.linux": "/run/host/usr/bin/zsh"
    

    However there are many problems loading libraries and configurations from the home directory. So I assume it does not allow access everything in the files system. NOTE: This requires no additional parameters to flatpak run