Bicycling, Photography and Programming

Latest

Return of the 007 SSH Agent

Years ago when I first stared listening to podcasts when I had barely worked at PRWeb for a year even, I came up with a piece of shell script to automatically start up an ssh-agent and ask for your passphrase.

Unfortunately, the code created tons of ssh-agents, which was unfortunate.

Here is a version that behaves much better:

  1 #!/bin/bash
2 export SSH_RECENT="$HOME/.ssh/recent"
3 [ -f $SSH_RECENT ] && eval `cat $SSH_RECENT`
4 RUNNING_AGENTS=0
5 if [ ! -z "$SSH_AGENT_PID" ]
6 then
7 RUNNING_AGENTS=`ps -p $SSH_AGENT_PID | grep -v CMD | wc -l`
8 fi
9 if [ $RUNNING_AGENTS -lt 1 -a $UID -ne 0 ]
10 then
11 eval `ssh-agent`
12 echo "export SSH_AGENT_PID=$SSH_AGENT_PID" > $SSH_RECENT
13 echo "export SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $SSH_RECENT
14 fi
15
16 [ `ssh-add -l | fgrep -v ' no ' | wc -l` -lt 1 ] && ssh-add

Can you tell me why I’m choosing to evaluate $UID for zero?

And, will this work if I switch from an Xterm to a virtual terminal?

Father and Daughter, Elizabeth Park

This seems to be the one of the more popular photos I’ve posted this year. Here’s a slightly more romantic version of it. I have a 24×18 @ 300dpi source file for making large prints if so desired.

Image of Father and Daughter, Elizabeth Park, 2012

Father and Daughter, Elizabeth Park, 2012

Strength in Numbers was fun

Good time watching that at the Mt Baker Theater. I was the only one to show up with a recumbent…and BSD daemon horns.

Upcoming: New Standing Workstation

I’ve posted about how my previous endeavors to work at a standing workspace, at work, and at home. It has not gone sour on me yet. Presently at
Candelatech I’ve been sitting on an exercise ball with three landscape monitors. It’s a lot of screen realestate! I love not needing to maximize and minimize windows and the ability to glance at my debug window and at log output at the same time. 

I feel like I slouch a lot more when I’m on the exercise ball–I’m eager to bounce up to the standing work space again. And soon I shall. I have built a wooden monitor rack from lumber reclaimed from a few projects around the house. I have hauled the pieces to work on my bike. It looks like nothing you’ve ever seen before. Expect photos soon.st

Bellingham Air Museum

I like the phrase “starter crank.” I loved planes as a boy, but now I’m bitter about the symbolism. Is this an attempt to poke at jingoism? I love the tone of the shiny metal, truly.

Image

HIgher res available.

2012-04 Pork Chops

Not quite warm or dry enough to eat outside, but fine time to gather some garnish for the chops.

2012-04 Pork Chops

2012-04 Pork Chops

LinuxFest Northwest 2012 was great fun (plus Apache talk slides)

I really had a great weekend. I liked taking the kids to the Fest on Saturday, and I’m glad that I got them to do some robots. They of course wanted to spend a lot of time in the game room. And I was impressed that they were eager for lunch (salmon)!

I got caught on camera for a second in the “Why Linux Doesn’t Suck” talk. (Haven’t gotten a chance to review the posting on lunduke.com to see if I was edited out.) I really only made it to a few talks, but I mostly got to have great conversations with a lot of people.

Surprisingly, I spent a lot of time talking about embedded storage servers and the possibility of NanoBSD for embedded (Compact Flash based) devices. Interesting stuff, but I also suspect now that DSL and Slitaz Linux distros weigh in super small as well.

My Apache talk only garnered five attendees and one passer by whom I almost ejected. I had rewriten my Apache Rewrites talk from last year and whittled it down to six slides, and that was really all I needed. I was done in 30 minutes, and the rest of the time was discussing some real-world examples. We dug into the subject and I think everyone left much smarter.

And here are this year’s slides: 2012-04 Apache Rewrites

12.04 upgrade … :-(

So my loop of apt-get -f install is done and now when I try and start various GTK apps, I get library configuration errors. I can’t get Libre Office Writter to start, either. I don’t have much hope for dpkg-reconfigure –all in this case.

I think it’s about time for an install on a fresh drive. Or a raid of three 10krpm drives!

Ubuntu 12.04 — apt-get my guile

So first impression on rebooting into an upgrade of Ubuntu 12.04 — busted install. Unity would not start up, I killed lightdm and restarted it, and I immediately notice that firefox has missing png for some of the tab buttons.

 

Presently I’m repeating:

$ apt-get autoclean
$ dpkg --clear-avail
$ apt-get update
$ apt-get -f install
$ apt-get autoremove

And this appears to be doing a good job of finding and removing corrupted /var/…/dpkg package files and fixing my install.

 

Recommendations for #Linux storage server?

I’ve got an embedded 800mhz Via system that I’m going to retrofit with a 2TB drive for catching backups. I used to run CentOS 3.5 on there but those days are long gone. I’d rather run a rolling distro…Debian…Arch. I will likely also retrofit it with a CF adapter for the boot device. Likely I will use it for a caching DNS server, and if I have resources left over, maybe some Squid caching for the household as well. What would you recommend?

Follow

Get every new post delivered to your Inbox.

Join 325 other followers