all IRC, all the time

For a while now, I’ve been chasing the holy grail of IRC: running my own low-power, always-on server that I can connect to from anywhere. After 6+ weeks of uptime, I’m ready to declare my current solution a success. I’m running quassel-core (and other things) on a mini stick computer, and I can connect to it from home or remotely, by desktop, laptop, or Android device (by wifi or data connection).

There are plenty of ways to do this, but it’s taken a while for me to work it out, so I wanted to write it up.

TL;DR: Get at least a dual-core ARM device that runs Linux, install quassel-core and create a PostegreSQL database for it, then use Quassel on your computers and Quasseldroid on Android devices to connect. Use an SSH tunnel to the device when you’re away from your home network.

First, the device to run it on. Just about any ARM device that can run Linux takes care of the low-power part — a rooted Android phone, a Raspberry Pi, or some other mini Android or Linux device. If you can get Debian or some other full distro running (whether natively or as a loop device inside Android), you can probably run quassel-core. But you probably want at least a dual-core device for decent performance. Here is what I’ve tried:

  • Droid Incredible (1 Ghz single core, CyanogenMod with Debian running in a chroot): This worked moderately well, but it was not completely reliable. Every week or so on average, I would have to manually restart it, and it would often have an annoying delay between sending/receiving messages and them appearing in my clients. (I suspect this is an i/o bottleneck.)
  • Raspberry Pi (on raspbmc): Terrible delay, often topping 5 or 10 seconds. While some have reported running quassel-core without issue, others have found it unusably laggy. Anecdotally, this is probably the result of slow SD cards (like the class 4 I was using); I was also using SQLite, and never tested if PostgreSQL would perform better. If you want to try it on an RPi, try a lean and clean distro on a reasonably speedy SD card.
  • MK808B (1.6 Ghz dual core rk3066, Android 4.1 running Debian via ‘Lil Debi): This worked quite well, even while simultaneously serving as a device for Netflix and other apps on my TV. The downside is that the network connection would become unresponsive pretty often. (The connection was more stable when I didn’t use any extraneous apps, and I expect that a device like this would do great with a native Linux distro… if you can it running and get the wifi working. Some of the many similar devices have wifi working on native Linux distros.)
  • GK802 (1.2 Ghz quad core Freescale i.MX6, running Debian with a 3.0.35 kernel): This is my current device, which has been great. They go for $65-70 right now (I got mine on sale for $60 from geekbuying.com). While there are faster and more efficient quad-core sticks with rk3188 processors for a little less money, some of which have working Linux distros, I went with this one because Freescale has a reputation for good documentation and for playing nicely with the free software world, and because — similar to a Raspberry Pi — the “internal” memory is a micro SD card, so you don’t have to worry as much about bricking it. There’s a nice little Debian installer I used to get up and running, and you can also run Ubuntu on it pretty easily. After pinning udev, I was able to upgrade to Jessie without too much trouble. The class 4 micro SD card I’m using is probably the main system bottleneck, but it’s been able to handle Quassel just fine. Update 2014-09-12: You can get a more up-to-date kernel now. See here, particularly the links in the comments. And if you run into trouble, visit #imx6-dev on freenode IRC.

Second, quassel-core and the database. You’ll probably want the latest version, so on Debian you’ll probably want to use Testing (currently, “Jessie”). For the database, you should definitely use PostgreSQL instead of SQLite. SQLite will work well at first, but as the database grows it will take longer and longer for clients to connect and receive the backlog. Eventually, when my SQLite database hit about 180mb on my MK808B, it wouldn’t connect at all. With six weeks of Postgres so far, I’ve seen no degraded performance as the database grows. Unlike with SQLite, though, you’ll need to do some command line work before you can set up the client.

Third, the clients. The desktop Quassel client is available on just about any system, and you’ll need to use it at least to set up your database initially. Quasseldroid is the Android client, which I like a lot. There’s also iQuassel for iOS, which I haven’t tried. Even on a modest Android device, you can pull tens of thousands of backlog messages in a few seconds.

Fourth, remote connections. There are many ways you could connect remotely to your quassel-core, but the one I’ve been using is just to SSH into the device, so that I can restrict password logins and use only ssh keys. On my Ubuntu laptop, I do a socks proxy for the Quassel port, like this:

ssh -D 4242 root@<my-server-ip-address>

On (rooted) Android devices, I use SSH Tunnel by Max Lv, which lets you route individual apps through SSH. In that case, I tunnel the Quasseldroid app to the Quassel port on my server, and then set up the connection within Quasseldroid to “localhost”.

If you don’t have root, or you use iOS, or you just want a simpler setup, you could just allow connections from the Internet straight to your Quassel port.

All this may seem pretty complicated, but once you get it set up it’s extremely usable. (Any questions about the details, just ask.)

the use of Aaron Swartz photographs

After Aaron Swartz committed died by suicide in January, and in the months since then as issues of internet freedom and his own tragic story have continued to make news, there’s been a lot of demand for photos of Aaron. I had three photos of him up on Flickr and Wikimedia Commons, from a 2009 Wikipedia meetup.

(I went back to my archives and found several more from that meetup.)

When I got contacted by photo editors who wanted to use these photos, I tried to get them to follow the terms of the CC-BY-SA license. In two cases, Rolling Stone and New Republic, I got a chance to explain how to use a Creative Commons license in print. For most photo editors, free licenses are a big unknown, but lately (in my anecdotal experience) they’ve been more willing to use and follow the licenses than in years past. Here are the spreads.

Top: The New Republic, 11 March 2013. Bottom: Rolling Stone, 28 February 2013

I’ve tried to follow how these photos have been used online, as well, to understand how–and how well–freely licensed images are used by news websites. Of the 42  uses I’ve looked at there are:

  • 6 that follow the license, or come close enough. (If they include a link to the original on Commons or Flickr, I count it as close enough, since others will be able to find all the attribution and license info, even if the reuser isn’t following the license to the letter.)
  • 9 that provide attribution to me, but do not follow the license (ie, there’s no indication that the file is freely licensed).  Among these is the long Slate profile that is also sold as a Kindle ebook… but with no attribution in the ebook that I can tell.
  • 9 (most of which credit me) that add an illegitimate attribution to photo agencies: DPA/Corbis, DPA/Landov and such. Among them: Business Week, New York Magazine, New Scientist, and Bloomberg.com. Two from time.com did not initially credit me, only the photo agencies, but the credits were updated after @wikisignpost contacted them. A few others still don’t. I’m not sure how the photo got appropriated into (I assume) DPA’s collection, but they seem to be distributing it widely and internationally.
  • 18 that provide no attribution. In addition to the Amazon ebook version of the Slate piece, the more significant places that don’t use any attribution include the Boston NPR station, Democracy Now, and a Fast Company piece by the project lead of Creative Commons Brazil.

Probably the most interesting use is this mixed media derivative (unattributed, and with no free licensing that I can tell) from a Hungarian website. If anyone knows the language and wants to try to get them to release it under a free license, please do.

UPDATE

The time.com writer put me in touch with their photo editor, who sent me a screenshot from the Landov website, showing how my photo appears in the photo licensing database.The last part of the Caption section reads:

Photo: Sage Ross (Editor’s note: usable only under consideration of Creative Commons Lizenz CC-BY-SA 2.0 and will full reference) DPA/LANDOV

But the Comments/Restrictions section is blank, and the Photographers/Source line that news orgs would typically use just says SAGE ROSS/DPA/LANDOV. So basically they are charging news organizations for this photo and hiding away the fact that it’s not their photo to license in the normal way, and that if their customers want to use it, they actually have to follow the same rules as everyone who gets it for free from the original source.

I would ‘preciate that

I had an adversarial relationship with Brighton all morning. He’s been a little whirlwind of destruction.

I turn my back for one minute…

I finally drew a line and insisted that he pick up the cards and pieces of Candyland that he’d scattered through the hall.

“Can I have some mango?”

“No, not until you pick up Candyland.”

“I’m not hungry.”

And so on. After extensive pouting and pretending to nap and semi-voluntary confinement to his room and plenty of whining, he comes up to me.

“Daddy, would you help me pick this up? I would ‘preciate that.”

Aaron Swartz

I didn’t know Aaron well, but I admired him deeply. The remembrances at Remember Aaron Swartz give a picture of just how much he meant to so many people.

These photos are from the last time I saw him, at a small wiki meetup in Boston in 2009. In my favorite, he’s huddled around a screen with SJ and Mako, and they’re all geeking out over these videos of procedurally generated educational games and and books that are written with Word macros. His passion was infectious and beautiful.

Use a spare Android phone as an always-on IRC connection.

I ordered a Raspberry Pi (which should arrive in a few weeks), and my first project was going to be to set it up as an always-IRC connection using quassel. I use IRC regularly, usually from my desktop, but I don’t like leaving my 200w computer running all the time. (The electricity cost adds up quickly!) . If not for IRC, I’d set it to hibernate after 10 or 15 minutes of inactivity. Then I realized, why wait until I get the Pi? I’ve got my old Android phone (a Droid Incredible), which could serve just as well. Now I’ve got a quassel-core that I can leave on all the time, which runs on about 2 watts! It’s pretty easy, if you’ve got a rooted android phone you aren’t using.

First, install a standard Linux distro on the phone. I did this using Debian Kit, which let me put Ubuntu 12.04 on without much hassle. Just follow the instructions.
Then, within your Linux terminal, run:

apt-get install quassel-core

That should get you everything you need. To start it, just run:

quasselcore

Then plug in your phone and turn off the screen, and it’s ready to set up as your always-on IRC connection. (You need to be connected to your wifi network, and the phone should be set not to sleep, so that it maintains the connection.) You probably also want to follow these instructions to set up SSL, especially if you run an open wifi network at home. They worked for me verbatim; just run this before starting up quassel-core:

openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout ~/.config/quassel-irc.org/quasselCert.pem -out ~/.config/quassel-irc.org/quasselCert.pem

Find out the local IP address of that phone, and then you can run a quassel-client (not a quassel monolithic build, which combines the core and client into one program) on any or all of your computers on the same network. You’ll need to use one of the desktop clients (Linux, Windows, or Mac) to begin, and at the first connection it’ll let you set up an administrator account. Once you’ve created that account, you can also log in from other Android phones using Quasseldroid. (It can’t set up the initial account, though.)

After that, as long as quassel-core is running, you can use whatever computer you have handy to chat on IRC, everything that happens while you are offline gets synced each time you connect to the core. This is how IRC is supposed to work!

UPDATE: 2013-06-04

I used quassel-core on my Droid Incredible for almost six months. Most of the time it worked pretty well, but at times the lag (for my own messages to reach IRC, and for others to reach me) was a problem. I recently tried setting it up on my Raspberry Pi (running it in the background on a Raspbmc system), but I experienced the same severe lag as noted on the RPi forum (actually, worse in many cases).

I’m now running it on an MK808B Android stick (which I also use for Netflix and other media on my TV), using the same method as above. This dual-core Android stick has been really snappy with quassel; backlogs load very quickly (on both the desktop client and Quasseldroid) and there’s no noticeable lag.

One thing I didn’t note above is that with Debian Kit, dpkg may report a problem when quassel-core is installed, but it will still work. (I didn’t notice this during my first installation, although it may have happened. But I tried recently on several different Android devices with both Debian and Ubuntu installations, including using other methods than Debian Kit of running Linux, and I get an error every time.)