RetroNET Shell

RetroNET Shell

Downloads › NABU Internet Adapter

The RetroNET Shell puts the command prompt of the computer running your Internet Adapter on your NABU: cmd.exe on Windows, or bash on Linux and macOS. List and move files, run scripts and check on the adapter, all from the NABU keyboard.

Read this first

Whoever is using the NABU, and any NABU program, gets the full command prompt of your computer while this is on: they can read, change and delete your files and run any command. It is off by default. Only turn it on if you trust everyone who uses your NABU and the programs you run.

Turn It On

  1. Open Settings on the Internet Adapter and go to the RetroNET tab.
  2. Tick Enable RetroNET host shell and press Save.
The RetroNET tab of the Internet Adapter settings
Settings › RetroNET. “Enable RetroNET host shell” is the last checkbox.

Turn it off again the same way when you’re done. While it’s off, shell programs say so and nothing is started on your computer.

Programs

RShell in 80 columns on an F18A

RetroNET RShell

From NABU Channels (Utilities). A full-screen VT100/ANSI terminal: 80 columns on an F18A or PICO9918, line-drawing boxes, scroll regions and a blinking cursor.

Remote Shell running in Cloud CP/M

Remote Shell (Cloud CP/M)

Type RSHELL at the A> prompt in Cloud CP/M. Uses your CP/M screen (40 or 80 columns with MODE) and returns to CP/M when you’re done.

RShell in 40 columns on a stock NABU
RShell in 40 columns on a stock NABU. Long lines wrap.

Keys

The NABU keyboard has no backslash, pipe, tilde or backtick, so both programs use CTRL keys for them.

PressTypes
CTRL+B\ backslash
CTRL+P| pipe
CTRL+T~ tilde
CTRL+G` backtick
Arrow keysCommand history and line editing (in bash)
CTRL+] or TV/NABUDisconnect and leave

How It Works

  1. The program asks for a shell. If the setting is on, the adapter starts your computer’s command prompt in the background: %ComSpec% (cmd.exe) on Windows, or your $SHELL (bash, or /bin/sh) on Linux and macOS. No window opens on your computer.
  2. It starts in the Store folder. The prompt opens in the RetroNET Store folder, where the NABU’s files live, so dir or ls shows them straight away.
  3. You type. Every key you press on the NABU is passed to the prompt, exactly as if you typed it on your computer.
  4. The output comes back. The adapter collects what the prompt prints and the NABU program draws it, turning modern terminal codes and UTF-8 characters into something the NABU can show.
  5. It ends with the program. When you leave, reset the NABU or turn it off, the adapter closes the prompt.
  • Commands that open a window (like Notepad) open on your computer, not on the NABU.
  • The prompt runs without a real terminal window behind it, so a few programs that insist on one may refuse to start. Ordinary commands, scripts and batch files all work.

Troubleshooting

The program says the shell is disabled

Tick Enable RetroNET host shell on the RetroNET tab of Settings and press Save.

I can’t type a backslash, pipe or tilde

Use the CTRL keys in the table above.

The screen shows strange characters

Both programs clean up UTF-8 and terminal codes. If something still looks wrong in Remote Shell, try RShell from NABU Channels, which understands more terminal codes, or use 80 columns with an F18A or PICO9918.

A command seems stuck

Some commands wait for input or keep running. Press CTRL+] to leave: the adapter closes the prompt. Avoid commands that wait for keys or never finish, such as ping -t.

For Developers

Any NABU program can use the shell with the rn_Shell functions in RetroNET-FileStore.h (NABU-LIB).

uint8_t sh = rn_ShellOpen();       // 0xff = refused (setting off, or no free handles)

rn_ShellWrite(sh, 0, 5, "dir\r\n");  // type a command; "\r\n" runs it

while (rn_ShellAvailable(sh) >= 0) {

  int32_t n = rn_ShellRead(sh, buf, 0, sizeof(buf));   // 0 = nothing yet

  ... print n bytes of buf
}

rn_ShellClose(sh);
  • rn_ShellAvailable() returns -1 once the shell has exited and all its output has been read.
  • Several shells can be open at once, each with its own handle. The adapter closes them all when the NABU resets.
  • Always handle 0xff from rn_ShellOpen() and tell the user to turn the setting on.
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.