nrfutil toolchain-manager launch won't work with zsh

As title says, I have a clean install of Xubuntu 23.10, latest nrfutil and toolchain-manager package

My shell is zsh, however "nrfutil toolchain-manager launch --shell zsh" will not giving me a shell that with a working west

If I force it to use bash then everything is fine with following PATH

PATH=/home/localuser/ncs/toolchains/2be090971e/usr/bin:/home/localuser/ncs/toolchains/2be090971e/usr/bin:/home/localuser/ncs/toolchains/2be090971e/usr/local/bin:/home/localuser/ncs/toolchains/2be090971e/opt/bin:/home/localuser/ncs/toolchains/2be090971e/opt/nanopb/generator-bin:/home/localuser/ncs/toolchains/2be090971e/opt/zephyr-sdk/aarch64-zephyr-elf/bin:/home/localuser/ncs/toolchains/2be090971e/opt/zephyr-sdk/x86_64-zephyr-elf/bin:/home/localuser/ncs/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/bin:/home/localuser/ncs/toolchains/2be090971e/opt/zephyr-sdk/riscv64-zephyr-elf/bin:/home/localuser/bin:/home/localuser/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/games:/usr/games:/snap/bin

While in zsh it's clearly missing lot's of things

PATH=/home/localuser/bin:/home/localuser/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/games:/usr/games:/snap/bin

Could someone from the team texplain how the shell was invoked? since the new version of nrfutil no longer opensource, I cannot figure it out

Parents Reply Children
  • Hello again,

    Could you provide the output of running printenv in your zsh terminal after launching it with nrfutil?

    Best regards,

    Michal

  • CLUTTER_BACKEND=x11
    COLORTERM=truecolor
    DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
    DEBUGINFOD_URLS=https://debuginfod.ubuntu.com 
    DESKTOP_SESSION=xubuntu
    DISPLAY=:0.0
    DISTCC_HOSTS=+zeroconf
    EDITOR=vim
    GDMSESSION=xubuntu
    GDM_LANG=en_US
    GIT_EXEC_PATH=/home/localuser/ncs/toolchains/2be090971e/usr/local/libexec/git-core
    GIT_TEMPLATE_DIR=/home/localuser/ncs/toolchains/2be090971e/usr/local/share/git-core/templates
    GNOME_KEYRING_CONTROL=/run/user/1000/keyring
    GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
    GTK_OVERLAY_SCROLLING=0
    HOME=/home/localuser
    HOSTNAME=zephyr-dev
    LANG=en_US.UTF-8
    LANGUAGE=en_US
    LC_ADDRESS=zh_CN.UTF-8
    LC_IDENTIFICATION=zh_CN.UTF-8
    LC_MEASUREMENT=zh_CN.UTF-8
    LC_MONETARY=zh_CN.UTF-8
    LC_NAME=zh_CN.UTF-8
    LC_NUMERIC=zh_CN.UTF-8
    LC_PAPER=zh_CN.UTF-8
    LC_TELEPHONE=zh_CN.UTF-8
    LC_TIME=zh_CN.UTF-8
    LD_LIBRARY_PATH=/home/localuser/ncs/toolchains/2be090971e/usr/lib:/home/localuser/ncs/toolchains/2be090971e/usr/lib/x86_64-linux-gnu:/home/localuser/ncs/toolchains/2be090971e/usr/local/lib:/home/localuser/.nrfutil/lib/nrfutil-toolchain-manager
    LESSOPEN=|lesspipe %s
    LESS_TERMCAP_mb=
    LESS_TERMCAP_md=
    LESS_TERMCAP_me=
    LESS_TERMCAP_se=
    LESS_TERMCAP_so=
    LESS_TERMCAP_ue=
    LESS_TERMCAP_us=
    LOGNAME=localuser
    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=00: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:*.avif=01;35:*.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:*.webp=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:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:
    MAIL=/var/mail/localuser
    NRFUTIL_EXEC_PATH=/home/localuser/.nrfutil/bin/nrfutil
    NRFUTIL_LAUNCHER_VERSION=1.0.0
    NRFUTIL_TOOLCHAIN_MANAGER_CURRENT_TOOLCHAIN=2be090971e
    OLDPWD=/home/localuser/Documents/gfw_cracker
    PAGER=less
    PATH=/home/localuser/bin:/home/localuser/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/games:/usr/games:/snap/bin
    PWD=/home/localuser
    PYTHONHOME=/home/localuser/ncs/toolchains/2be090971e/usr/local
    PYTHONPATH=/home/localuser/ncs/toolchains/2be090971e/usr/local/lib/python3.9:/home/localuser/ncs/toolchains/2be090971e/usr/local/lib/python3.9/site-packages
    QT_ACCESSIBILITY=1
    QT_QPA_PLATFORMTHEME=gtk2
    READNULLCMD=less
    SESSION_MANAGER=local/zephyr-dev:@/tmp/.ICE-unix/1188,unix/zephyr-dev:/tmp/.ICE-unix/1188
    SHELL=/bin/zsh
    SHLVL=2
    SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
    TERM=xterm-256color
    USER=localuser
    VTE_VERSION=7400
    WINDOWID=56623107
    WRITE_ON_UDEV=yes
    XAUTHORITY=/home/localuser/.Xauthority
    XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg
    XDG_CURRENT_DESKTOP=XFCE
    XDG_DATA_DIRS=/usr/share/xubuntu:/usr/share/xfce4:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/usr/share
    XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/localuser
    XDG_MENU_PREFIX=xfce-
    XDG_RUNTIME_DIR=/run/user/1000
    XDG_SEAT=seat0
    XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
    XDG_SESSION_CLASS=user
    XDG_SESSION_DESKTOP=xubuntu
    XDG_SESSION_ID=c1
    XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
    XDG_SESSION_TYPE=x11
    XDG_VTNR=7
    ZEPHYR_SDK_INSTALL_DIR=/home/localuser/ncs/toolchains/2be090971e/opt/zephyr-sdk
    ZEPHYR_TOOLCHAIN_VARIANT=zephyr
    _=/usr/bin/printenv
    

  • Thank you. I have forwarded the information, but the main developer is unfortunately out of office currently, so I'll get back to you when they'll be back.

    Best regards,

    Michal

  • Hello again, one more quick update:

    So according to nrfutil toolchain-manager launch --help

    Options:
          --shell
              Launch a sub-shell within the current terminal
              
              The shell spawned is determined by the `SHELL` environment variable. An attempt is made to spawn the shell without running any config files (e.g. ".bashrc"), as these files could (potentially) mess up the environment. Officially supported shells are: "bash", "pwsh" and "zsh". Other shells might still work, but these are spawned with no flags.

    Note: You can run any shell, with any number of flags, by
    passing the command directly (see [COMMAND]).
              
              This feature is not supported on Windows.

    According to this, you should set a SHELL environmental variable instead and then just run:

    nrfutil toolchain-manager launch --shell

    Best regards,

    Michal

  • well, my default shell is zsh, which you could find out in the printenv output, it says "SHELL=/bin/zsh"

    I tried with --shell only it did not work that's why I appended zsh after it

Related