Porthole
Watching a session

Connecting from a phone

Scan the QR code and watch — or type — from any phone.

Porthole prints a QR code with every session, so opening a shared terminal on a phone takes a couple of seconds.

Scan to connect

  1. Run porthole host on your machine.
  2. Point your phone's camera at the QR code in the terminal output.
  3. Tap the link — the viewer opens in your mobile browser.

That is it. The browser viewer is the same one you get on a desktop, laid out for a small screen.

The accessory key bar

Phone soft keyboards have no Esc, Ctrl, Tab, or arrow keys. Without them you could type text but not send Ctrl+C, exit vim, or walk back through shell history — which makes a terminal effectively read-only for anything interactive.

So when the keyboard is up, Porthole shows a bar above it:

┌──────┬─────┬──────┬───┬───┬───┬───┐
│ Esc  │ Tab │ Ctrl │ ← │ ↓ │ ↑ │ → │
└──────┴─────┴──────┴───┴───┴───┴───┘

Ctrl is a sticky modifier: tap it, then tap a letter. Tap Ctrl then c to send Ctrl+C. The layout follows the Termux "extra keys" convention that mobile terminal users already know.

The bar only appears when you can actually type — in a read-only session there is nothing for it to do.

Tips

  • Rotate to landscape for anything wider than about 80 columns. The terminal reflows and the host is told the new size.
  • Use fullscreen (the header button) to reclaim the browser chrome.
  • The phone needs network access to the signaling server to complete the handshake; after that the connection is peer-to-peer.
  • For a phone that should only watch, ask the host for a read-only session.

Hide the QR code

If you are recording your terminal or do not need the QR:

porthole host --no-qr

The link and code are still printed — only the QR is omitted. --no-link goes further and prints the code alone.

A QR code encodes the session link, and a session link is a capability. Do not put one on a slide, in a screenshot, or on a stream unless the session is also password-protected or invite-only.

On this page