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

zsh env different when opened via CLI #167855

Closed
meganrogge opened this issue Dec 1, 2022 · 9 comments
Closed

zsh env different when opened via CLI #167855

meganrogge opened this issue Dec 1, 2022 · 9 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug code-cli confirmation-pending terminal-shell-zsh An issue in the terminal specific to zsh
Milestone

Comments

@meganrogge
Copy link
Contributor

    This does not appear to have been resolved in insiders. While I no longer see the error message mentioned in the description, my integrated terminal is still broken, in that I cannot use any of the zsh functionality.

As an example, when I load the IDE via launcher and open a folder via the File > Open Folder, my integrated zsh terminal works as expected, displaying something like:

╭─   ~/repos/my-repo   fix/my-bug *1                                                 
╰─❯ 

However when opening the editor via the terminal, my integrated zsh terminal displays something like:

my-machine-name% 

And in the latter case, none of the zsh functionality works.

Version info

Version: 1.74.0-insider
Commit: c87fa19f7932cefa1abeac4dd85ade3983780e14
Date: 2022-12-01T05:21:51.018Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.15.0-56-generic
Sandboxed: Yes

After re-reading my original bug description, I realise I never mentioned that the zsh functionality wasnt working, so that's my bad. Perhaps these two issues are unrelated (recursion limit exceeded and zsh terminal becoming a "basic terminal"), but they appeared at the same time.

Originally posted by @kb-ig in #163843 (comment)

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug confirmation-pending terminal-shell-zsh An issue in the terminal specific to zsh code-cli labels Dec 1, 2022
@meganrogge
Copy link
Contributor Author

what's the value of terminal.integrated.inheritEnv for you?

@meganrogge meganrogge added the info-needed Issue requires more information from poster label Dec 1, 2022
@kb-ig
Copy link

kb-ig commented Dec 1, 2022

@meganrogge true/checked
image

@meganrogge meganrogge removed the info-needed Issue requires more information from poster label Dec 2, 2022
@Tyriar Tyriar added this to the Backlog milestone Dec 5, 2022
@meganrogge
Copy link
Contributor Author

any interesting differences when you run env?

@meganrogge meganrogge added the info-needed Issue requires more information from poster label Dec 5, 2022
@kb-ig
Copy link

kb-ig commented Dec 6, 2022

There's nothing that stands out to me, but I've included it in case anything catches your eye.

Env (integrated terminal)
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
LANGUAGE=en_GB:en
USER=user
SSH_AGENT_PID=2269
XDG_SESSION_TYPE=x11
SHLVL=1
HOME=/home/user
DESKTOP_SESSION=zorin
QT_STYLE_OVERRIDE=adwaita
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/code.desktop
GTK_MODULES=gail:atk-bridge
GNOME_SHELL_SESSION_MODE=zorin
MANAGERPID=2060
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
LIBVIRT_DEFAULT_URI=qemu:///system
GIO_LAUNCHED_DESKTOP_FILE_PID=13351
IM_CONFIG_PHASE=1
MANDATORY_PATH=/usr/share/gconf/zorin.mandatory.path
QT_QPA_PLATFORMTHEME=gtk3
LOGNAME=user
_=/usr/bin/env
JOURNAL_STREAM=8:60421
DEFAULTS_PATH=/usr/share/gconf/zorin.default.path
XDG_SESSION_CLASS=user
USERNAME=user
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
WINDOWPATH=2
PATH=/home/user/.nvm/versions/node/v14.19.1/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
SESSION_MANAGER=local/kb-ig-zorinos:@/tmp/.ICE-unix/2305,unix/kb-ig-zorinos:/tmp/.ICE-unix/2305
INVOCATION_ID=4dd580b11ac34e27b73f9c4857576530
XDG_RUNTIME_DIR=/run/user/1000
XDG_MENU_PREFIX=gnome-
DISPLAY=:0
LANG=en_GB.UTF-8
XDG_CURRENT_DESKTOP=zorin:GNOME
XAUTHORITY=/run/user/1000/gdm/Xauthority
XDG_SESSION_DESKTOP=zorin
XMODIFIERS=@im=ibus
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
SHELL=/usr/bin/zsh
QT_ACCESSIBILITY=1
GDMSESSION=zorin
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
GJS_DEBUG_OUTPUT=stderr
QT_IM_MODULE=ibus
PWD=/home/user/repos/my-repo
XDG_DATA_DIRS=/usr/share/zorin:/home/user/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
XDG_CONFIG_DIRS=/etc/xdg/xdg-zorin:/etc/xdg
CHROME_DESKTOP=code-url-handler.desktop
ORIGINAL_XDG_CURRENT_DESKTOP=zorin:GNOME
GDK_BACKEND=x11
OLDPWD=/home/user/repos/my-repo
AWS_SDK_LOAD_CONFIG=1
AWS_PROFILE=dev
ZSH=/home/user/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
P9K_SSH=0
NVM_DIR=/home/user/.nvm
NVM_CD_FLAGS=-q
NVM_BIN=/home/user/.nvm/versions/node/v14.19.1/bin
NVM_INC=/home/user/.nvm/versions/node/v14.19.1/include/node
TERM_PROGRAM=vscode
TERM_PROGRAM_VERSION=1.73.1
COLORTERM=truecolor
NODE_OPTIONS=--require /home/user/.config/Code/User/workspaceStorage/e0f932978fa7979987beda0750e1fd51/ms-vscode.js-debug/bootloader.js          
VSCODE_INSPECTOR_OPTIONS=:::{"inspectorIpc":"/tmp/node-cdp.29108-1.sock.deferred","deferredMode":true,"waitForDebugger":"","execPath":"/home/user/.nvm/versions/node/v14.19.1/bin/node","onlyEntrypoint":false,"autoAttachMode":"smart","aaPatterns":["/home/user/repos/my-repo/**","!**/node_modules/**","**/$KNOWN_TOOLS$/**"]}
GIT_ASKPASS=/usr/share/code/resources/app/extensions/git/dist/askpass.sh
VSCODE_GIT_ASKPASS_NODE=/usr/share/code/code
VSCODE_GIT_ASKPASS_EXTRA_ARGS=--ms-enable-electron-run-as-node
VSCODE_GIT_ASKPASS_MAIN=/usr/share/code/resources/app/extensions/git/dist/askpass-main.js
VSCODE_GIT_IPC_HANDLE=/run/user/1000/vscode-git-dc261c6e7d.sock
VSCODE_INJECTION=1
ZDOTDIR=/tmp/user-code-zsh
USER_ZDOTDIR=/home/user
TERM=xterm-256color
P9K_TTY=old
_P9K_TTY=/dev/pts/1
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:

@meganrogge
Copy link
Contributor Author

Thanks - is this the ZDOTDIR that you're expecting? Does it match when you run env in an external terminal?
ZDOTDIR=/tmp/user-code-zsh

@kb-ig
Copy link

kb-ig commented Dec 6, 2022

The ZDOTDIR env var does not exist outside of the integrated terminal. Running env in an external terminal does hot have this variable listed.

Going back to this previous bug report, the script that it mentions seems to be what's setting this variable. Although I would have expected it to still show in an external terminal, but that doesnt seem to be the case.

For completeness, here's my env from an external terminal (my previous comment has the env contents from the integrated terminal).

Env (external terminal)
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
SESSION_MANAGER=local/kb-ig-zorinos:@/tmp/.ICE-unix/2305,unix/kb-ig-zorinos:/tmp/.ICE-unix/2305
GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/bb443b85_3094_4755_b5d2_66547b00bf64
SSH_AGENT_PID=2269
XDG_CURRENT_DESKTOP=zorin:GNOME
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
DEFAULTS_PATH=/usr/share/gconf/zorin.default.path
IM_CONFIG_PHASE=1
COLORTERM=truecolor
LIBVIRT_DEFAULT_URI=qemu:///system
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
DESKTOP_SESSION=zorin
QT_IM_MODULE=ibus
XDG_MENU_PREFIX=gnome-
USER=user
GJS_DEBUG_OUTPUT=stderr
HOME=/home/user
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
PWD=/home/user
QT_STYLE_OVERRIDE=adwaita
GTK_MODULES=gail:atk-bridge
_=/usr/bin/env
XDG_CONFIG_DIRS=/etc/xdg/xdg-zorin:/etc/xdg
XDG_SESSION_DESKTOP=zorin
JOURNAL_STREAM=8:60421
WINDOWPATH=2
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
MANAGERPID=2060
MANDATORY_PATH=/usr/share/gconf/zorin.mandatory.path
LOGNAME=user
QT_ACCESSIBILITY=1
GNOME_TERMINAL_SERVICE=:1.4645
GNOME_SHELL_SESSION_MODE=zorin
PATH=/home/user/.nvm/versions/node/v14.19.1/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
XDG_RUNTIME_DIR=/run/user/1000
XMODIFIERS=@im=ibus
XDG_SESSION_TYPE=x11
SHELL=/usr/bin/zsh
USERNAME=user
VTE_VERSION=6003
INVOCATION_ID=4dd580b11ac34e27b73f9c4857576530
SHLVL=1
XAUTHORITY=/run/user/1000/gdm/Xauthority
QT_QPA_PLATFORMTHEME=gtk3
XDG_DATA_DIRS=/usr/share/zorin:/home/user/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
XDG_SESSION_CLASS=user
TERM=xterm-256color
GDMSESSION=zorin
DISPLAY=:0
OLDPWD=/home/user
AWS_SDK_LOAD_CONFIG=1
AWS_PROFILE=dev
P9K_TTY=old
_P9K_TTY=/dev/pts/1
ZSH=/home/user/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
P9K_SSH=0
NVM_DIR=/home/user/.nvm
NVM_CD_FLAGS=-q
NVM_BIN=/home/user/.nvm/versions/node/v14.19.1/bin
NVM_INC=/home/user/.nvm/versions/node/v14.19.1/include/node

@meganrogge meganrogge removed the info-needed Issue requires more information from poster label Dec 6, 2022
@nmarandi
Copy link

nmarandi commented Jan 3, 2023

Vscode version on host and remote: 1.74.2
Host OS: Windows 10
Remote OS: Ubuntu 22.04

I have this problem too. this happens to me when I use remote explorer to connect vscode-server. on startup all the terminals are something like this:
image

image

but opening any terminal after that:
image

in terminals that have this problem: USER_ZDOTDIR=/tmp/mixer-code-zsh
in terminals that have not this problem: USER_ZDOTDIR=/home/mixer

@sheikhlimon
Copy link

Why isn't it fixed yet?

@meganrogge meganrogge assigned Tyriar and unassigned Tyriar Jan 24, 2023
@devklick
Copy link

devklick commented Mar 7, 2023

Just want to confirm that this is no longer an issue for as of 1.75.1 (possibly even as of an earlier version)

Version info
Version: 1.75.1
Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
Date: 2023-02-08T21:35:30.018Z
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Linux x64 5.15.0-60-generic
Sandboxed: No

@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug code-cli confirmation-pending terminal-shell-zsh An issue in the terminal specific to zsh
Projects
None yet
Development

No branches or pull requests

6 participants