Cult of Linux, and cheap cheap hardware

Potpourri. I just have two little things to write about today, so that’s what I’ll do.
The Cult of Linux, and cults of computing past. In yesterday’s comments, Dave Thorarinsson brought up an interesting phenomenon. He observed, when talking about his new Linux box and losing track of time learning it, “It pretty much feels like the time I had my Amiga.”

I remember reading in the mail section of Amiga magazines, more than a decade ago, “I haven’t had this much fun since I got my C-64!” And the old Commodore magazines noted that their C-64s had a special place in their devotees’ hearts and asked, “Have you ever heard of anyone getting attached to a PC clone?”

The inferred answer is no. And that doesn’t seem to have changed. Today, the biggest PC enthusiasts replace their machines frequently, relegating their old, unbeloved machines to grunt roles, or scrapping them for parts.

The C-64, by contrast, was a simple machine. Although it only had one slot for expansion, the motherboard itself was simple enough that just about anyone with a little bit of patience could trace it out and understand it. There was some unused address space in it that you could add chips to. Common projects included speech synthesizers and an extra sound chip, so you could have six-voice, stereo sound. And it seemed like most C-64 owners had tried their hand writing at least simple programs.

The Amiga was similar. It was harder to program, and a little harder to hack, but I had a subdirectory on my Amiga’s hard drive that was called “PD Hardware,” containing makeshift schematics for stuff I could build. I wired in a PAL/NTSC switch so I could change video standards and run European software correctly. I even designed an add-on board for it myself, once, to give myself an extra ROM socket. And of course I replaced much of the operating system with replacement utilities written by hobbyists that were smaller and faster, had more features, or both.

You want to know why the Amiga and C-64 fanatics were so loyal? They knew their machines inside and out, and to a degree that just wasn’t possible with a PC clone.

With Linux, the hardware doesn’t matter anymore, but you can customize the software to whatever extent you want. The hardest-core Linux people are doing just that. At a level below that, people compile the OS from source, from scratch. At a level below that, they just replace utilities with smaller and faster or more functional ones, like I was doing with my Amiga.

The long and the short of it is tweakers have a lot more liberties with Linux than they’ll ever get out of Redmond.

People who liked my book can certainly find a lot to like with Linux. People who fancy themselves experts but don’t really want to know how their computers work and who think books like mine are a waste of time will never be tied to Linux like the fanatics are.

Cheap hardware. It’s a buyer’s market. I’m building an intranet server for my church, and they have lots of bits and pieces but not quite enough for a complete system, so I did some looking around at my favorite bottom-fishing holes. You can get an awful lot of computer for next to nothing these days.

I’ve bought things at least once from each of these vendors, and they got stuff to me reasonably fast (within a week, ground shipping) so I feel reasonably comfortable recommending them.

Slot-1 barebones systems — case, power supply, slot 1 mobo (66 MHz FSB, so you’re stuck with P2s up to 333 MHz or Celerons, and according to the manufacturer, Celerons will work), and a floppy drive. $24.50. $19.95 if you don’t mind some wear. Very nice.

At the same place, scroll down and you can pick up Tier-1 business-class P2s for under $200. If you’re lucky you can sometimes even find a dual-capable machine. They go fast, but the getting’s good. Lots of businesses are dumping these due to their 3- or 4-year upgrade cycles. For someone who just wants to do word processing and e-mail, these systems are overkill. If you want to upgrade in pieces over the course of the next couple of years, the P2s with a 100 MHz FSB are workhorses and you can add lots of cheap memory, nice video cards, and fast, cheap hard drives. Gatermann just picked up an HP Vectra P2-266, dual capable, with SCSI, for $117. It will serve him well. He plans to run Debian on it, but I don’t know if he’s thinking of it as a server or a workstation. It’d make a fabulous server.

72-pin SIMMs — if you’ve still got a system that takes them, nice deals on 4-16MB sticks, and good deals on bigger sticks.

Low-end Pentium I desktops — P75-120, 16 meg of RAM, 1 MB video, who knows what else. $29.99. Nice for a low-end Linux box, or for a Win95 system that’s going to see limited use. Put a fast hard drive in it and it’ll surprise you. After you get yours, check and see what CPUs the system will take; a P200 can be had for as little as $16 and makes a nice upgrade. It’s a pretty big step up from 75 MHz to 200 MHz.

Seagate 9-gig 5.25″ full-height SCSI HD — $12.95. If you’ve got two 5.25″ bays open and no spacer between them, here’s a cheap way to fill it with 9 gigs of storage. I know a couple of people who have these drives. They’re surprisingly quick (they hold their own next to 7200-rpm 3.5″ disks). Back up your data and buy some spares if the shipping doesn’t kill you. One of the guys I know has several of these, and he’s had one or two die on him.

FIC AZ-11 ATX mobo — $34.95. It’ll take Durons and Athlon Thunderbirds. The fastest chip I’ve put in one is a 1 GHz Duron. No ISA slots and just 5 PCI slots, but it’s a capable board. I use one in my video editing workstation, and I paid more than 35 bucks for it. Totally obsolete, but when you can get a 1 GHz Duron and fan on this board for $89, who cares? It’ll still be a good computer in three years. Trust me.

I keep seeing this board on the closeout places, so I expect even after the current supply dries up, there’ll be more.

Speaking of closeout motherboards, there’s a variety of them over at Just Deals. You can get a Soyo Socket 370 board for $28 and various Socket A boards in the $35-$40 range. If it’s Slot 1 or even Slot A you’re looking for (maybe you’ve got a CPU laying around), you can find stuff there too.

And if you need a cheap copy of Word 97, you can get the Works 99 suite for 30 bucks.

Need an operating system for that new old computer? Prices range from $25 for Win95 to $180 for WinXP Pro.

Dave installs Windows XP

We needed an XP box at work for testing. Duty to do the dirty deed fell to me. So after ghosting the Windows 2000 station several of us share, I pulled out an XP CD. It installed surprisingly quickly–less than half an hour. The system is a P3-667 with 128 MB RAM and an IBM hard drive (I don’t know the model).
It found the network and had drivers for all the hardware in the box. That doesn’t happen very often with Microsoft OSs, so it was nice.

I booted into XP, to be greeted by a hillside that was just begging to be overrun by tanks, but instead of tanks, there was this humongo start menu. I right-clicked on the Start button, hit Properties, and picked Classic view. There. I had a Win95-like Start menu. While I was at it, I went back and picked small icons. I don’t like humongous Start menus.

I also don’t like training wheels and big, bubbly title bars. The system was dog slow, so I right-clicked on the desktop to see what I could find to turn off. I replaced the Windows XP theme with the Classic theme. Then I turned off that annoying fade effect.

Still, the system dragged. I went into Control Panel, System, Performance. Bingo. I could pick settings for best appearance (whose choices are certainly debatable–I guess they look good if you like bright colors and have a huge monitor) or best performance. Guess which I picked? Much better.

Next, I went into Networking. I saw some QoS thing. I did a search. It’s intended to improve the quality of your network, at the price of 20% of your bandwidth. Forget that. I killed it.

After I did all that stuff, XP was reasonably peppy. It logs on and off quickly. I installed Office 2000 and it worked fine. The apps loaded quickly–just a couple of seconds. That’s how it should be. If I went in and edited the shortcuts in the Start menu to turn off the splash screens, they’d load instantly.

WinXP brings up a bunch of popups that I don’t like. If I wanted unexpected popup windows, I’d run a Web browser. I couldn’t quickly figure out how to disable those.

I couldn’t run Windows Update. It froze every time I tried.

I found a Windows XP tuning guide at ExtremeTech. I suspect turning off the eye candy will help more than most of the suggestions in that article. I suspect if I dug around I’d find other things. We’ll see if I get some time.

XP isn’t as bad as I expected, I guess. But I’m still not going to buy it.

This, on the other hand, is worth a second look. And a third. You can now run MS Office on Linux. No need to wait for Lindows, no need to abandon your current fave distro (at least if your fave distro is Red Hat, SuSE, Mandrake, Debian, or Caldera).

It’s 55 bucks. It’s available today. It brings Office 97/2000 and Lotus Notes r5 to your Linux desktop. Other Windows apps work, but their functionality isn’t guaranteed.

You can get some screenshots at CodeWeavers. It even makes the apps look like native Linux apps.

Linux reliability

Linux reliability. Steve Mahaffey brought up a good point yesterday, while I was off on a consulting gig, where I learned one of the secrets of the universe–but since it’ll bore a lot of people to tears, I’ll save that for the end.
I’ve found that text-based apps and servers in Linux are extremely reliable. As David Huff’s tagline reads, “Linux: Because reboots are for upgrades.” If you’re running a server, that’s pretty much true. Unless you have to upgrade the kernel or install hardware that requires you to open the case, you can go for months or years without upgrading it.

The problem with Linux workstations is that up until very recently, the GUI apps people want to run the most have been in beta. The developers made no bones about their quality, but companies like Red Hat and Mandrake and SuSE have been shipping development versions of these apps anyway. On one hand, I don’t blame them. People want programs that will do what they’re used to doing in Windows. They want word processors that look like Word and mail clients that look like Outlook, and if they’re good enough–that is, they don’t crash much more than their Windows equivalents and they provide nearly as much functionality, or, in some cases, one or two things MS didn’t think of–they’ll put up with it. Because, let’s face it, for 50 bucks (or for nothing if you just download it off the ‘net) you’re getting something that’s capable of doing the job of Microsoft packages that would set you back at least $1,000. Even if you just use it for e-mail and Web access, you come out ahead.

The bigger bone I have to pick with Red Hat and Mandrake and, to some extent, even SuSE is where they put experimental code. I don’t mind experimental desktop apps–I’ve been running Galeon since around version 0.8 or so. But when you start using bleeding-edge versions of really low-level stuff like the C compiler and system libraries just to try to eke out some more performance, that really bothers me. There are better ways to improve performance than using experimental compilers. Not turning on every possible daemon (server) is a good start.

Compile beta-quality apps with a compiler that’s beta quality itself, and throw in every other bleeding-edge feature you can think of, and you’ll end up with a system that has the potential to rival Windows’ instability. Absolutely.

That’s one reason I like Debian. Debian releases seem to take as long as the Linux kernel does, and that’s frustrating, but reassuring. You can install the current stable Debian package, then add one or more of the more desirable apps from either the testing or unstable tree (despite the name, Debian unstable’s stability seems comparable to Mandrake) and have the best of all worlds. And when a .01 release of something comes out (which it always seems to do, and quickly) it’s two commands to upgrade to it.

It’ll be interesting to see how Lycoris (formerly Redmond Linux) pans out. Lycoris appears to take a more conservative approach, at least with the number of apps they install. If that conservatism extends to the versions of those packages they install, it’ll go a long way towards extending server Linux’s reliability to the desktop.

Debian is intimidating. I find it less intimidating than Slackware, but it does zero handholding during installation. So generally I recommend someone start with SuSE or Mandrake or Red Hat, get comfortable with how things are laid out, and get familiar with PC hardware if not already, and then, once feeling brave, tackle Debian. Debian is hard to install, but its quality is pristine and it’s exceptionally easy to maintain. Debian developers try to justify the difficulty of installing it by saying no one ever has to install it twice on the same PC, and they’re right about the second part. Eventually I expect they’ll take the installer from another distro that’s based on Debian to make it easier, but it won’t be in Debian 3.0 and it may not make it into 3.1 either.

The secret of consulting. My employer sent me off on a consulting gig yesterday. The main reason for it, I suspect, is because of my training as a journalist. It means I can ask questions, keep track of the answers, and make a PowerPoint presentation that looks decent.

Consultants get a bad rap because they’re notorious for not knowing anything. You pay lots of money to have someone who knows nothing about you and potentially nothing about your problem come in and ask questions, then come back later and give you a dog-and-pony show featuring sugar-coated versions of your answers and little else.

I won’t say who my client is, nor will I say who my employer is. What I will say is that my partner in this endeavor knows a whole lot more about the subject matter than I do. I’ll also say that the two of us are good researchers and can learn very quickly. Our regular job titles attest to that. We both have liberal arts degrees but we primarily work as systems administrators. We didn’t learn this stuff in school.

Up until Monday, I knew nothing about our client. Absolutely nothing. Up until yesterday afternoon, I knew nothing meaningful about the client. I knew its name and what its logo looked like, the name of one person who worked there, and I had a vague notion what they wanted to know.

I think that was an advantage. We both asked a lot of questions. I wrote down the answers quickly, along with whatever other information I could gleen. We left three hours later. I had six pages of typewritten notes and enough documents from them to fill a standard manilla file folder. We knew what they didn’t want, and we knew they were willing to throw money at the problem.

There’s such thing as knowing too much. One of the solutions they’re considering is overkill. The other is underkill. The difference in price between them is about 3 times our consulting fee. It took me another hour’s worth of research to find something that will give them the bare minimum of what they need for about $500 worth of additional equipment on top of the low-ball figure. When you’re talking the high-ball figure costing in excess of $40,000, that’s nothing. I found another approach that basically combines the two that will double the cost of the low-ball figure, but still save them enough to more than justify our fee.

I don’t know their internal politics or their priorities on the nice-to-have features. My job isn’t to tell them what to buy. Nor is it my job to give them my opinion on what they should buy. My job is to give them their options, based on the bare, basic facts. Whatever they buy, my feelings won’t be hurt, and there’s every possibility I’ll never see them again. They’ll make a better-informed decision than they would have if they’d never met me, and that’s the important thing to all involved.

I never thought I’d be able to justify a role as a high-priced expert on nothing relevant. But in this case at least, being an expert on absolutely nothing relevant is probably the best thing I could have brought to the table.

And since we haven’t done a whole lot of this kind of consulting before, I’ll get to establish some precedents and blaze a trail for future projects. That’s cool.

That other thing. There’s a lot of talk about the current scandal in Roman Catholicism. It’s not a new scandal; it’s been a dirty little — and not very well-kept — secret for years. There’s more to the issue than we’re reading in the papers. I’ll talk about that tomorrow. I come neither to defend nor condemn the Roman Catholic church. Its problems aren’t unique to Catholicism and they’re not unique to the Christianity either. Just ask my former Scoutmaster, whose filthy deeds earned him some hefty jail time a decade and a half ago.

Stay tuned.

A couple of quick things

Scanners in Windows 2000. While those two pompous, arrogant gits were out romping about and insulting one another, I was helping Gatermann put together an all-SCSI Windows 2000 system. I talked about that earlier this week. After much wrestling, we got the system booting and working, but his expensive Canon film scanner, which was the reason for all of this adventuring in the first place–his eclectic mix of Ultra160 and SCSI-2 and internal and external components was too much for his old card to handle–wouldn’t work under 2000. It worked fine in Win98, however. But if you’re scanning film, you’re pretty serious about your work, and 2000’s lack of stability is bad enough, while Win98’s lack of stability is enraging.
Side note: His scanner worked just fine in Linux with SANE and GIMP. The SANE driver was alpha-quality, but once he figured out the mislabeled buttons, it worked. Though flawed, it was no worse than a lot of drivers people ship for Windows, and it wasn’t any harder to set up either. Not bad, especially considering what he paid for it.

Gatermann, being a resourceful sort, did a search on Google groups and found a suggestion that he update his ASPI drivers. Since he had an Adaptec card, he could freely download and use Adaptec’s ASPI layer. He did, and the scanner started working.

It’s been a long time since I’ve had to do that to get a scanner going, but it’s been a long time since I’ve set up a SCSI scanner too.

Debian. At work on Friday, I booted the computer on my desk into Linux out of protest (more on that later… a lot more) and I figured while I was in Linux reading and responding to e-mail and keeping up with the usual news sources (I wasn’t having to do any NT administration at the time, which was why I was able to protest), I’d run apt-get update and apt-get upgrade. I run Debian Unstable at work, because Debian Unstable, though it’s considered alpha, is still every bit as stable as the stuff Mandrake and Red Hat have been pushing out the door the past 18 months. It’s also about as close to cutting-edge as I want to live on. Well, it had been a while since I did an update, and I was pleasantly surprised to find I suddenly had antialiased text in Galeon. That’s been my only gripe about Galeon until recently; the fonts looked OK, but they looked a whole lot better in Windows or on a Mac. The quality of the antialiasing still isn’t as good as in Windows, which in turn isn’t as good as on the Mac, but it’s better than none at all.

Galeon was already faster than any Windows-based browser I’d seen, but a recent Galeon build combined with the 0.99 build of Mozilla seemed even faster, and Web sites that previously didn’t render quite right (like Dan’s Data now rendered the same way as in that big, ugly browser from that monopolist in Redmond.

I expect with these last couple of updates, I’ll be spending even more time in Linux from here on out. I already have a full-time Linux station, but I use it about half the time and my Windows 2000 station about half the time. I may limit the Windows 2000 station to video editing very soon. And with some of the cool video programs out there for Linux now, it may share time. I suspect I’ll be doing editing on the Windows box, post-production on the Linux box, and then outputting the results to tape on the Windows box.

Full disclosure and integrity

I feel like I owe it to my readers to disclose a few things, due to the events of recent weeks raising a few questions in some people’s minds.

Read more

The penguins are coming!

The penguins are coming! Word came down from the corner office (the really big corner office) that he wants us to get really serious about Linux. He sees Linux as a cheap and reliable solution to some of the problems some outside clients are having. This is good. Really good.
My boss asked if it would be a capable answer to our needs, namely, for ISP-style e-mail and for Web caching. But of course. Then he asked if I was interested in pursuing it. Now that’s a silly question.

Now it could be that FreeBSD would be even better, but I know Linux. I don’t know FreeBSD all that well. I’ve installed it once and I was able to find my way around it, but I can fix Linux much more quickly. The two of us who are likely to be asked to administer this stuff both have much more Linux experience than we have BSD experience. Plus you can buy Linux support; I don’t know if you can buy FreeBSD support. I doubt we will, but in my experience, clients want to know (or at least think) that some big company is standing behind us. They’re more comfortable if we can buy support from IBM.

So maybe my days of Linux being a skunkworks project are over. The skunkworks Linux boxes were really cleverly disguised too–they were Macintoshes. They’re still useful for something I’m sure. I expect I’ll draft one of them for proof-of-concept duty, which will save us from having to pull a Compaq server from other duty.

I spent a good portion of the day installing Debian 3.0 on an old Micron Trek 2 laptop. It’s a Pentium II-300 with 64 megs of RAM. It boots fast, but current pigware apps tend to chew up the available memory pretty fast. I recompiled the kernel for the hardware actually in the machine and it helped some. It’s definitely useful for learning Linux, which is its intended use.

I’ve noticed a lot of people interested in Linux lately. One of our NT admins has been browsing my bookshelf, asking about books, and he borrowed one the other day. Our other NT admin wants to borrow it when he’s done with it. The Trek 2 I installed today is for our senior VMS admin, who wants a machine to learn with. My boss, who’s been experimenting with Linux for a couple of years, has been pushing it aggressively of late.

I don’t know if this situation is unique, but it means something.

I spent a good part of the evening at the batting cages. I messed my timing up something fierce. I hit the first few pitches to the opposite field, some of them weakly, but soon I was hitting everything–and I mean everything–to the third-base side. So my bat speed came back pretty fast, and I was getting way out in front of a lot of the pitches. So I started waiting on the ball longer, hoping to start hitting the ball where it’s pitched. The end result was missing about a quarter of the time, slashing it foul to the third-base side a quarter of the time, hitting it weakly where it was pitched a quarter of the time, and hitting it solidly where it was pitched a quarter of the time. Good thing the season doesn’t start until June–I’ve got some work to do.

Afterward, I drove to my old high school, hoping to be able to run a lap or two around the track. I was hoping for two; realistically I knew I’d probably be doing well to manage one. There was something going on there, and I couldn’t tell if the track was in use or not, so I kept driving. Eventually I ended up at a park near my apartment. I parked my car, found a bit of straightaway, and ran back and forth until I was winded. It didn’t take long.

I can still run about as fast as I could when I was a teenager, but my endurance is gone. I’m hoping I can pick that back up a little bit. I was a catcher last season, filling in occasionally at first base and in left field. In the league I play in, we usually play girls at second and third base, and we’ve got a couple of guys who can really play shortstop, so I’ll probably never play short. When I was young I played mostly left field and second. I’d like to roam left field again. Not that I mind catching, but there’s a certain nostalgia about going back to my old position.

Stopping spam.

Forget what I wrote yesterday. I was going to post the stuff I wrote in Ohio when I realized it isn’t all that good, it’s definitely not useful, and the people who annoy me the most are the people who can’t get over themselves. No one cares what I ate for breakfast, and the only people who care what went on in Ohio already know.
So here’s something useful instead. It’s the coolest thing I’ve found all year. Maybe all decade, for that matter.

Spam begone. I hate spam. It wastes my time and my bandwidth and, ultimately, my money. I’ve seen some estimates that spam costs ISPs as much as $5 per month per account. You’d better believe they’re passing those losses on to you.

There are tons and tons of anti-spam solutions out there, but most of them run on the mailserver side, so for an end-user to use them, they have to set up a mail server and either use it for mail or run fetchmail to pull the mail in from ISP’s mail servers. I’ve done that, but it’s convoluted. But that’s trivial compared to setting up the anti-spam kits.

I was crusing along, vaguely happy, when my local mailserver developed bad sectors on the hard drive, so one day when I went to read my mail, I heard clunking noises. I turned around, flipped on the power switch to the server’s attached monitor, and saw read errors. Hmm. I hope that mail wasn’t important…

Eventually I shut down my mail server and put up with the spam, hoping I’d come up with a better idea.

I found it in a Perl script called disspam.pl, written by Mina Naguib.

It took a little doing to get it running in Debian. Theoretically it’ll run on any OS that has Perl installed. Here’s what I did in Debian:

su (to become root)
apt-get install libnet-perl (Perl couldn’t see the network without this, so the next command in this sequence was failing. This hopefully isn’t necessary on other distros, as I have no idea what the equivalent would be.)
perl -MCPAN -e shell (as per readme–I accepted the defaults, then when it asked for CPAN servers, I told it my continent and country. Then it gave me 48 choices. I picked a handful at random, since none were any more obviously close to me than others.)
install Net::POP3 (as per readme)
quit
cp sample.conf disspam.conf
chmod 755 disspam.pl

Next, I loaded up disspam.conf into a text editor. It looks just like a Windows-ish INI file.

The second line gives me an exclude list. It’ll take names and e-mail addresses. So I put in a few important names that could possibly be blocked (friends with AOL and Hotmail addresses). That way if their ISPs ever misbehave and get blacklisted, their mail will still get to me. Then I popped down to the end of the file and configured my POP3 mailbox. I had an account I hadn’t read in a week, so I figured I’d get a good test. Just drop in your username, password, and POP3 server like you would for your e-mail client. If you have more than one account, copy and paste the section.

Bada bing, bada boom. You’re set. Run disspam.pl and watch. In my case, it flagged and deleted about a dozen messages, typical of what I usually get, like mail offering me Viagra or access to horny cheerleaders or how to find out anything about anyone (which I already know–I have a journalism degree). The only questionable thing it flagged was mail from MLB.com. I can’t get off their mailing list ever since I voted online for the All-Star game. No importa, I never read that mail anyway. I could have always added MLB.com to my exclude list if what they had to say mattered to me.

But if you’re like me and get lots of mail–that was my less-busy account–and about half of it is spam, that stuff’s going to scroll by really fast. So here’s what I recommend doing: when you execute disspam.pl, use the following command line:

~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log

Then you can examine disspam.log. If disspam ever deletes something it shouldn’t have, you can add the person to your exclude list and e-mail them to ask what they wanted. It looks to be less work than deleting all that spam. Probably less embarrassing too. Have you ever accidentally opened one of those horny cheerleader e-mail messages when there were people around? Yikes!

I fired up Ximian Evolution, pulled down my mail, and had 15 new messages. No spam. None. Sweet bliss.

It’s just version 0.05 and the author considers it beta, but I love it already.

Unix’s power allows you to string simple tools together to make powerful ones. Here are some suggestions.

You can e-mail the log to yourself with these commands:

mail -s disspam [your_address] rm ~/disspam/disspam.log

If you want the computer to do all the work for you, here’s the command sequence:

cronttab

Then add these entries:

0 0 * * * mail -s disspam [your_address] * 0 * * * ~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log

If you read your mail on the same machine that runs disspam, you can substitute your user account name for your e-mail address and save your ISP a little traffic.

You’ll have to provide explicit paths for disspam.pl and disspam.conf.

The first entry causes it to mail the log at midnight, then delete the original. The second entry filters your inbox(es) on the hour, every hour. To filter more frequently you can add more lines:


* 10 * * * ~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log
* 20 * * * ~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log
* 30 * * * ~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log
* 40 * * * ~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log
* 50 * * * ~/disspam/disspam.pl ~/disspam/disspam.conf >> ~/disspam/disspam.log

This program shouldn’t be necessary for very long. It’s short and simple (4.5K worth of Perl) so there’s no reason why mail clients shouldn’t start incorporating similar code. Until they do, you run the risk of disspam and your mail client getting out of sync and some spam coming through. If you read your mail on a Linux box with an mbox-compliant client like Sylpheed or Balsa or Kmail, you can bring fetchmail into the equation. Then create a .fetchmailrc file in your home directory (name it ~/.fetchmailrc to ensure it goes to the right place). Here’s the format of .fetchmailrc:

poll SERVERNAME protocol PROTOCOL username NAME password PASSWORD

So here’s an example that would work for me:

poll mail.swbell.net protocol pop3 username dfarq password censored

Next, set your mail client to no longer check for mail automatically, then type crontab and edit your disspam lines so they read like this:

* 20 * * * disspam.pl disspam.conf >> ~/disspam.log ; fetchmail (your server name)

In case you’re interested, the semicolon tells Unix not to execute the second command until the first one is complete. If you have more than one mail account, add another fetchmail line.

As an aside, Evolution seems to use the mbox file format but it doesn’t store its file where fetchmail will find it. I think you could symlink /var/spool/mail/yourusername to ~/evolution/local/Inbox/mbox and it would work. I haven’t tried that little trick yet.

But even if you’re not ambitious enough to make it run automatically and integrate with all that other stuff, it’s still a killer utility you can run manually. And for that matter, if you can get Perl running on NT or even on a Mac, this ought to run on them as well.

Check it out. It’ll save you time and aggravation. And since it only reads the headers to decide what’s spam and what’s not, it’ll save bandwidth and, ultimately, it’ll save your ISP a little cash. Not tons, but every little bit can help. You can’t expect them to pass their savings on to you, but they’ll certainly pass their increased expenses on to you. So you might as well do a little something to lower those expenses if you can. Sometimes goodwill comes back around.

Another RISC platform for Linux

Vintage workstations. I’ve read two articles this past week about running Linux or another free Unix on vintage hardware.
http://www.debianplanet.org/article.php?sid=605
http://www.newsforge.com/article.pl?sid=02/02/19/049208&mode=thread

And while I can certainly appreciate the appeal of running a modern free Unix on a classic workstation from the likes of DEC or Sun or SGI, there’s another class of (nearly) workstation-quality hardware that didn’t get mentioned, and is much easier to come by.

Apple Power Macintoshes.

Don’t laugh. Apple has made some real dogs in the past, yes. But most of their machines are of excellent quality. And most of the appeal of a workstation-class machine also applies to an old Mac: RISC processor, SCSI disk drives, lots of memory slots. And since 7000-series and 9000-series Macs used PCI, you’ve got the advantage of being able to use cheap PC peripherals with them. So if you want to slap in a pair of 10,000-rpm hard drives and a modern SCSI controller, nothing’s stopping you.

There’s always a Mac fanatic out there somewhere willing to pay an exhorbinant amount of money for a six-year-old Mac, so you won’t always find a great deal. Thanks to the release of OS X (which Apple doesn’t support on anything prior to the Power Mac G3, and that includes older machines with G3 upgrade cards), the days of a 120 MHz Mac built in 1996 with a 500-meg HD and 32 megs of RAM selling for $500 are, fortunately, over. Those machines run Linux surprisingly well. Linux of course loves SCSI. And the PPC gives slightly higher performance than the comparable Pentium.

And if you’re lucky, sometimes you can find a Mac dirt-cheap before a Mac fanatic gets to it.

The biggest advantage of using a Mac over a workstation is the wealth of information available online about them. You can visit www.macgurus.com to get mainboard diagrams for virtually every Mac ever made. You can visit www.everymac.com for specs on all of them. And you can visit www.lowendmac.com for comprehensive write-ups on virtually every Mac ever made and learn the pitfalls inherent in them, as well as tips for cheap hardware upgrades to squeeze more speed out of them. I learned on lowendmac.com that adding video memory to a 7200 increases video performance substantially because it doubles the memory bandwidth. And on models like the 7300, 7500, and 7600, you can interleave the memory to gain performance.

Besides being better-built than many Intel-based boxes, another really big advantage of non-x86 hardware (be it PowerPC, Alpha, SPARC, MIPS, or something else) is obscurity. Many of the vulerabilities present in x86 Linux are likely to be present in the non-x86 versions as well. But in the case of buffer overflows, an exploit that would allow a hacker to gain root access on an Intel box will probably just crash the non-x86 box, because the machine language is different. And a would-be hacker may well run into big-endian/little-endian problems as well.

http://homepages.ihug.com.au/~aturner/7200boot.html

Trolling the web for nothing in particular

Yes, Brian, baseball will soon return. I hate the things Major League Baseball does (Bob Costas once likened choosing sides between the players and the owners to choosing sides between Iran and Iraq), but we’ve chosen to stay together for the kids. I’m sure everyone who cares (and some who don’t) can guess what I think of Bud Selig, but I’ll tell you anyway, soon enough.
In the meantime, I look like ArsTechnica today. Oh well. I don’t do this very often.

Blogging. Wired News had its take on the phenomenon, and threw out some interesting stats.


In January alone, at least 41,000 people created new blogs using Blogger, and that number is always increasing, [Blogger founder Evan] Williams said. Some have put the total number of weblogs at more than 500,000.

Alongside the boom, however, there have recently been a few faint signs of backlash. As increasing hordes take on the task of trying to keep new sites looking nice, sounding original and free from banalities, more hordes just seem to fail.

Blog critic Dave Linabury offered a recipe for success:


“It really can take a lot of time,” he said. “I spend two hours a day on my weblog. Many people don’t realize this, they think it’s a quick way to get popular. And after awhile they get really discouraged and say, ‘he got 2,300 hits today, I got four.’ The bulk of people out there get less than two dozen hits.”

“I don’t want to be elitist,” Linabury added, “but all these people out there with popular weblogs, they’ve been doing it longer and they stick to their guns.”

I can attest to that. The people who get more traffic than I get almost all have been doing this longer. But I can tell you one thing: It’s never enough. Back when I was getting 80 visits a day I wanted 150. When I was getting 150 visits a day, I wanted 250. Now that I get about 500 visits a day, I’m awfully distressed to see people are getting 2,300. And by the time I reach 2,300, I’m sure there will be people getting 5,000 or even 10,000. (Note that visits are the number of unique visitors; hits are the number of files served up. Hit count is deceptive. I get 500 visits per day but closer to 1,000 or even 1,500 hits per day, due to people visiting, reading comments, and then often reading something from a previous week. And if they do a search, that’s at least two additional hits.)

Link

Another feather in Internet Explorer’s cap. To my knowledge, no new security vulnerabilities have been reported in Internet Explorer this week, but the newest security patch, released last week, contains a bug that can cause a VBscript directive that previously worked to crash the browser.

Microsoft says Webmasters need to modify their pages not to use the directive.

That’s nice (I don’t use VBscript on this site) but there are embedded devices, such as HP’s JetDirect card, that use the directive. So early adopters of this patch may find themselves unable to do their jobs.

Better webmaster recommendation: Don’t use VBscript or ActiveX or other Microsoft-owned languages in your Web pages at all. Better end-user recommendation: Use Mozilla or a derivative instead of Internet Explorer.

Link

Recompiling Debian for your hardware. This thread comes up every so often, and with the popularity of Linux From Scratch and Gentoo, the appeal of a compiled-from-scratch Debian is undeniable. But does the small speed improvement offset the increased difficulty and time in upgrading?

The consensus seems to be that recompiling gzip, bzip2, and gnupg with aggressive options makes sense, as does recompiling your kernel. Recompiling XFree86 may also make some sense. But expending time and energy in the perfectly optimized versions of ls and more is foolhardy. (Especially seeing as speed demons can just get assembly language versions of them from www.linuxassembly.org.)

Link

A Guide to Debian. This is a guide, still incomplete, that gives a number of tips for someone who’s just installed Debian. The tips are applicable to other many other Linux (and even Unix) flavors as well.

Link

Spam. A coworker walked into my cube today and asked me how he could keep web robots from harvesting e-mail addresses from his web site. I found myself referring once again to the definitive piece on the subject, from Brett Glass (who gets my nomination for the greatest computer columnist of all time, for what that’s worth).

Link

The RULE project. A project has emerged to bring Red Hat Linux back to its roots, and allow it to run on older, less-powerful hardware.

From their site:


This install option is meant to benefit primarily two classes of users:

* GNU/Linux newbies who cannot afford modern computers, but still need, to get started more easily, an up to date, well documented distribution.
* System administrators and power users who have no interest in eye candy, and want to run updated software on whatever hardware is available, to minimize costs, or just because it feels like the right thing to do.

I love their FAQ. Check this out:


1.0 Hardware is so cheap today, why bother?

1. This is a very limited and egoistic attitude. Eigthy per cent of the world population still has to work many months or years to afford a computer that can run decently the majority of modern, apparently “Free” software.
2. Many people who could afford a new computer every two years rightly prefer to buy something else, like vacations, for example…. Hardware should be changed only when it breaks, or when the user’s needs increase a lot (for example when one starts to do video editing). Not because “Free” Software requires more and more expensive hardware every year.

These guys have the right idea. I can only hope their work will influence other Linux distributions as well.

Link

Linux uptime. (Sure, a little original content.) When I was rearranging things months ago, I unplugged the keyboard and monitor from my webserver, then I never got around to plugging them back in because I didn’t have to do anything with it.

The other day, I had occasion to plug a keyboard and mouse back into it. I went in, did what I wanted to do, then out of curiosity I typed the uptime command. 255 days, it told me. In other words, I haven’t rebooted since last May, which, as I recall, was about when I put the machine into production.

Linkfest Friday…

Let’s start things off with some links. Web development’s been on my mind the last few days. There’s a whole other world I’ve been wanting to explore for a couple of years, and I’ve finally collected the information that’ll let me do it.
Redirecting virus attacks — Your neighbor’s got Nimda? Here’s how to get his IIS server to quit harassing your Apache server. (Suggests redirecting to a bogus address; I’m inclined to redirect either to 127.0.0.1 or www.microsoft.com, personally.)

DJG’s help setting up MySQL. Apache, MySQL and PHP are a fabulous combination, but bootstrapping it can be a painful process. People talk about writing a sendmail.cf file as their loss of innocence, but I’ve written one of those and I’ve tried to set up the LAMP quartet. The sendmail.cf file was easier because there’s a whole lot more written about it.

Short version: Use Debian. Forget all the other distributions, because they’ll install the pieces, but rarely do they put the conduits in place for the three pieces to talk. It’s much easier to just download and compile the source. If that doesn’t sound like fun to you, use Debian and save some heartache. If you’re stuck with the distro you have, download ApacheToolbox and use it. You’ll probably have to configure your C/C++ compiler and development libraries. That’s not as bad as it sounds, but I’m biased. I’ve compiled entire distributions by hand–to the point that I’ve taken Linux From Scratch, decided I didn’t like some of the components they used because they were too bloated for me, and replaced them with slimmer alternatives. (The result mostly worked. Mostly.) You’ve gotta be a bit of a gearhead to take that approach.

Debian’s easier. Let’s follow that. Use this command sequence:

apt-get install apache
apt-get install php4-mysql
apt-get install mysql-server

Next, edit /etc/apache/httpd.conf. There’s a commented-out line in there that loads the php4 module. Uncomment that. Just search for php. It’ll be the third or fourth instance. Also, search for index.html. To that line, add the argument index.php. If you make index.php the first argument, access to PHP pages will be slightly faster. Pull out any filetypes you’re not using–if you’ll never make an index page called anything but index.html or index.php, pull the others and Apache will perform better.

Got that? Apache’s configured. Yes, the php installation could make those changes for you. It doesn’t. I’m not sure why. But trust me, this is a whole lot less painful than it is under Red Hat.

But you’re not ready to go just yet. If you try to go now, MySQL will just deny everything. Read this to get you the rest of the way.

Once you’ve got that in place, there are literally thousands of PHP and PHP/MySQL apps and applets out there. If you can imagine it, you can build it. If HTML is a 2D world, PHP and MySQL are the third and fourth dimension.

Am I going to be playing in that world? You’d better believe it. How soon? It depends on how quickly I can get my content whipped into shape for importing.

This is the holy grail. My first editing job was doing markup for the Digital Missourian, which the faculty at the University of Missouri School of Journalism believe was the first electronic newspaper (it came into being in 1986 or so). By the time I was working there in the late summer of 1995, it had been on the ‘Net for several years. About eight of us sat in a room that was originally a big storage closet, hunched in front of 486s, pulling stories off the copydesk, adding HTML markup, and FTPing them to a big Unix cluster on the MU campus. We ran a programmable word processor called DeScribe, and we worked out some macros to help speed along the markup.

No big operation works that way anymore. There aren’t enough college students in the world. You feed your content to a database, be it Oracle or IBM DB2 or Microsoft SQL Server or MySQL or PostgresSQL. Rather than coding in straight HTML, you use a scripting language–be it PHP or ASP–that queries the database, pulls the content, applies a template, and generates the HTML on the fly. The story goes from the copy editor’s desk to the Web with no human intervention.

There are distinct advantages to this approach even for a small-time operation like me. Putting the content in a database gives you much more versatility. Some people want overdesigned Web sites. Some want something middle-ground, like this one. Others want black text on a gray background like we had in 1994. You can offer selectable formats to them. You can offer printer-friendly pages. You can even generate PDFs on the fly if you want–something some sites are doing now in an effort to gain revenue. If you have content from various sources, you can slice and dice and combine it in any imaginable way.

I can’t wait.