Spawn sessions with login shell terminal env
ci / test (push) Has been cancelled
ci / remote-bench (push) Has been cancelled

This commit is contained in:
Codex
2026-06-11 09:34:56 -04:00
parent babfb204c3
commit 92f43df046
3 changed files with 20 additions and 3 deletions
+7 -1
View File
@@ -152,6 +152,12 @@ fi
if [ "$role" = "server" ] || [ "$role" = "both" ]; then
server_config="$config_dir/server.toml"
if [ "$force_config" -eq 1 ] || [ ! -f "$server_config" ]; then
login_shell="$(
if command -v getent >/dev/null 2>&1; then
getent passwd "$(id -un)" | awk -F: '{print $7}'
fi
)"
login_shell="${login_shell:-${SHELL:-/bin/sh}}"
cat >"$server_config" <<EOF
port = $port
bind = "0.0.0.0"
@@ -164,7 +170,7 @@ retransmit_window = 256
default_input_mode = "read-write"
prewarm_sessions = ["default"]
create_on_attach = true
shell = "/bin/sh"
shell = "$login_shell"
sessions_dir = "~/.local/share/dosh/sessions"
secret_path = "~/.config/dosh/secret"
EOF