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

Integrated terminal cannot find system executables #44646

Closed
mlewis-everley opened this issue Feb 27, 2018 · 6 comments
Closed

Integrated terminal cannot find system executables #44646

mlewis-everley opened this issue Feb 27, 2018 · 6 comments
Assignees
Labels
info-needed Issue requires more information from poster linux Issues with VS Code on Linux

Comments

@mlewis-everley
Copy link

  • VSCode Version: 1.20.1 (Via Software Manager)
  • OS Version: Linux Mint 18.3

Steps to Reproduce:

  1. Open integrated terminal.
  2. Run $ php -v.
  3. $ bash: php: command not found.
  4. Open linux terminal.
  5. Run $ php -v.
  6. $ PHP 7.0.25-0ubuntu0.16.04.1 (cli) ( NTS )...

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

This has already been reported in issue #40544 (but that has been closed).

I have changed the following VS code settings (in an attempt to fix this):

"terminal.integrated.shell.linux": "/bin/bash",
"terminal.integrated.env.linux": {
    "PATH": "${env:PATH}:/usr/local/bin"
},
"terminal.integrated.shellArgs.linux": [
    "-l"
],

Running $ which php in Linux terminal returns:

/usr/bin/php

Running $ ls - l /usr/bin in the integrated terminal results in (no php):

-rwxr-xr-x   2 nfsnobody nfsnobody    2891 Jan  1  1970 pdfmom
-rwxr-xr-x   2 nfsnobody nfsnobody   21465 Jan  1  1970 pdfroff
-rwxr-xr-x   2 nfsnobody nfsnobody    1306 Jan  1  1970 pdftexi2dvi
-rwxr-xr-x   3 nfsnobody nfsnobody 2095232 Jan  1  1970 perf
lrwxrwxrwx   1 nfsnobody nfsnobody      10 Feb 25 00:21 perl -> perl5.22.1
-rwxr-xr-x   2 nfsnobody nfsnobody   12672 Jan  1  1970 perl5.22.1
-rwxr-xr-x   3 nfsnobody nfsnobody   45393 Jan  1  1970 perlbug
-rwxr-xr-x   2 nfsnobody nfsnobody     262 Jan  1  1970 perldoc
-rwxr-xr-x   2 nfsnobody nfsnobody   10862 Jan  1  1970 perlivp
-rwxr-xr-x   3 nfsnobody nfsnobody   45393 Jan  1  1970 perlthanks
-rwxr-xr-x   2 nfsnobody nfsnobody   14408 Jan  1  1970 pfbtops
-rwxr-xr-x   2 nfsnobody nfsnobody   38896 Jan  1  1970 pg
-rwxr-xr-x   4 nfsnobody nfsnobody   26680 Jan  1  1970 pgrep
-rwxr-xr-x   2 nfsnobody nfsnobody  200696 Jan  1  1970 pic
-rwxr-xr-x   2 nfsnobody nfsnobody    2957 Jan  1  1970 pic2graph
-rwxr-xr-x   2 nfsnobody nfsnobody    8357 Jan  1  1970 piconv
-rwxr-xr-x   4 nfsnobody nfsnobody   14376 Jan  1  1970 pidof
lrwxrwxrwx   1 nfsnobody nfsnobody      15 Feb 25 00:21 pinentry -> pinentry-curses
-rwxr-xr-x   4 nfsnobody nfsnobody   64288 Jan  1  1970 pinentry-curses

Finally, if I run $ ls -l / in Linux terminal:

drwxr-xr-x   2 root root  4096 Feb 25 00:03 bin
drwxr-xr-x   5 root root  1024 Feb 25 00:04 boot
drwxr-xr-x   2 root root  4096 Feb 24 23:53 cdrom
drwxr-xr-x  22 root root  4320 Feb 27 09:34 dev
drwxr-xr-x 151 root root 12288 Feb 26 19:14 etc
drwxr-xr-x   5 root root  4096 Feb 25 00:09 home
lrwxrwxrwx   1 root root    33 Feb 24 23:55 initrd.img -> boot/initrd.img-4.10.0-38-generic
drwxr-xr-x  26 root root  4096 Feb 25 00:03 lib
drwxr-xr-x   2 root root  4096 Feb 25 00:03 lib64
drwx------   2 root root 16384 Feb 24 23:50 lost+found
drwxr-xr-x   3 root root  4096 Feb 25 00:28 media
drwxr-xr-x   2 root root  4096 Nov 24 12:36 mnt
drwxr-xr-x   3 root root  4096 Feb 26 19:04 opt
dr-xr-xr-x 299 root root     0 Feb 26 11:30 proc
drwx------   6 root root  4096 Feb 26 11:23 root
drwxr-xr-x  36 root root  1100 Feb 27 07:35 run
drwxr-xr-x   2 root root 12288 Feb 25 00:03 sbin
drwxr-xr-x   2 root root  4096 Nov 24 12:36 srv
dr-xr-xr-x  13 root root     0 Feb 26 13:15 sys
drwxrwxrwt  19 root root  4096 Feb 27 19:48 tmp
drwxr-xr-x  10 root root  4096 Nov 24 12:36 usr
drwxr-xr-x  13 root root  4096 Feb 25 21:28 var
lrwxrwxrwx   1 root root    30 Feb 24 23:55 vmlinuz -> boot/vmlinuz-4.10.0-38-generic

But if I run $ls -l / in VSCode integrated terminal, I get different results (which look quite odd):

drwxr-xr-x   7 nfsnobody nfsnobody  4096 Feb 25 00:24 app
lrwxrwxrwx   1 morven    morven        7 Feb 27 19:48 bin -> usr/bin
drwxr-xr-x   2 morven    morven       80 Feb 27 19:48 boot
drwxr-xr-x   2 nfsnobody nfsnobody  4096 Feb 24 23:53 cdrom
drwxr-xr-x   5 morven    morven      320 Feb 27 19:48 dev
drwxr-xr-x  25 morven    morven     1300 Feb 27 19:48 etc
drwxr-xr-x   5 nfsnobody nfsnobody  4096 Feb 25 00:09 home
lrwxrwxrwx   1 morven    morven       33 Feb 27 19:48 initrd.img -> boot/initrd.img-4.10.0-38-generic
lrwxrwxrwx   1 morven    morven        7 Feb 27 19:48 lib -> usr/lib
lrwxrwxrwx   1 morven    morven        9 Feb 27 19:48 lib64 -> usr/lib64
drwx------   2 nfsnobody nfsnobody 16384 Feb 24 23:50 lost+found
drwxr-xr-x   3 nfsnobody nfsnobody  4096 Feb 25 00:28 media
drwxr-xr-x   2 nfsnobody nfsnobody  4096 Nov 24 12:36 mnt
drwxr-xr-x   3 nfsnobody nfsnobody  4096 Feb 26 19:04 opt
dr-xr-xr-x 296 nfsnobody nfsnobody     0 Feb 27 19:48 proc
drwxr-xr-x   6 morven    morven      160 Feb 27 19:48 run
lrwxrwxrwx   1 morven    morven        8 Feb 27 19:48 sbin -> usr/sbin
drwxr-xr-x   2 nfsnobody nfsnobody  4096 Nov 24 12:36 srv
drwxr-xr-x   7 morven    morven      140 Feb 27 19:48 sys
drwxr-xr-x   5 morven    morven      120 Feb 27 19:49 tmp
drwxr-xr-x  14 nfsnobody nfsnobody  4096 Feb 25 00:21 usr
drwxr-xr-x   6 morven    morven      140 Feb 27 19:48 var
lrwxrwxrwx   1 morven    morven       30 Feb 27 19:48 vmlinuz -> boot/vmlinuz-4.10.0-38-generic

Not quite sure what is going on there...

@Tyriar
Copy link
Member

Tyriar commented Feb 28, 2018

@mlewis-everley you mention you got VS Code from the software center? We don't actually distribute in any software center yet AFAIK, we only expose a deb package at https://code.visualstudio.com/download

Could you be installing https://snapcraft.io/vscode? Can you check where VS Code was installed to?

@Tyriar Tyriar added info-needed Issue requires more information from poster linux Issues with VS Code on Linux labels Feb 28, 2018
@mlewis-everley
Copy link
Author

@Tyriar VS Code is available in the Software Manager in Mint 18.3 under the "FlatPack" (https://www.flatpak.org/) category:

software-manager-vscode

I will be honest, I know sod all about FlatPack, but the command it adds to the menu runs it like so:

/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=code --file-forwarding com.visualstudio.code --reuse-window @@ %F @@

If you try and run code from the terminal then you get

command 'code' not found

@Tyriar
Copy link
Member

Tyriar commented Mar 1, 2018

@mlewis-everley yeah that's probably your problem. That's an unofficial distribution that we cannot support (which could be tampered with in any way the author wanted). I'd uninstall that, install the official deb and try again.

Also is that tick meant to mean verified/official or installed?

@mlewis-everley
Copy link
Author

@Tyriar It means installed, I am not really sure who maintains the Flatpack software, it is new in this version of Mint I think. I will uninstall this version and try again, I only installed it as I assumed it was an official package :-o

@mlewis-everley
Copy link
Author

OK, I can confirm that the official .deb package works as expected. Not really sure who is responsible for the flatpack version.

If anyone else is having issues with the version from Linux Mint Software Manager, remove and install the official .deb instead.

@Tyriar
Copy link
Member

Tyriar commented Mar 1, 2018

@mlewis-everley the repo is here https://github.com/flathub/com.visualstudio.code, thanks for confirming. I'll comment the fix over at #40544 too

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster linux Issues with VS Code on Linux
Projects
None yet
Development

No branches or pull requests

2 participants