Linux Fu: Share Terminal In Browser

The title of this post says it all: GoTTY is a program that lets you share Linux terminal applications into a web browser. It is a simple web server written in Go that runs a non-GUI program and can push it out a socket in such a way that a browser can display it and, optionally, let the user interact with it.

With the emphasis on security these days, that ought to alarm you. After all, why would you want a shell running in a browser? Hang on, though. While that is possible — and not always undesirable — the real value to this technique is to run a specific command line program in a browser window. Here’s a use case: You want users to remotely monitor a system using top (or htop, if you are fancy). But you don’t want users logging into the system nor do you want to require them to have ssh clients. You don’t want to install monitoring tools, just use what you already have.

If you could get the output from top to show up in a browser window — even if the users had no ability to input — that would be an easy solution. Granted, you could just run top in batch mode, collect the output, and write it somewhere that a web server could find it. Assuming you have a web server installed, of course. But then what if you did want some other features like taking command line options or having the option for (hopefully) authenticated users to interact with the software? Now that would be more complicated. With GoTTY, it is easy.

Continue reading “Linux Fu: Share Terminal In Browser”

Teletype Machine Resurrected

A teleprinter is, at its heart, an automatic typewriter.  It’s electrically controlled and has some smarts to be able to decode an incoming message and has something that will move the keys.   These printers have been in use since the late 1800’s and [AethericLtd] have refurbished an old 1930’s design and given it a bit of steampunk flair.

As is common with older mechanical devices that have been sitting for extended periods of time, the first thing this machine needed was a bath. The machine was separated into its three main parts and soaked in a degreasing solvent. The keyboard was the dirtiest, so it got an overnight soak. Since little of the mechanism was electrical, most of it could be submerged which helped with the cleaning.

The next step in the restoration was lubrication. In order to do a proper job, the manuals (which were available online) were consulted and synthetic motor oil used for lubrication. Once all the hundreds of parts were oiled, [AethericLtd] started working on the wiring. The original wiring in this machine was called Deltabeston – a type of wire by General Electric which uses asbestos insulation. To play it safe, that wire was left alone. The selector magnet required only 4 volts to pull up, but 4 volts wasn’t enough to run the machine. The power supply used was a 120 VDC, 200 mA supply through a 2 KΩ, 10 W resistor.

Once everything was back together and working, [AethericLtd] could take machine out and show it off. The website describes not only the restoration process but also the setup, how to connect to the machine and how to communicate with the machine. Great work! If you are interested in these machines, there have been a few Teleprinter projects on the site before: this one has been modified to connect to a modern modem, and this one prints out tweets.

Continue reading “Teletype Machine Resurrected”

Demonstrating Baudot Code

Visualizing how electronic signals work can be difficult. A physical model can be darn useful in overcoming that difficulty. At a recent workshop entitled “Unboxing Black Boxes” [Julian Hespenheide’s] group created a device to show Baudot Code in operation. This amalgam of wood and Arduino they dubbed émile in honor of Émile Baudot (1845-1903).

Baudot developed his code to transmit telegraph signals from one machine to another, in contrast to Morse code which was principally for human communication. Both codes were used throughout the 20th century. For example, those big clattering, mechanical teletype machines use a minor variation of Baudot code.

Baudot is a fixed length code of 5 bits, as opposed to Morse’s variable length code. Morse has a separate code for each characters while Baudot uses “shift’ codes to change between alphabet and figure characters. For instance, a binary 11 would represent either an ‘A’ or a ‘-‘ depending on the shift state. If the shift code was missed the receiver would get gibberish.

In émile the Baudot code is sent by marbles. That’s right, marbles. There are five marbles, one for each bit in the Baudot code. Each marble rolls in a track toward the Arduino. How does the machine know which marbles to send? “Punch cards”! These are a marvelous aspect of the design.

Each card represents a code. Each position in the card has a gap to allow a marble to pass ( a set bit), or no gap to block the marble (an unset bit). The operator loads 5 marbles and a punch card and launches the marbles via a spring mechanism.

[Julian’s] really created a great visualization of Baudot code with this project! Take a look at émile in action after the break. Continue reading “Demonstrating Baudot Code”

Retrotechtacular: How To Teletypewriter

This week, you’re going to learn the ins and outs of the AN/GRC-46 thanks to this army training film from 1963. What is the AN/GRC-46, you ask? Why it’s a complete mobile-tactical sheltered radio-teletypewriter rig capable of CW, voice, and teletype transmission.

The film covers the components that make up the AN/GRC-46, their functions, the capabilities of the system, and proper operation procedures. There’s a lot going on in the tiny 1400lb. steel shelter, so each piece will be introduced from the ground up.

You’ll become familiar with the voltage distribution system and the AN/GRC-46’s included accessories. This introduction will be followed by a short course in RF signal transmission and the Frequency-Shift Keying (FSK) that is performed by the modulator. The ranges of both the transmitter and receiver are discussed, along with the capabilities mentioned before: CW operation using the keyer, voice operation, teletype operation, and reperforation of teletype tape.

Finally, you’ll observe a seasoned operator make contact and send a teletype message with movements so careful and deliberate that they border on mesmerizing. When he’s not sending messages or taking long walks on the beach, he can usually be found cleaning and/or lubricating the transmitter filter.

Continue reading “Retrotechtacular: How To Teletypewriter”

Retrotechtacular: Where The Linux/UNIX TTY Came From

retrotechtacular-tty-demystified

From time to time we realize that sayings which make sense to us probably will have no meaning for future generations. Two of the examples that spring to mind are “hang up the phone” or in a vehicle you might “roll down the window”. And so is the case for today’s Retrotechtacular. Linux users surely know about TTY, but if you look up the term you actually get references to “Teletypewriter”. What’s that all about?

[Linus Akesson] wrote a fantastic essay on the subject called The TTY Demystified. We often feature old video as the subject of this column, but we think you’ll agree that [Linus’] article is worth its weight in film (if that can be possible). The TTY system in Linux is a throwback to when computers first because interactive in real-time. They were connected to the typewriter-mutant of the day known as a teletype machine and basically shot off your keystrokes over a wire to the computer the terminal was controlling.

This copper pipeline to the processor is still basically how the terminal emulators function today. They just don’t require any more hardware than a monitor and keyboard. We consider ourselves fairly advanced Linux users, but the noob and expert alike will find nuggets and tidbits which are sure to switch on the lightbulb in your mind.

[Thanks Chuck]

Retrotechtacular is a weekly column featuring hacks, technology, and kitsch from ages of yore. Help keep it fresh by sending in your ideas for future installments.