Adding license and web html.
authorviric@llimona
Thu, 27 Sep 2007 00:22:51 +0200
changeset 53 07500c5c53cb
parent 51 da017c618a9c
child 54 65996505f0a9
Adding license and web html.
app_control.c
app_term.c
client.c
client_term.c
dump.c
error.c
eth_client.c
eth_linux.c
eth_proto.c
eth_server.c
filter.c
filter_string.c
filter_telnet.c
gen_sockets.c
main.c
server.c
signals.c
simple_math.c
tcp_server.c
test_filter.c
unix_client.c
unix_server.c
user_term.c
web/index.html
xterm.c
--- a/app_control.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/app_control.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <stdlib.h>
 #include <unistd.h>
 #include <assert.h>
--- a/app_term.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/app_term.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <sys/types.h>
 #include <unistd.h>
 #include <errno.h>
--- a/client.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/client.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
--- a/client_term.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/client_term.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <unistd.h>
 
 void send_to_client_stdout(const char *buf, int len)
--- a/dump.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/dump.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <stdio.h>
 #include <stdarg.h>
 
--- a/error.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/error.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,5 +1,5 @@
 /*
-    stdin mix - a mixer/multiplexer for stdin to processes
+    Terminal Mixer - multi-point multi-user access to terminal applications
     Copyright (C) 2007  Lluís Batlle i Rossell
 
     Please find the license in the provided COPYING file.
--- a/eth_client.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/eth_client.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    stdin mix - a mixer/multiplexer for stdin to processes
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/select.h>
--- a/eth_linux.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/eth_linux.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,5 +1,5 @@
 /* Copyright Coraid, Inc. 2006.  All rights reserved. */
-/* Modified by Lluis Batlle */
+/* Modified the original with BSD license by Lluis Batlle */
 
 #include <sys/types.h>
 #include <sys/socket.h>
--- a/eth_proto.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/eth_proto.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <netinet/in.h>
 #include <string.h>
 #include <stdio.h>
--- a/eth_server.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/eth_server.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/select.h>
--- a/filter.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/filter.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
--- a/filter_string.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/filter_string.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <stdlib.h>
 #include <string.h>
 #include "filter.h"
--- a/filter_telnet.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/filter_telnet.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <stdlib.h>
 #include "main.h"
 #include "filter.h"
--- a/gen_sockets.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/gen_sockets.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <unistd.h>
 #include <stdlib.h>
 #include <assert.h>
--- a/main.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/main.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,5 +1,5 @@
 /*
-    stdin mix - a mixer/multiplexer for stdin to processes
+    Terminal Mixer - multi-point multi-user access to terminal applications
     Copyright (C) 2007  Lluís Batlle i Rossell
 
     Please find the license in the provided COPYING file.
--- a/server.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/server.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
--- a/signals.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/signals.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,5 +1,5 @@
 /*
-    stdin mix - a mixer/multiplexer for stdin to processes
+    Terminal Mixer - multi-point multi-user access to terminal applications
     Copyright (C) 2007  Lluís Batlle i Rossell
 
     Please find the license in the provided COPYING file.
--- a/simple_math.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/simple_math.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include "main.h"
 
 int max(int a, int b)
--- a/tcp_server.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/tcp_server.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <stdlib.h>
 #include <assert.h>
 #include <unistd.h>
--- a/test_filter.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/test_filter.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <stdio.h>
 #include <string.h>
 
--- a/unix_client.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/unix_client.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <sys/un.h>
 #include <sys/socket.h>
 #include <unistd.h>
--- a/unix_server.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/unix_server.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <stdlib.h>
 #include <assert.h>
 #include <unistd.h>
--- a/user_term.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/user_term.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <sys/types.h>
 #include <unistd.h>
 #include <errno.h>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/index.html	Thu Sep 27 00:22:51 2007 +0200
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+	<title>Terminal Mixer</title>
+</head>
+
+<body>
+
+<h1>Terminal Mixer</h1>
+
+<p>This program can start processes inside a pseudo-terminal, which can be
+accessed through a Unix socket, TCP or even raw ethernet (using the ethernet
+protocol 0xCACA). The programs can be linked to the current terminal, or
+they can be unliked like in <em>nohup</em>. But even in this latter case you
+can connect to them using the mentioned protocols.</p>
+
+<p><em>tm</em> can also start programs as if they communicate through pipes
+instead of terminals, and this can be quite useful for remote-controlling
+applications.</p>
+
+<p>More than one client can connect to the served pseudo-terminal, either using
+<em>tm</em> as a client or <em>telnet</em> for TCP. You can choose if they
+are only allowed to read, or they can also contribute on input.</p>
+
+<h2>Download</h2>
+
+<p>Download the latest version (GPL licensed):
+<a href="tm-0.3.tar.gz">tm-0.3.tar.gz</a> - v0.4</p>
+
+<p>Look at the
+<a href="/~mercurial/cgi-bin/hgwebdir.cgi/tm">version repository</a> if you are
+interested in its development. If you can send any bug report, please
+do that at the mail address at the bottom of the page. I'd like this
+program to have as few bugs as possible, sure!</p>
+
+<h2>What can you do with it? Examples of use</h2>
+
+<h3>Share a terminal remotely</h3>
+Start <em>vim</em> cooperatively, using:
+<pre>
+tm -n 2 -p 3000 -t -x -w vim
+</pre>
+<p>Two [-n 2] users will be able to telnet to the port 3000 [-p 3000], and get
+the same <em>vim</em> terminal [-t] interface as you. They will be able
+to use vim [-w], not only look at it.
+The size of their xterms [-x] will be set accordingly to the size of your
+terminal. A nice feature of xterm!</p>
+<h3>Have a safe way of accessing a host, even if it has no IP address</h3>
+<p>Start a remote <em>bash</em> putting this in your start scripts:</p>
+<pre>
+ifconfig eth0 up
+tm -e eth0 -n -w bash &amp;
+</pre>
+<p>Then you can connect to it using another computer (as root), typing
+the MAC address of the serving host:</p>
+<pre>
+tm -e eth0 -c 00:14:85:16:B2:32
+</pre>
+<p>And you will have a non-terminal bash answering your requests. Don't
+<em>exit</em> from it, because the <em>tm</em> server will end.</p>
+<h3>Remote control for mplayer</h3>
+<p>Start a <a href="http://www.mplayerhq.hu/">mplayer</a> allowing remote
+commands with:</p>
+<pre>
+tm -w mplayer -slave voice_recording.mp3
+</pre>
+<p>Then you can send orders as simple as these:</p>
+<pre>
+echo pause | tm
+</pre>
+<p>Make your xbindkeys to map to these commands, and you can have a good
+control of your music playing.
+In fact I mapped <em>pause</em> to F1, and <em>go backwards 5 seconds</em>
+to F2, and I use this for transcription of voice recordings.</p>
+
+<h2>Manual</h2>
+<p>Look at its <a href="man_ts.html">manpage</a> (v0.4).
+Here you also have a copy of the help for the same version:</p>
+<pre>
+tm v0.3 - terminal mixer,  Copyright (C) 2007  Lluis Batlle i Rossell
+usage: ./tm [opts] [appcommand] [param1] [param2] ...
+ If you give _appcommand_, it starts the application and
+ serves it through a Unix socket on $TM_SOCKET or /tmp/tm-socket.UID,
+ unless '-p' is used.
+ Without _appcomand_, starts a the Unix socket client.
+options: 
+ -h     Show help.
+ -P     Run the child as connected to a pipe (default).
+ -t     Run the child as connected to a terminal (raw mode in client).
+ -n     Unlink the program from the terminal (as 'nohup').
+ -N MAX Serve at most MAX sockets for each transport (1 default).
+ -w     The remote clients can write to the application.
+ -C     The remote clients end will close app's stdin.
+ -p NUM Listen to tcp port NUM for 'telnet', and not listen to any
+        Unix socket.
+ -E     Echo remote input to the server terminal.
+ -e dev Also serve/connect using raw ethernet, device 'dev'.
+ -c adr Connect to address (MAC if eth).
+ -x     Send xterm's resize control string to clients.
+</pre>
+
+<h2>Thanks</h2>
+<ul>
+<li>To Pancake, who gave a spark for the general idea of this program,
+based on an initial <a href="../stdinmix">stdinmix</a>
+<li>To Raúl Salinas, for its support.
+<li>To the useful, although sometimes uncomfortable, UNIX interface.
+<li>To GNU, an ugly but working and helpful ol' UNIX implementation.
+<li>I took some bits from
+<a href="http://swik.net/cec">Coraid Ethernet Console</a> (BSD license)
+</ul>
+
+<address>Author:
+<a href="http://vicerveza.homeunix.net/~viric/">Lluís Batlle i Rossell</a>,
+viric_at_vicerveza_dot_homeunix_dot_net</address>
+</body>
--- a/xterm.c	Wed Sep 26 23:46:16 2007 +0200
+++ b/xterm.c	Thu Sep 27 00:22:51 2007 +0200
@@ -1,3 +1,9 @@
+/*
+    Terminal Mixer - multi-point multi-user access to terminal applications
+    Copyright (C) 2007  Lluís Batlle i Rossell
+
+    Please find the license in the provided COPYING file.
+*/
 #include <sys/ioctl.h>
 #include <termios.h>
 #include <sys/types.h>