It's user error.

Try Inferno without Installing It

The thing I said here is actually a really real thing. Inferno’s usually easy enough to get up and running. There’s some mkfile tweaking, sometimes there are some platform-specific bugs, you’ll have to adjust your path, etc. It can be a bother. It’s definitely worth it, but you can’t tell that until you go through the effort. Downloads that take three minutes are annoying to people nowadays, and this is 10 minutes of tinkering and compiling. I mean, a friend of mine had to harass me repeatedly for me to get Go installed, so I understand your pain.

So here it is, Inferno that you can just use without even downloading it.

“Stop Jabbering at Me and Get to the Instant Gratification!”

You’ll need a VNC viewer. There are lots of those, all over the earth and with no monetary cost to you. There are free VNC viewers for very nearly every platform. Even “mobile” devices have clients: my phone has one, iOS has free clients, Android has free clients. (You’ll probably be hurting inside Acme without a three-button mouse on those OSs, though.)

Update (2015-08-25): You don’t need a VNC client

Well, you don’t need to install one. Websockets and canvas tags. You can run it in the browser now by visiting There are more details in another entry.

How to Connect:

Connect your VNC viewer to, port 60666. This is different from the standard VNC ports, so some of them need weird syntax like double colons to specify an actual port.

RealVNC or TightVNC (Unixes)


TightVNC (Windows)

Put into the box where it asks you what host to connect to.

wm/vncv (Inferno)

wm/vncv tcp!!60666

If you’re doing this, I like that you’re using Inferno to get access to a slow, buggy Inferno over VNC. Keep on rocking.

Chicken of the VNC (MacOS X)

I don’t have a Mac, unless you count the semi-operable G5 tower I bought a couple of years ago. It doesn’t have OSX on it, because Apple no longer sells a version of OSX that runs on PowerPC and I’d rather see if I can get Plan 9 to boot on it than convince balky hardware to accept an obsolete version of a closed-source OS. Also the video card is messed up.

I have received some instructions for OSX from Christian Wright and Christopher Small. You can set the host field to as shown below:

Thanks, Christian Wright!

Or you can set the host field to and the display number to 54766 (i.e., 60666 – 5900) as shown below:

Thanks, Christopher Small!

Browser-based Clients

You’re welcome to try. I could not find any that worked.

Also How Does One Implement Such a Thing?

I’d been kicking around the idea of doing something like this for a long time, but I was a bit stumped because I had been trying to figure out how to make it work in the browser. There’s a Javascript library for 9P, everything was looking like a lot of work. Eventually VNC occurred to me, and everything fell into place from there. In all, I spent maybe an hour or so on all the code. The server itself took about 15 minutes. Writing the survival guide that pops up when you log in took longer, and then this sloppy blog entry took a small amount of time to dash out. Overall, pretty happy with the return on investment.

The Server Proper

There’s a listener running in a non-stripped Inferno on the machine you connect to:

listen -A -v 'tcp!*!60666' { os xvnferno & }

The xvnferno script has to live inside Linux for now, in order to get to Xvnc. It starts up a new instance of Xvnc, runs the stripped-down Inferno using that as a display, and then uses the P9P version of dial(1)‌ to hook that VNC server’s socket to the scripts stdin/stdout, which, since it’s run by the Inferno listen command, has its stdin/stdout connected to the network. Obvious in retrospect, but I should patent it!

Hacks to the OS

I hacked /emu/port/devfs-posix.c, specifically to disallow attaches to the host filesystem. If you are familiar with Inferno but that didn’t make any sense, I’m talking about allowing #U (which emu needs for the root FS) but disallowing #U*/. I also prevented os from working by tweaking /emu/Linux/emu to leave out the file that provides #C.

I had to tweak some of the colors in Acme, because the monochrome color palette rendered highlighted text and regular text indistinguishable. I made a number of tweaks to /lib/wmsetup, to do some initialization, and then added a nasty hack to make them run only once. I’m too embarrassed to put said hacks here, so you’ll have to look at them yourself.


I toyed with having /emu/port/ipif-posix.c redirect all outgoing connections to localhost, but ended up going with iptables to avoid adding weird behavior to the networking code in Inferno:

iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -s -j ACCEPT
iptables -P OUTPUT DROP

Essentially, that allows incoming connections and forbids outgoing ones, except to localhost. There’s an Inferno registry running on the box, so the people connected can have some sort of voluntary, structured, ad-hoc interaction.


Well, I think I’ve got a reasonable expectation that things will stay safe. The VMs are restricted enough that they can’t escape the filesystem they’re in. I also restricted outgoing net access, which is kind of a necessary evil for cases like this where I’m giving out free, anonymous VMs to the general populace. I don’t need my public IP getting blacklisted as a source of spam, or to turn into a node in a DDoS or anything.

The main problem this presents is that the way it handles networking is kind of a really important feature of Inferno.

It’s Broken and Sucks!!

It very well might be when you read this! There are issues for scaling here, among other things.

The Dis VM has limits for memory usage (to prevent runaway processes). Simultaneously running wm/memory, Tetris, the Mandelbrot viewer with fill off and depth 1000, math/ack to calculate an Ackermann(4,4), Acme, a naive (fib 30) in the Scheme interpreter, a couple of shells, Vixen, and a date widget, the VM grunted and strained and pegged the CPU but didn’t max out the memory for quite some time, and I was able to spawn new VMs just fine, even with the CPU pegged.

I hit a few problems when I tried to spawn 100 of them at the same time, and some of them got lost. I played a little with a random backoff and a load-based delay, and got some good results, but hitting 1,000 simultaneous attempts to spawn started losing VMs. I stopped there, because I figure that if there is enough interest in Inferno to have a thousand people try to play with a semi-crippled version of it at the same time, that’s really cool. I haven’t even attempted to account for being DoS’d, but this isn’t exactly Critical Internet Infrastructure since it involves no pictures of what people are eating or .gif’s of cats. In the event that someone does, here’s my first line of defense:

(This illustration of DMR blowing a raspberry is by John Klossner, from The Unix-Haters Handbook. Used totally without permission.)

My second line of defense is to just kill the service and come up with a better first line of defense.

Is This the Inferno Room?

Yes it is.

In case you were wondering what it is you are looking at, that’s Michael Keaton in a green wig, excited and dancing outside an Inferno-themed place of some sort. It was the 80s. You had to be there.

“Where’s that Map/Reduce Thing You’ve Been Claiming You’ll Put Up?”

Where’s your Map/Reduce thing, turkey?

Okay, seriously, though, I need a few days to sit down and hack on it, and I have more or less been working seven days (and a few nights) a week for a while. Getting a consulting business off the ground, as a method of funding some of the more interesting projects. That’s another story, and it might be interesting enough to congeal into a blog post or two eventually, but suffice it to say we’re doing okay but slightly short on sleep and recreational hacking time. Overall, no complaints.

So a large part of the Inferno stuff I’ve been doing has been little scripts to do highly boring things like “track billable hours”, “generate itemized invoices” and “make Acme talk to Ruby and PostgreSQL”. Little scripts rather than Big Things like Map/Reduce or getting competent enough at yacc to do a port of awk to Inferno. There might be a blog post in there if I write enough of these little hacks.

If you’re interested in a semi-preview, aside from the previous post about building a cluster, there’s Geryon, which is more or less a translation of Google’s Map/Reduce into Inferno. What I’m doing is closer to PVM3, sort of.

Hacker News

I’ve posted this on HN. So far, whenever I do that, the resulting discussion is interesting enough to be worth the trouble, so I guess thanks, Hacker News.

Update (2013-04-07)

I got some pretty good feedback! Thanks! I also received CotVNC instructions from a couple of people with Macs (Christian Wright and Christopher Small); I’ve updated the OSX section. Thanks, guys!

Tags: inferno

<< Previous: "Interlude: Inferno at Work"
Next: "Making Music with Computers: Two Unconventional Approaches" >>