A shell session is now kept, and a lost one comes back
What a Shell session showed is now recorded and replayed in the message centre, without the keystrokes. Connect returns you to a shell your browser left running, with any question still on screen, and debconf's dialogs draw the way they do over SSH.
On Sunday we patched one of our own Ubuntu machines through the device console's Shell, and three things went wrong in one upgrade.
Halfway through, apt asked which keyboard layout the machine uses. Over SSH that question is a coloured dialog with a list to scroll. In the Shell it arrived as 99 numbered keyboard languages and a prompt, "Country of origin for the keyboard:". Typing "United Kingdom" was refused, because the list is of languages, and "UK" picked Ukrainian.
Then the browser tab went away mid-question. The upgrade kept running on the machine, waiting for an answer that could no longer reach it, and it held the package database's lock.
The next Shell session's upgrade sat waiting for that lock.
Afterwards we went to the message centre to see what had been done, and there was nothing to see. Its terminal sessions had only ever been the Query tab's osquery history. A Shell session kept who opened it, when, from where and how it ended, and none of what was done in it.
All three are fixed in agent 0.3.118 and the server beside it.
What a session showed is kept
The agent now records each Shell session's output and sends it to Wegweiser while the session runs. In the message centre every Shell session has its own card, and its page replays the session in a terminal the size the technician's was. Beside it is a list of the commands typed at the prompt, and you can download the session as text.
A dialog, an editor or top draws on a screen of its own that disappears
when the program exits, so Play runs the session again with its timing,
and the dialog stays on screen for as long as it did. Pause holds it there.
What it keeps is the screen. It doesn't keep keystrokes. The commands are there because the shell repeats each one as it's typed. A password typed at a prompt that hides it isn't, and we think a record of every password your technicians typed would be a worse thing to hold than no record.
Long output, such as a build log or a large file sent to the screen, keeps its beginning and its end, and the page says how much was left out. The command typed after it is always kept.
Shell sessions and their recordings are shown to masters only, and the audit log names everyone who opens one.
Sessions from before this release, and sessions on older agents, still show who, when and how they ended, and say that what was done wasn't recorded.
A lost session comes back
If your browser leaves a Shell session without disconnecting (a reload, a closed tab, a laptop lid), the shell keeps running on the machine until 15 minutes pass without input, as it did before. Connect now takes you back into that shell instead of starting a second one beside it, and draws what was on the screen, including a question still waiting for its answer. A colleague who presses Connect on the same machine gets a shell of their own.
Programs that draw a screen now draw it, and exit ends a session
The agent runs as a system service, and a service starts without a terminal type. The Shell inherited that, so debconf fell back to numbered questions, and other programs that draw a screen did the same or wouldn't start.
The shell is now told it runs in an xterm, the terminal your browser draws it with.
Typing exit didn't end a session either, on Linux or on Windows. The agent
waited for the terminal's output to end, and its own handle on the terminal
kept that from happening, so the session sat open and empty until the
15-minute limit. It now ends when the shell does.
What you need to do
Nothing. The agent update reaches our own machines first and yours a day later, once it has run cleanly here. The message centre pages are live now.