diff --git a/README.md b/README.md index 6b936fc..867e6d8 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,8 @@ someone types the disk passphrase locally) unless something like ## Single remote app: Chromium with your logged-in accounts -`remote-chromium.sh` (run on the travel laptop) closes any Chromium you have +`remote-chromium.sh [--x11] [host]` (run on the travel laptop; host defaults to +`teemu-thinkpad-ubuntu`) closes any Chromium you have running on the home machine, then launches it there with its window drawn locally via `waypipe` (`--x11` for classic X11 forwarding instead). The close step matters: Chromium allows one process per profile, so a still-running diff --git a/remote-chromium.sh b/remote-chromium.sh index 76326ca..0d41137 100755 --- a/remote-chromium.sh +++ b/remote-chromium.sh @@ -4,13 +4,20 @@ # would swallow the new window), then launches it there with its window # drawn here. # -# Usage: remote-chromium.sh [--x11] (default: waypipe) -# Remote host: $REMOTE_HOST, default teemu-thinkpad-ubuntu +# Usage: remote-chromium.sh [--x11] [host] +# --x11 classic X11 forwarding instead of waypipe +# host ssh host to run Chromium on (default: teemu-thinkpad-ubuntu) set -euo pipefail -HOST="${REMOTE_HOST:-teemu-thinkpad-ubuntu}" MODE="waypipe" -[ "${1:-}" = "--x11" ] && MODE="x11" +HOST="teemu-thinkpad-ubuntu" +for arg in "$@"; do + case "$arg" in + --x11) MODE="x11" ;; + -*) echo "Unknown option: $arg"; exit 1 ;; + *) HOST="$arg" ;; + esac +done if [ "$MODE" = "waypipe" ] && ! command -v waypipe >/dev/null 2>&1; then echo "waypipe not installed here - run: sudo apt install waypipe (needed on both machines)"