From dbd0142b1ece72b54eeecff7ba9d16860230033c Mon Sep 17 00:00:00 2001 From: Ashley Mensah Date: Thu, 30 Apr 2026 12:29:08 +0200 Subject: [PATCH] fix(client): export NB_DAEMON_ADDR and NB_CONFIG in shell rc The CLI defaults to /var/run/netbird.sock which doesn't exist in our rootless setup. Export NB_DAEMON_ADDR and NB_CONFIG in .bashrc so the CLI automatically connects to the user-level daemon socket. --- release_files/install-steamos.sh | 39 ++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/release_files/install-steamos.sh b/release_files/install-steamos.sh index 9798f290e..08e1a9dea 100755 --- a/release_files/install-steamos.sh +++ b/release_files/install-steamos.sh @@ -227,25 +227,30 @@ do_install() { write_service_unit enable_service - # Ensure ~/.local/bin is on PATH for future shells - if ! echo "$PATH" | grep -q "${INSTALL_DIR}"; then - local shell_rc="${HOME}/.bashrc" - if [[ -f "${HOME}/.zshrc" ]]; then - shell_rc="${HOME}/.zshrc" - fi - - local path_line="export PATH=\"${INSTALL_DIR}:\$PATH\"" - if ! grep -qF "${INSTALL_DIR}" "$shell_rc" 2>/dev/null; then - echo "" >> "$shell_rc" - echo "# Added by NetBird installer" >> "$shell_rc" - echo "$path_line" >> "$shell_rc" - info "Added ${INSTALL_DIR} to PATH in ${shell_rc}" - fi - - # Also export for the current script so auto-connect and instructions work - export PATH="${INSTALL_DIR}:${PATH}" + # Configure shell environment so the CLI finds the daemon socket and binary + local shell_rc="${HOME}/.bashrc" + if [[ -f "${HOME}/.zshrc" ]]; then + shell_rc="${HOME}/.zshrc" fi + local daemon_addr="unix://${STATE_DIR}/netbird.sock" + + if ! grep -qF "# Added by NetBird installer" "$shell_rc" 2>/dev/null; then + cat >> "$shell_rc" <