From d4ca5f99dc45cecaa8c0a6b479578ca76a0bd7c7 Mon Sep 17 00:00:00 2001 From: saymrwulf Date: Thu, 16 Apr 2026 09:28:10 +0200 Subject: [PATCH] Clarify background/foreground behavior in app.sh start output Users now see explicit messages about whether Jupyter runs in background or foreground, what happens when the terminal closes, and how to stop the server. --- scripts/app.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/scripts/app.sh b/scripts/app.sh index d6b6da8..a1774fc 100755 --- a/scripts/app.sh +++ b/scripts/app.sh @@ -241,7 +241,11 @@ cmd_start() { local url url=$(_server_url || echo "http://localhost:8888/lab/tree/00_START_HERE.ipynb") warn "JupyterLab already running (PID $existing_pid)" + echo "" echo " $url" + echo "" + echo " To stop: bash scripts/app.sh stop" + echo " To restart: bash scripts/app.sh restart" if $open_browser; then if command -v open &>/dev/null; then open "$url" @@ -267,11 +271,14 @@ cmd_start() { # Foreground mode — Ctrl-C stops the server cleanly if $foreground; then - info "Starting JupyterLab on port $port (foreground, Ctrl-C to stop)..." + info "Starting JupyterLab on port $port (foreground mode)..." local url="http://localhost:$port/lab/tree/00_START_HERE.ipynb" echo "" echo " ${BOLD}$url${NC}" echo "" + echo " Jupyter is running in the foreground — this terminal is occupied." + echo " Press Ctrl-C to stop. Closing this terminal also stops Jupyter." + echo "" if $open_browser; then # Open browser after a short delay (in background) (sleep 3 && { @@ -326,10 +333,17 @@ cmd_start() { done local url="http://localhost:$port/lab/tree/00_START_HERE.ipynb" - ok "JupyterLab running (PID $pid)" + ok "JupyterLab running (PID $pid) on port $port" echo "" echo " ${BOLD}$url${NC}" echo "" + echo " Jupyter is running in the background — this terminal is free." + echo " It will keep running even if you close this terminal." + echo "" + echo " To stop: bash scripts/app.sh stop" + echo " To check: bash scripts/app.sh status" + echo " Logs: bash scripts/app.sh logs -f" + echo "" if $open_browser; then if command -v open &>/dev/null; then