Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dtinth/ttycast
Broadcast your tty to the world! Stream your live terminal session online. Powered by ttyrec, tty.js and Socket.IO
https://github.com/dtinth/ttycast
nodejs socket-io
Last synced: 4 days ago
JSON representation
Broadcast your tty to the world! Stream your live terminal session online. Powered by ttyrec, tty.js and Socket.IO
- Host: GitHub
- URL: https://github.com/dtinth/ttycast
- Owner: dtinth
- License: mit
- Created: 2012-07-06T17:38:21.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-12-23T13:17:05.000Z (almost 9 years ago)
- Last Synced: 2024-10-16T22:09:30.104Z (18 days ago)
- Topics: nodejs, socket-io
- Language: JavaScript
- Homepage: http://me.dt.in.th/page/ttycast
- Size: 116 KB
- Stars: 430
- Watchers: 26
- Forks: 23
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
ttycast: broadcast your tty!
============================This app allows you to broadcast your tty online, in really real time! Powered by:
* [headless-terminal](https://github.com/dtinth/headless-terminal) - headless
terminal emulator, forked from [tty.js](https://github.com/chjj/tty.js).
* [socket.io](http://socket.io/) - for real time communication
* [ttyrec](http://0xcc.net/ttyrec/index.html.en) - a tty recorder (and the [JavaScript port](https://github.com/jedi4ever/ttyrec.js))
* and also thanks to [Connect](http://www.senchalabs.org/connect/).Prerequisites
-------------Install ttyrec and ttycast:
npm install -g ttyrec ttycast
* The above command installs the [JavaScript port of ttyrec](https://github.com/jedi4ever/ttyrec.js), which is fairly new. If it does not work, you can also try the [native ttyrec](http://0xcc.net/ttyrec/index.html.en), which is available in most package managers (apt-get, Homebrew, ...).
Running (Broadcast & Record)
-------First, set your terminal to the size that you prefer to broadcast, then run the script:
ttyreccast outfile.tty
Open your browser and navigate to the server. You should see a blank black screen.
http://localhost:13377/
Then, open a new terminal of __the same size__ and run this command:
reset && ttyrec /tmp/ttycast
You should see your terminal screen on the web browser now. Recorded output goes into `outfile.tty`.
Changing Port
-------------ttycast uses the PORT environment variable but the default port is 13377
Running (manual way)
--------------------In your terminal emulator, create a named pipe and pipe it using `ttyplay -n` to ttycast.
mkfifo /tmp/ttycast && ttyplay -n /tmp/ttycast | ttycast -s 80x25; rm /tmp/ttycast
Open your browser and navigate to the server.
http://localhost:13377/
Then, spawn a new 80x25 terminal window and start recording:
reset && ttyrec /tmp/ttycast
Then you should see characters appearing in real-time. After using, don't forget to `rm /tmp/ttycast`!
Piping Via SSH
--------------You can install ttycast on your server somewhere, and pipe your
local terminal there through SSH!Good when you are behind a firewall.
ttyplay -n /tmp/ttycast | ssh myserver.dt.in.th PORT=12345 ttycast
Pipe Anything
-------------Um you can pipe anything that a terminal can understand to ttycast, and it will be broadcasted.
brew install sl
{ while true; do sl 2>&1; done } | ttycastLicense
-------The MIT license