When You’re The Server Wrangler

Though this blog belongs to me, it doesn’t live with me. www.geofffox.com resides on a computer somewhere in the suburbs west of Philadelphia. I rent a tiny sliver of the server which is shared with countless others.

I pay the hosting company to handle the operating system and play traffic cop if one of the tenants uses more than his fair share of the resources. I handle the rest, including the code that runs my site.

About two weeks ago the server stopped allowing me to upload new files.

Uh oh.

I poked around and found that though I have unlimited storage space (I’m using around 10 Gb of storage) there is a limit to the number of individual files. Sneaky.

I am allowed 262,144 files. That should be plenty. Unfortunately a quick check showed I was at the limit.

Why?

In a case like this there are a few go-to geeks I lean on. Not this time. This was going to be my challenge!

My server is headless, meaning there is no pretty graphical screen like you see on your computer. My only means of communication is through a terminal program.

Think Matthew Broderick in War Games!

This is where Google is indispensable as a tech support tool. A half dozen keywords hinting at what I wanted went in, a site with exactly the code I needed came out!

du ~/*|sort -n

Those characters commanded my server to count the number of files in each of its directories, then list them starting with the directory containing the most files.

Within seconds I found the problem. A caching plug-in, a tiny program to make this website faster for you, had gone nuts! It had spawned hundreds of thousands of files and never cleaned up after itself.

Two minutes later after an uninstall/reinstall I was 184,783 files short of a full load. Problem solved… at least for now.

My Geek Cred

Hackers who modify other people’s computer code (sometimes for nefarious purposes) are called “script kiddies.” Literally, they know just enough to be dangerous!

That’s me. I am a script kiddie!

Hackers who modify other people’s computer code (sometimes for nefarious purposes) are called “script kiddies.” Literally, they know just enough to be dangerous!

That’s me. I am a script kiddie!

I spent the last few days configuring this laptop as a Linux development platform. That means acting as a webserver, though only on my network at home.

Tonight Apache2, PHP, and MySQL went in. These are core components for serving web pages. All of them are free and used on millions of sites.

Installation instructions are sparse at best. You are often on your own making educated guesses and retracing steps.

I have no clue what I’m doing. It works! That’s enough.

The last step was installing WordPress, the software that runs this blog. WordPress is the reason every blog entry looks similar to all the others. It places my words and photos inside the look I created.

The image at the top of this page is a screencap showing the WordPress method of creating a page.

A new WordPress theme is my goal. It will be written here in its own little protected sandbox When finished it will move to the commercial production server I rent. It should modernize my blog’s look. Past experience says everyone will hate it at first.

All the programs I’ve mentioned were written by developers who possess great skill. It’s mind boggling to contemplate how complex these creations get. I’m just a script kiddie. My goal is to customize what’s already written. There’s no way I could start from scratch.

Doing this is challenging. It’s how I’m getting back in shape to go out in the world again.

Linux Installs Are Never Easy

Does my blog have new PC smell tonight? I’m typing on an old laptop running a freshly installed version of Ubuntu Linux.

Quick explanation. Linux serves the same purpose as Windows or Mac OS. It is an operating system. Linux comes in a variety of ‘flavors’ of which Ubuntu is one.

Programs that run on Macs or Windows PCs (mainly) don’t run on Linux and vice versa.

Linux is free and user supported. It is often used in scientific applications or where 24/7/365 reliability is demanded.

Most of the Internet runs on Linux. Google, eBay, Facebook and Wikipedia all run on Linux servers. So does geofffox.com.

My reason for Linux on this laptop is different. I needed a challenging tech problem. My mind has festered aimlessly for the last few months. This would force me to focus and concentrate.

Though Linux is a powerful operating system it has never been an easy install!

There’s a version of Ubuntu called Studio. It comes with programs specifically made for media manipulation. That sounded right for me.

Ubuntu Studio loaded perfectly… except for the systems that controlled WiFi and sound. I fixed the WiFi problem, but could never get the sound working.

There are compromises I’ll make, but sound? Nah.

I tried another version… and then another before finally getting one to install! Even then I had to use an arcane terminal program to manually entre the proper code to install WiFi.

In this regard Linux isn’t ready for prime time. This stuff should have been fixed years ago.

For web browsing and most of the usual Internet pursuits Linux is just fine (after you get it working). Actually it’s better than fine because virus writers leave it alone! There are too few Linux desktops to make it worth the hackers time! Helaine’s laptop has been running an earlier edition of Ubuntu for a few years with few problems.

It’s possible this laptop will end up with its screen off acting as a LAMP (Linux, Apache, MySQL, PHP) stack for web development. It’s probably where the next version of this blog will come from. Or it might go back on the shelf waiting for the next time I need a challenge.

Right now it’s the laptop under my fingers. That’s enough.

Olympics Streaming Nearly Gets It Right

Earlier, Helaine called me to her computer. The free online Olympic streaming was hung up at the point where her Comcast credentials were requested. The process failed by returning her to the point where she was asked to specify our cable provider.

The photo above is the table tennis venue at the 2012 London Olympics. OK, no one was playing when I tuned in, but at least I was finally able to tune in. Mostly the online Olympic video has been a pain or a fail.

Earlier, Helaine called me to her computer. The free online Olympic streaming was hung up at the point where her Comcast credentials were requested. The process failed by returning her to the point where she was asked to specify our cable provider.

Oh, yeah. You need to subscribe to cable or satellite to get the free streaming. Cord cutters are not welcome!

As it turns out most flavors of Linux, the operating system on Helaine’s laptop, are suffering this same indignity. Considering the streaming seems to come out of a custom YouTube channel and YouTube videos are usually easily seen on her laptop this is a head scratcher.

The problem is Ubuntu and some other Linux ‘flavors’ don’t automatically load the DRM (digital rights management) software necessary to protect NBC’s investment. Finding this solution was not easy. In fact my last blog entry is a small attempt to make it easier for others following in my footsteps.

Helaine can now watch Rhythmic Weightlifting and the Javelin Catch even if they’re not on TV.

For my Asus Transformer Prime tablet the problem is a little more vexing. It’s not supported, period!

The “NBC Olympics Live Extra” app will let users watch more than 3,500 hours of live events on tablets and smartphones. But only customers who have a cable or satellite subscription will get full access — and the app is available only on Apple devices and a “select” list of Android phones and tablets. — (CNNMoney)

Not only isn’t my tablet ‘selected,’ neither are those made by Samsung. This isn’t rocket science. There are already loads of streaming sites that have figured out how to serve me.

The rating for NBC’s Android app speaks for itself. I’m not the only unhappy camper this evening.

NBC Olympics Streaming Problem On Linux Solved!

For most of my usual blog readers this will be obscure gobbledygook. Feel free to move on.

If you’re trying to stream the Olympics and find yourself stuck at the authentication page it’s because your system doesn’t have the software necessary to protect NBC’s video. Easily cured! Though the streaming is done via conventional Flash technology,

A missing Ubuntu HAL (Hardware Abstraction Layer) module, which is not installed by default, causes this behavior. – Source Adobe

For Ubuntu open a terminal and

sudo apt-get install hal

After the “libhal” (HAL) library install completes, close the browser and clear the Adobe Access directories by executing the following shell commands:

cd ~/.adobe/Flash_Player
rm -rf NativeCache AssetCache APSPrivateData2

For Suse and other Linux distros head here.

This took about two minutes on my Ubuntu laptop and now works perfectly.

You’re welcome.

Yeah, I’m That Nerdy

Make no mistake, nerdiness this deep doesn’t happen overnight. I was nerdy from the cradle. This will never change.

If you’re part of the late night crew on Facebook you might already know this story. I have an old laptop. It is for playing… for hacking. It is where code is written and experiments are performed. Instead of Windows this computer runs Linux.

Linux is an operating system, Think language, like English or Italian. Ideas are expressed in similar fashion in all languages though the words are pronounced differently. Same with operating systems.

I’ve loaded different flavors of Linux dozens of times on old hardware. Because the underlying code used in Linux is Open Source people can freely modify it and redistribute it at will. Anyone is allowed to make a Linux distribution!

The install never goes 100%. Last night was no exception.

I was attempting to install Mint which is based on Ubuntu which is based on Debian. Don’t ask me to explain the last sentence.

The Mint install was flawed. It couldn’t activate the wireless (802.11g) function on this laptop. Royal pain.

Meanwhile, while trying to get everything straightened out I realized how little I liked Mint’s look.

Ciao Mint.

I downloaded a Xubuntu distribution, burned a CD and installed it.

Perfect!

Xubuntu is “Ubuntu light.” It uses a different graphical system meant for less powerful machines. It loaded the first time. I’m using it to compose this entry.

On my right is a new wireless router. It is 802.11n capable. Newer pieces of hardware also use that protocol.

I found it at Newegg for $19.99 including shipping. Tough to resist.

Before I install it I will “flash” it with new firmware, Open Source router code called DD-WRT. DD-WRT is often discussed and referenced on the Geek boards.

What does it do better than the stock firmware? No clue. Will learn.

Make no mistake, nerdiness this deep doesn’t happen overnight. I was nerdy from the cradle. This will never change.

Helaine And The Penguin: My Wife’s Linux Laptop

To Helaine Ubuntu and Windows are functionally equivalent. To a hacker or virus planter there’s a huge difference. Their voodoo won’t harm her!

Just a few feet to my left Helaine is sitting with her laptop. I can’t see what she’s doing, but whatever it is she’s doing it without complaint. Her laptop no longer runs Windows. She’s running Ubuntu Linux.

After a few pointed questions I’ve come to the conclusion she doesn’t care. That’s great.

To Helaine Ubuntu and Windows are functionally equivalent. To a hacker or virus planter there’s a huge difference. Their voodoo won’t harm her!

The anticipation of this switchover was more painful than the switch itself. I backed up her critical files, inserted the Ubuntu disk and it just installed. Both the sound and WiFi were recognized and proper drivers installed.

Beyond logging onto our encrypted wireless network there was nothing to do. The laptop just worked on the first try!

That’s not to say there weren’t challenges. The current Linux version of Picasa has a well documented glitch that kept it from running. Of course the well documented glitch wasn’t seen by me until I installed it three times!

Some of what I did wouldn’t be obvious to a new user. That’s a Linux problem, though new Windows installation from scratch would bring some similar concerns.

I understood WINE needed to be installed for a few Windows only programs to run. No problem for me, but it must be frustrating to someone who can’t conceptualize why and just wasn’t expecting it.

Converting Helaine’s email files demanded some scrambling. She’s an Outlook Express user. I set up Thunderbird as her mail client because it’s quite similar.

Unfortunately Thunderbird won’t import Outlook Express files natively. There is a separate command line program that does the conversion. Files then have to be manually renamed. Again, not a big deal, but only if you know you have to do it.

I’m pretty impressed with Thunderbird. I hadn’t configured an email program in a long time, but as soon as I told Thunderbird Helaine’s mail address it went into its database and set all the server parameters automatically. Sweet.

The default Ubuntu look is a little utilitarian and dull. The default type is very small. I reconfigured the fonts and colors and even added Helaine’s desktop background from her Windows machine. It’s a little more finished now.

So far it’s running like a champ. It boots quickly. It’s been stable. All the functionality she wants and needs is there.

By the way, all of this is free! Where have I gone right?

I’m About To Perform The Great Linux Experiment On Helaine’s Laptop

I can reload Windows XP and take the chance of it happening again or just maybe I can switch her to the virtually virus free Ubuntu Linux.

Helaine’s laptop is infected again! Though I’ve removed most of the infection her browser is still being hijacked. Google results bring spammy non-Google ‘search’ sites. There’s surely stuff I can’t find. Other functions like sound are no longer reliable.

This virus is so good it managed to shut off Microsoft’s own Windows Security Essentials program! Thanks Bill.

This is not Helaine’s fault! Considering where I found most of the infected files it looks like she was fed an infected Java jar. It probably came from an otherwise trustworthy website via an infected ad.

A day after the infection Java posted one of their ‘too damn often’ security updates. Come to think of it Microsoft was in the midst of rolling out Security Essentials 2 then too. Coincidence? I think not.

I have two choices. I can reload Windows XP and take the chance of it happening again or just maybe I can switch her to the virtually virus free Ubuntu Linux.

She was at first skeptical. OK, she was skeptical at second too. Linux sounds geeky.

Certainly there will be a different look and different programs to use. Her browser will remain the same. Her email program will change.

Helaine is primarily a web browser. She doesn’t run very many discrete programs. Those she does use have native Linux versions or claim to run through WINE the Windows emulator.

Linux comes with a ‘live’ version allowing a quick try without committing to an installation. I loaded the CD and it works.

Tonight I’ll back up Helaine’s files and install Ubuntu. Wish me luck.

Better still wish Helaine luck.

The Penguin And I Are Fighting… Again

You might be wondering why I run Linux if it is sometimes a little difficult to deal with? I don’t know, but I suspect it’s like a geek’s medal of honor.

This will be short. I am not of good spirit. I am fighting with the Penguin–my euphemism for Linux.

Last week I attempted to install a little hardware addition to the Ubuntu Linux computer I use as my desktop at work. It didn’t work and I gave up trying!

Trying to get back to where I’d begun I uninstalled the new software I’d added to the machine. Bad move!

Today when the machine wasn’t working quite right I rebooted only to find the Internet was nowhere to be found! I probably had uninstalled the software that controls Internet access. The only way to reinstall is to go on the Internet to get the files.

Oops! no Internet.

My only simple choice is to reinstall the operating system from the ground up.

I backed up my customized files to a pen drive, burned a disk and am in the midst of watching screen-after-screen of Ubuntu promotion as new bits fill up the hard drive. Before I leave work tonight the machine will be up and running again.

You might be wondering why I run Linux if it is sometimes a little difficult to deal with? I don’t know, but I suspect it’s like a geek’s medal of honor.

What’s Up With Stef’s Laptop And Can You Help?

Is is from the infection? Can bad files cause a computer to just shut itself off? Maybe it’s a hardware problem? I’m not sure and that’s why I’m posting it here.

About a week ago Stef’s laptop got infected. I wrote about it and how I fixed it. Unfortunately it wasn’t that easy.

Is anything ever?

Almost immediately after the repair her computer began spontaneously shutting down. It’s boom–lights out for no reason! This happens in safe and normal modes. It just shuts do
and goes silent. Both the battery and AC adapter seem fine.

Is is from the infection? Can bad files cause a computer to just shut itself off?

Maybe it’s a hardware problem?

I’m not sure and that’s why I’m posting it here. Maybe you know?

Here’s my plan to troubleshoot. I’ll download a Linux distribution which can be run directly of a CD. None of what’s on her hard drive will be used. Then I can just let the computer sit and see what happens. If it continues to turn itself off the problem is hardware and on an out-of-warranty laptop that means death!

I’m looking for suggestions, if you have any.

The Penguin And I Are At It Again!

This is hardcore geek work. I’m performing tasks that resemble scenes from “War Games.” I inserted a disk and within seconds the screen was full of scrolling text.

The penguin and I are at it again. This is like Ali-Frazier!

If you missed it earlier the Linux operating system is referred to as the penguin here. My homebuilt DVR runs atop Linux. Unfortunately part of the DVR isn’t working. I am too crazed to allow that.

Mythbuntu is the distribution that’s causing the trouble. I read somewhere (though I haven’t been able to find it since) MythDora supports my capture card and fixes my problem. We’ll see.

This is hardcore geek work. I’m performing tasks that resemble scenes from “War Games.” I inserted a disk and within seconds the screen was full of scrolling text.

Why is it there when it goes by so fast it can’t be read? Got me. It just does.

This is a net install. I burned a smaller file–just enough to get the computer running. My job is done. It will now go online and find whatever else is needed. The autonomous computer is currently installing 194 Mb of “fluid-soundfont-lite-patches-3.1.-4.fc12.noarch.” That’s file 65 of 1457. Isn’t that the one they download to take over the Earth?

This will take a while. I might go to sleep and let it work quietly then pick it up in the morning (by which I mean afternoon).

It partially worked before I attempted this. It’s only fair I get at least that far tomorrow.

You And The Penguin Aren’t Getting Along

I’m like the guys who built hot rods in the 50s and 60s–just with computers. That’s why I’m rebuilding something that worked fine, but could be coaxed to work finer.

“You and the penguin aren’t getting along.” It was Helaine. “I can tell.” She’s psychic about these things.

The penguin is ‘Fox housetalk’ for Linux, a computer operating system that’s sparsely used by folks at home. It is atop Linux that MythTV, my DVR software sits.

I know. This is really geeky. It’s my fun… when the penguin and I are speaking.

It hasn’t been good this weekend. Computers aren’t suppose to give you a different answer when doing the same thing multiple times. This Ubuntu Linux install did.

I’m a scrounger. I’m like the guys who built hot rods in the 50s and 60s–just with computers. That’s why I’m rebuilding something that worked fine, but could be coaxed to work finer.

I’m in the midst of rebuilding my DVR. It moved into a faster box, got a software update and acquired a digital tuner. I should be able to record non-scrambled high def shows in high def.

The problem is none of the digital station recording works! When it’s time to scan for channels it merely rolls through the dial without locking onto one. I can still record ‘old fashioned’ TV, but that’s not the point.

Others have had this problem and solved it. I will too.

At the moment it’s driving me a little crazy.

Meanwhile this newly assembled machine means two very old and now gutted computers will be thrown out. Though both are worthless the act itself pains me. It seems so wrong. It would be like throwing out wire or cable. You just don’t.

Do-It-Yourself DVR

Working on computers is a lot simpler than it sounds. Cards only plug in where they’re supposed to plug in. I’ve yet to fry one!

You know the guys who used to have cars up on blocks customizing and tweaking them until they performed exactly as the tinkerer wished? I’m that tinkerer, except with computers. That probably explains why last night when Helaine went to bed I went to work on an old PC–my DVR.

A few months ago I started recording my shows on the Comcast DVR we rent. The homebrew DVR was powered down. What I discovered was viewing video on the laptop while I’m doing other things is much more satisfying. That’s what brought this rebuild.

First an admission. Working on computers is a lot simpler than it sounds. Cards only plug in where they’re supposed to plug in. I’ve yet to fry one!

This computer was state-of-the-art years ago. It’s a P4 with 512mb RAM and a 150 gb hard drive. Even if you don’t recognize the stats, just think slow.

Luckily as a DVR it’s just fine. The secret here is the video capture cards which themselves contain a small computer specifically made to manipulate video. They do most of the heavy lifting. My two PVR-150s are the only pieces bought especially for a DVR. Together they cost around $100.

The standard program for this type of thing is MythTV. It’s an free open source program which runs on Linux. I chose to install Mythbuntu which combines MythTV and Ubuntu Linux in one distribution. I downloaded an iso file and burned it to a CD.

Surprisingly the installation went very slowly–over two hours. Then came the real tough part, configuring.

MythTV is meant to run on many different types of hardware so it needs to be custom configured. Unfortunately, as a free project put together by volunteers the documentation is a little lacking and the program’s interface non-intuitive. It took a while to understand exactly what was needed.

By 4:00 AM the box was built and everything was working. I downloaded the next fourteen days of TV listings into a MySQL database and selected a few shows to record.

This version of MythTV has some rudimentary streaming, but mostly I watch the video on my other computers using MythTV Player, another freeware program. Perfect!

What is tantalizing now is the thought of streaming my DVR to my iPhone. There are a few ways written but they all seem too complex. I’ll keep looking.

I’m also thinking of buying one more TV tuner card. This would be an ATSC, QAM card for recording HDTV digital cable (only the few unscrambled channels, unfortunately).

Like the guys with the cars on blocks this job will never be done.

That New Computer Smell

A few days ago my desktop computer at work spontaneously changed its screen resolution to 1440×900 and would not let me revert to 1280×1024. Grrrrrr. I spent a few hours online going through other Linux related resolution questions before I finally said, “Screw it.”

I know–how totally nerdy to use Ubuntu Linux as my desktop. Contrary to popular belief there isn’t anything much I can do with Windows I can’t do with Linux. As long as my bosses don’t object I’m happy–and always virus free!

That being said Linux isn’t quite as user friendly as Windows, though it’s gotten a lot better over time. Today’s install went very smoothly with sound working immediately and Internet access (which is non-standard to my desk) taking just a few minutes more.

There’s not much I store on this machine. In fact I was surprised to see this box is running with a 20 Gb hard drive! That’s a thousand times larger than the first hard drive I owned butt still around 1/10th the size of the smallest drive you can buy today.

Before I reformatted this machine I transferred all my configuration scripts to a memory stick which I promptly left home! Oops. With a little Internet magic Helaine plugged the memory stick into Stef’s laptop and I plucked the files.

All I had to do was install them into the correct directory and set up the “cron” (a program which fires off certain tasks at specific times). What could be easier?

The scripts, which worked perfectly in the old machine, were dying a gruesome death in the new one! It took a phone call to my friend Bob in Florida to get them running. Why his solution worked is totally beyond me! Scripts which were working yesterday should have worked today.

So, my resolution is fixed and I’m up and running with a clean install of Ubuntu 9.04. Clean installs always work better and have that new computer smell.

Ubuntu releases a brand new Linux distribution every six months. October, next month, is the next scheduled push. I’ll probably do all of this again.