Skip to content

Home screen widgets

ZestSSH has a home screen widget on Android and, from 4.0, on iPhone and iPad. It lists up to four of your hosts; tapping one opens ZestSSH and asks before it connects. While the app lock is on, the widget shows no host at all. The app icon also has shortcuts of its own.

The widget shows a ZestSSH header, a + button, and up to 4 hosts from your personal space.

  • Each host shows its name (or its address when it has no name) and its address underneath.
  • Tapping + opens the form for a new host.
  • With no hosts yet, the widget says “No hosts yet. Tap + to add one.”
  • While the app lock is on, the widget says “App lock is on” and “Open ZestSSH to connect.”, and lists no host.

A screen reader reads each host as “Connect to web-01”, and + as “New host”.

The widget shows the first four hosts of your personal space, in the order of your host list (their saved order, then by name). It never shows a team’s hosts.

The list is given to the widget while your personal space is the one on screen. It updates when your hosts change (one added, edited or deleted). A search on the Hosts tab does not change what the widget shows.

The widget is given a host’s ID, name, address and port, and nothing else: no user name, key, password, startup command or environment.

From 4.0, the widget lists no host while the app lock is on, on Android as on an iPhone or iPad. From the moment you turn the lock on, the hosts it listed are taken away, and it says “App lock is on” with “Open ZestSSH to connect.” When you turn the lock off, the hosts come back. So someone holding your locked phone does not see your host names and addresses on the home screen.

A tap does not connect straight away. ZestSSH opens and asks first:

  1. The question reads Connect to {host}? and says: “A widget, a shortcut or a link asked to open a session to {address} with its saved sign-in. Connect only if you asked for it.”
  2. Tap Connect to open the session, or close the question to do nothing.

A few things can stop or change that:

  • The app is locked: nothing opens until you unlock it. The tap is answered once ZestSSH is unlocked.
  • A Telnet host: you get the usual warning that the connection is not encrypted before it opens.
  • A team space is on screen: ZestSSH switches to your personal space first, since the host is yours.
  • The host is gone: you see “No host named {name} is saved in your personal space.”
  • Free plan: if you already have the most sessions the Free plan allows, you see “Free tier session limit reached - upgrade to Squeezed for unlimited.”
  • Recording mode is on: ZestSSH asks you to turn it off first, so the question shows the real host name and address.
  1. Long-press an empty spot on your Android home screen.
  2. Select Widgets.
  3. Find ZestSSH in the list. Its description reads “Connect to your hosts in one tap”.
  4. Drag it to your home screen. It takes 3 by 3 cells by default, and you can resize it.

Tapping the ZestSSH header opens the app. Besides the updates ZestSSH gives it, the widget redraws itself every hour.

These details are for people who want to know what the widget reads.

  1. App side: the app writes a JSON list of up to four hosts to its shared preferences under the key widget_connections, and whether the app lock is on under widget_locked, then asks Android to redraw the widget over the method channel com.affluentlabs.zestssh/widget (method updateWidget). While the lock is on, the list is empty.
  2. Widget side: the widget reads the two. While the lock is on it shows no host, even a list an older version left; otherwise it draws a row for each host.
  3. Tap: a host’s row opens the link zestssh://connect?id=<host id>, which the app answers with the question above. The + button opens zestssh://connection/new.

Each entry in the list has an id, a label, a host and a port. The widget shows the label and the host; the port and id are stored but not shown. For example:

[
{"id": "3f2a9c1e-0b7d-4e55-9a10-6c2d8e4f7a21", "label": "web-01", "host": "web-01.example.com", "port": 22},
{"id": "8b4e2d70-51c3-4f9a-b6e2-0d9c3a7f1e44", "label": "db-primary", "host": "192.168.10.5", "port": 22}
]

If the widget’s channel is not there (for example on a build without the widget), the update is skipped without an error.

From 4.0, iPhone and iPad have the widget too.

  1. Touch and hold an empty spot on the home screen until the apps jiggle, then tap Edit and Add Widget (or + on older iOS).
  2. Search for ZestSSH and choose Quick Connect: “Connect to your hosts in one tap”.
  3. Pick the medium or the large size, and tap Add Widget.

Before you have opened ZestSSH since installing or updating it, the widget says “Open ZestSSH once to list your hosts here.”

  • The hosts are marked as private, so iOS hides them wherever it hides private content.
  • The widget does not redraw itself on a timer: ZestSSH updates it as your hosts change and as the lock is turned on or off.
  • The widget’s words are in the app’s twelve languages.
  • ZestSSH and the widget share the host list through an App Group of their own, in the form {"v":1,"locked":false,"hosts":[...]}. While the lock is on, locked is true and hosts is empty.

Long-press the ZestSSH app icon to see its shortcuts:

  • New host: opens the form for a new host.
  • Import: opens the import of an SSH config file.
  • Snippets: opens your snippets.
  • With Squeezed, up to 4 hosts you connected to most recently also appear. Picking one connects to it, whether ZestSSH was closed or already open. Nothing connects while the app is locked: the host is opened once you unlock.

The same host shortcuts appear as quick actions on an iPhone or iPad (long-press the app icon). On an iPhone or iPad, the Shortcuts app also has ZestSSH’s own actions; see iOS Shortcuts.