vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

X server not forwarded when using remote devcontainer

Open JanPokorny opened this issue 2 years ago • 10 comments

  • VSCode Version: 1.63.2
  • Local OS Version: Microsoft Windows 10 Enterprise 10.0.19044
  • Remote OS Version: Linux jpb.cdn-dev.ko1.os.scif.cz 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux
  • Remote Extension/Connection Type: Docker over SSH

Steps to Reproduce:

  1. Ensure you have two machines:
  • local machine with Windows 10, VSCode, running X server (eg. VcXSrv) and ssh client configured to X forward to the remote machine
  • remote machine with Linux, x11-apps, Docker, configured to accept X forwarding over SSH
  1. Add this to .profile on the remote machine: (based on this SO answer: https://stackoverflow.com/a/48235281/6099426)
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | sudo xauth -f /tmp/.docker.xauth nmerge - && sudo chmod 777 /tmp/.docker.xauth
export DISPLAY=$(echo $DISPLAY | sed 's/^[^:]*\(.*\)/172.17.0.1\1/')
export XAUTHORITY=/tmp/.docker.xauth
  1. From VSCode, open a folder on the remote using SSH
  2. In VSCode terminal (so on the remote) run echo $DISPLAY $XAUTHORITY and ensure the output is 172.17.0.1:10.0 /tmp/.docker.xauth (number after : may be different)
  3. Ensure that running xeyes displays eyes (X forwarding to remote works)
  4. Ensure that running sudo docker run -ti --rm -e DISPLAY -e XAUTHORITY -v /tmp/.docker.xauth:/tmp/.docker.xauth fr3nd/xeyes displays eyes (X forwarding to remote docker works)
  5. Add the following devcontainer.json configuration, equivalent to the CLI call above:
{
    "image": "fr3nd/xeyes",
    "initializeCommand": "echo $DISPLAY $XAUTHORITY",
    "runArgs": [
        "-e", "DISPLAY",
        "-e", "XAUTHORITY",
        "-v", "/tmp/.docker.xauth:/tmp/.docker.xauth"
    ],
}
  1. Reopen in container and in the terminal (so now inside the container) run xeyes -- this produces error Error: Can't open display: 127.0.0.1:0.0
  2. Check output of the initializeCommand (which runs on the host machine) and compare with the output of the command from step 4 (ran on the same machine using remote SSH directly) -- the value of DISPLAY will be different, probably because the container is opened through a new SSH connection, without X forwarding enabled

JanPokorny avatar Jan 18 '22 14:01 JanPokorny

The DISPLAY valid on the SSH server is not valid inside the container. Could you retry when adding "--network=host" to the runArgs property? (Only for testing, this makes the container use the same network interfaces as the host which is not recommended.)

chrmarti avatar Jan 20 '22 13:01 chrmarti

@chrmarti As you can see in point 2, I specifically construct a DISPLAY and XAUTHORITY to be used within the docker container, using the IP address 172.17.0.1 which in Docker's network adapter is the IP of the host computer. This IP thus points to the host both inside and outside of Docker. Adding --network=host has no effect.

From my understanding, the problem is that when VSCode connects to a SSH workspace, it behaves differently than when it connects to a SSH+Docker workspace. You can see that while in point 4, the DISPLAY value is the one expected after SSH forwarding (and indeed, xeyes work both on host and in Docker), in point 9 (what initializeCommand did print) the DISPLAY is not set correctly -- meaning that in the SSH connection used to run initializeCommand (and presumably the Docker commands as well) the X server was not forwarded properly.

JanPokorny avatar Jan 20 '22 13:01 JanPokorny

Could you set the log level to 'trace', reopen the folder in the container and then append the log from that? (F1 > Remote-Containers: Show Container Log) image

chrmarti avatar Jan 21 '22 09:01 chrmarti

@chrmarti At the bottom are the logs. I have redacted the internal DNS name to machine.internal.company.com out of precaution 😅

For completeness, here's my .ssh/config:

Host machine.internal.company.com
  HostName machine.internal.company.com
  User debian
  ForwardAgent yes
  ForwardX11 yes
  ForwardX11Trusted yes

And here's the full log:

Container log
[94 ms] Remote-Containers 0.209.6 in VS Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3).
[93 ms] Start: Resolving Remote
[105 ms] Start: Run: ssh machine.internal.company.com /bin/sh -c /bin/sh
[131 ms] Start: Run in host: id -un
[2775 ms] debian
[2776 ms] Warning: No xauth data; using fake authentication data for X11 forwarding.
[2777 ms] Stop (2646 ms): Run in host: id -un
[2778 ms] Start: Run in host: cat /etc/passwd
[2798 ms] Stop (20 ms): Run in host: cat /etc/passwd
[2799 ms] Start: Run in host: echo ~
[2819 ms] /home/debian
[2821 ms] 
[2821 ms] Stop (22 ms): Run in host: echo ~
[2823 ms] Start: Run in host: test -x '/home/debian/.vscode-remote-containers/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node'
[2839 ms] 
[2840 ms] 
[2841 ms] Exit code 1
[2842 ms] Stop (19 ms): Run in host: test -x '/home/debian/.vscode-remote-containers/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node'
[2843 ms] Start: Run in host: test -x '/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node'
[2860 ms] 
[2861 ms] 
[2861 ms] Stop (18 ms): Run in host: test -x '/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node'
[2862 ms] Start: Run in host: test -f '/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node_modules/node-pty/package.json'
[2878 ms] 
[2879 ms] 
[2879 ms] Stop (17 ms): Run in host: test -f '/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node_modules/node-pty/package.json'
[2879 ms] Start: Run in host: test -f '/home/debian/.vscode-remote-containers/dist/vscode-remote-containers-server-0.209.6.js'
[2897 ms] 
[2897 ms] 
[2897 ms] Stop (18 ms): Run in host: test -f '/home/debian/.vscode-remote-containers/dist/vscode-remote-containers-server-0.209.6.js'
[2915 ms] userEnvProbe: loginInteractiveShell (default)
[2916 ms] userEnvProbe shell: /bin/bash
[2917 ms] Start: Run in Host: /bin/bash -lic '/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node' -p '"89da861ce1ca004c9b2ea8149f32a0dd" + JSON.stringify(process.env) + "89da861ce1ca004c9b2ea8149f32a0dd"'
[3193 ms] Stop (276 ms): Run in Host: /bin/bash -lic '/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node' -p '"89da861ce1ca004c9b2ea8149f32a0dd" + JSON.stringify(process.env) + "89da861ce1ca004c9b2ea8149f32a0dd"'
[3194 ms] 89da861ce1ca004c9b2ea8149f32a0dd{"SHELL":"/bin/bash","SSH_AUTH_SOCK":"/tmp/ssh-kreigba2rT/agent.16243","REMOTE_CONTAINERS_IPC":"","PWD":"/home/debian/repos/jan.pokorny2/image-cropping","LOGNAME":"debian","XDG_SESSION_TYPE":"tty","XAUTHORITY":"/tmp/.docker.xauth","HOME":"/home/debian","LANG":"C.UTF-8","LS_COLORS":"","STARSHIP_SHELL":"bash","SSH_CONNECTION":"10.0.116.74 60650 10.244.21.129 22","STARSHIP_SESSION_KEY":"2098643711361720","XDG_SESSION_CLASS":"user","REMOTE_CONTAINERS_SOCKETS":"[]","USER":"debian","DISPLAY":"172.17.0.1:16.0","SHLVL":"0","XDG_SESSION_ID":"125","XDG_RUNTIME_DIR":"/run/user/1000","SSH_CLIENT":"10.0.116.74 60650 22","LC_ALL":"C.UTF-8","PATH":"/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin","DBUS_SESSION_BUS_ADDRESS":"unix:path=/run/user/1000/bus","MAIL":"/var/mail/debian","GOPATH":"/home/debian/.go","_":"/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node"}89da861ce1ca004c9b2ea8149f32a0dd
[3195 ms] bash: cannot set terminal process group (16244): Inappropriate ioctl for device
bash: no job control in this shell

[3196 ms] userEnvProbe parsed: {
  "SHELL": "/bin/bash",
  "SSH_AUTH_SOCK": "/tmp/ssh-kreigba2rT/agent.16243",
  "REMOTE_CONTAINERS_IPC": "",
  "PWD": "/home/debian/repos/jan.pokorny2/image-cropping",
  "LOGNAME": "debian",
  "XDG_SESSION_TYPE": "tty",
  "XAUTHORITY": "/tmp/.docker.xauth",
  "HOME": "/home/debian",
  "LANG": "C.UTF-8",
  "LS_COLORS": "",
  "STARSHIP_SHELL": "bash",
  "SSH_CONNECTION": "10.0.116.74 60650 10.244.21.129 22",
  "STARSHIP_SESSION_KEY": "2098643711361720",
  "XDG_SESSION_CLASS": "user",
  "REMOTE_CONTAINERS_SOCKETS": "[]",
  "USER": "debian",
  "DISPLAY": "172.17.0.1:16.0",
  "SHLVL": "0",
  "XDG_SESSION_ID": "125",
  "XDG_RUNTIME_DIR": "/run/user/1000",
  "SSH_CLIENT": "10.0.116.74 60650 22",
  "LC_ALL": "C.UTF-8",
  "PATH": "/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin",
  "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus",
  "MAIL": "/var/mail/debian",
  "GOPATH": "/home/debian/.go",
  "_": "/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node"
}
[3197 ms] userEnvProbe PATHs:
Probe:     '/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin'
Container: None
[3217 ms] Setting up container for folder or workspace: /home/debian/repos/jan.pokorny2/image-cropping
[3218 ms] Host: ssh://machine.internal.company.com
[3224 ms] Start: Check Docker is running
[3226 ms] Start: Run in Host: docker version --format {{.Server.APIVersion}}
[3309 ms] Stop (83 ms): Run in Host: docker version --format {{.Server.APIVersion}}
[3309 ms] Server API version: 1.41
[3309 ms] Stop (85 ms): Check Docker is running
[3428 ms] Start: Run in Host: git rev-parse --show-cdup
[3464 ms] Stop (36 ms): Run in Host: git rev-parse --show-cdup
Running the initializeCommand from devcontainer.json...

[3466 ms] Start: Run in Host: /bin/sh -c echo $DISPLAY $XAUTHORITY
127.0.0.1:0.0 /tmp/.docker.xauth
[3517 ms] Stop (51 ms): Run in Host: /bin/sh -c echo $DISPLAY $XAUTHORITY

[3518 ms] Start: Run in Host: docker ps -q -a --filter label=vsch.local.folder=/home/debian/repos/jan.pokorny2/image-cropping --filter label=vsch.quality=stable
[3582 ms] Stop (64 ms): Run in Host: docker ps -q -a --filter label=vsch.local.folder=/home/debian/repos/jan.pokorny2/image-cropping --filter label=vsch.quality=stable
[3582 ms] Start: Run in Host: docker inspect --type container 569c09df6902
[3644 ms] Stop (62 ms): Run in Host: docker inspect --type container 569c09df6902
[3645 ms] Start: Removing Existing Container
[3645 ms] Start: Run in Host: docker rm -f 569c09df6902f6dc9854ae71e1a49462facfa4a09f2a8624429f44276dbc574c
[3958 ms] Stop (313 ms): Run in Host: docker rm -f 569c09df6902f6dc9854ae71e1a49462facfa4a09f2a8624429f44276dbc574c
[3959 ms] Stop (314 ms): Removing Existing Container
[4011 ms] Start: Run in Host: docker inspect --type image fr3nd/xeyes
[4077 ms] Stop (66 ms): Run in Host: docker inspect --type image fr3nd/xeyes
[4301 ms] Start: Run in Host: docker build -f /tmp/vsch/updateUID.Dockerfile-0.209.6 -t vsc-image-cropping-3080ccd476e61f5469b8cc9706ce3a0b-uid --build-arg BASE_IMAGE=fr3nd/xeyes --build-arg REMOTE_USER=user --build-arg NEW_UID=1000 --build-arg NEW_GID=1001 --build-arg IMAGE_USER=user /tmp/vsch
Sending build context to Docker daemon  26.62kB
Step 1/10 : ARG BASE_IMAGE
Step 2/10 : FROM $BASE_IMAGE
 ---> 371b6af5d2a8
Step 3/10 : USER root
 ---> Using cache
 ---> 86ac088a870a
Step 4/10 : ARG REMOTE_USER
 ---> Using cache
 ---> 90e3e104a347
Step 5/10 : ARG NEW_UID
 ---> Using cache
 ---> 4398b5016c61
Step 6/10 : ARG NEW_GID
 ---> Using cache
 ---> 8d8439d91ee0
Step 7/10 : SHELL ["/bin/sh", "-c"]
 ---> Using cache
 ---> eb118a23d688
Step 8/10 : RUN eval $(sed -n "s/${REMOTE_USER}:[^:]*:\([^:]*\):\([^:]*\):[^:]*:\([^:]*\).*/OLD_UID=\1;OLD_GID=\2;HOME_FOLDER=\3/p" /etc/passwd);      eval $(sed -n "s/\([^:]*\):[^:]*:${NEW_UID}:.*/EXISTING_USER=\1/p" /etc/passwd);         eval $(sed -n "s/\([^:]*\):[^:]*:${NEW_GID}:.*/EXISTING_GROUP=\1/p" /etc/group);        if [ -z "$OLD_UID" ]; then              echo "Remote user not found in /etc/passwd ($REMOTE_USER).";    elif [ "$OLD_UID" = "$NEW_UID" -a "$OLD_GID" = "$NEW_GID" ]; then               echo "UIDs and GIDs are the same ($NEW_UID:$NEW_GID).";         elif [ "$OLD_UID" != "$NEW_UID" -a -n "$EXISTING_USER" ]; then          echo "User with UID exists ($EXISTING_USER=$NEW_UID).";         elif [ "$OLD_GID" != "$NEW_GID" -a -n "$EXISTING_GROUP" ]; then                 echo "Group with GID exists ($EXISTING_GROUP=$NEW_GID).";       else            echo "Updating UID:GID from $OLD_UID:$OLD_GID to $NEW_UID:$NEW_GID.";           sed -i -e "s/\(${REMOTE_USER}:[^:]*:\)[^:]*:[^:]*/\1${NEW_UID}:${NEW_GID}/" /etc/passwd;                if [ "$OLD_GID" != "$NEW_GID" ]; then                   sed -i -e "s/\([^:]*:[^:]*:\)${OLD_GID}:/\1${NEW_GID}:/" /etc/group;            fi;             chown -R $NEW_UID:$NEW_GID $HOME_FOLDER;        fi;
 ---> Using cache
 ---> b4d66f89967f
Step 9/10 : ARG IMAGE_USER
 ---> Using cache
 ---> 9197ad101cea
Step 10/10 : USER $IMAGE_USER
 ---> Using cache
 ---> 5bcfb772fcd4
Successfully built 5bcfb772fcd4
Successfully tagged vsc-image-cropping-3080ccd476e61f5469b8cc9706ce3a0b-uid:latest
[4491 ms] Stop (190 ms): Run in Host: docker build -f /tmp/vsch/updateUID.Dockerfile-0.209.6 -t vsc-image-cropping-3080ccd476e61f5469b8cc9706ce3a0b-uid --build-arg BASE_IMAGE=fr3nd/xeyes --build-arg REMOTE_USER=user --build-arg NEW_UID=1000 --build-arg NEW_GID=1001 --build-arg IMAGE_USER=user /tmp/vsch
[4493 ms] Start: Run in Host: docker -v
[4549 ms] Stop (56 ms): Run in Host: docker -v
[4550 ms] Start: Run in Host: docker events --format {{json .}} --filter event=start
[4574 ms] Start: Starting container
[4576 ms] Start: Run in Host: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=/home/debian/repos/jan.pokorny2/image-cropping,target=/workspaces/image-cropping --mount type=volume,src=vscode,dst=/vscode -l vsch.local.folder=/home/debian/repos/jan.pokorny2/image-cropping -l vsch.quality=stable -l vsch.remote.devPort=0 -e DISPLAY -e XAUTHORITY -v /tmp/.docker.xauth:/tmp/.docker.xauth --entrypoint /bin/sh vsc-image-cropping-3080ccd476e61f5469b8cc9706ce3a0b-uid -c echo Container started
Container started
[5083 ms] Log: startEventSeen#data {"status":"start","id":"279e5abf0ff5318ac5c32c7ae4f5dc10b00ab04a9f510d4a5d0bd9f79d1ada42","from":"vsc-image-cropping-3080ccd476e61f5469b8cc9706ce3a0b-uid","Type":"container","Action":"start","Actor":{"ID":"279e5abf0ff5318ac5c32c7ae4f5dc10b00ab04a9f510d4a5d0bd9f79d1ada42","Attributes":{"image":"vsc-image-cropping-3080ccd476e61f5469b8cc9706ce3a0b-uid","name":"elastic_cray","vsch.local.folder":"/home/debian/repos/jan.pokorny2/image-cropping","vsch.quality":"stable","vsch.remote.devPort":"0"}},"scope":"local","time":1642759585,"timeNano":1642759585172147224}
[5085 ms] Stop (511 ms): Starting container
[5086 ms] Start: Run in Host: docker ps -q -a --filter label=vsch.local.folder=/home/debian/repos/jan.pokorny2/image-cropping --filter label=vsch.quality=stable
[5123 ms] Stop (573 ms): Run in Host: docker events --format {{json .}} --filter event=start
[5150 ms] Stop (64 ms): Run in Host: docker ps -q -a --filter label=vsch.local.folder=/home/debian/repos/jan.pokorny2/image-cropping --filter label=vsch.quality=stable
[5150 ms] Start: Run in Host: docker inspect --type container 279e5abf0ff5
[5210 ms] Stop (60 ms): Run in Host: docker inspect --type container 279e5abf0ff5
[5211 ms] Start: Inspecting container
[5212 ms] Start: Run in Host: docker inspect --type container 279e5abf0ff5318ac5c32c7ae4f5dc10b00ab04a9f510d4a5d0bd9f79d1ada42
[5276 ms] Stop (64 ms): Run in Host: docker inspect --type container 279e5abf0ff5318ac5c32c7ae4f5dc10b00ab04a9f510d4a5d0bd9f79d1ada42
[5277 ms] Stop (66 ms): Inspecting container
[5302 ms] Start: Run in Host: docker exec -i -u user -e VSCODE_REMOTE_CONTAINERS_SESSION=7df714c7-e10d-4857-ba9f-33b0ba2246be1642759578660 279e5abf0ff5318ac5c32c7ae4f5dc10b00ab04a9f510d4a5d0bd9f79d1ada42 /bin/sh
[5325 ms] Start: Run in container: uname -m
[5431 ms] x86_64
[5432 ms] 
[5432 ms] Stop (107 ms): Run in container: uname -m
[5433 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[5458 ms] PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="https://bugs.debian.org/"
[5459 ms] 
[5460 ms] Stop (27 ms): Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[5462 ms] Start: Run in container: cat /etc/passwd
[5485 ms] Stop (23 ms): Run in container: cat /etc/passwd
[5489 ms] Start: Updating configuration state
[5497 ms] Stop (8 ms): Updating configuration state
[5499 ms] Start: Setup shutdown monitor
[5504 ms] Forking shutdown monitor: c:\Users\JP\.vscode\extensions\ms-vscode-remote.remote-containers-0.209.6\dist\shutdown\shutdownMonitorProcess \\.\pipe\vscode-remote-containers-93fa47f5207cfd9d70453d1198c152941caac292-sock singleContainer Trace c:\Users\JP\AppData\Roaming\Code\logs\20220121T105628\exthost1\ms-vscode-remote.remote-containers 1642759580053
[5531 ms] Stop (32 ms): Setup shutdown monitor
[5533 ms] Start: Run in container: test -d /home/user/.vscode-server
[5552 ms] 
[5553 ms] 
[5553 ms] Exit code 1
[5553 ms] Stop (20 ms): Run in container: test -d /home/user/.vscode-server
[5554 ms] Start: Run in container: test -d /home/user/.vscode-remote
[5572 ms] 
[5573 ms] 
[5573 ms] Exit code 1
[5573 ms] Stop (19 ms): Run in container: test -d /home/user/.vscode-remote
[5573 ms] Start: Run in container: test -f /var/vscode-server/.patchEtcEnvironmentMarker
[5592 ms] 
[5593 ms] 
[5593 ms] Exit code 1
[5593 ms] Stop (20 ms): Run in container: test -f /var/vscode-server/.patchEtcEnvironmentMarker
[5593 ms] Start: Run in Host: docker exec -i -u root 279e5abf0ff5318ac5c32c7ae4f5dc10b00ab04a9f510d4a5d0bd9f79d1ada42 /bin/sh
[5612 ms] Start: Run in container: test ! -f '/var/vscode-server/.patchEtcEnvironmentMarker' && set -o noclobber && mkdir -p '/var/vscode-server' && { > '/var/vscode-server/.patchEtcEnvironmentMarker' ; } 2> /dev/null
[5734 ms] Starting monitor process...
[5748 ms] Received message: [{"type":"configure","sequence":0,"options":{"cwd":"/home/debian/repos/jan.pokorny2/image-cropping","dockerCLI":"docker","env":{"SHELL":"/bin/bash","SSH_AUTH_SOCK":"/tmp/ssh-kreigba2rT/agent.16243","REMOTE_CONTAINERS_IPC":"","LOGNAME":"debian","XDG_SESSION_TYPE":"tty","XAUTHORITY":"/tmp/.docker.xauth","HOME":"/home/debian","LANG":"C.UTF-8","LS_COLORS":"","STARSHIP_SHELL":"bash","SSH_CONNECTION":"10.0.116.74 60650 10.244.21.129 22","STARSHIP_SESSION_KEY":"2098643711361720","XDG_SESSION_CLASS":"user","REMOTE_CONTAINERS_SOCKETS":"[]","USER":"debian","DISPLAY":"127.0.0.1:0.0","SHLVL":"0","XDG_SESSION_ID":"125","XDG_RUNTIME_DIR":"/run/user/1000","SSH_CLIENT":"10.0.116.74 60650 22","LC_ALL":"C.UTF-8","PATH":"/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin","DBUS_SESSION_BUS_ADDRESS":"unix:path=/run/user/1000/bus","MAIL":"/var/mail/debian","GOPATH":"/home/debian/.go","_":"/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\\Users\\JP\\.vscode\\extensions\\ms-vscode-remote.remote-containers-0.209.6\\scripts\\ssh-askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\\Users\\JP\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"c:\\Users\\JP\\.vscode\\extensions\\ms-vscode-remote.remote-containers-0.209.6\\dist\\common\\sshAskpass.js","VSCODE_SSH_ASKPASS_HANDLE":"\\\\.\\pipe\\ssh-askpass-cbfafb873f794b4f30c26a2073d76770126986de-sock","DOCKER_CONTEXT":"default","VSCODE_DOCKER_HOST":"ssh://machine.internal.company.com"},"containerId":"279e5abf0ff5318ac5c32c7ae4f5dc10b00ab04a9f510d4a5d0bd9f79d1ada42","user":"user","sessionId":"7df714c7-e10d-4857-ba9f-33b0ba2246be1642759578660","logLevel":1,"delay":10000}}]
[7191 ms] 
[7192 ms] 
[7192 ms] Stop (1580 ms): Run in container: test ! -f '/var/vscode-server/.patchEtcEnvironmentMarker' && set -o noclobber && mkdir -p '/var/vscode-server' && { > '/var/vscode-server/.patchEtcEnvironmentMarker' ; } 2> /dev/null
[7193 ms] Start: Run in container: cat >> /etc/environment <<'etcEnvrionmentEOF'
[7233 ms] 
[7233 ms] 
[7233 ms] Stop (40 ms): Run in container: cat >> /etc/environment <<'etcEnvrionmentEOF'
[7234 ms] Start: Run in container: test -f /var/vscode-server/.patchEtcProfileMarker
[7266 ms] 
[7266 ms] 
[7266 ms] Exit code 1
[7267 ms] Stop (33 ms): Run in container: test -f /var/vscode-server/.patchEtcProfileMarker
[7267 ms] Start: Run in container: test ! -f '/var/vscode-server/.patchEtcProfileMarker' && set -o noclobber && mkdir -p '/var/vscode-server' && { > '/var/vscode-server/.patchEtcProfileMarker' ; } 2> /dev/null
[7287 ms] 
[7287 ms] 
[7287 ms] Stop (20 ms): Run in container: test ! -f '/var/vscode-server/.patchEtcProfileMarker' && set -o noclobber && mkdir -p '/var/vscode-server' && { > '/var/vscode-server/.patchEtcProfileMarker' ; } 2> /dev/null
[7288 ms] Start: Run in container: sed -i -E 's/((^|\s)PATH=)([^\$]*)$/\1${PATH:-\3}/g' /etc/profile || true
[7316 ms] 
[7317 ms] 
[7317 ms] Stop (29 ms): Run in container: sed -i -E 's/((^|\s)PATH=)([^\$]*)$/\1${PATH:-\3}/g' /etc/profile || true
[7317 ms] Start: Run in container: test ! -f '/home/user/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/home/user/.vscode-server/data/Machine' && { > '/home/user/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[7346 ms] 
[7346 ms] 
[7346 ms] Stop (29 ms): Run in container: test ! -f '/home/user/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/home/user/.vscode-server/data/Machine' && { > '/home/user/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[7347 ms] Start: Run in container: cat /home/user/.vscode-server/data/Machine/settings.json
[7365 ms] 
[7365 ms] cat: /home/user/.vscode-server/data/Machine/settings.json: No such file or directory
[7365 ms] Exit code 1
[7365 ms] Stop (18 ms): Run in container: cat /home/user/.vscode-server/data/Machine/settings.json
[7366 ms] Start: Run in container: test -d /home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3
[8124 ms] 
[8125 ms] 
[8125 ms] Exit code 1
[8126 ms] Stop (760 ms): Run in container: test -d /home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3
[8126 ms] Start: Run in container: test -d /vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3
[8156 ms] 
[8157 ms] 
[8157 ms] Stop (31 ms): Run in container: test -d /vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3
[8158 ms] Start: Run in container: mkdir -p '/home/user/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3' '/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3'
[8177 ms] 
[8177 ms] 
[8178 ms] Stop (20 ms): Run in container: mkdir -p '/home/user/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3' '/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3'
[8178 ms] Start: Run in container: touch '/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3'
[8178 ms] Start: Launching Remote-Containers helper.
[8179 ms] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-d3884b5b9f351ad130b74018bcc56dff9ea1902e.sock) forwarded to remote host (/tmp/ssh-kreigba2rT/agent.16243).
[8179 ms] Start: Run in Host: gpgconf --list-dir agent-extra-socket
[8199 ms] 
[8200 ms] 
[8200 ms] Stop (22 ms): Run in container: touch '/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3'
[8216 ms] Stop (37 ms): Run in Host: gpgconf --list-dir agent-extra-socket
[8217 ms] /run/user/1000/gnupg/S.gpg-agent.extra
[8217 ms] 
[8219 ms] Start: Run in container: gpgconf --list-dir agent-socket
[8237 ms] 
[8237 ms] /bin/sh: 13: gpgconf: not found
[8238 ms] Exit code 127
[8238 ms] Stop (19 ms): Run in container: gpgconf --list-dir agent-socket
[8238 ms] Start: Run: gpgconf --list-dir agent-extra-socket
[8274 ms] findLocalWindowsExecutable: Exectuable 'gpgconf' not found on PATH 'C:\Users\JP\scoop\shims;C:\Tools;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin;C:\Users\JP\scoop\apps\python39\current\Scripts;C:\Users\JP\scoop\apps\python39\current\.;C:\Users\JP\scoop\apps\postgresql\current\bin;C:\Users\JP\scoop\apps\nodejs\current\bin;C:\Users\JP\scoop\apps\nodejs\current\.;C:\Users\JP\scoop\apps\imagemagick\current\.;C:\Users\JP\go\bin;C:\Users\JP\scoop\shims;C:\Users\JP\AppData\Local\Programs\Python\Launcher\;C:\Users\JP\AppData\Roaming\Python\Python39\Scripts;C:\Users\JP\AppData\Local\Microsoft\WindowsApps;C:\Users\JP\AppData\Local\Programs\Microsoft VS Code\bin'.
[8277 ms] Stop (39 ms): Run: gpgconf --list-dir agent-extra-socket
[8279 ms] Start: Run in Host: docker exec -i -u user 279e5abf0ff5318ac5c32c7ae4f5dc10b00ab04a9f510d4a5d0bd9f79d1ada42 /bin/sh
[8279 ms] Stop (101 ms): Launching Remote-Containers helper.
[8280 ms] userEnvProbe: loginInteractiveShell (default)
[8281 ms] userEnvProbe shell: /bin/bash
[8281 ms] Stop (43 ms): Run: gpgconf --list-dir agent-extra-socket
[8302 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-d3884b5b9f351ad130b74018bcc56dff9ea1902e.js' >/tmp/vscode-remote-containers-d3884b5b9f351ad130b74018bcc56dff9ea1902e.js
[8322 ms] Start: Run in container: # Test for /home/user/.ssh/known_hosts and ssh
[8340 ms] ssh not found
[8341 ms] 
[8341 ms] Exit code 1
[8341 ms] Stop (19 ms): Run in container: # Test for /home/user/.ssh/known_hosts and ssh
[8341 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --system --replace-all credential.helper '!f() { /home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node /tmp/vscode-remote-containers-d3884b5b9f351ad130b74018bcc56dff9ea1902e.js $*; }; f' || true
[8360 ms] 
[8360 ms] 
[8360 ms] Stop (19 ms): Run in container: command -v git >/dev/null 2>&1 && git config --system --replace-all credential.helper '!f() { /home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node /tmp/vscode-remote-containers-d3884b5b9f351ad130b74018bcc56dff9ea1902e.js $*; }; f' || true
[8361 ms] Start: Preparing Extensions
[8361 ms] Start: Run in container: test ! -f '/home/user/.vscode-server/data/Machine/.installExtensionsMarker' && set -o noclobber && mkdir -p '/home/user/.vscode-server/data/Machine' && { > '/home/user/.vscode-server/data/Machine/.installExtensionsMarker' ; } 2> /dev/null
[8380 ms] 
[8380 ms] 
[8380 ms] Stop (19 ms): Run in container: test ! -f '/home/user/.vscode-server/data/Machine/.installExtensionsMarker' && set -o noclobber && mkdir -p '/home/user/.vscode-server/data/Machine' && { > '/home/user/.vscode-server/data/Machine/.installExtensionsMarker' ; } 2> /dev/null
[8385 ms] Extensions cache, install extensions: None
[8385 ms] Start: Run in container: test -d /home/user/.vscode-server/extensionsCache && ls /home/user/.vscode-server/extensionsCache || true
[8403 ms] 
[8404 ms] 
[8404 ms] Stop (19 ms): Run in container: test -d /home/user/.vscode-server/extensionsCache && ls /home/user/.vscode-server/extensionsCache || true
[8404 ms] Start: Run in container: test -d /vscode/vscode-server/extensionsCache && ls /vscode/vscode-server/extensionsCache || true
[8424 ms] github.copilot-1.7.4608
github.copilot-1.7.4669
github.copilot-1.7.4688
humao.rest-client-0.24.6
jasonlhy.hungry-delete-1.6.0
jkjustjoshing.vscode-text-pastry-1.3.1
joaompinto.vscode-graphviz-0.0.6
jsynowiec.vscode-insertdatestring-2.3.0
kevinrose.vsc-python-indent-1.14.2
korekontrol.saltstack-0.0.9
littlefoxteam.vscode-python-test-adapter-0.7.0
logerfo.gitlab-notifications-0.0.8
mhutchie.git-graph-1.30.0
mikestead.dotenv-1.0.1
mindaro-dev.file-downloader-1.0.11
ms-azuretools.vscode-docker-1.18.0
ms-dotnettools.vscode-dotnet-runtime-1.5.0
ms-kubernetes-tools.vscode-kubernetes-tools-1.3.6
ms-python.gather-2021.9.1
ms-python.python-2021.12.1559732655
ms-python.vscode-pylance-2022.1.1
ms-toolsai.jupyter-2021.11.1001550889
ms-toolsai.jupyter-keymap-1.0.0
ms-toolsai.jupyter-renderers-1.0.4
ms-vscode.cpptools-1.7.1
ms-vscode.test-adapter-converter-0.1.5
ms-vsliveshare.vsliveshare-1.0.5242
mtxr.sqltools-0.23.0
mtxr.sqltools-driver-mysql-0.2.0
mtxr.sqltools-driver-pg-0.2.0
mutantdino.resourcemonitor-1.0.7
ponicode.ponicode-0.61.3
redhat.vscode-yaml-1.2.2
redhat.vscode-yaml-1.3.0
rubymaniac.vscode-paste-and-indent-0.0.8
samuelcolvin.jinjahtml-0.16.0
slightc.pip-manager-1.1.0
sonarsource.sonarlint-vscode-3.1.0
sourcery.sourcery-0.10.0
stkb.rewrap-1.15.4
stkb.rewrap-1.16.0
thesofakillers.vscode-pbtxt-0.0.4
visualstudioexptteam.intellicode-api-usage-examples-0.0.7
visualstudioexptteam.intellicode-api-usage-examples-0.0.8
visualstudioexptteam.vscodeintellicode-1.2.15
visualstudioexptteam.vscodeintellicode-insiders-1.1.5
vscode-icons-team.vscode-icons-11.8.0
warpnet.salt-lint-0.1.0
zyinmd.sepia-1.2.25
[8424 ms] 
[8424 ms] Stop (20 ms): Run in container: test -d /vscode/vscode-server/extensionsCache && ls /vscode/vscode-server/extensionsCache || true
[8425 ms] Extensions cache, link in container: None
[8425 ms] Stop (64 ms): Preparing Extensions
[8425 ms] Start: Run in container: for pid in `cd /proc && ls -d [0-9]*`; do { echo $pid ; readlink /proc/$pid/cwd ; readlink /proc/$pid/ns/mnt ; cat /proc/$pid/stat | tr "
[8451 ms] 
[8452 ms] 
[8452 ms] Stop (150 ms): Run in container: cat <<'EOF-/tmp/vscode-remote-containers-d3884b5b9f351ad130b74018bcc56dff9ea1902e.js' >/tmp/vscode-remote-containers-d3884b5b9f351ad130b74018bcc56dff9ea1902e.js
[8452 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-d3884b5b9f351ad130b74018bcc56dff9ea1902e.js' >/tmp/vscode-remote-containers-server-d3884b5b9f351ad130b74018bcc56dff9ea1902e.js_1642759588505
[8516 ms] Stop (91 ms): Run in container: for pid in `cd /proc && ls -d [0-9]*`; do { echo $pid ; readlink /proc/$pid/cwd ; readlink /proc/$pid/ns/mnt ; cat /proc/$pid/stat | tr "
[8516 ms] 
[8517 ms] 
[8517 ms] Stop (65 ms): Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-d3884b5b9f351ad130b74018bcc56dff9ea1902e.js' >/tmp/vscode-remote-containers-server-d3884b5b9f351ad130b74018bcc56dff9ea1902e.js_1642759588505
[8519 ms] Running extension host agents:
[]
[8520 ms] Start: Starting VS Code Server
[8537 ms] Start: Run in Container: /bin/bash -lic '/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node' -p '"b70fd6341f8bc28796296e37a2bea133" + JSON.stringify(process.env) + "b70fd6341f8bc28796296e37a2bea133"'
[8538 ms] Start: Run in Container: /home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/server.sh --log trace --force-disable-user-env --port 0 --extensions-download-dir /home/user/.vscode-server/extensionsCache --start-server 
[8687 ms] Stop (150 ms): Run in Container: /bin/bash -lic '/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node' -p '"b70fd6341f8bc28796296e37a2bea133" + JSON.stringify(process.env) + "b70fd6341f8bc28796296e37a2bea133"'
[8689 ms] 

*
* Visual Studio Code Server
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license https://aka.ms/vscode-remote/license
*

Extension host agent listening on 33113

[8689 ms] b70fd6341f8bc28796296e37a2bea133{"HOSTNAME":"279e5abf0ff5","REMOTE_CONTAINERS_SOCKETS":"[\"/tmp/vscode-ssh-auth-d3884b5b9f351ad130b74018bcc56dff9ea1902e.sock\"]","LS_COLORS":"","REMOTE_CONTAINERS_IPC":"/tmp/vscode-remote-containers-ipc-d3884b5b9f351ad130b74018bcc56dff9ea1902e.sock","PATH":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","PWD":"/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3","SHLVL":"1","HOME":"/home/user","DISPLAY":"127.0.0.1:0.0","XAUTHORITY":"/tmp/.docker.xauth","_":"/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node"}b70fd6341f8bc28796296e37a2bea133
[8690 ms] bash: cannot set terminal process group (55): Inappropriate ioctl for device
bash: no job control in this shell

[8691 ms] Stop (171 ms): Starting VS Code Server
[8692 ms] userEnvProbe parsed: {
  "HOSTNAME": "279e5abf0ff5",
  "REMOTE_CONTAINERS_SOCKETS": "[\"/tmp/vscode-ssh-auth-d3884b5b9f351ad130b74018bcc56dff9ea1902e.sock\"]",
  "LS_COLORS": "",
  "REMOTE_CONTAINERS_IPC": "/tmp/vscode-remote-containers-ipc-d3884b5b9f351ad130b74018bcc56dff9ea1902e.sock",
  "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
  "PWD": "/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3",
  "SHLVL": "1",
  "HOME": "/home/user",
  "DISPLAY": "127.0.0.1:0.0",
  "XAUTHORITY": "/tmp/.docker.xauth",
  "_": "/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node"
}
[8692 ms] userEnvProbe PATHs:
Probe:     '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
Container: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
[8694 ms] Start: Run in container: echo 33113 >'/home/user/.vscode-server/data/Machine/.devport-899d46d82c4c95423fb7e10e68eba52050e30ba3'
[8728 ms] 
[8729 ms] 
[8729 ms] Stop (35 ms): Run in container: echo 33113 >'/home/user/.vscode-server/data/Machine/.devport-899d46d82c4c95423fb7e10e68eba52050e30ba3'
[8730 ms] Port forwarding for container port 33113 starts listening on local port.
[8732 ms] Port forwarding local port 33113 to container port 33113
[8733 ms] Start: Run in container: test ! -f '/home/user/.vscode-server/data/Machine/.onCreateCommandMarker' && set -o noclobber && mkdir -p '/home/user/.vscode-server/data/Machine' && { > '/home/user/.vscode-server/data/Machine/.onCreateCommandMarker' ; } 2> /dev/null
[8759 ms] 
[8760 ms] 
[8760 ms] Stop (27 ms): Run in container: test ! -f '/home/user/.vscode-server/data/Machine/.onCreateCommandMarker' && set -o noclobber && mkdir -p '/home/user/.vscode-server/data/Machine' && { > '/home/user/.vscode-server/data/Machine/.onCreateCommandMarker' ; } 2> /dev/null
[8760 ms] Start: Run in container: test ! -f '/home/user/.vscode-server/data/Machine/.updateContentCommandMarker' && set -o noclobber && mkdir -p '/home/user/.vscode-server/data/Machine' && { > '/home/user/.vscode-server/data/Machine/.updateContentCommandMarker' ; } 2> /dev/null
[8779 ms] 
[8779 ms] 
[8779 ms] Stop (19 ms): Run in container: test ! -f '/home/user/.vscode-server/data/Machine/.updateContentCommandMarker' && set -o noclobber && mkdir -p '/home/user/.vscode-server/data/Machine' && { > '/home/user/.vscode-server/data/Machine/.updateContentCommandMarker' ; } 2> /dev/null
[8780 ms] Start: Run in container: test ! -f '/home/user/.vscode-server/data/Machine/.postCreateCommandMarker' && set -o noclobber && mkdir -p '/home/user/.vscode-server/data/Machine' && { > '/home/user/.vscode-server/data/Machine/.postCreateCommandMarker' ; } 2> /dev/null
[8788 ms] Stop (8695 ms): Resolving Remote
[8807 ms] 
[8808 ms] 
[8808 ms] Stop (28 ms): Run in container: test ! -f '/home/user/.vscode-server/data/Machine/.postCreateCommandMarker' && set -o noclobber && mkdir -p '/home/user/.vscode-server/data/Machine' && { > '/home/user/.vscode-server/data/Machine/.postCreateCommandMarker' ; } 2> /dev/null
[8815 ms] Port forwarding connection from 56630 > 33113 > 33113 in the container.
[8825 ms] Start: Run in Host: docker exec -i -u user -e VSCODE_REMOTE_CONTAINERS_SESSION=7df714c7-e10d-4857-ba9f-33b0ba2246be1642759578660 279e5abf0ff5318ac5c32c7ae4f5dc10b00ab04a9f510d4a5d0bd9f79d1ada42 /home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node -e 
[8842 ms] [10:06:28] Extension host agent started.
[8858 ms] [10:06:28] Started scanning user extensions
[8859 ms] Start: Run in container: # Test for /home/user/.gitconfig and git
[8860 ms] [10:06:28] resolveShellEnv(): running (macOS/Linux)
[8861 ms] [10:06:28] getUnixShellEnvironment#runAsNode undefined
[10:06:28] getUnixShellEnvironment#noAttach undefined
[8864 ms] [10:06:28] getUnixShellEnvironment#env {
  HOSTNAME: '279e5abf0ff5',
  HOME: '/home/user',
  REMOTE_CONTAINERS_IPC: '/tmp/vscode-remote-containers-ipc-d3884b5b9f351ad130b74018bcc56dff9ea1902e.sock',
  PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
  VSCODE_AGENT_FOLDER: '/home/user/.vscode-server',
  DISPLAY: '127.0.0.1:0.0',
  REMOTE_CONTAINERS_SOCKETS: '["/tmp/vscode-ssh-auth-d3884b5b9f351ad130b74018bcc56dff9ea1902e.sock"]',
  XAUTHORITY: '/tmp/.docker.xauth',
  SHELL: '/bin/bash',
  PWD: '/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3',
  VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH: '/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3/remote/node_modules',
  VSCODE_CWD: '/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3',
  ELECTRON_RUN_AS_NODE: '1',
  ELECTRON_NO_ATTACH_CONSOLE: '1'
}
[9466 ms] [10:06:28] ExtensionManagementService.refreshReportedCache
[9466 ms] [10:06:28] RequestService#request https://az764295.vo.msecnd.net/extensions/marketplace.json
[9467 ms] [10:06:28] resolveShellEnv(): skipped (--force-disable-user-env)
[9467 ms] [10:06:28] getUnixShellEnvironment#shell /bin/bash
[9468 ms] [10:06:28] getUnixShellEnvironment#spawn ["-ilc"] '/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3/node'  -p '"ed435e8d3ed9" + JSON.stringify(process.env) + "ed435e8d3ed9"'
[9468 ms] [10:06:29] Extension VSIX downlads cache dir does not exist
[9469 ms] [10:06:29] Scanned user extensions: 0
[9470 ms] git not found
[9470 ms] 
[9470 ms] Exit code 1
[9470 ms] Stop (611 ms): Run in container: # Test for /home/user/.gitconfig and git
[9923 ms] Port forwarding process for 56630 > 33113 > 33113 in the container:
[
  {
    "pid": 3372,
    "ppid": 11196,
    "bin": "C:\\Users\\JP\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",
    "name": "Code.exe",
    "cmd": "\"C:\\Users\\JP\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" --type=utility --utility-sub-type=network.mojom.NetworkService --field-trial-handle=1484,4862281738422510482,11248109521161936553,131072 --disable-features=CookiesWithoutSameSiteMustBeSecure,SameSiteByDefaultCookies,SpareRendererForSitePerProcess,WinRetrieveSuggestionsOnlyOnDemand --lang=en-US --service-sandbox-type=none --user-data-dir=\"C:\\Users\\JP\\AppData\\Roaming\\Code\" --standard-schemes=vscode-webview,vscode-file --secure-schemes=vscode-webview,vscode-file --bypasscsp-schemes --cors-schemes=vscode-webview,vscode-file --fetch-schemes=vscode-webview,vscode-file --service-worker-schemes=vscode-webview --streaming-schemes --mojo-platform-channel-handle=2068 /prefetch:8"
  }
]
[9924 ms] [10:06:29] getUnixShellEnvironment#raw ed435e8d3ed9{"HOSTNAME":"279e5abf0ff5","SHELL":"/bin/bash","REMOTE_CONTAINERS_SOCKETS":"[\"/tmp/vscode-ssh-auth-d3884b5b9f351ad130b74018bcc56dff9ea1902e.sock\"]","LS_COLORS":"","REMOTE_CONTAINERS_IPC":"/tmp/vscode-remote-containers-ipc-d3884b5b9f351ad130b74018bcc56dff9ea1902e.sock","VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH":"/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3/remote/node_modules","ELECTRON_RUN_AS_NODE":"1","VSCODE_AGENT_FOLDER":"/home/user/.vscode-server","PATH":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","PWD":"/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3","ELECTRON_NO_ATTACH_CONSOLE":"1","SHLVL":"1","HOME":"/home/user","DISPLAY":"127.0.0.1:0.0","VSCODE_CWD":"/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3","XAUTHORITY":"/tmp/.docker.xauth","_":"/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3/node"}ed435e8d3ed9

[9925 ms] [10:06:29] getUnixShellEnvironment#stderr bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

[9925 ms] [10:06:29] getUnixShellEnvironment#result {
  HOSTNAME: '279e5abf0ff5',
  SHELL: '/bin/bash',
  REMOTE_CONTAINERS_SOCKETS: '["/tmp/vscode-ssh-auth-d3884b5b9f351ad130b74018bcc56dff9ea1902e.sock"]',
  LS_COLORS: '',
  REMOTE_CONTAINERS_IPC: '/tmp/vscode-remote-containers-ipc-d3884b5b9f351ad130b74018bcc56dff9ea1902e.sock',
  VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH: '/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3/remote/node_modules',
  VSCODE_AGENT_FOLDER: '/home/user/.vscode-server',
  PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
  PWD: '/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3',
  SHLVL: '1',
  HOME: '/home/user',
  DISPLAY: '127.0.0.1:0.0',
  VSCODE_CWD: '/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3',
  XAUTHORITY: '/tmp/.docker.xauth',
  _: '/vscode/vscode-server/bin/linux-x64/899d46d82c4c95423fb7e10e68eba52050e30ba3/node'
}
[9925 ms] [10:06:29] ExtensionManagementService.refreshControlCache {
  malicious: [
    { id: 'visualstuiocode.emmet' },
    { id: 'joaomoreno.banana' },
    { id: 'JacobeanResearchandDevelopmentLLC.vscode-scxml-preview' },
    { id: 'joaquin6.package-watch' },
    { id: 'KazuoCode.gthubsum' },
    { id: 'MaxGotovkin.tslens' }
  ],
  unsupportedPreReleaseExtensions: {
    'github.vscode-pull-request-github-insiders': {
      id: 'github.vscode-pull-request-github',
      displayName: 'GitHub Pull Requests and Issues'
    },
    'ms-vscode-remote.remote-ssh-nightly': { id: 'ms-vscode-remote.remote-ssh', displayName: 'Remote - SSH' },
    'ms-vscode-remote.remote-ssh-edit-nightly': {
      id: 'ms-vscode-remote.remote-ssh-edit',
      displayName: 'Remote - SSH: Editing Configuration Files'
    }
  }
}
[9927 ms] [10:06:29] Started scanning user extensions
[9927 ms] [10:06:29] Scanned user extensions: 0
[9940 ms] Port forwarding connection from 53441 > 33113 > 33113 in the container.
[9950 ms] Start: Run in Host: docker exec -i -u user -e VSCODE_REMOTE_CONTAINERS_SESSION=7df714c7-e10d-4857-ba9f-33b0ba2246be1642759578660 279e5abf0ff5318ac5c32c7ae4f5dc10b00ab04a9f510d4a5d0bd9f79d1ada42 /home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node -e 
[9963 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --global --replace-all credential.helper '!f() { /home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node /tmp/vscode-remote-containers-d3884b5b9f351ad130b74018bcc56dff9ea1902e.js $*; }; f' || true
[9989 ms] 
[9989 ms] 
[9989 ms] Stop (26 ms): Run in container: command -v git >/dev/null 2>&1 && git config --global --replace-all credential.helper '!f() { /home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node /tmp/vscode-remote-containers-d3884b5b9f351ad130b74018bcc56dff9ea1902e.js $*; }; f' || true
[9990 ms] Start: Run in container: mkdir -p '/home/user/.vscode-server/data/Machine' && [ "$(cat '/home/user/.vscode-server/data/Machine/.postStartCommandMarker' 2>/dev/null)" != '2022-01-21T10:06:25.16921403Z' ] && echo '2022-01-21T10:06:25.16921403Z' > '/home/user/.vscode-server/data/Machine/.postStartCommandMarker'
[10010 ms] [10:06:30] [::ffff:127.0.0.1][adcd47c5][ManagementConnection] New connection established.
[10021 ms] [10:06:30] [File Watcher (node.js)] [ADDED] /home/user/.vscode-server/data/Machine/.postStartCommandMarker
[10022 ms] 
[10022 ms] 
[10022 ms] Stop (32 ms): Run in container: mkdir -p '/home/user/.vscode-server/data/Machine' && [ "$(cat '/home/user/.vscode-server/data/Machine/.postStartCommandMarker' 2>/dev/null)" != '2022-01-21T10:06:25.16921403Z' ] && echo '2022-01-21T10:06:25.16921403Z' > '/home/user/.vscode-server/data/Machine/.postStartCommandMarker'
[10111 ms] [10:06:30] [File Watcher (node.js)] [CHANGED] /home/user/.vscode-server/data/Machine/.postStartCommandMarker
[10132 ms] [10:06:30] Started scanning system extensions
[10133 ms] [10:06:30] Started scanning user extensions
[10140 ms] [10:06:30] Started scanning system extensions
[10140 ms] [10:06:30] Started scanning user extensions
[10140 ms] [10:06:30] Started scanning user extensions
[10348 ms] [10:06:30] [::ffff:127.0.0.1][38a2756e][ExtensionHostConnection] New connection established.
[10356 ms] [10:06:30] [::ffff:127.0.0.1][38a2756e][ExtensionHostConnection] <248> Launched Extension Host Process.
[11156 ms] Port forwarding process for 53441 > 33113 > 33113 in the container:
[
  {
    "pid": 3372,
    "ppid": 11196,
    "bin": "C:\\Users\\JP\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",
    "name": "Code.exe",
    "cmd": "\"C:\\Users\\JP\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" --type=utility --utility-sub-type=network.mojom.NetworkService --field-trial-handle=1484,4862281738422510482,11248109521161936553,131072 --disable-features=CookiesWithoutSameSiteMustBeSecure,SameSiteByDefaultCookies,SpareRendererForSitePerProcess,WinRetrieveSuggestionsOnlyOnDemand --lang=en-US --service-sandbox-type=none --user-data-dir=\"C:\\Users\\JP\\AppData\\Roaming\\Code\" --standard-schemes=vscode-webview,vscode-file --secure-schemes=vscode-webview,vscode-file --bypasscsp-schemes --cors-schemes=vscode-webview,vscode-file --fetch-schemes=vscode-webview,vscode-file --service-worker-schemes=vscode-webview --streaming-schemes --mojo-platform-channel-handle=2068 /prefetch:8"
  }
]
[12571 ms] Received message: [{"type":"configure","sequence":1,"options":{"cwd":"/home/debian/repos/jan.pokorny2/image-cropping","dockerCLI":"docker","env":{"SHELL":"/bin/bash","SSH_AUTH_SOCK":"/tmp/ssh-kreigba2rT/agent.16243","REMOTE_CONTAINERS_IPC":"","LOGNAME":"debian","XDG_SESSION_TYPE":"tty","XAUTHORITY":"/tmp/.docker.xauth","HOME":"/home/debian","LANG":"C.UTF-8","LS_COLORS":"","STARSHIP_SHELL":"bash","SSH_CONNECTION":"10.0.116.74 60650 10.244.21.129 22","STARSHIP_SESSION_KEY":"2098643711361720","XDG_SESSION_CLASS":"user","REMOTE_CONTAINERS_SOCKETS":"[]","USER":"debian","DISPLAY":"127.0.0.1:0.0","SHLVL":"0","XDG_SESSION_ID":"125","XDG_RUNTIME_DIR":"/run/user/1000","SSH_CLIENT":"10.0.116.74 60650 22","LC_ALL":"C.UTF-8","PATH":"/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin","DBUS_SESSION_BUS_ADDRESS":"unix:path=/run/user/1000/bus","MAIL":"/var/mail/debian","GOPATH":"/home/debian/.go","_":"/home/debian/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\\Users\\JP\\.vscode\\extensions\\ms-vscode-remote.remote-containers-0.209.6\\scripts\\ssh-askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\\Users\\JP\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"c:\\Users\\JP\\.vscode\\extensions\\ms-vscode-remote.remote-containers-0.209.6\\dist\\common\\sshAskpass.js","VSCODE_SSH_ASKPASS_HANDLE":"\\\\.\\pipe\\ssh-askpass-cbfafb873f794b4f30c26a2073d76770126986de-sock","DOCKER_CONTEXT":"default","VSCODE_DOCKER_HOST":"ssh://machine.internal.company.com"},"containerId":"279e5abf0ff5318ac5c32c7ae4f5dc10b00ab04a9f510d4a5d0bd9f79d1ada42","user":"user","sessionId":"7df714c7-e10d-4857-ba9f-33b0ba2246be1642759578660","logLevel":1,"delay":10000}}]
[18466 ms] Extensions cache, copy to shared cache: None

JanPokorny avatar Jan 21 '22 10:01 JanPokorny

It looks like the .bashrc or .profile/.bash_profile in the container is setting DISPLAY to 127.0.0.1:0.0.

chrmarti avatar Jan 25 '22 11:01 chrmarti

@chrmarti Well, the Dockerfile is here and you can see it is just Debian with x11-apps, no additional config that could break things: https://github.com/fr3nd/docker-xeyes/blob/master/Dockerfile. Furthermore the issue is the same with any container I tested.

Here's the list of cases:

  • From terminal outside VSCode, connect to host over ssh: X server works ✔
  • From terminal outside VSCode, connect to host over ssh and then run docker container: X server works ✔
  • From VSCode, connect to host as a remote SSH workspace: X server works ✔
  • From VSCode, connect to host as a remote SSH workspace, and in VSCode terminal run the Docker container: X server works ✔
  • From VSCode, connect to host as a remote SSH+devcontainer workspace: X server is not working, DISPLAY is set to 127.0.0.1:0.0

It seems clear that the issue is somewhere in the "SSH+devcontainer" feature, as all the other cases work fine.

I have provided a complete reproducible example in the top post. Were you able to reproduce it?

JanPokorny avatar Jan 25 '22 11:01 JanPokorny

Could you retry with "userEnvProbe": "none" added to your devcontainer.json?

chrmarti avatar Jan 25 '22 14:01 chrmarti

@chrmarti No effect with "userEnvProbe": "none". Also it seems to be the default value anyway, if the docstring is to be trusted.

JanPokorny avatar Jan 27 '22 14:01 JanPokorny

The first userEnvProbe in the log shows "DISPLAY": "172.17.0.1:16.0" for the SSH server. The initializeCommand for some reason then has 127.0.0.1:0.0. I need to investigate how this might happen.

chrmarti avatar Jan 31 '22 10:01 chrmarti

Are there any news to this? I am having (possibly) the same problem. I wish to use x window with a remote development container but it "can't open display: ....... "

dhartaifb avatar Jul 28 '22 14:07 dhartaifb

I am able to use vcxsrv from within docker dev container in vscode by setting the DISPLAY to the name:0.0, as vcxsrv is showing it in my taskbar.

So I ran:

export DISPLAY=LAPTOP-XXXXXX:0.0

as seen in the taskbar by vcxsrv: image

QuakeEye avatar Jan 16 '23 11:01 QuakeEye

@QuakeEye This issue is specifically about forwarding X Server when using a remote dev container -- that is, the docker daemon is running on a different machine than VSCode.

JanPokorny avatar Jan 20 '23 14:01 JanPokorny

@JanPokorny Ah alright, I may have gotten confused since vscode denotes my wsl dev container as a remote container

QuakeEye avatar Jan 20 '23 14:01 QuakeEye

Implemented in https://github.com/microsoft/vscode-remote-release/issues/550 and currently available in the Dev Containers extension's pre-release versions.

chrmarti avatar Jan 24 '23 10:01 chrmarti