Take remote-chromium.sh's host as an argument instead of an env var
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b7ad3a9b8c
commit
9593b233aa
2 changed files with 13 additions and 5 deletions
|
|
@ -142,7 +142,8 @@ someone types the disk passphrase locally) unless something like
|
||||||
|
|
||||||
## Single remote app: Chromium with your logged-in accounts
|
## 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
|
running on the home machine, then launches it there with its window drawn
|
||||||
locally via `waypipe` (`--x11` for classic X11 forwarding instead). The close
|
locally via `waypipe` (`--x11` for classic X11 forwarding instead). The close
|
||||||
step matters: Chromium allows one process per profile, so a still-running
|
step matters: Chromium allows one process per profile, so a still-running
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,20 @@
|
||||||
# would swallow the new window), then launches it there with its window
|
# would swallow the new window), then launches it there with its window
|
||||||
# drawn here.
|
# drawn here.
|
||||||
#
|
#
|
||||||
# Usage: remote-chromium.sh [--x11] (default: waypipe)
|
# Usage: remote-chromium.sh [--x11] [host]
|
||||||
# Remote host: $REMOTE_HOST, default teemu-thinkpad-ubuntu
|
# --x11 classic X11 forwarding instead of waypipe
|
||||||
|
# host ssh host to run Chromium on (default: teemu-thinkpad-ubuntu)
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
HOST="${REMOTE_HOST:-teemu-thinkpad-ubuntu}"
|
|
||||||
MODE="waypipe"
|
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
|
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)"
|
echo "waypipe not installed here - run: sudo apt install waypipe (needed on both machines)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue