SSH trick

A while ago, I wanted to copy some stuff from my laptop to a machine behind a proxying firewall.

Very quickly, I got sick of copying something to the firewall, logging in, then copying to the final machine, so I put together a small ssh proxy script that would log into the firewall for me when I requested the dest machine (sunshine), and then use nc to connect to sunshine.

But, the problem is that sometimes I carry my laptop into the house where ‘sunshine’ lives, so I extended it to become the script ssh-through-fw

With that script in an appropriate location, I add this to my ~/.ssh/config:

host sunshine

ProxyCommand $HOME/.install/bin/ssh-through-fw 192.168.1. user@firewall %h %p

Where 192.168.1. is the prefix of the IP range used in the network behind the firewall.

Now, when I am running remotely, connecting to sunshine happens through the firewall, but when I’m behind the firewall it connects directly to the machine without me thinking about it.

Mono in Barcelona

Went to Miguel’s Mono Talk at the university last night.

Nothing too unexpected in the talk, but it was nice to hang out with a bunch of Free Software Barcelonians that I’ve never met.

As an added bonus, during the talk I discovered some brain-dead code in our GStreamer GstAdapter that made for an easy 90x speedup when collecting large numbers of buffers.


I upgraded to Ubuntu Edgy (a little early, but I need the updates) – and suddenly Suspend To Ram is working on my laptop!

I’ve had this laptop 2 years, and never managed to get it to successfully resume from RAM. Woot!

Recent GStreamer releases (Attention: Packagers)

I found a small bug in the GStreamer build system, introduced at the start of April, which exposes a bug in the registry cache.

The end result, sadly, is that applications based on GStreamer end up opening a bunch of plugins (sometimes ALL of them) every time they start.

Neatly, the problem only on happens in packaged builds where a –with-package-name or –with-package-origin is being passed to configure, so there was never any chance we’d see it in CVS.

Packagers of various distros that have built packages for GStreamer in the last 6 weeks should take a look at:

Back from the US

I spent the last week in Phoenix, Arizona – my first trip to the US… more or less. A brief visit when I was 11 years old is too fuzzy in my memory to really count.

I had a nice week and got to enjoy a few foods that are scarce in Spain. In particular, getting a decent steak, cooked right.

I saw a documentary on number systems on the TV one night, hosted by Terry Jones. It went through different counting systems that have been used throughout history, from Ancient Egypt, to Roman and Arabic numerals. The last section was about counting in binary, with a fast-motion demo of how to write various numbers in binary using egg cups labelled 1, 2, 4, 8, 16… and boiled eggs to represent ones. At the end, Terry Jones said “After only a few short hours of tuition, I believed that it was possible to represent ALL numbers using only zeros and ones. What’s more, I began to suspect that you don’t actually have to do it with eggs!” 🙂

I installed a Word Press plugin called Live Press that should replicate my entries to LJ. Previously I’ve only used my LJ account to post comments on friends’ blogs so hopefully this will produce my first post there.

Running KDE apps out of tree

I’ve tried a couple of times over the last few weeks to build amaroK out of subversion so that I can help with their GStreamer 0.10 powered backend.

My usual method of developing stuff is to have a checkout somewhere under ~/devel. If the project supports running uninstalled, I’ll just work with it there. If it requires installation (as amaroK seems to), I like to install to ~/install.

Under no circumstances will I install to /usr, because it puts the package management system into weird states and it’s always a PITA to recover later. Plus, it makes thomasvs haemorrhage nastily.

How is this relevant? Well, I was given the impression that KDE apps absolutely need to be installed in the same prefix – unless I felt like building ALL of KDE in another prefix, I would need to install amaroK into /usr.

Armed with this knowledge, I tried building packages of an SVN snapshot. For some reason (again, I’m told) creating a snapshot tarball of amaroK’s SVN requires an active svn account, which I don’t have because I’m not a KDE developer. Hence, I would have to rely on someone else’s SVN snapshot tarballs to build packages from. In addition, building a package and installing it takes a relatively long time and would severely hamper my speed. I gave it up as a bad approach after spending around an hour to get a build package of amaroK 1.4.0-RC1 , and went off to do something productive.

About a week later, I tackled the problem again. This time, markey mentioned a variable called KDEDIRS. It turns out that by doing:


all my problems magically go away – I can run ‘amarokapp’ manually, debug it etc, and it correctly finds all its resources and whatnot in my preferred prefix.

So now, I have that exported from my ~/.xsession-vars file, along with all my normal PATH, LD_LIBRARY_PATH, PYTHONPATH and friends and everything just works.