Unixish

January 5, 2009
book graphicunix/linux problem solving guide

I’ve been a Unixish consultant, programmer and troubleshooter since 1983. I have a larger, less focused but more active website at APLawrence.com that also covers Unix and Linux. This site is strictly Unixish.

I strongly believe that open source is important, not just for computers but also politically and socially.   I like Mac OS X for its smoothness, but I wish it were fully open.

I’m not a Linux zealot:  I see much that needs to be improved.  I am definitely a fan – just not one who can see no flaws.

Advertisements

HubPages

June 23, 2010

I have been mostly writing at HubPages recently.  I’m happy to have you come visit me there.

My most recent post there is a bit Unixish.  A non-technical guide to understanding and fixing TCP/IP problems on a network does cover Windows, but makes note of Linux and Mac OS X procedures and commands.

BSD Or Linux

February 16, 2009

I’m thinking of moving my main site.  The plan I have now includes things I don’t need like Miva Merchant and therefore costs me more than it should.  My current host only offers Linux now – I’m a hold-over BSD system from a company they bought.

I’d kind of like to stay with BSD..  so I may have to change my hosting company.  It’s probably easier to just switch to Linux – easier to find Linux hosting anyway..

I dunno.  I tried 1&1 a while back and was not happy..

In praise of simplicity

February 1, 2009

I had a customer this week with odd network problems. I’m not sure yet that we’ve found all of it, but some of it was a funky nameserver in resolv.conf. I don’t know what else is going on, but printing wasn’t working.

They were using HP printers and as this was an old SCO box, hpnp printing.
That’s the binaries and scripts that HP did for that platform and they were not working. For a quick test, I replaced them with “netcat” and printing worked.

The problem with the HP stuff is that it’s complicated.  It wants to check and double check that the printers are ready before it sends anything.  Netcat just blasts the bytes out, hell or high water.

That’s why it always works unless there just is no network or if the printer itself is broken.  That philosophy makes sense to me:  have at it, because if it doesn’t work, somebody will complain very quickly – it’s not like nobody will notice!   HP treats this like it’s unattended work that needs double-checking and logging.  That could be necessary in a very large network but even then I can’t see it because large networks will have full time admins who can and will do all the tests anyway!

Page rotation

January 19, 2009

I want to do A/B testing on different sales pages for my e-books.  I wrote up 4 different versions and named them “psst.A”, “psst.B”, etc.

I have a cron job that runs this Perl script every day:

#!/usr/bin/perl
open(I, “data/abcontrol”) or exit 1;
@c=<I>;close I;
$a=pop @c;
exit 0 if not $a;
open(I, “>data/abcontrol”) or exit 1;
print I “$a”;
foreach (@c) {
print I “$_”;
}
close I;
chdir(“data/text”);
chomp $a;
exit 0 if not $a;
$cmd=”cp psst.$a psst.html”;
system($cmd);
open(O,”>>data/abcontrol.dates”);
$date=localtime();
print O “$a $date\n”;
close O;

The “abcontrol” file contains “A”, “B”, “C”, “D”, one  per line.  This swaps in the next variant and records the time for the running page to a file.  I can later compare that file to sales figures to see which page did better.

After the first run, “abcontrol” will have “BCDA”, then “CDAB” and so on – constantly rotating which page to use next.

But that’s silly:  why not just store a “D”, decrement to “C” and store it back and so on to “A” and then go to “D” again?

But why even do that?

#!/usr/bin/perl
$a=((localtime)[7]  % 4 + 65);
$cmd=”cp psst.$a psst.html”;
system($cmd);

That (localtime)[7] is the day of the year, so mod 4 it’s 0-4, add 65 it’s A-D.

No log file needed either as we always know when “A” ran.

OpenOffice Files

January 13, 2009

If you crash and OO says it can only open Read Only, look for a .~lock(filename) file in the directory.   Remove it.

OO can automatically keep new chapters on right hand pages but the instructions are awful.  I posted a howto at http://aplawrence.com/Web/open_office_pages.html

Just now I’m working with a customer with Vmware on RedHat – its networking config changed and screwed up everything.  Can’t get vmware-config.pl to work reliably.  Had to stop everything by killing processes.

What appeared to happen was that the interfaces switched:  what we had on vmnet0 went to vmnet3 and vice versa..  that confused every machine on the network.   Some had rebooted and were working but others were not and we didn’t want to reboot those so I had to fix vmware’s config..  all took about an hour.. annoying..

Mandriva Linux

January 7, 2009

In my quest for a desktop for Joe Average Windows User, I was strongly urged to look at Mandriva.

After doing so, I have to wonder what that guy was smoking.  My first confusion was this screen:

mandriva-linux

What is that grayish window in the middle??  Handles come out of its left and right sides and you can drag it around, but why is it there? I clicked on “Live Install” and waited.. and waited..

The install was molasses slow.  Cold molasses.  Cold molasses on a winter day slow.

Yes, I was installing into a Fusion VM so I expect a little less than instant response.  I don’t expect anything this slow, though.  This is the slowest Linux install I have ever done in Fusion.

It lost my cursor at finish – that could be the VM’s fault, of course.  But listen up all distro packagers:

YOU NEED TO BE ABLE TO RUN IN A VM.

You WANT to run well.  This is how a lot of people test things nowadays.

After the install things got a little better but still pretty sad.  Not quick like a bunny.  Slow like a turtle.  Does “Mandriva” mean “turtle” in some obscure language?

After login, there’s that same strange gray screen – without Live Install now but just as fuzzy and mysterious.

I noticed that Firefox was 3.0.3.  That’s good.   What is that orange bug in the upper right hand corner of the screen??

A little icon in the tray told me that updates were needed.  I clicked on it and it showed just 3 updates.  For real? OK, sweet..

Naww, after those there were 385 more.  That’s when I noticed that the system was running fast enough: the updates clicked right along.  It’s just keyboard and mouse that are slooooooow.

That silly gray window – close it, it comes back???? What IS this??

I started a Konsole terminal.  Can i ask a question? Why an 80 x 32  Konsole terminal?????  Terminals should open 80 x 24 or 80 x 25.  No more, no less.

But typing was faster in there too, so it is the desktop that has the performance issue.

And then it crashed.  Well. not outright, but I got this:

mandriva-linux-1

I gave up.  Mandriva is definitely not ready for Joe.

The point of X11 on Mac was.. ?

January 6, 2009

I installed X11 from the 10.5 cd because every time I talk to a fellow Mac owner they ask me about Fink and X11 and every time I tell them I’ve never installed either of ’em.

Wait, really? Nope.  Thought about it, never got around to it.

So just now I pulled out the OS X cd and installed X11.  I then downloaded and installed Fink and started looking over the stuff you can download.

There has to be something in the 2,000+ packages that I’d need or want, right?

Well, if there is I am yet to find it.    I’m still looking, though..

Software Developers shouldn’t ignore Unix

January 5, 2009

The Wolfire Blog did a post suggesting that game developers should not ignore Mac OS X and Linux.  He makes the point that the power users and most vocal evangelists are apt to be Mac or Linux people.

He is so right, but it’s not just games.  Take Google Chrome as a perfect example.

Who are the big software  influencers today? Mac and Linux users. Who does Google put Chrome out for first? Windows users. There may be far more of them in raw quantity, but more of the people who count will be found NOT running Windows.

Smart people aren’t using Windows.  Oh sure, there are some but by and large the tech community is strongly moving to OS X and Linux.   I even see Windows support techs carrying Macbooks – and I don’t mean just the ones who wiped out OS X and put Vista on it.

Google (and anyone else) should develop OS X and Linux versions FIRST.  If they did that, they’d undoubtedly see a quicker and higher adoption rate when they do release the Windows version.

PCLinuxOS

January 4, 2009

I downloaded this from PCLinuxOS.com and installed it in a VM as I usually do.  I was immediately confused by the boot menu – this is one of those that doesn’t offer an “Installation” choice (even though pressing “F1” for Help references such a choice).  You boot the Live CD and install from there.

I also had a hard time finding my time zone – they put way too many choices in.  Amusingly, although the time zone manager had the correct time, after booting the LiveCD, it was wrong.  After installation to the hard drive it was still wrong but it was easy enough to find the tool in “Administration Center”.

I took a look at “Network Services” and was pleased to see that they don’t start much by default – Linux distros are generally getting much smarter about that.

Under “Security”, they let you configure a firewall – by default, that’s not turned on but as none of the sevices are either, that’s fine.

The whole Administration Center seems to be very well done – clean layout with both a simple, basic interface but more power available if you want it.  There’s an “Expert” mode that brings up even more options – I was suitably impressed.

Well, until I tried to quit out of it.  It doesn’t let me – the only choice was to minimize the window.  That’s fine, but I think a new user (especially a new Windows user) might be a little confused by that.  Wait, was that Administration Center or Control Center?  Which is which?  New user confusion time..

I fired up Firefox and found it was 2.0.  Hmm, oh yeah:  I haven’t asked this to do any updates yet.. where is that?  Hmmm.. don’t see it in Administration Center.. it has to be the “Package Manager” of course.. would a Windows user realize that?  Maybe..

But even if they do, how does it work?  I’ve never used this particular tool before – what do you do in Synaptics Package Manager to get it to check for updated software?  There’s a button for “Mark All Upgrades” – that seems a little less than intuitive to me but I could be splitting hairs.  I did that and noticed that although Firefox 3 was in the list, it wasn’t marked for installation.. I marked it and let it rip..

Six hundred and eighty seven files to download..  while that’s chugging along I can poke around a bit more..

It bothers me a little that Firefox wasn’t automatically selected for upgrade.   Firefox 2 didn’t have “Check for Updates” under its Help menu so a naive user could go a long time using an old browser.  Could be worse though:  they could have installed XP and Internet Explorer 6 🙂

PCLinuxOS uses KDE and automaticlally installs Klipper – that’s good, as I hate the default Linux cut and paste and any new Windows user is going to hate it more.  If they notice Klipper in their tray (which they surely will), they’ll be instantly delighted.

They also install OpenOffice and a lot of other typical desktop user tools – Amarok for example.  You might be interested in reading a self described N00b’s impressons of that at “Amarok Part 1” (no, that person wasn’t running PCLinuxOS but it’s a good writeup of a new users first impressions).

That darn new user thing..  I’m always worried about that.  I’d really like to recommend Linux to non-techy users, but I don’t want to be left holding the bag for support.    This PCLinuxOS is very user friendly, but is it friendly enough?  It’s not good enough that it be as friendly as XP – heck, it’s obviously a lot more friendly than Vista, but is it friendly enough to just hand over to a current XP user?

I don’t know.  My instincts say no, not quite.  Some users, sure.  The adventurous ones, the good humored  ones – the ones who wouldn’t have me on the phone every day!   But the rest..  seems risky to me.

OK, I’m waiting for those 687 files to finish installing.   I sure hope that all goes well.. can you tell I’ve seen systems killed by package upgrades before?  Oh, yeah..

There were some warning from the package manager after all the upgrades and installs finished.  I ignored them as any good Windows user would and rebooted.  Happily everything came up fine.  It didn’t upgrade Firefox though..

So I downloaded it and the system offered to open the download with Ark, which instantly failed.  Of course I can drop to a terminal and bzip2 -d the file, but will my imaginary n00bie know that?  Of course not..

But actually it HAD installed Firefox 3 – it just hadn’t updated the link on the desktop.  Again, nothing that a new user would understand, unfortunately.

Oh, well:  very nicely done anyway.  I’d recommend this as an option for anyone who is planning to use Linux anyway.. just not as a “switcher” choice.