(Historical note Sep 2008: The 'ec' script below is no longer (or shortly will not be) required, as there is now a patch that enables emacs as a frameless daemon)

(Historical note May 2008: This post is now over a year old. Multi-TTY Emacs is now part of the main Emacs CVS tree. Most of this post is still applicable, but the build instructions are very much out of date and for the most part are unnecessary as the multi-tty patch has now made it into most distros. It should just be an 'apt-get install emacs-snapshot' away)

Multi-TTY Emacs is one of the most useful peices of software I've seen in a long time. Emacsclient, the underlying interface for multi-tty, has been around for a while. It allows someone to connect to a long running Emacs session and it avoids the long startup time Emacs usually has. However, it only works in a graphical environment. Multi-TTY Emacs allows us to do the same from either a graphical environment or from a simple terminal (tty).

Here's a typical use case: I'm at home and I'm using Emacs from within X-windows. I'm using the wonderful IRC client, ERC, and asking a question in #python, #emacs, #gentoo etc. but no one seems to be paying any attention and no one is answering my question right away. Oh well, it's time for me to head off to class or work. I leave Emacs running at home but since I forgot to enable chat logs, it's rather difficult for me to connect remotely and find out if anyone has responded to my question. With Multi-TTY, I can ssh into my home computer and bring up Emacs in a text console and check my ERC buffer even though I originally started Emacs graphically from X-Windows. Neat.

Multi-TTY is contained in the CVS version (23) of Emacs. Version 23 is still a (tiny) bit rough around the edges, so don't blame me if while using it it deletes all your files and destroys your life in general. It won't, but caveat emptor. I am now running multi-tty on Gentoo and Ubuntu Feisty Fawn. Here's how:

Gentoo

On my laptop I run Gentoo Linux. Getting the latest version of Emacs on Gentoo was a breeze! :

GTK support is explicitly turned off as it causes problems with multi-TTY. This is no biggie for me as I always have (menu-bar-mode -1) and (tool-bar-mode -1) set.

Emerge: sudo emerge emacs-cvs -va

Tell the system to use the new emacs: sudo eselect emacs set emacs-23-multi-tty

Ubuntu

Ubuntu was much more difficult to setup correctly because the repositories don't have the CVS version yet (emacs-snapshot is 22). So, I've compiled it from source myself and once I clean up my instructions I will publish a HOWTO as well as my .deb package.

Usage

Connecting to an already running emacs session is quite easy:

In the main emacs session run M-x server-start

Now just run emacsclient -c and you should see a new window pop up that has all the exact same buffers. If you are on a non-graphical terminal you'll likewise get the same emacs session albeit in text mode.

Running preload_emacs -s ryan will now create an emacs server named 'ryan'. It loaded emacs in a screen session so that it will be able to be a long running process (Emacs apparently cannot run without an interface, hence we run it in a screen session to hide it away out of sight.)

To connect, we run emacsclient -c -s ryan. Typing plain old emacs here will load an entirely new Emacs session, which isn't really what we want. To make it a bit easier I created a shell script called "ec" that will load an emacsclient with these settings automatically:

So as soon as I read about the HD-DVD processing key being hacked I ordered up a new domain name because I thought it would be a neat way to spread the word about HD-DVD liberation. That was April 30th. I had no idea what was in store for us all on May 1st, the day of the so called "Digg Revolt". That was something that took me by surprise. And what a wonderful, crazy surprise that was!

Yesterday, I got an email from Alex Pham from the LA Times asking for an interview, so I called in. Alex and I talked for 10 minutes about my views on the AACS DRM, the digg revolt, and my new domain name purchase. I tried to make it clear that I was not advocating piracy, but rather about awareness of the horrendous piece of legislation called the DMCA.

However, the story got it wrong. Discovering the HD-DVD processing key is *NOT* about piracy. Professional pirates don't gain anything by the discovery of a processing key. You don't need the processing key in order to make a bit for bit copy of an HD-DVD to sell on the streets. Although it's true that the key can be used for piracy, its main intrinsic value remains movie playback. So if this isn't mainly about piracy, what is it about? It's about licensing. The movie industry wants full control over which movies I watch, when and where I watch them, and what 'approved' players I use to view them with.

I use Linux. Exclusively. I don't even own a copy of Microsoft Windows. Since Linux is composed of free software, do you think that there is some free software that can play HD-DVDs (before the DRM was cracked)? Nope. If I want to watch a movie that I legally purchase from Wal-Mart on my laptop, who's the MPAA/AACSLA to tell me that I can't? By encrypting the contents of the disk, they are essentially telling me that they don't want me to watch the movies I legally purchased from them. And yet, do they have that right? I don't think so. They haven't made me sign any licensing agreement. When I buy an HD-DVD from Wal-Mart, I buy it like I would buy a case of Coca-Cola, and there's absolutely no implied licencing agreement for that. With movies, you don't even see the shady tactics that computer software uses, such as "Shrink-Wrap" licencing agreements, where you don't know what you're agreeing to until after you purchase the software and unrwrap it.

If I pirate a movie, and the MPAA or whoever the rightful owner is catches me, then prosecute me for stealing your work. That at least has the resemblance of legality, but don't tell me that I can't tell people how to play the movies that they rightfully own. I'm not stealing anything from anybody by doing so.