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.