Archives / Search ›

Busy; Evening at Adler

Yes, I’m still alive. Between research (paper #2 got accepted, and I’m presenting it at HPCA in February; currently revising paper for publication, and incredibly excited about getting back to my current project), the class I’m TAing this semester (advanced introduction to operating systems, being offered for the first time with Linux kernel programming assignments), and other miscellaneous duties, I haven’t had a lot of free time. I did finally get to see Serenity at the Lorraine last weekend, and have been watching some anime (Honey and Clover is phenomenal), but that’s been about it for fun.

I’ll be in rhe Chicago area this Friday, Saturday and most of Sunday, ostensibly for a cool-sounding Mac event but also to meet a bunch of friends and acquaintances who are flying in for the occasion. Despite my proximity to Chicago I’ve only been there about once a year since moving to Illinois.

Some of that time I’ll be working, but if anyone wants to get together for a meal or just to hang out, let me know (leave a comment or email me).

1001Screenshot 1.0.2 released

Just a minor fix because 1001 1.0b44 gained a hyphen in its bundle identifier; it is now tv.kung-foo.1001 instead of tv.kungfoo.1001. Download here; requires Mac OS X 10.3 or later and, obviously, 1001 and a Flickr account.

And since I posted the original message about this, 1.0b45 came out. 1001 continues getting nicer; maybe I should actually use my real camera a bit more, instead of just posting screenshots and poor-quality phonecam pictures :-)

Now, off to install my new bike tires before I go to school.

(Doh, the link was broken; fixed. The new tire I installed survived the trip to school; so far, so good.)

Cisco VPN client installer destroys /opt

I haven’t seen this complained about very much, but see here. If you run recent versions of the Mac OS X Cisco VPN client installer, it will destroy the permissions on the contents of /opt, and turn /opt into a symbolic link to /private/opt for no good reason. I’m currently restoring my DarwinPorts setup from a backup.

Luckily, the one reason I needed to use the campus VPN is gone (dcsfiles.cs.uiuc.edu supported only SMB access, which is firewalled, and not WebDAV/SSL, which works now). Unfortunately, despite the usability of vpnc, I couldn’t get it to work on OS X; after a bit of minor source hacking, the tunnel would be set up and the routes established but nothing would go through it.

TextDrive moved; OpenVPN script revised

gilford.textdrive.com, the server hosting this weblog, is now in San Diego. I’m looking forward to less downtime now TextDrive has physical access to their servers; I couldn’t really have asked for a much smoother transition.

I revised my OpenVPN DNS script and the associated weblog entry earlier today; it’s now generic and should work unmodified as long as you’ve set up your server to send the right DHCP options. I’ve been getting a steady stream of requests for it, so I hope it helps some people…

Automatically setting $DISPLAY with NX

I do most of my research work on Linux, primarily with lots of X11 Emacs and OS X Terminal windows. I sit at my iBook, which doesn’t stay put network-wise or physically in any given day. Setting up my environment from scratch every time I need to start work in a new location is a huge time sink (in perception if not reality), so I’ve been doing some work to reduce this setup delay.

I can detach from my terminal sessions with screen as I’ve been doing for many years, but X11 is harder. In the past, I either used a local Emacs with TRAMP (for slow setup, slow synchronous file I/O, poor tolerance of network failure, and inability to do things like M-x compile), waited a long time for a remote Emacs to come up over SSH-forwarded X11 (for slow setup), or settled for Emacs running in a Terminal window (making, among other things, copy and pasting between OmniOutliner and Emacs very painful). VNC was out because it took over the entire screen, used lots of CPU, and was too slow over my home Internet connection; besides, I like being able to overlap X11 and Mac windows.

Thankfully, there is finally a good alternative: NX. It’s a primarily-GPL-but-with-commercial-pieces client/server X proxy system which massively speeds up X11, VNC and RDC traffic and reduces latency to the point that remote windowing is usable over a slow connection. As of version 1.5, it also provides detachable multiwindowed (rootless) sessions.

I’ve been using NX full-time for the past month or so, first with 1.4 which gave me “fast, detachable” (and windowed) or “slow, rootless” but not the best of both worlds, and finally this week with 1.5. The initial Mac 1.5 client was a bit broken, but the problems were in the open-source part of it, so Gian Filippo Pinzari from NoMachine was able to provide a patch in a mailing list post. I rebuilt the corresponding components, and everything works now! (Update, August 17: The official client as of version 1.5.0-106 now works without patching.) I even tried detaching my NX session from OS X, resuming on Windows, detaching from there, and resuming on Linux. Did I mention how fast everything is? I can hardly tell the difference between working at home and school now.

There’s also FreeNX, which is comprised primarily of shell scripts wrapping the GPL NX components. I used it before 1.5 came out. FreeNX has some advantages: more configurability, like being able to move my cache directory out of my home directory, since AFS tokens expiring can be a bit of a problem (I work around this with commercial NX using symlinks), and the ability to install as a non-root user. It also has some disadvantages: failures are difficult to troubleshoot, and I can’t get it to work with the NX 1.5 components. Commercial NX is downright cheap for a single user license, and the company is being incredibly generous with their support and code, so I plan to pay for it.

And finally, this brings us to some hopefully-unique information I have to add: a short zsh fragment I wrote so my display gets set automatically based on an already-open NX session. Since I don’t want any fancy desktop environments to start under NX—I already have OS X for that—the session is set to start a small terminal window which immediately goes into the Dock (rxvt -fn fixed -geometry 80x3 -iconic). After that’s set up, I head back to Terminal and ssh into the machine where my NX session runs, and this piece of my ~/.zshrc sets $DISPLAY for me:

  # use NX display if possible
  if [[ -z $DISPLAY ]] {
    nx_cache_dir=(~/.nx/C-$HOST-*(N:t))
    case ${#nx_cache_dir} in
      0) ;;
      1) export DISPLAY=unix:${${(s:-:)nx_cache_dir[1]}[3]}.0
         ;;
      *) echo '*** Potentially stale NX cache directories:'
         for i in ${(f)"$(cd ~/.nx; ls -ldt $nx_cache_dir)"}; do
           echo '***' ${${=i}[-4,-1]}
         done
    esac
  }

Then I start my screen session, and I’m ready to go.

In case you accidentally have some old session caches around, the script warns you it doesn’t know which one to pick; mostly, this was left over from when I was debugging NX problems (rant about GNU ls and cut‘s inflexibility deleted). Of course, you might have some legitimate reason for having multiple simultaneous sessions, too…

In other news, I’m using WordPress 1.5.2 now. The upgrade was pretty simple, though I had to be careful what I was doing (mv -i is your friend). I haven’t tested everything, so let me know if you have any difficulties with this site after the upgrade.

‹ Newer Posts  •  Older Posts ›