Longterm
An SSH terminal for Sailfish OS.
- Multiple connections at once, switchable from the app and visible on the cover
- xterm-256color terminal (vim, top, tmux), pinch to zoom, copy and paste, search
in the scrollback, links open in the browser, OSC 52 clipboard from the server
- Configurable key toolbar with Ctrl, Alt, arrows, Home/End, PgUp/PgDn and F1-F12, above
the keyboard or at the top. Tap Ctrl or Alt twice to lock it, drag the arrows key to
move the cursor
- Snippets of commands typed with one tap, per host or for all, and the history of
what was typed in the session to type again
- Hardware keyboards: Alt and Meta, Ctrl with symbols, Ctrl+Shift+C/V to copy and paste,
Ctrl+Tab and Ctrl+PgUp/PgDn between connections, Ctrl+Shift+T for a new one
- Swipe the keyboard down for the whole screen, flick through the scrollback, save or
share the scrollback, log sessions to Documents/Longterm
- Any monospace font on the device, with Nerd Fonts symbols for prompts whatever the font,
and color schemes imported from iTerm2, Alacritty, Windows Terminal, Xresources or base16
- Password, key, certificate and keyboard-interactive (one-time code) login
- mosh, which keeps the session through network changes, sleep and dead spots, and
even through a restart of the app, with typing shown before the server echoes it
- Files on the server: browse, download files and folders into Downloads, open them in
their app, upload files and folders, rename and delete, or download and upload a single
file straight from the session menu. Files shared from other apps upload to a server
- Saved hosts in groups and favorites, most recent first, with search. Jump hosts, local
and remote port forwards, a SOCKS proxy, agent forwarding, environment variables,
keepalive and connect timeouts, Wake-on-LAN, and attaching to a tmux session,
importable and exportable as ssh_config
- Keys installed on a host from the app, like ssh-copy-id
- Everything backed up into one file encrypted with a passphrase, and restored from it
- The app can lock with a code, and host key fingerprints show as QR codes
- Shows the operating system of each host as an icon, detected when connecting
- Ed25519, ECDSA and RSA keys and remembered passwords kept in the Sailfish
Secrets keychain, private keys exportable with a passphrase
- Reconnects by itself when the network drops or changes, recovers from changed
host keys, known hosts can be reviewed and removed
- Terminal bell vibrates, or notifies when the session is not on screen, and programs
can send their own notifications with OSC 9 or OSC 777
- Color schemes: Default, Catppuccin Mocha, Dracula, Gruvbox Dark, Nord,
Solarized Dark and Light
Not supported: FIDO security keys (sk-ed25519), as Sailfish OS gives apps no way to talk to them.
Needs Sailfish OS 5.1 or newer, on aarch64 or armv7hl. The app is sandboxed
and asks for the Internet, Secrets and user directories permissions on first start, the last for
downloading and uploading files.
mosh
Turn on "Use mosh" for a saved host to run the terminal over mosh. Longterm
logs in over SSH, starts mosh-server there and talks to it over UDP, so the host needs mosh
installed and UDP ports 60000 to 61000 reachable. Where mosh-server does not start, the session
says so and goes on as a plain SSH session. The session survives changing networks and the
phone sleeping, and shows how long the server has been silent when packets stop getting through.
The SSH connection stays open next to it for files, port forwards and agent forwarding for as
long as it lasts. If it drops, the terminal goes on over mosh and those stop until the next
connect, and a new SSH connection is made in the background for them. Through a jump host,
mosh-server is started over the jump but the UDP packets go to the host directly.
When the app quits, a mosh session stays on the server and the app picks it up on its next
start, screen and all, without logging in again. What it needs for that is in its data folder,
the session key in the keychain. Disconnecting ends the session on the server for good.
On slow links, typing shows underlined before the server echoes it, like mosh's own client
does. Each new line starts out unsure: only once the screen confirmed what was typed on it do
further keys show early, so nothing typed at a password prompt does. It can be turned off in
the settings.
Coding agent status
Longterm can show what a coding agent such as Claude Code or
Codex is doing in a session. The dot and the line under the
connection turn blue while it works, with what it is doing such as "Reading terminal.cpp...", red for
"Waiting for input..." when it asks for permission or asks a question, and green for "Done".
Questions and finished turns also notify, and tapping the notification opens the session.