14 months from purchase to setup?

Not so long ago a thread came up on DF, dealing with printing. That reminded me…. I baught my printer in what, February of 2007 and it’s just been gathering dust?

That’s gotta be a new record: for either laziness or being to fsckin’ busy lol.

The reason I bought it, I knew this model was usable with most OSes. Honestly, I _hate_ ink jet printers (and printers in general, but yeah… especially ink jets). Sadly, a decent PostScript printer is harder to find in this place then an affordable laser printer; having to use an inkjet makes me very happy that I rarely print anything.

Around OpenBSD 4.3 or so, I stripped off all printing related packages off my server: the shitmark hasn’t worked in years. So I had to setup the format filtering magic anew: ghostscript (no_x11 flavour), hpijs, foomatic-filters, and foomatic-db-hpijs. Several years ago it was my intention to run a networked printer off the box, but the printer I had at the time more or less stopped functioning under FreeBSD+CUPS, so I haven’t paid much attention since then. Most distributions use the Common Unix Print System (CUPS) these days; but I’m just old at heart, I like the Berkeley Line Printer Daemon (lpd). CUPS, only way I ever know wth is going on is going cross eyed with log files; with lpd, at least you know it’s brainlessly simple to sort out.

My only complaint about the printer, ‘lptest | lpr’ resulted in 2 pages of ~60 lines before I decided to dequeue the 200 line job: and the some-bitch isn’t smart enough to eject the darn 3rd sheet of paper ^_^. (whether this has to do with my PPD file or hpijs support for my printer is not interesting to me, lol). On top of that, the thing prints about as slow as I can write text by hand. I could just imagine if I fed tpsh’s ~3000 lines of text though it, probably take a week and 50 sheets of paper.

Chuckle of the day, 2009-04-13 in #vim

   viking | "Viper, an emacs package providing Vi
emulation on top of Emacs." i don't know what
to say
jamessan | Vimacs : Vim-Improved eMACS: Emacs emulation
for Vim
SAS_Spidey01 | HAHAHA
SAS_Spidey01 | thank you jamessan, I haven't laughed like
that in a while xD

Worthless router

Ended up woken up around 0930 (yippee, 3 hours sleep) due to a power outage; then dragged out shopping 🙁

When I got home and finally on the computer, I noticed for the first time in a LONG time my laptop couldn’t get a wireless connection: usually my BSD system is queen of the WLAN. A quick bit of investigation showed that during the power outage, the router reset itself totally. It’s a good thing my laptops Ethernet port has been supported since ~FreeBSD 6.4. Dug up an old Ethernet cable and plugged into the router. Sure enough the piece of crap got reset to factory defaults during the power outage stuff this morning.

Reconfigured the router and upgraded the encryption: only to find out my mothers PC couldn’t handle it, despite having the same hardware as my desktop. A quick search of Google turned up what I suspected, menu option added in an update; and her box was running XP Home SP2 / IE6 / .NET 1.1 lol. Updates are almost finished, and now every machines back on the network

My mothers been badgering me to try charters atypical power cycle suggestion: which I know could be done for years and years and wouldn’t change jack shit; she’s got no logical concept of networks. Some how, I think understanding helps troubleshoot stuff then trying the Microsoft Ritual Solution (MSRS). In my experience it works fine for Win32, but UNIX and networking equipment in general seems to follow a more sane pattern 😉

Tom Knight and the Lisp Machine; The Jargon File, version 4.4.7

A novice was trying to fix a broken Lisp machine by turning the power off and on.

Knight, seeing what the student was doing, spoke sternly: “You cannot fix a machine by just power-cycling it with no understanding of what is going wrong.”

Knight turned the machine off and on.

The machine worked.

I always think about that old koan when having such trouble lol.

What I hate about programming

Some months ago when it reached Kris Moore’s attention (late as usual) that I had brought up security issues with his Firefox3 PBI, he changed it to something almost as bad. A couple weeks ago, I heard back from Kris that he had [naively] changed the code for making Fx3 the users default browser would no longer run as “root”. After a little more conversation he split it off to something better.

Originally it was a part of the script that runs during PBI installation (and worse then the below script), probably tired of my replies he made an extra wrapper around the Firefox3, that asks the user if they want Firefox3 set default or not, rather then workin’ the user database at install time. (I refuse comment on the following scripts predecessors: if you want to know more, read his SVN). The solution he came up for that wrapper, was to invokes the following code as the user when necessary:

#!/bin/sh
# Helper script to make FF the default browser for a user
##############################################################################

# Get the users homedir
USER="`whoami`"
HOMEDIR="`cat /etc/passwd | grep ^${USER}: | cut -d ":" -f 6`"

if [ -e "${HOMEDIR}/.kde4" ]
then
KDEDIR=".kde4"
else
KDEDIR=".kde"
fi

if [ ! -e "${HOMEDIR}/${KDEDIR}/share/config/kdeglobals" ]
then
echo "ERROR: No kdeglobals file for $USER"
exit 1
fi


TMPKFILE="${HOMEDIR}/.kdeglobals.$$"
TMPKFILE2="${HOMEDIR}/.kdeglobals2.$$"
rm ${TMPKFILE} >/dev/null 2>/dev/null

cat ${HOMEDIR}/${KDEDIR}/share/config/kdeglobals | grep -v '^BrowserApplication' > ${TMPKFILE}

rm ${TMPKFILE2} >/dev/null 2>/dev/null
touch ${TMPKFILE2}
while read line
do
if [ "$line" = "[General]" ]
then
echo "$line" >> ${TMPKFILE2}
if [ "${KDEDIR}" = ".kde4" ]
then
echo "BrowserApplication[$e]=!/Programs/bin/firefox3" >> ${TMPKFILE2}
else
echo "BrowserApplication=!/Programs/bin/firefox3" >> ${TMPKFILE2}
fi
else
echo "$line" >> ${TMPKFILE2}
fi
done < ${TMPKFILE}

# all finished, now move it back over kdeglobals
rm ${TMPKFILE}
mv ${TMPKFILE2} ${HOME}/${KDEDIR}/share/config/kdeglobals

exit 0

which is more secure then the original implementation, and more efficient also. Tonight I sent Kris a casual (read: adapt to need, don’t take as is) suggestion from yours truly:

#!/bin/sh
# Helper script to make FF the default browser for a user
# Should work for KDE3 and KDE4.
##############################################################################

PROG="!/Programs/bin/firefox3"
FILE="./share/config/kdeglobals"

for D in "${HOME}/.kde" "${HOME}/.kde4"
do
cd $D 2>/dev/null || break;

if [ ! -e "$FILE" ]
then
echo "ERROR: No kdeglobals file, unable to set $PROG as default"
exit 1
fi

ed -s "$FILE" <<EOF
/[General]/
/BrowserApplication.*=/
s/=.*/=${PROG}/
wq
EOF
# write your own error handlers
done

exit 0

which should work as far as I can test; since I lack a working KDE install (compiling KDE4.2+ is on my todo list). It’s not perfect, but it sure is nicer then what he had a few months back. I included the a diff of the two scripts in my last message, which may very well go against my decision to “never” send these people patches. But I really don’t care if he accepts it or not, because while I believe in being helpful, I also I do not like doing peoples jobs for them.

I’m a lazy good for nothing creep, but I am lazy of muscle – not lazy of mind. The most productive code I have ever written, is the code I was smart enough /not/ to write in the first place.

I came here to live

I grew up in a town where tough was a cigarette
And a souped up car on a county road
Nothin’ much to do back then
So we’d make bets
On how much drink a guy could hold
And I held my own
Learn to hold my own

Daddy works some dead-end job at the concrete plant
Mama taught the Sunday bible class
For eighteen years I remember thinkin’
There was more to life than that
So I ran the streets to beat the Devil
Goin’ just as fast as I could fly
‘Cause I came here to live
I didn’t come here to die

Mama used to wait for me with the porch light on
Worried about her little boy ’til I got home
Daddy he’d say listen son
But back then there wasn’t much
That I didn’t already know

I reckon I was doing close to 80
When I felt the tire slip out from under me
And I never set out lookin’ for Jesus
So I guess Jesus come lookin’ for me
And He found me upside down in a ditch
Smokin’ gas in my eyes
And He said son you came here to live
You didn’t come here to die

Sunday morning I got up and I went to church
That summer I got a job and I went to work
Met a girl in town put some money down
On a little house with a yard

Our little boy was due in September
But he came early in July
For eighteen days all I remember
Was settin’ there at his side
Sayin’ son open up your eyes
Just open up your eyes
‘Cause you came here to live
You didn’t come here to die
Son you came here to live

— I can Here to Live, Trace Adkins

Clear with a vengeance!

Ok, I can take the lag, I can almost stand a 9x19mm P228 compact pistol packing a harder punch then a 7.62x67mm (.300 Cal) Winchester Magnum WA 2000 sniper rifle with half the stopping power of the 9mm…. but this is just to much.

Teammate trew a frag into the room I’m in, stampedes the tangos and flushes me right into them.

I can stand the tangos, but if y’all want to start frag-flushing me into a 4 on 1 dance off… I ain’t getting on my dancin’ shoes, I’m gettin’ a bigger freakin’ gun.

H&K 23, 5.56x45mm NATO Light Machine Gun —> room cleared with a vengeance like no other baby!

(and no, I didn’t shoot the idiots on my team, I shot that tangos lol)

Darn it, I had my mail down to under a 100 messages in the queue…. few months of busyness and it’s over 700 lol. Oh well, weekends are good for something 🙂