GithubHelp home page GithubHelp logo

happy-ferret / ttycast Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dtinth/ttycast

0.0 1.0 0.0 119 KB

Broadcast your tty to the world! Stream your live terminal session online. Powered by ttyrec, tty.js and Socket.IO

Home Page: http://me.dt.in.th/page/ttycast

License: MIT License

JavaScript 91.78% Makefile 0.42% CSS 2.51% HTML 3.95% Shell 1.34%

ttycast's Introduction

ttycast: broadcast your tty!

This app allows you to broadcast your tty online, in really real time! Powered by:

ttycast

Prerequisites

Install ttyrec and ttycast:

npm install -g ttyrec ttycast
  • The above command installs the JavaScript port of ttyrec, which is fairly new. If it does not work, you can also try the native ttyrec, 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 } | ttycast

sl!!

License

The MIT license

ttycast's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.