JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Add commandline args for term dimensions
[watch-my-terminal.git] / README.md
1 Intro
2 =====
3
4 watch-my-terminal is a little utility that enables people to watch your
5 terminal using just a web browser. This is achieved by having ``script`` send
6 its log to a tiny web server (thank you node.js) with realtime updates helped
7 along by the socket.io library.
8
9 The terminal emulation is far from complete, but sufficient to correctly render
10 vim (with color, etc), less, man, ls --color, etc. when run in
11 rxvt-unicode-256color
12
13
14 Install
15 =======
16
17 To run watch-my-terminal, you'll need coffeescript and a node library called
18 socket.io. socket.io depends on several other node libraries, so it's
19 recommended to install it with npm. 
20
21 1.      Install coffeescript and npm with your package manager. On debian-family
22         distros that would look something like this:
23
24                 apt-get install coffee-script npm
25
26 2.      Download socket.io (into a sub-directory of this folder.) First make sure
27         you cd into the watch-my-terminal directory (where you should see the
28         package.json file for watch-my-terminal) and then execute:
29
30                 npm install
31
32 The other dependency is "script" which in installed by default on pretty much
33 all Linux installations. I've heard that there is an old BSD version which is
34 incompatible.
35
36 I have only tested this on debian unstable. Please contact jason@jasonwoof.com
37 if you are aware of what different or additional steps are required for other
38 systems.
39
40
41 Configure
42 =========
43
44 You can set the http port and default terminal dimensions by editing
45 server.coffee
46
47
48 Run
49 ===
50
51 To start making your terminal viewable, cd to this directory, and run:
52
53         ./run.sh $COLUMNS $LINES
54
55 Then test that it's working by opening up http://localhost:2218/ in your
56 favorite web browser (assuming your favorite web-browser does javascript.)
57
58 watch-my-terminal listens on all your ip addresses by default, so your terminal
59 contents are now accessible to the whole network. Also, you can replace
60 "localhost" in that link with something that points at your computer, and share
61 the link with others on your network (or the internet if you're not
62 firewalled.) If you are firewalled, check out the -R option of ssh.
63
64
65 Feedback, Questions, Bugs, etc.
66 ===============================
67
68 Please direct your questions, statements, interjections, etc to the author:
69
70         Jason Woofenden <jason@jasonwoof.com>