Screen tomfoolery

I’ve been using GNU screen for a long time. Probably something like 15 years. But I’ve pretty much always used it in a fairly naive way, no custom configuration, and when working remotely I’ll typically log in to the “gateway” machine, run screen there, and wind up with 20-30 sessions sitting in it and eventually go nuts trying to figure out what exactly any given session actually is.

Which has motivated me to learn a bit more about what’s going on, and, admittedly, to cargo-cult a bit too.

So here’s my .screenrc as it stands now:

hardstatus alwayslastline
hardstatus string '%{= BW}[%H] %{= BW}%-Lw%{= RW}%50> %n%f* %t%{= BW}%+Lw%< %{= BW}% -=%c%{-}'
defscrollback 1000
vbell off
term xterm

The nifty bit is that “hardstatus string” line. What it does is give me a line at the bottom of the terminal which looks a bit like this:

[prod01au] 0* bash 1 sqsh 2 log 15:39

Except generally with a lot more “screens”.

In addition to this I have a few aliases of the form:

alias sqsh=screen -t sqsh sqsh -Usa -S`hostname`

to make it easy to fire off what I need with the right labels. Of course that ’sqsh’ example is grossly simplified, and for sqsh itself I actually use a wrapper script because the database names are not always the same as the hostnames, but anyway…

So now I make a point of running screen directly on each system I touch, which means that:

  • I can see at the bottom-left exactly which host it is, whatever crappy prompt settings might be in place;
  • I can see which “screens” are running what;
  • I’ve always got a couple of useful things there, ready for next time, like a “tail -f” of the Sybase error log;
  • I’m much more efficient.

All this is usually running in a tabbed terminal emulator (Apple’s Terminal.app at the moment, but in theory any will do), one tab per host. And it’s dead easy to pick these sessions up from anywhere, of course, which was the reason I was using screen in the first place.

Popularity: 19% [?]

Budget comments

A few small comments with respect to the 2008-09 (Australian) Federal budget:

  • Means-testing the baby bonus feels a bit petty. I’ve never really been that keen on the baby bonus anyway, but perhaps it should’ve been left alone until the question of paid maternity leave is addressed?
  • Laptops-for-the-kiddies is a nice idea but as has been pointed out in a number of places there are some infrastructure issues that are going to impede this. Laptops don’t keep running for eight hours without a charge and many state schools simply don’t have the electrical infrastructure to support them. Funding for that would’ve been a Good Idea…
  • Means-testing the solar panel rebate seems completely stupid. People who will now be eligible for the rebate are exactly the ones who don’t have $20-30k to spare for solar panels!
  • Half a billion for “clean coal” research? Yeesh.
  • Salary-sacrifice of laptops has been clobbered. Probably the right thing to have done but from a personal perspective I wish they’d waited until next year. Oh well.
  • The “alco-pop” tax increase. Not going to reduce binge drinking, which is (a) a niche problem; and (b) a cultural issue anyway. But there was an inconsistency with the alcohol taxes so it’s not unreasonable. Perhaps they should do the same with all drinks containing alcohol, just to even things out?
  • If half a million people are expected to bail from private health insurance because they’re no longer penalised for failing to have it, then that says to me that the real problem with private health insurance is that the product simply isn’t very compelling. Instead of whinging, industry should be trying to figure out how attract customers. That may well require negotiation with Government as it’s a heavily-regulated area. One obvious option would be to offer a low-cost high-excess package, a sort of “catastrophic cover” arrangement. I’m sure there are other things they could do.

Nelson continues to look like a fool in his response. It’s too soon, really, to expect the Liberals to have regained their balance after losing last year, but they’re going to have to start shaping up soon and it doesn’t look like Dr Nelson is the man to do it.

Popularity: 17% [?]