Friday, July 28, 2017

"One app. at a time"

A couple years ago, Dennis bought a laptop on the cheap that swiftly demonstrated its shortcomings as a "portable" Windows machine.

For tasters, it's a leviathan:  A Dell Precision M6400, boasting a 17" screen and tipping the scales at 8.54 lb / 3.88kg.  During its limited use, its Windows 7 OS never could be convinced that it was Genuine Microsoft(TM), despite entering the registration code over and Over And OVER.  It's also a battery hog, running less than two hours on a full charge.  Which is not at all surprising, considering how, were you to flip it upside down while it's running, I'm not convinced that you couldn't pop popcorn with the vents.

It was Dennis's tablet purchase that ultimately consigned this bully-boy to the corner and dust.  But my go-to Linux laptop ("Big Grey") is about eight years old.  Also, it spooked me a week or so back with a bad HDD sector.  So it was time to think about migrating.  Dennis swore that he really-most-sincerely had zero use for the Dell (not even as a doorstop).

So, booyah for a free laptop, amirite?  (Uh-huh:  I can already hear the DIY computer-geeks start to snicker evilly already...)

Normally I run on AMD chips, but this laptop is Team Intel.  Welp, turns out that, somewhere along the line, I missed the memo that the "AMD64" distributions of Linux now apply to 64-bit Intel chips as well.  And I didn't realise my mistake until after making it about halfway through the a Debian 16.04 installation/configuration.  (Side note:  Whatever improvements the Ubuntu team may have made to the base product, their installation is still as unpolished as ever, so it took two attempts to make it that far.)  And that was with the wifi drivers working right out of the box.  (A not-so-small mercy which does not go unappreciated.)

That-all basically shot a day.

But, hey, a free laptop's a free laptop, right?

Disgusted, I made the i386 system image dig its own grave by downloading the AMD64 Ubuntu .ISO file and burning it to DVD.  Except that ISO file was corrupted sometime during the burn-in.  (Do not go gentle into that good night, i386 -- I gotta admire your spirit.)

Fine.  Screw you, Ubuntu...and the godsforsaken Unity desktop you rode in on.

Debian 9 ("Stretch") is barely over a month old, so I'll get all the latest/greatest stuff, right?  Also, its system requirements are muuuuch friendlier to older hardware than Ubuntu. 

So I dug out my notes -- OF COURSE I HAVE NOTES -- from previous Ubuntu/Debian installs; more a collection of URLs than anything else because why write it down when you can look it up, I ask you.

That was my first (big) mistake.  Not the notes themselves, but forgetting how long it had been since I'd installed and customised a Debian OS.  That would have been "Big Grey," about two Debian versions back, to be precise.  (Raspian  doesn't count b/c the Raspberry Pi is its own beastie, and most certainly not a the Swiss Army knife that a desktop/laptop is.)

Now.  One of my oldest friends is a fan of old cars -- the antique auto show in Iola, WI, was the highlight of his summer (and his bonding time with his Dad).  No surprise that it was he who introduced me to the Johnny Cash song "One Piece at a Time."  Lyrics (courtesy of Google) are at the end of this post, but the tl;dr is a how guy schemes to assemble his very own Cadillac from parts smuggled out of the factory.  Over the course of a multi-decade career working in the GM factory.

My Gentle Reader doubtless sees the punch-line coming...and can well understand that the parallels were not lost on me.  Because technology moves so much faster in I/T, and I'm not convinced that there weren't about as many moving parts by the time that beastie was fully functional.

All told, it cost me the better part of three days to set up this "free" laptop.  A few reasons:

Gnome  Apparently, it's a different flavour ("Metacity" vs. just "Gnome Classic") that allows for the civilised amenity of app. launchers on the top bar.  Except Metacity didn't show up in the login options for multiple boots/reboots.  Once it was an option, fighting custom launchers to make them retain the designated icon took a few tries to get right.

Dropbox  Installed from binaries, not repos (Boo!)  This version refused to start on startup; needed to create autostart file.  Still figuring out how to terminate its process at shutdown and wondering why in name of Mordor that isn't a part of the .desktop file vocabulary in the first place.

The "AMP" part of "LAMP"  I'm spoiled by having this install from a single terminal command.  I forgot how crazy-simple this made things.  And I was about to be forcibly reminded...

Apache  User directories are enabled differently in 2.4 than they are in 2.2.  So two tries there.

PHP  Well-behaved, though I had to briefly go spelunking for the .conf file.

MySQL  Absolute NIGHTMARE.  Debian 9 actually installs the MySQL fork "MariaDB" and masks it with "mysql" executables.  In a PR juke worthy of K Street, MariaDB is billed as a "drop-in replacement for MySQL."  Uh-huh...yeeeeeah...so, about that...  There's no prompt for a root password during install, which was the root (pun intended) of a morning's worth of hair-pulling.  I could "anonymously" interact with the command-line UI, but all GUIs refused to connect.  Between 2 separate Q&A sites, I managed to piece together the info. I needed to disable the anonymous command-line access and create an uber-sooper-dooper admin. user to take the place of root.  Oh, and installing the mysql binaries from Oracle?  Fuggedabouddit...I couldn't even connect to the server from the command-line UI (much less Workbench), so I went back to MariaDB after forcibly ejecting the borked MySQL installation.

MySQL Workbench  Special mention b/c I literally lost track of how many times I installed/uninstalled it.  Blows up on login, even with a valid username/password.  No surprise--it's been trouble since the days (15 years ago) when "MySQL Query Browser" refused to run at all on Windows 2000.  For now, PhpMyAdmin and the Database tool in NetBeans will, between them, do what I need to do.

PhpMyAdmin  Speaking of which, there's now an extra step to install the missing mbstring and gettext modules.  Otherwise, it worked like a charm after the main authentication issues were sorted out.

NetBeans  Lesson learned: Go with the platform-independent version.  Designate the base JDK folder, not the path to the executable.  (That screw-up was sheer PEBKAC on my part, btw.)  Blessings upon the Moncton Java guru who saved my bacon on that one.  May the fries in his poutine always stay crispy.  (I think that's a legit. Canadian blessing, but don't quote me...)

Fritzing  Is in the Debian repos, but the parts bin is a separate install. (Whyyyyy???)

Geany  Apparently changed the per-language syntax highlighting sometime between versions 1.23 and 1.29.  Have temporarily thrown in the towel for custom keyword highlighting for OpenSCAD.  (On the plus side, this version of OpenSCAD doesn't lose the menu-bar, so booyah.)  But there went most of the afternoon.

And that's just the high points...

Along the way, of course, I learned a few new SysAdmin-type tricks.  Mind you, I have no illusions that I'll remember them, but at least we won't be strangers when inevitably we meet again.  I have a renewed & enhanced appreciation for the "Ask Ubuntu" community and the global treasure that is StackOverflow.  And I would be remiss not to note an array of independent bloggers and the Google algorithm-finders that put them at my fingertips.

In the past, I've had a few sharp things to say about "free" software in the context of modern capitalism.  And, let's not pussy-foot around it:  I use this software gig-in and gig-out to earn my crust.  But there is less than no question that my hard-won knowledge (not to be confused with "wisdom" because that's another beastie) cost me scarcely a drop compared to the Great Lake that is the sum of FOSS efforts going back decades.

Yes, I've drastically expanded and revised my notes.  Mainly because I have a DisplayPort to DVI adapter on the way that will allow me to plug this laptop into the KVM switch (or so I trust) and take the place of the current workstation.  (Sort of a two-for-one win-win.)  If that-all pans out, I might just spring for the SDRAM to bring the memory up to 8GB.  And after that goes down, it's finally Big Grey's turn for a rebuild and (likely) rebirth as a dedicated "maker" machine (Arduino, AVR, and 3D printing).

After that,  of course, the value of the information in those notes will incrementally decay from "asset" to "liability."  Next rebuild, I'll know better than to just whip them out thinking, "It's cool--I got this."  "How can you be so sure?"  my Gentle Reader might (justifiably) wonder.  Don't be silly, GR:  Of course I added a note IN ALL CAPS at the very top of the document.  If you can count on a recovering tech. writer for anything, it, it's reading the documentation.

- - - - -

"One Piece at a Time" - Wayne Kemp

Well, I left Kentucky back in forty nine
An' went to Detroit workin' on a 'sembly line
The first year they had me puttin' wheels on Cadillacs

Every day I'd watch them beauties roll by
And sometimes I'd hang my head and cry
'Cause I always wanted me one that was long and black.

One day I devised myself a plan
That should be the envy of most any man
I'd sneak it out of there in a lunchbox in my hand
Now gettin' caught meant gettin' fired
But I figured I'd have it all by the time I retired
I'd have me a car worth at least a hundred grand.

I'd get it one piece at a time
And it wouldn't cost me a dime
You'll know it's me when I come through your town
I'm gonna ride around in style
I'm gonna drive everybody wild
'Cause I'll have the only one there is around.


So the very next day when I punched in
With my big lunchbox and with help from my friends
I left that day with a lunch box full of gears
I've never considered myself a thief
But GM wouldn't miss just one little piece
Especially if I strung it out over several years.

The first day I got me a fuel pump
And the next day I got me an engine and a trunk
Then I got me a transmission and all the chrome
The little things I could get in my big lunchbox
Like nuts, an' bolts, and all four shocks
But the big stuff we snuck out in my buddy's mobile home.

Now, up to now my plan went all right
'Til we tried to put it all together one night
And that's when we noticed that something was definitely wrong.

The transmission was a fifty three
And the motor turned out to be a seventy three
And when we tried to put in the bolts all the holes were gone.

So we drilled it out so that it would fit
And with a little bit of help with an adapter kit
We had that engine runnin' just like a song
Now the headlight' was another sight
We had two on the left and one on the right
But when we pulled out the switch all three of 'em come on.

The back end looked kinda funny too
But we put it together and when we got through
Well, that's when we noticed that we only had one tail-fin
About that time my wife walked out
And I could see in her eyes that she had her doubts
But she opened the door and said "Honey, take me for a spin."

So we drove up town just to get the tags
And I headed her right on down main drag
I could hear everybody laughin' for blocks around
But up there at the court house they didn't laugh
'Cause to type it up it took the whole staff
And when they got through the title weighed sixty pounds.

I got it one piece at a time
And it wouldn't cost me a dime
You'll know it's me when I come through your town
I'm gonna ride around in style
I'm gonna drive everybody wild
'Cause I'll have the only one there is around.


Ugh! Yeah, RED RYDER
This is the COTTON MOUTH
In the PSYCHO-BILLY CADILLAC Come on

Huh, This is the COTTON MOUTH
And negatory on the cost of this mow-chine there RED RYDER
You might say I went right up to the factory
And picked it up, it's cheaper that way
Ugh!, what model is it?

Well, It's a '49, '50, '51, '52, '53, '54, '55, '56
'57, '58' 59' automobile
It's a '60, '61, '62, '63, '64, '65, '66, '67
'68, '69, '70 automobile.