| Crates.io | webterm-server |
| lib.rs | webterm-server |
| version | 0.1.0 |
| created_at | 2023-04-18 13:44:37.471413+00 |
| updated_at | 2023-04-18 13:44:37.471413+00 |
| description | webterminal server using hyper and xterm.js |
| homepage | |
| repository | https://github.com/de-vri-es/webterm-server-rs |
| max_upload_size | |
| id | 842455 |
| size | 1,485,074 |
A simple no-frills webterm server.
Usage: webterm-server [OPTIONS] [COMMAND] [ARGS]...
Arguments:
[COMMAND] The command to execute [default: webterm-login]
[ARGS]... Arguments for the command
Options:
-v, --verbose... Print more messages
-q, --quiet... Print less messages
-l, --listen <LISTEN> The address to bind to [default: localhost:8080]
-h, --help Print help
You can have the webterm server spawn a shell without requiring the user to login. Simply adjust the command line arguments:
webterm-server -- /usr/bin/zsh -l
You can also have the webterm server start su -l MYUSER.
The su program will ask for a password before starting a login shell for MYUSER.
webterm-server -- /usr/bin/su -l MYUSER
You could try to use the /sbin/login program.
However, the login program requires root permissions to function on many systems.
You can mimic the behaviour of login with a small shell script:
#!/bin/sh
read -p "Username: " -r username
exec su -l "$username"
This script is included in the repository as webterm-login.
You can install it somewhere and have the webterm server run it for new sessions:
webterm-server -- /usr/local/bin/webterm-login