52 lines
2.2 KiB
Markdown
52 lines
2.2 KiB
Markdown
# Shell
|
|
|
|
A login shell on the router, as your console account: your own POSIX account of the directory, or
|
|
a local account root chose.
|
|
|
|
- **Opening** asks for your password and code again, unless you used a shell within the router's
|
|
`web.shell_auth_timeout` minutes. **Open with a passkey** takes one of your passkeys instead,
|
|
unlocked with your device's PIN or biometrics; it shows when you have a passkey (see
|
|
[Account](account.md)).
|
|
- **Closing:** the router ends the shell after `web.shell_idle_minutes` without a keystroke; the
|
|
page shows the reason and keeps the terminal readable.
|
|
|
|
## Editor
|
|
|
|
`vre FILE...` (or `vpn-router-editor FILE...`) in the shell opens the files in the editor of this
|
|
page and returns at once:
|
|
|
|
```sh
|
|
vre /etc/hosts ~/notes.txt
|
|
```
|
|
|
|
- **Tabs:** each file has a tab with its name, and its path as the tooltip. A dot marks unsaved
|
|
changes, and the cross closes the tab, asking first when there are unsaved changes.
|
|
- **Editor icon** (left of the shell icon): shown while a file is open. It switches between the
|
|
terminal and the editor; the shell keeps running.
|
|
- **Minimap button** (left of Save): shows or hides the minimap at the right edge of the editor.
|
|
This browser remembers the choice.
|
|
- **Save** (or Ctrl+S): writes the file on the router, as your console account. When the file
|
|
changed on the router after it was read, **Reload** takes the router's version and **Overwrite**
|
|
writes yours.
|
|
- **Limits:** text files of up to 1 MiB, at most 20 at a time. A file that does not exist is
|
|
created when saved. A file your console account may not write cannot be saved; edit it in the
|
|
terminal.
|
|
- **When files close:** when the shell ends, every file closes and the icon goes away. `vre`
|
|
works only in this shell.
|
|
|
|
## Requirements
|
|
|
|
- Membership of `admins`, enrolment for one-time passwords (see [Account](account.md)), also when
|
|
you open the shell with a passkey, as the router's login session and `sudo` need it, and console
|
|
login, which root switches on the router:
|
|
|
|
```sh
|
|
vpn-router-user console <name> --posix
|
|
```
|
|
|
|
- The router offers the shell only while its `web.shell` is `true`:
|
|
|
|
```sh
|
|
vpn-config-edit set web.shell true
|
|
```
|