Tag Archives: opensource

The Game Grid is powered by Unix

I first saw the most recent Tron Legacy trailer when jwz posted the video a week ago.  I remem­ber see­ing the brief scene when the kid is look­ing at the com­puter con­sole and being mainly focused on the on-screen key­board.  “Oh yeah, I remem­ber that from the orig­i­nal Tron.  They had iPad key­boards long before the iPhone.” But that was about all I took away from the scene.  I watched the trailer again last night, this time in HD, and had to freeze-frame it on that scene,

This time, I focused on the con­sole win­dows.

This might be where I become “comic book guy” for a bit and geek out over minor details that mean lit­tle, if any­thing.  If you, your­self, are not a geek, please do not mind my geek­ery.

I can­not say that I know the mythol­ogy of the new movie (and if you do know, please do me a favor and don’t spoil) other than a lit­tle bit time­line from the Flynn Lives web­site for the Alternate Reality Game pro­mot­ing the movie.  According to the site, Flynn dis­ap­peared in 1989.  Presumably this com­puter is either the same sys­tem from 1982 (the orig­i­nal Tron movie) or a slightly upgraded one.  Given this infor­ma­tion, I find a few inter­est­ing things about this screen­shot:

  • The oper­at­ing sys­tem is “SolarOS.”  Given the graph­ics, I find it hard to believe this is the same Solar OS as some guy’s side-project, first released in 2007.  Given the time­line and its sim­i­lar­ity to Unix and X Windows, it’s most likely “SunOS” and/or “Solaris” (with the name changed by the movie folks to be not quite so bla­tant), although Solaris did not come about until... 1991? ...1992?
  • Given the lit­tle con­cen­tric boxes in the upper-right of each win­dow, X win­dow man­ager looks like twm or some vari­a­tion thereof.  (It’s been a while since I have used twm and remember/know lit­tle of its vari­a­tions or forks).
  • That win­dow in the back is run­ning top.
  • The thing eat­ing up the most process time is Xorg, an Open Source imple­men­ta­tion of X Windows.  I’m hav­ing dif­fi­culty com­ing up with a time­line for Xorg, but I’m pretty cer­tain it did not exist until mid-decade — cer­tainly not in 1989, in which case I assume some­body upgraded the com­puter since being installed in the secret back room of Flynn’s.  Maybe he has a ser­vice agree­ment and pays some­one to come along and upgrade the thing.  Or maybe he pops out into the real world for some air (and sys­tem main­te­nance) every once in a while.  Or maybe he just upgrades soft­ware from within the machine — although I’d imag­ine that would be a lit­tle wor­ry­ing if you were liv­ing inside the machine you were upgrad­ing.  Who would restore from backup?  And if you were in the machine, not inter­act­ing with it from the con­sole, why would you care what win­dow man­ager it runs?
  • There are a cou­ple of instances of watch.
  • Something called “ksof” — is that like lsof?
  • The game grid runs on 2.5G of mem­ory?  (This assumes, of course, that the Tron world is entirely con­tained within this sys­tem, and that it’s not just an inter­face con­sole to an even larger sys­tem some­where.)
  • Load aver­ages in the 0.6 and 0.7 range are a lit­tle high, but not hor­ri­ble.
  • Lots of things are run­ning with a “nice” value of –5.
  • The fact that there are “0 zom­bies” (zom­bie processes) is prob­a­bly pretty good for the folks in the com­puter.  I’m sure Tron Legacy would be a much dif­fer­ent movie with (un-)dead processes.

Maybe oth­ers can find inter­est­ing tid­bits, easter eggs, or anachro­nisms in the screen.  Sound off in the com­ments if you notice some­thing inter­est­ing.

Posted in: Movies Pictures

On Google Chrome (Mac, Linux, and nightly builds)

On Google Chrome

As you may have heard, Google is work­ing on a web browser called Chrome. There have been beta ver­sions out for Windows and Linux for some time. The Mac ver­sion is still play­ing catch-up. Because Firefox, the browser I now use, has appeared to get more slow and clunky over time, I fig­ured I would give Chrome a try. My main gripes with Firefox (on the Mac) are the speed, the startup/shutdown time, and the way it keeps eat­ing up mem­ory such that I have to restart it once a day (and con­se­quently wait for it to shut down, then start up again).

I started look­ing at the Mac ver­sion, but (at the time) it was a joke. There were no add-ons and no way to man­age your book­marks. You could book­mark all you wanted, and those links would show up in the menus, but if you ever wanted to edit, move, or remove book­marks, there was no way to do so. Because I had sim­i­lar per­for­mance issues with my Linux com­puter at work, I tried forc­ing myself to use it full-time there, first, because the Linux ver­sion was much more feature-complete.

Honestly, I have not looked back. In Linux (and pre­sum­ably Windows), it’s solid enough and fast enough that I find it a bet­ter expe­ri­ence than Firefox. It took me a lit­tle while to get the right mix of exten­sions, but this is what I’ve added to my Chrome instal­la­tion:

  • AdSweep for ad block­ing. I’m not con­vinced that this is the best ad blocker out there, as I have not looked at any oth­ers yet. All I know is that this was one of the first ad block­ers for Chrome and that it per­forms well enough that I have not needed to look for alter­na­tives.
  • FlashBlock is a click-to-play Flash blocker sim­i­lar to the one I use under Firefox. This pre­vents, for instance, YouTube videos and embed­ded music from auto-starting until I click on them.
  • Google Mail Checker for show­ing how many email mes­sages I have wait­ing in my inbox. I only use this under Linux. On the Mac, I have Google Notifier, which bet­ter inte­grates with the oper­at­ing sys­tem (com­plete with Growl noti­fi­ca­tion).
  • Google Reader Notifier is the same as above, but for Google Reader instead of Gmail.
  • Xmarks Bookmark Sync ensures that all of my book­marks across all of my com­put­ers are syn­chro­nized: the Linux box at work, the Mac lap­top I shut­tle between home and work, the Mac server at home, and the iPhone.  The exten­sion itself is a lit­tle bit prone to crash­ing on Chrome, but does not lose or man­gle data, and oth­er­wise works fine.
  • Amazon2Powells adds a link to pages on Amazon to the cor­re­spond­ing prod­uct at Powell’s. It lets me browse Amazon, hop on the bus, then buy locally.
  • A mod­i­fi­ca­tion of Google Reader Minimalistic (based on the orig­i­nal at UserScripts) that tweaks the fonts and lay­out on Google Reader a lit­tle more to my lik­ing than the orig­i­nal ver­sion.

I have been happy with Chrome on Linux for about three weeks now. I have been using a nightly Chrome build on the Mac for about two weeks and have been happy with that. In the inter­ven­ing time, Google release a new devel­oper pre­view of the Mac (adding exten­sion sup­port), but I am stick­ing with the nightly build for the fol­low­ing rea­sons:

  • Although exten­sions are in both the devel­oper pre­view and nightly snap­shot, book­mark edit­ing is not. Only the nightly has the Bookmark Manager menu item enabled.
  • The tab-to-search auto­matic locat­ing and using of search forms is unavail­able in the devel­oper pre­view, but works in the nightly. In Firefox, I had a spe­cial book­mark set up (basi­cally the Amazon search URL with “%s” in place of the search string, with the key­word “ama”) that let me type in “ama cheese” to find cheese on Amazon. With Chrome, after I have searched Amazon once, it remem­bers. All I need to do is type in “ama[TAB]cheese” to do the same thing with no pre­vi­ous spe­cial setup.

Oddly enough, one thing I’m miss­ing on Mac Chrome (and I feel weird for even say­ing this) is Java. In Firefox, I dis­able Java. I greatly dis­like Java-in-the-browser. As I men­tioned before, I use a light­weight note-taking appli­ca­tion called TiddlyWiki. It is, effec­tively, a self-modifying HTML file. In Firefox, it uses some fancy JavaScript (after ask­ing the user for per­mis­sion, of course) to write the file back to disk after mod­i­fi­ca­tions. Under other browsers (Safari, Opera, and Chrome), it uses some Java Applet trick­ery to do the same thing, since those browsers do not have the option to bust out of the JavaScript “sand­box” and write to disk with­out a bit of Java-assist. The prac­ti­cal upshot is that I can­not cur­rently use TiddlyWiki on the Mac ver­sion of Chrome because it blocks JavaScript file writes and doesn’t sup­port Java Applet file writes. This isn’t a huge deal-breaker at present — I open Firefox to edit notes — but is an annoy­ance that I hope will be fixed before I’d con­sider Chrome a com­plete prod­uct. And it works under Linux, so I doubt it is an inten­tional over­sight.

Overall, I would score Chrome as such:

  • Chrome under Linux: A–
  • Chrome developer-preview on Mac: D+
  • Chrome nightly (, 35604) on Mac: B
Posted in: Code Software

Pardon our dust –or– Netninja on Thesis

constructionAs you can tell by the ubiq­ui­tous ‘90s-era non­trans­par­ent ani­mated shov­eler graphic at right, Netninja.com has been under con­struc­tion this week­end. Everything looks fine now, but this is a warn­ing that there may still be some loose cov­er­plates hid­ing spark­ing wires. You see — today, I installed the Thesis theme engine for WordPress. What does this mean? For most folks, it means almost noth­ing. There is a slightly new look with a bit more spit-and-polish. Blog posts were shuf­fled to the /blog sub­di­rec­tory (http://netninja.com/blog/) and the website’s root (http://netninja.com/) serves as a bet­ter table of con­tents. Beyond that, lit­tle has changed.

“So, then, why’d you change?”

For this, we need to take a lit­tle his­tory les­son. Back when I started exper­i­ment­ing with WordPress in lieu of LiveJournal, about 3 years ago, I found a theme I liked. The term “steam­punk” was not in pop­u­lar use yet, but I liked the style and found a great free wood-and-brass WordPress theme. As WordPress matured over the years, releas­ing bet­ter ver­sions with more fea­tures and fancier user inter­faces, I dis­cov­ered the dirty secret of most free themes:

The major­ity of free themes are aban­don­ware, cre­ated once by a web designer for a one-off site or to expand her port­fo­lio and are never looked at again

As WordPress matured, the free theme that I was using did not. The fail­ure mode for this theme, and most oth­ers, was non-graceful. Each newly added fea­ture brought more quirky behav­ior from the theme. I finally aban­doned it, unable to find a suit­ably themed replace­ment, in favor of cre­at­ing my own. I started with the theme that came with WordPress and mucked around with its stylesheets using Firebug until I arrived at some­thing that looked rea­son­ably like the theme I had pre­vi­ously used.

This, too, worked great for a while. Then WordPress released a newer ver­sion with a newer base theme. As I recall, the biggest dif­fer­ence was with nested com­ments, but there were a sig­nif­i­cant num­ber of minor dif­fer­ences as well. I once again had to go through the exer­cise of migrat­ing my CSS changes from the old style to the lat­est. I had used that for a while and have been happy, but I now under­stand that ver­sion 2.9 is on the hori­zon and do not wish to repeat that exer­cise.

With that his­tory, I can now answer “why did you change to Thesis?” I run a num­ber of plu­g­ins on this site. Several of them have PayPal dona­tion links. I have even donated to a few of them. And yet, I see no themes with such dona­tion links and few (if any) free themes with an active, sup­port­ive, user­base. I have peeked at a num­ber of for-pay themes out there, but Thesis seemed the most robust and upgrad­ably hack­able (that is, hack­able with the least amount of effort each time WordPress and/or Thesis gets updated). Given the choice between spend­ing a lot of time fix­ing my theme each upgrade, not upgrad­ing, or shelling out some money for a pro­fes­sional theme, I chose the pro­fes­sional theme.

P.S. I know a lot of peo­ple hype the SEO aspects of Thesis. I appre­ci­ate that out of the box Thesis does its due dili­gence like putting the post key­words in the HTML key­word meta tag (some­thing that the default WordPress theme, sur­pris­ingly, does not do). However, I am not an SEO nut and am not excited by all the SEO options attached to each post.

P.P.S. One of the most vocal Thesis sup­port­ers in the PDX com­mu­nity is Aaron Hockley of Social Photo Talk. I am not a pho­tog­ra­pher, but I have fol­lowed his posts on Social Photo Talk because many of them make good blog­ging sense for non-photographers. If you click over to that blog and get Thesis through his yel­low affiliate-link ban­ner over there, I’m sure it will make him happy.

Shortening with YOURLS and Tweetie 2 for iPhone

A few months back, around the pos­si­ble demise of the tr.im URL short­en­ing ser­vice, there was a sud­den rise in pop­u­lar­ity with run­ning your own URL short­ener on your own bou­tique URL. That was when I set up Ninja Me (nja.me) using YOURLS. At the time, I reverse-engineered the undoc­u­mented API enough to hack Twitter-Tools to use that instead of bit.ly. (As a side­bar, Twitter-Tools has since added offi­cial hooks for the URL pro­cess­ing, mak­ing my inel­e­gant hack just that: an inel­e­gant hack. I need to write a real solu­tion soon.) The most recent ver­sion of YOURLS, 1.4, has fully doc­u­mented the API. Serendipitously, this comes at the same time that Tweetie 2 for the iPhone added cus­tom URL short­en­ing.


You can then com­bine the power of Open Source with the power of well-documented closed-source and use your YOURLS instal­la­tion with Tweetie. It is actu­ally quite sim­ple.


This post is specif­i­cally about the 1.4 ver­sion of YOURLS and the 2.0a ver­sion of Tweetie for the iPhone, but I assume should work (per­haps with minor mod­i­fi­ca­tion) for future ver­sions — try it and let me know the result! The browser screen­shots that fol­low are Firefox 3.5. If you are using Safari, you will see much of the same text, but minus the for­mat­ting and sur­round­ing tags. I have no idea what Internet Explorer will do, but I have pre­vi­ously seen it want to down­load XML as a file instead of dis­play­ing it. If in doubt, just use Firefox.

Determining Your Custom URL

Before you can con­fig­ure Tweetie, you need to deter­mine what URL to give it. If you feel con­fi­dent in your web skills, you can prob­a­bly jump to the end of this sec­tion for the final URL, oth­er­wise keep read­ing. The spe­cific URL is highly depen­dent upon your YOURLS domain name, instal­la­tion loca­tion, and login. It can be cal­cu­lated with a tiny amount of work, as you will see.

The cus­tom URL begins with the URL to where you have installed YOURLS. For me, this is “http://nja.me”. For you, it is another domain and may include a sub­di­rec­tory. Take this, and append “yourls-api.php” to the URL. To ver­ify, you can enter this URL in a web browser (for me, it is http://nja.me/yourls-api.php), and you should see some­thing to the effect of “Please Log In.” This is the base URL to which you will add some para­me­ters: your username/password, action, and for­mat.


Take that base URL and start by adding “?username=MyUsername&password=MyPassword”, of course replac­ing MyUsername with your actual user­name and MyPassword with your actual pass­word. You set this up when you first installed YOURLS, but if you have for­got­ten, it can be found by open­ing includes/config.php in a text edi­tor and look­ing for the sec­tion $yourls_user_passwords. (In my instal­la­tion, I have one username/password com­bi­na­tion I use inter­ac­tively and one I use for the WordPress and Tweetie API, but I’m extra para­noid like that.) If you paste this new URL into a browser, you should get a mes­sage about a miss­ing action if every­thing went cor­rectly.


If you see this mes­sage, then just append “&action=shorturl&format=simple&url=%@” to your URL. This will give you a final URL that looks some­thing like this (obvi­ously, with your own domain name, user­name, and pass­word):


Try past­ing that in your browser, but man­u­ally replac­ing that funny “%@” with, for instance, http://google.com:


This should print back a short URL that points to Google. If this is the case, you’re good to go.

Configuring Tweetie

  • Go to the top level “Accounts” screen in Tweetie.
  • Touch the “Settings” but­ton in the lower-left.
  • Touch the “URL Shortening” option:


  • Touch the “Custom...” option.
  • Enter the cus­tom URL you got from the above sec­tion. This is the URL with “%@” in it. Tweetie auto­mat­i­cally replaces that funny lit­tle two-character code with the URL to shorten.


  • Touch the “Save” but­ton.”

Test It

  • Get your­self a nice long URL. I opened Mobile Safari, typed “test” into the search bar, then copied the nice long result­ing Google URL.
  • Start a new tweet and paste the URL in there.


  • Select the “Shorten URL” option (in case you did not know, you can reveal that by touch­ing the mes­sage length counter in the cen­ter right of the screen). In a few sec­onds, you should have a short URL going through your ser­vice. If you did some­thing incor­rectly, Tweetie falls back to using bit.ly, so if you see a bit.ly URL, double-check what you entered as your cus­tom short­ener.


And that’s all there is. You now have Tweetie using your cus­tom URL short­en­ing ser­vice.

Posted in: Code iPhone Projects Twitter


Question IconDoes any­one have a good resource (I’ve seen sev­eral bad ones, but not a great ref­er­ence) that explains how to set up a free L2TP/PPTP VPN on a consumer-level OS X work­sta­tion? I’m not talk­ing OS X server, because that ships with server out of the box with a nice GUI con­fig­u­ra­tion tool. OS X work­sta­tion ships with the vpnd exe­cutable, but the man­page for it is a lit­tle sparse. It seems to require an undoc­u­mented XML plist con­fig­u­ra­tion file.

The ulti­mate goal here is to get a VPN tun­nel from the iPhone to a machine at home work­ing. From the lap­top to talk to home, I have a very hacky imple­men­ta­tion of PPTP-over-SSH imple­mented. I’d like to have some­thing less hacky, using the vpnd exe­cutable because I can reli­ably believe that it will get secu­rity updates with OS X dot-releases, and it just seems like “the right way to do it.”

Posted in: Dear Diary iPhone Questions

Apple Keyboard Fn

Apple Keyboard

After play­ing with the new Apple key­board for 5–10 min­utes at the Apple Store the other week (the sales folks were curi­ous as to why I was writ­ing what looked like code into a TextEdit win­dow), I decided to get one. The key spac­ing isn’t a big deal at all–they just squared the beveled edges on regular-sized keys–unless you hap­pen to be some­one who reg­u­larly hits the edges of keys (and if you do, you’re prob­a­bly not typ­ing cor­rectly any­way.) The “play” on the keys is the same as my lap­top, which is also nice–muscle mem­ory for only one “depth” of keys/keyboard. So I took it to work and hooked it up to my Linux box.

I pro­ceeded to set up key map­pings (swap­ping option and com­mand, for instance), until I hit a snag. The new Apple key­board has a “fn” key where the “Insert” usu­ally is on PC key­boards. It’s a “Help” key on Apple key­boards, so it’s nice that they killed off that key–it was too easy to acci­den­tally hit and spawn the helper appli­ca­tion.

Unfortunately, it looks like this key is hard-wired to other key com­bi­na­tions (the F1..F12 keys and their cor­re­spond­ing bright­ness, speaker, iTunes, dash­board, etc. func­tions.) It doesn’t look like it gen­er­ates a key­board scan code that can be trapped. This nor­mally wouldn’t be a big deal, but I use the “shift-insert” key com­bi­na­tion for one par­tic­u­lar oper­a­tion that I use con­stantly: past­ing text into a ter­mi­nal win­dow. Middle-click doesn’t always work (it depends on whether the text is in the X Windows paste buffer or the KDE paste buffer, so gives incon­sis­tent results), but shift-insert always does what I want... yet this key­board has no insert key!

Instead, I mapped that insert func­tion­al­ity to shift-delete (the key just under Fn), which does not make a lot of log­i­cal sense, but is a similar-enough and usable key com­bi­na­tion that it works well for me. I have been using this for a week or two now, and I like it a lot bet­ter than the Dell key­board I was using pre­vi­ously.

Posted in: Dear Diary Work

My Firefox Plugins

This is mainly for my own ref­er­ence, although I fig­ured the list could be ben­e­fi­cial to oth­ers. These are the plu­g­ins and Greasemonkey scripts I am using under Firefox. They’re also doc­u­mented (and updated) at http://stackoverflow.org/wiki/My_Firefox_Plugin_Setup

Posted in: Dear Diary

I vant to drink your blood

Octagenarian vam­pires took three flasks of my blood. I didn’t pass
out, but boy am I loopy. Going to OSCON as soon as I walk straight.


Sent from my iPhone

Posted in: Dear Diary


Eight years ago, I worked at a com­pany where I had both a Linux desk­top machine and a Linux lap­top.  The lap­top was the pri­mary machine — for cod­ing, doc­u­men­ta­tion, and car­ry­ing around to meet­ings (back when WiFi was cutting-edge tech­nol­ogy that few peo­ple knew about.)  The desk­top was the work­horse for large builds and a net­work file store.  At that job, I learned about a lit­tle appli­ca­tion called x2x.  It lets you share a sin­gle key­board and mouse between two X-Windows machines, sim­i­lar to a Keyboard-Video-Mouse switch.  When you drag the mouse off the edge of one screen, it appears on the edge of the neigh­bor­ing screen.  Effectively, you have what appears to be one large desk­top span­ning both machines.  It is not really a huge desktop–you can’t drag files across, but the paste­board works across the machines.

At the cur­rent job, I have a dual-headed Linux desk­top, with my PowerBook sit­ting off to the side (han­dling email, doc­u­men­ta­tion, and that sort of thing.)  I dis­cov­ered an app called X2VNC that does a sim­i­lar thing — giv­ing me a nice three-screen, two-machine “desk­top.”  From the X-Windows box, you can drag the mouse off-screen and on to the screen of a machine run­ning VNC.  It’s the same concept–the main machine must be X-Windows (and there­fore Linux), but the remote-controlled machine can be any­thing that runs a VNC server.  It mostly works, but there was a par­tic­u­lar case (when you use the mouse and key­board to remotely shut down VNC) in which the mouse and key­board are ren­dered inop­er­a­ble on the Linux machine and requires a reboot.  (Technically, no, you can ssh into the box and start killing processes, but still...)

The other day, a coworker (hi, Daniel!) pointed to an appli­ca­tion called Synergy that does the same thing, but is totally cross-platform.  Both the client and server can be run on all major oper­at­ing sys­tems: Windows, OS X, and Linux!  It also seems much more sta­ble than X2VNC.

Posted in: Software Work


powerpc-linux-gcc -I../linux- -I../linux- -D__KERNEL__ -m32 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -msoft-float -pipe -ffixed-r2 -mmultiple -mno-altivec -mstring -Wa,-maltivec -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -c -o cheese_main.o cheese_main.c
In file included from ../linux-,
from ../linux-,
from cheese_main.c:2:
../linux- warning: "CONFIG_HZ" is not defined
../linux- warning: "CONFIG_HZ" is not defined
../linux- warning: "CONFIG_HZ" is not defined
../linux- warning: "CONFIG_HZ" is not defined
../linux- warning: "CONFIG_HZ" is not defined
../linux- warning: "CONFIG_HZ" is not defined
../linux- warning: "CONFIG_HZ" is not defined
../linux- error: #error You lose.

Posted in: Code Work