Monthly Archives: December 2013

Starting Cygwin ssh-agent at Logon

Common problem: you want to use ssh-agent with Cygwin, but because Windows is special, you can’t inherit the environment in the way you naturally would on a Unix or Linux system.

Now, before I proceed, understand that this is a HorribleHack™; it is the equivalent of modifying your .bashrc every time you login.

For this to work, you need to have the setx utility installed, which you need to download if you’re still using XP.

The first step is to save the following script; I put it in ~/bin/, but you could safely put it into /usr/bin as it only modifes the environment of the person who runs it. I used Python 3 because I could and because everyone should.

Next, create a shortcut in your Startup Folder. I called it simply “SSH Agent”.

The command line you will need (the Target field in the shortcut), is:

There seems to be an undocumented feature of run, that requires one to set the -p option to something or it will fail. Obviously, if you’ve installed the 64-bit version of Cygwin or put the start-ssh-agent script somewhere else, you’ll need to change your paths accordingly.

I haven’t written the symmetrical stop-ssh-agent, because I’m lazy and Windows doesn’t provide a convenient location to run scripts at log-off (you mess with group policies if you want, but I have more interesting things to be doing…)

Overcoming Intertia: Why YOU Should be Using Python 3

I despise change for the sake of change. Change for the sake of change is un-scientific. Change for the sake of change is a small person’s way of imposing their way on people.

I’m a fan of Python. I enjoy coding in Python; it lifts my spirits. I believe that Python is a good general-purpose scripting language, but more importantly, I believe that The Python Language is well-managed. By this, I’m referring to things like correctly managed backwards compatibility: a script written in Python 2.0 will work correctly in Python 2.7; there was a clear plan for migrating from 2.x to 3.0, which was adjusted in response to community feedback.

I’ve been using Python 3 for 3 years (starting with 3.1). If you’ve used Python 3, I suspect that, like me, you agree that it does what it’s meant to do: provide an incremental step forward over the 2.x series, while fixing some inconsistencies and oversights. This is the main reason I would encourage anyone who hasn’t already taken the plunge to do so; Python 3 is JustBetter™.

There is an additional reason, as the title of this post implies; unless and until “everyone” is using Python 3, “people” will continue to use Python 2. Unfortunately for Python 3, Python 2 is really good and much of the good stuff in Python 3 has been back-ported to 2.6 and 2.7. This has resulted in the paradox of technological inertia; an inferior technology persists, simply because it is ubiquitous.

Now, as I stated at the beginning of this post, I do not believe in change for the sake of change. Neither do I agree that all technological inertia is actually real (see dvorak vs. qwerty) and I’m not saying progress hasn’t been made (Django now supports Python 3, for example), but the default python is still Python 2 on most systems that I’m aware of and until that changes, we all have a responsibility, I believe, to push for that change.

I believe that it’s just as important, if not more important, that we push for the small changes where we can, because big changes are more often than not an accumulation of small changes that happen all at the same time, yet they are more difficult and more disruptive (and often less successful) – you only need to look at recent events, such as those in Egypt or Syria for evidence of this.

By embracing the small changes, we make life easier for ourselves, not more difficult.