gems: broadcast your terminal
January 10th, 2007 edited by lucasEntry submitted by Martín Ferrari. DPOTD needs your help, please contribute !
Gems is an unknown, little, but efficient program which enables you to broadcast what is seen in your terminal to any number of clients. It’s great for technical lectures and talks, where people often has to make an effort to see what are you typing in the projected screen. It is terminal-agnostic, communicates by any TCP port using very little bandwith and no CPU power, and obviously, it’s free software!
It is very easy to set up, there is no configuration at all, apt-get it and you’re ready to go. In the master terminal, launch the server, optionally specifying a listening port and maximum number of connections (defaults to 6666 and 25, respectively, see the man page for more information), and immediatly you will be given back a shell:
teacherhost:~$ gems-server -port 9999 gems-server initialized. gems-server: warning: terminal size is greater than 80x25. teacherhost:~$ cd tmp teacherhost:~/tmp$ PS1='Hello world class:\w\$ ' Hello world class:~/tmp$ Hello world class:~/tmp$ ls test.c Hello world class:~/tmp$
Gems warns you if you are using a big terminal, because clients won’t be able to connect if they have smaller terminals. To connect to a server, just specify address and port:
pupil1:~$ gems-client teacherhost 9999 gems-client: Connection established -- Press 'q' to exit. Hello world class:~/tmp$ ls test.c Hello world class:~/tmp$
When a client connects, he sees only what you type after the connection is made, no screen status is maintained. This is key to its simplicity and compatibility with any type of terminal, but you will have to force screen refreshes as new clients connect (usually just pressing ^L). In this example the client connected just before the ls command was issued.
This is a screenshot of a gems session with clients in the same computer, the focused terminal is the server. You can have different terminal sizes for clients and server as long as the server terminal can fit in the clients.
Links:
- Homepage of the project. It has not seen development lately, but it seems to Just Work(tm).
gems is included in Debian and Ubuntu since respectively Sarge and Hoary.
January 10th, 2007 at 5:57 am
Very useful. Thanks.
I remember having to do this by ‘tee’ing the output of my screen editor into the ttys of students. Not flexible but those were old days and I thought it had some hack value. :)
January 10th, 2007 at 9:57 am
Is there something to record and play a terminal session !?
January 10th, 2007 at 10:39 am
I believe you can do exactly the same thing with screen.
January 10th, 2007 at 10:40 am
’script’ records your session atleast, ‘cat’ for playback? :P
January 10th, 2007 at 11:10 am
There is debian package.
http://packages.debian.org/stable/misc/ttyrec
it do record of tty and you can play with ttyplay included in package.
January 10th, 2007 at 2:18 pm
S: gems include calling script as an option.
Spook: you need to all people be logged in the same machine with the same user to use screen like this, as far as I know.
January 10th, 2007 at 4:17 pm
Sure it is different beast but since bandwidth is cheap this days I prefer VNC - then you can run as many terminals inside as you need.
January 10th, 2007 at 9:43 pm
Tincho: You can have multiple users connect to a screen session, but they do need to be logged in on the same machine. However, it can be a pain to set up and setting it up incorrectly can give the other users access to your account.
January 11th, 2007 at 9:30 pm
That is a very cool tool. In these days of bloated GUI applications this is a little gem.