bashrc and openssh

Just thought I’d document this for web-posterity…

Some of our systems rely on a large number of environment variables that get loaded via .profile or .bashrc, but most importantly the PATH variable.

Under Ubuntu and Fedora 9+ this stopped working when using “ssh <host> <command>”.

After much googling and head scratching, I finally found the cause.

Our bashrc files all had something like this near the start:

if [ -z "$PS1" ] ; then
  return   # or exit or something

Using OpenSSH’s ssh in command mode, e.g. ssh dev-strat stophost, results in a non-interactive login, for which “PS1” is not set.

So if you’re having a hard time getting your ssh commands to load their environment… Check for that.

A few tools go a long way

I need to start working on my sales pitch/technique. As Motor pointed out, 1.31 is getting close. You want to know how close? Join the queue. Now, isn’t that just wrong? Hey, hands up, mea culpa, I’ve been a significant cause of 1.31 delays. But that just makes the was-once-a-manager in me even more irate.

How can we possibly not know how close we are? Aren’t we a seasoned software developer?

Workin’ Mercurial

On Friday I used Mercurial‘s built-in repository conversion tool to build a Mercurial repository from Subversion 1.30 branch. Went home, cloned that to my Linux and Windows boxes and I’ve been tinkering over the weekend.

With the inotify extension, it’s really zipping under Linux; especially with atime changes disabled.

And I notice that I’m very quickly falling back into the habit of early commits.

The only bottleneck in the system is that the master repository is on a Windows Server 2003 share, and cloning/pulling/pushing are a little slow. I suspect that I need to look into setting up hgservice or something.

But if we do switch to Mercurial, I think we’ll probably set it up alongside Trac (which I increasingly dislike) or Redmine or something: Trac development seems somewhat bumbling, Redmine is generally nicer but it has rude rough edges – e.g. the forum system is kinda noddy. I will probably like Redmine more when I quit trying to integrate it to our Windows domain logins and use our game-database logins like we do with Trac right now.