Posts Tagged ‘Linux’

 

When You’re The Server Wrangler

Saturday, February 2nd, 2013

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

Saturday, September 29th, 2012

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

Thursday, September 27th, 2012

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

Saturday, July 28th, 2012

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!

Saturday, July 28th, 2012

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

Monday, December 19th, 2011

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

Sunday, January 2nd, 2011

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

Saturday, January 1st, 2011

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

Monday, November 15th, 2010

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?

Saturday, October 30th, 2010

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.