rex-glance

Jump onto another machine's screen from a Rex pane, fast, to do something by hand.

For the moments when a terminal isn't enough and you need the screen for a minute: a stuck dialog to click, a login window, a setting that only has a GUI. Open it, do the thing, close it.

It's not a remote desktop to work in all day, and not for video. For that, use a real screen-sharing app.

What it values

  • Latency over looks. Clicks and keys go out the moment you make them, and only the parts of the screen that really changed are sent. On a slow link the picture drops resolution rather than falling behind.
  • Nothing to install on the far side. It connects to the screen sharing the machine already runs: macOS Screen Sharing, or wayvnc / x11vnc on Linux.
  • It goes where Rex goes. It runs in a Rex pane and draws with the kitty graphics protocol, so any Rex app shows it, on a Mac or an iPad.

Install

You need Go and Rex. rex-glance runs on the machine that runs your Rex server.

git clone https://github.com/travelingflwr/rex-glance
cd rex-glance
go build -o ~/.local/bin/rex-glance .
ln -s "$PWD/glance.lua" ~/.config/rex/glance.lua

Then name your machines in ~/.config/rex/init.lua:

pcall(function()
  require("glance").setup{
    machines = { { name = "This Mac", host = "localhost" }, "linuxbox" },  -- ssh or tailnet names
  }
end)

Run rex config reload, and Glance at… is in Rex's palette.

A Mac needs Screen Sharing turned on (System Settings → General → Sharing). Linux with wayvnc needs enable_auth=true and enable_pam=true in ~/.config/wayvnc/config. The first time, rex-glance asks for the password and offers to keep it in the Keychain, but only after a login works.

Keys

Keys
Typing, arrows, Tab, Escape…go to the machine as typed
Ctrl+Option+keyon a Mac, that key with ⌘ (Ctrl+Option+Space is Spotlight)
Ctrl-]quit, the way telnet does

The mouse works as you'd expect: clicks, drags, right-click, scrolling and hover.

From the command line

rex-glance look <machine>          # the screen in this pane
rex-glance look <machine> --fast   # 1×: less sharp, about a quarter of the data
rex-glance reach <machine>         # can its screen sharing be reached, and how

How it stays fast, and troubleshooting: the README on GitHub.