A momentary crisis of faith, and who am I anyway?

I find that I have these odd periods at the end of big projects. I wander around for a bit wondering what I am meant to do now that the burningly urgent things are off my todo list. This time normally ends up being playing with the kids, watching TV or being mopey.

I offer this little sequence as the blog form of a holding pattern until I know what I am going to work on next…

    The other day I discovered that I no longer know who I am all the time. Specifically, slack unsets the environment, which means that the whoami command no longer works when you are running a command as root. To whit:

    sudo bash
    root@machine:~# whoami
    root@machine:~# echo $SUDO_USER

    So, if SUDO_USER is unset, how do I determine who the command is running as? Well, my immediate thought was that /proc would have something, and in fact it does. Here is what I ended up with:

    root@machine:~# cat /proc/$$/environ | sed 's/[^[:print:]]/\n/g' | grep USERNAME

    Horrible, isn’t it? I must also admit that I had to get onto IRC and wait for Jaq to teach me about that :print: thing. Good on him for being nerdier than me.

    So, that’s still horrible. So horrible. What else can I do? Someone else in IRC land suggested:

    root@machine:~# ps auxeww | grep $$ | sed -e 's/^.*SUDO_USER=//' -e 's/ .*$//'

    Still ewwww. So what else is there? Well, one of the older geeks on the IRC channel suggested this:

    root@machine:~# who am i
    mikal    pts/16       Apr 15 15:38 (:0.0)
    root@machine:~# who -m
    mikal    pts/16       Apr 15 15:38 (:0.0)
    root@machine:~# who -m | awk '{print $1}'

    who am i is an alias for the -m option in who. And it’s just what I want. We have a winner!

Slashdot, Google and Slack

Rodney Gedda’s writeup of my talk on Slack (which by the way is in no way a comment on Slackware, or derived from Slackware) got slashdotted today. I am assured by Alan that the download link stayed up just fine, despite benley’s best efforts. To be honest, I wasn’t expecting this level of attention, although the tool is very cool.

Other press coverage (that I am aware of) for my AUUG talks includes:

Obviously many of these articles recycle content, and the links above still include the Google News redirects, because it’s easier than editting them out by hand.

(I have been slashdotted before, for TwinkleTux, and another time with the review for the ImageMagick book. Then there was the time that one of my articles about ImageMagick got slashdotted (direct link), but for some reason the sequel didn’t.)

Why does every man and his dog put man pages online?

So, I know that I have a few man pages online, but then again I wrote either the code they document, or some of the generation toolchain to create them, so I think that is different. Why does every man and his dog feel that he should put man pages online? It actually makes it really hard to search for things if the first page of Google results are the same man page over and over again from sites who seem to think that they’re making a contribution to the community.

Are they just doing this to grab some pagerank?