This is a VT220 serial console (circa 1983) set up as a terminal for my Mac Pro (circa 2010), a nerdy dream I’ve had for a long time that I finally made a reality yesterday.
Some quick history: in the early days of office computers, it was rare that you would actually have one on your desk. Instead there might be a central mainframe (running Unix) and everyone would have a terminal that connected to it over a long serial cable or modem connection. One computer, many users.
The terminal has a keyboard and monitor, but it’s not a full computer and worthless without the mainframe. It’s more like a teletype machine, all it can do is display the text sent to it (like a paperless printer) and send text back. It doesn’t have any knowledge of pixels or colors or graphics of any kind.
In modern times we don’t have mainframes anymore, but Unix is more prevalent than ever. It runs on the servers delivering this page and the iPhone in your pocket. For developers and power users the command line has never gone away, but instead of a dedicated hardware serial console we have Terminal.app (with translucent backgrounds and anti-aliased fonts). The software is just emulating the old hardware, though. The protocols haven’t changed much in 30 years. The Unix underpinnings of OS X still have all the stuff required to use a real serial terminal, it’s just no one actually does it (well, almost no one).
I’ve always thought those old terminals were beautiful, and I’m not the only one—there’s a Mac app called Cathode that does a convincingly wonderful job simulating vintage terminals, using OpenGL to degrade things into a nice analog haze. But it’s not quite the same as the real thing…
Hardware terminals regularly crop up on eBay for around $100. They’re actually still used in a lot of places (old warehouse systems, supermarkets, banks) and there are still companies that support and refurbish them. Back at Vimeo we discovered one abandoned in a server closet when we moved into the office. Finding one isn’t a problem, the main challenge is stringing together the right adapters to use an ancient serial port with modern USB.
My biggest source of information getting this going was Paul Weinstein’s post about setting up an Apple IIc as a terminal for his Mac mini (which is similar, but not quite the same since the IIc still has to emulate the terminal in software). I got the same USB-to-serial adapter, a Keyspan USA-19HS ($27), which has Mac drivers that I can happily confirm work well with 10.7 Lion. I also needed a null modem cable ($7) and 25-pin female/female converter ($4) to connect it to my VT220.
At first I used the same method as Paul to get it working, gluing together the terminal and OS with a utility called screen. As Paul notes, this is less than desirable. It still requires you to open a software terminal to make the connection, and you’re still operating through a layer of emulation. On most Unixes you can simply add a line to /etc/ttys and everything just works via getty, but apparently this has been disabled in OS X since 10.5.
Eventually I found this page, which explains the problem and how to fix it. After adding a line in /etc/gettytab to manually set the terminal type to vt220-8bit everything works perfectly! A real hardware terminal directly connected the old fashioned way, with no emulation. Awesome.
If this is something you want to attempt yourself please drop me a line; I learned a lot about how terminals work over the last couple weeks and the final result is quite satisfying, a soft amber glow and one less window on my desktop. It’s also a nice reminder that we didn’t get to where we are overnight, user interfaces and software development have been evolving in an unbroken chain for a long time and some of the old ideas are so solid that they persist 30 years later. Why not use the proper hardware?
This is too awesome! I don’t think I would be quite committed enough to do it myself, though.