vscode: terminal.integrated.inheritEnv breaks integrated terminal
Issue Type: Bug
- Add
"terminal.integrated.inheritEnv": false
to settings.json - Try to open terminal
- Terminal blinks and can’t do anything
VS Code version: Code 1.36.0 (0f3794b38477eea13fb47fbe15a42798e6129338, 2019-07-03T13:20:56.241Z) OS version: elementary OS 5.0 Juno (Ubuntu 18.04.2 LTS), Linux x64 4.15.0-54-generic
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-7560U CPU @ 2.40GHz (4 x 3454) |
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: disabled_software oop_rasterization: disabled_off protected_video_decode: unavailable_off rasterization: disabled_software skia_deferred_display_list: disabled_off skia_renderer: disabled_off surface_synchronization: enabled_on video_decode: unavailable_off viz_display_compositor: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | 2, 2, 2 |
Memory (System) | 15.28GB (4.55GB free) |
Process Argv | –unity-launch |
Screen Reader | no |
VM | 0% |
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 32
- Comments: 23 (3 by maintainers)
A system error occurred (EACCES: permission denied, open ‘/proc/1598/environ’): Error: EACCES: permission denied, open ‘/proc/1598/environ’
In fedora:
For some reason it is not enabled by default and that is preventing the Terminal from running.
“terminal.integrated.inheritEnv”: false
produced the blank terminal window that the above mention for me on RHEL, VS Code 1.39.1. Log Window shows the same error as mentioned earlier:
A system error occurred (EACCES: permission denied, open '/proc/1/environ'): Error: EACCES: permission denied, open '/proc/1/environ'
The reason Inherit Env isn’t enable by default is probably this: https://github.com/microsoft/vscode-python/issues/7607 (ie: to make it more compatible with conda) I can confirm it happens for version 1.44.2, with both gnome-shortcut and terminal. Temporary fix for me is enable it, since my particular project does not care about it. But that is just a workaround.
Version: 1.41.1 Commit: 26076a4de974ead31f97692a0d32f90d735645c0 Date: 2019-12-18T15:04:31.999Z Electron: 6.1.5 Chrome: 76.0.3809.146 Node.js: 12.4.0 V8: 7.6.303.31-electron.0 OS: Linux x64 4.15.0-76-generic
I also run it from the terminal, usually doing a
code .
in a project directory.It started happening to me today, I ticked this option and it started working
Reproduced in Ubuntu 18.04, .deb Version: 1.9.1-1486597190
Workaround: remove
"terminal.integrated.inheritEnv": false
from options (but my use case does not require it)A system error occurred (EACCES: permission denied, open '/proc/1/environ'): Error: EACCES: permission denied, open '/proc/1/environ'
Just a note: I think
/proc/1/environ
points to the environment ofsystemd
or any init process, which is unlikely to be accessible by any user process without root privs.not for me (even with the 1.39.1 version)
Same here with the latest 1.40.1 on amd64 Ubuntu 16.04.
I used ‘–user-data-dir’. Only adding ‘–verbose’ make the integrated terminal work.
“terminal.integrated.inheritEnv”: false
For whatever reason, I’m no longer able to reproduce this bug.
"terminal.integrated.inheritEnv": false
seems to work perfectly for me now.EDIT: Probably related to https://gitlab.gnome.org/World/ShellExtensions/desktop-icons/issues/155
On Ubuntu 18.04, I installed VSCode with snap. When I launch VSC inside a terminal with
> /snap/bin/code
I am able to work in the VSC terminal whatever theterminal.integrated.inheritEnv
settings, but when I launch it with the.desktop
link, if the settings is atfalse
I got the issue of a blank terminal.It’s actually coming back, but it’s using a new way of getting the environment that should not have this issue.
I also experience this issue when my
settings.json
contains theterminal.integrated.inheritEnv: False
flag. Like @martinlbrook mentioned this only happens if you use the desktop shortcut or as others mentioned you set it to"terminal.integrated.inheritEnv": true
.I also still get the issue, though I’m using the deb
Same problem. I see this in output of
Log (Window)
:VS Code version: Code 1.36.0 (0f3794b38477eea13fb47fbe15a42798e6129338, 2019-07-03T13:20:56.241Z) OS version: Linux x64 5.1.8-1-MANJARO
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Extensions (24)