Spawn sessions with login shell terminal env
This commit is contained in:
+7
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user