Update README.md

This commit is contained in:
Shuanglei Tao
2018-10-13 08:46:45 +08:00
committed by GitHub
parent a428a7a430
commit 53624a44fa

View File

@@ -26,15 +26,7 @@ brew install ttyd
## Install on Linux ## Install on Linux
- Install from ppa (ubuntu 16.04 and later): - Binary version: download from the [releases](https://github.com/tsl0922/ttyd/releases) page.
```bash
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:tsl0922/ttyd-dev
sudo apt-get update
sudo apt-get install ttyd
```
- Build from source (debian/ubuntu): - Build from source (debian/ubuntu):
```bash ```bash
@@ -62,7 +54,7 @@ ttyd can be built with [MSYS2][10] on windows, The build instructions is [here][
opkg install ttyd opkg install ttyd
``` ```
If the install command fails, you can [compile it yourself][14]. You may want to [compile it manually][14].
# Usage # Usage
@@ -118,7 +110,6 @@ Then open <http://localhost:8080> with a browser, you will get a bash shell with
- If you want to login with your system accounts on the web browser, run `ttyd login`. - If you want to login with your system accounts on the web browser, run `ttyd login`.
- You can even run a none shell command like vim, try: `ttyd vim`, the web browser will show you a vim editor. - You can even run a none shell command like vim, try: `ttyd vim`, the web browser will show you a vim editor.
- Sharing single process with multiple clients: `ttyd tmux new -A -s ttyd vim`, run `tmux new -A -s ttyd` to connect to the tmux session from terminal. - Sharing single process with multiple clients: `ttyd tmux new -A -s ttyd vim`, run `tmux new -A -s ttyd` to connect to the tmux session from terminal.
- You can access underlying XTerm instance by calling `window.term` in browser, which allows you to interact with the term such as getting a snapshot of terminal content by `term.selectAll(); var terminalContent = term.getSelection().trim();`.
## Browser Support ## Browser Support