Category Archives: Programming

Xauth Overload

The Story Of X:

  • In the beginning was xauth, a command-line utility that let you set which machines and users had authority to connect to your X windows display.
  • Then there was XAUTH, part of the authentication mechanism in IPSec secure connections.
  • xAuth, on the other hand, is variation on the OAuth protocol. It’s being proposed by Twitter as a more convenient way for apps to authenticate with online services.
  • And now we have XAuth, a platform developed by Meebo to allow one website to see which other online services you might be logged into.

Come on guys! It’s time to start using some other letters!

Otherwise, we’ll have to think of a way of pronouncing the different capitalisations, so that when geeks say to each other over coffee, “Why don’t we just use x-auth?”, they don’t then all go and implement incompatible things…

Good indentations

I saw and liked this Python / Google T-shirt at Opentech.
(If you don’t understand it, don’t worry – it’s a very geeky joke!)

VNC2DL

vnc2dl2Warning – for geeks only…

I’ve just posted an alpha version of VNC2DL on github.

This is a VNC viewer which uses the new Open Source library from DisplayLink to display a VNC session on a USB-connected display, rather than in a window.

Just in case it’s useful to anyone…

Mac Mini 9

My Mac Book Pro has a new baby brother. It’s a Dell Mini 9 on which, thanks to the instructions here, I was able to install Mac OS X.

I already had a properly-licensed copy of the OS, in so far as any operation like this could be properly-licensed. I ordered the Dell with 2G RAM, an improved webcam, a larger (16GB) SSD and a bluetooth module. Total cost: £277. Including VAT. And shipping. Oh, and a nice carrying case.

As soon as you pick the device up, you can tell from the construction that it’s not an Apple. But my first solid-state ‘Mac’ runs the OS really quite nicely. I had a vague idea that Apple software was only licensed to run on Apple-badged products, so I fixed that too:

However, there was one downside to the bargain special price I got from Dell. After ordering, I discovered that some varieties of this machine, such as those purchased from PCWorld or from Vodafone, have a 3G modem and a slot for a SIM. This doesn’t have it, and it would have been really quite nice. But then I might not have got some of the other upgrades, and since everything else, including a 3G connection via Bluetooth to my phone, seems to work fine, I’m really very happy.

wget for Mac OS X Leopard

Three years ago I compiled a version of the ‘wget’ utility so that it would run under Mac OS X and uploaded it to Status-Q. It’s had an amazing number of downloads, and I felt it was probably time to update it!

So here is a shiny new wget.zip, which contains the following:

  • the wget binary
  • the wget.1 man page
  • the default wgetrc configuration file
  • A README file telling you a bit more.

The main changes from the original version are:

  • it’s a universal binary
  • it’s the latest version of wget (1.11.4)
  • it’s compiled on 10.5.4 and may possibly not work on older versions – please let me know in the comments if it does!

Hope it’s useful! Here’s some more of my Apple-related posts, or you could always just subscribe to the blog – here’s the RSS feed !

SSH ProxyCommand

Here’s an exceedingly useful feature of SSH which I only discovered recently.

Imagine that you have a single ‘gateway’ machine on your network which you can connect to from outside using SSH; I do this all the time. You can then use that machine to connect to other machines inside your network in a variety of ways: using the port-forwarding abilities of SSH (the -L and -R options), for example, or simply by running another SSH command from the gateway machine once you’ve connected to it.

But there’s a much tidier way to do it, using the ProxyCommand option.

To connect to internalmachine.mynet.com, just add something like the following to your ~/.ssh/config:

Host internalmachine.mynet.com
     ProxyCommand ssh gateway.mynet.com exec nc %h %p

then you can ssh directly to internalmachine.mynet.com from outside. SSH will connect to the gateway machine and run ‘nc’ to forward the SSH session to the internal machine.

And, of course, you can use it for things layered over SSH, like checkouts from Git or Subversion repositories. Very tidy! I also sometimes add -C to the ssh command so that any access done this way is automatically compressed, even in situations where it was hard to specify that explicitly.

If you’re unlucky enough to find yourself stuck behind a web proxy with no other outgoing access, one very nice-looking use of ProxyCommand is the Corkscrew utility by Pat Padgett.

Hope this is helpful to someone!

Update: there are a few useful extra tips in the comments.

Build version numbering with Git

The ‘Git’ version-control system is used to develop the Linux kernel, amongst other things, and it’s the most powerful one I’ve used. (And I’m old enough to remember SCCS :-)) It takes some work to get your head around Git, but we’re now using it to develop our CODA system, and it’s been well worth it.

Michael came up with a nice way to number our build versions and has written it up on his blog – might be of interest if you’re using Git already.

If you aren’t, Randall Schwarz’s talk is a good intro.

Firebug

For those of us who do web-based development, Firebug must be the single most useful tool invented in a long time. I’ve used it for ages but I keep discovering new stuff it can do.

If by any chance you haven’t discovered it yet, go and get it now – it’s free. Any time spent learning your way around it is definitely going to be worthwhile. For some more advanced examples, you can watch Joe Hewitt’s talk, given last year at Yahoo.

CamVine is hiring!

Aha! You know things are really getting serious at CamVine now… we’ve just created an ‘Opportunities‘ page! Keep your eye on it!

The first post we want to fill needs somebody who really understands web applications and enjoys creating them, and who has excellent all-round software skills and IT interests.

I’ve been doing much of this development in the past, but I now have to concentrate on other things, so somebody else gets to do the fun stuff. Besides, we now need somebody really good!

Could this be you? More info here.

Subverting the Finder

Interesting – long after I had given up on there ever being further releases of SCPlugin, I discover that it’s still being developed and there have been two releases this year. (The previous one I’d tried was in 2004).

SCPlugin allows you to access much of the functionality of the Subversion version control system directly from the Finder, and adds badges to your icons to show the Subversion status of the files concerned.

Image resizing

Here’s a lovely demonstration and description of some excellent image-processing algorithms:

Building a Debian package using SCons

I wanted to do this and couldn’t find any examples, so I’ve posted some notes on how I did it.

© Copyright Quentin Stafford-Fraser