My Media Center Died, Time For A New One

I have blogged about it before, I have a HTPC (home theatre pc) running in my living room, hooked to my TV. I started off with MythTV, but settled on Window Media Center 2005.

When I first built the Media Center machine, I had basic cable, with no DVR, so I let the media center handle all of that. Now I have Verizon FIOS with HD, and one of their HD DVR Boxes, and I rarely use my media center pc, but its always nice to be able to flip the input over to it and watch youtube and browse the web. I also like the fact that I can download all sorts of movies and tv from the darkside of the web and watch them on the tv. That was a huge plus.

For a while now, the Media Center has been acting funny. I built it on a shoe string budget with some questionable parts I had laying around, so I didn’t expect it to live forever. The other day it stopped working all together.

Today I took it apart to see what the problem was. After some investigation, I found the cheap power supply was dead, and it took the mother board/processor with it. FAIL!

Well, here I am at a cross roads. Before it was a matter of software, now I need new hardware. What do you think I should build or buy?

The main things I’m looking for in a HTPC

  • Ability to browse the web
  • Watch Videos I download form the internet, mostly divX files
  • Small form factor
  • Doesn’t really look like a computer
  • Blu-ray is a bonus

Should I build another Window xp MCE machine, Windows Vista Ultimate, mac Mini, apple TV, myth TV? I don’t even know where to start.

I’ll blog my research as I go. Lets see what you think I should do.

StarCraft in Ubuntu? YES, Drink the WINE!


In keeping in step with my new found love of StarCraft, I wanted to play it on my laptop. One problem… my laptop doesn’t run on windows or mac, its powered by UBUNTU!

I love running Ubuntu, and I have never found a reason why I would need windows on my laptop. Ubuntu does everything I need it to, that is until I wanted to play a PC based game on it.

I did a little google searching and I found out that WINE on Ubuntu will play StarCraft perfectly! I gave it a go, and was surprised at how easy it was, and how well it all worked together.

Here are the steps I took:

  • Open a terminal and run sudo apt-get install wine to get wine.
  • After that finishes, insert the StarCraft CD into the computer
  • In the terminal cd to whatever cdrom drive you put the cd in (under the /media/ directory). Mine was /media/cdrom0
  • Use Wine to setup StarCraft with wine setup.exe. You’ll get the install screen for SC – enter your CD key and install the software. StarCraft will be installed under the path of
    ~/.wine/drive_c/Program\ Files/Starcraft/starcraft.exe.
  • In the terminal, run winecfg and go to the Audio tab. Set Hardware Acceleration to Emulation.
  • What is StarcCaft without the Broodwar expantion? I eject the Starcraft CD and insert the Broodwar expantion CD.
    cd to the appropriate /media/ directory and run wine setup.exe.
  • To play StarCraft, run wine ~/.wine/drive_c/Program\ Files/Starcraft/starcraft.exe.
    I was also able to find a link to it from the Applications menu in Ubuntu.
  • Lastly, I downloaded the latest patch to BroodWar from, and ran that with no problem.

There it was, a fully patched and running copy of StarCraft on my Ubuntu laptop. Can life get sweeter? I submit that it can not!

/bin/rm: Argument list too long

I’m cleaning up my linux web server (the very one that powers this site), and I needed to delete some things that had been accumulation (spam mails). When say mean some, i mean over 100,000 files! I’m not a Linux whiz, but I can manage pretty well.

I tried to remove the files using “rm *”, only to get back “/bin/rm: Argument list too long”
my initial reaction was: wft? Arguments to long?! gtfo!

It took a bit to figure out, but I came up with a solution:

if you try:
rm *

and you get this:
/bin/rm: Argument list too long

do this instead:
find . -name "*" -print | xargs rm

The files are gone, and I am happy once again.

Mentors last words: The hacker manifesto


Lurking around online this morning I ran across the hackers manifest, written by Mentor. I haven’t read this in a solid 10 years. Going over it again brought back found memories of 1993 and my x468 66mhz (my phone is faster then that now!), with a 14.4 kbps modem.

If you have never read Mentors famous last words, hackers manifesto, here it is for you.

Another one got caught today, it’s all over the papers. “Teenager
Arrested in Computer Crime Scandal”, “Hacker Arrested after Bank Tampering”…
Damn kids. They’re all alike.

But did you, in your three-piece psychology and 1950’s technobrain,
ever take a look behind the eyes of the hacker? Did you ever wonder what
made him tick, what forces shaped him, what may have molded him?
I am a hacker, enter my world…
Mine is a world that begins with school… I’m smarter than most of
the other kids, this crap they teach us bores me…
Damn underachiever. They’re all alike.

I’m in junior high or high school. I’ve listened to teachers explain
for the fifteenth time how to reduce a fraction. I understand it. “No, Ms.
Smith, I didn’t show my work. I did it in my head…”
Damn kid. Probably copied it. They’re all alike.

I made a discovery today. I found a computer. Wait a second, this is
cool. It does what I want it to. If it makes a mistake, it’s because I
screwed it up. Not because it doesn’t like me…
Or feels threatened by me…
Or thinks I’m a smart ass…
Or doesn’t like teaching and shouldn’t be here…
Damn kid. All he does is play games. They’re all alike.

And then it happened… a door opened to a world… rushing through
the phone line like heroin through an addict’s veins, an electronic pulse is
sent out, a refuge from the day-to-day incompetencies is sought… a board is
“This is it… this is where I belong…”
I know everyone here… even if I’ve never met them, never talked to
them, may never hear from them again… I know you all…
Damn kid. Tying up the phone line again. They’re all alike…

You bet your ass we’re all alike… we’ve been spoon-fed baby food at
school when we hungered for steak… the bits of meat that you did let slip
through were pre-chewed and tasteless. We’ve been dominated by sadists, or
ignored by the apathetic. The few that had something to teach found us will-
ing pupils, but those few are like drops of water in the desert.

This is our world now… the world of the electron and the switch, the
beauty of the baud. We make use of a service already existing without paying
for what could be dirt-cheap if it wasn’t run by profiteering gluttons, and
you call us criminals. We explore… and you call us criminals. We seek
after knowledge… and you call us criminals. We exist without skin color,
without nationality, without religious bias… and you call us criminals.
You build atomic bombs, you wage wars, you murder, cheat, and lie to us
and try to make us believe it’s for our own good, yet we’re the criminals.

Yes, I am a criminal. My crime is that of curiosity. My crime is
that of judging people by what they say and think, not what they look like.
My crime is that of outsmarting you, something that you will never forgive me

I am a hacker, and this is my manifesto. You may stop this individual,
but you can’t stop us all… after all, we’re all alike.

ah to be young and think you knew it all.

cpanel broke mysqlhotcopy 1.22 but here is a fix!

Yesterday I logged into my server to back up my databases. I back up the mysql databases using a tool called “mysqlhotcoy”. It’s a handy perl application that copies the database files for easy restores, and it also works really quick when you run it.

I ran the mysqlhotcopy command as root, and was greeted with an error similar to this:
Invalid db.table name '`.`bar'

um, no…. this table exists

I have cpanel installed on my server, a lot of server do. cpanel does updates to many application, mysqlhotcopy is one of them. It looks like my version of mysqlhotcopy was updated to 1.22, and there is some major problems with mysqlhotcopy 1.22.

I did some googeling and I found some people talking about the problem. I even found a quick patch for the problem. The problem comes from a host adding the username and an underscore before a database name (example: “username_databasename.table“). mysqlhotcopy only looks for databasename.table

The following patch instructions will fix mysqlhotcopy 1.22

  • Open the perl script for editing. It is located at /usr/bin/mysqlhotcopy
  • find the following subroutine

    sub get_list_of_tables {
    my ( $db ) = @_;

    my $dbh = DBI->connect(“dbi:mysql:${db}${dsn};mysql_read_default_group=mysqlhotcopy”,
    $opt{user}, $opt{password},
    RaiseError => 1,
    PrintError => 0,
    AutoCommit => 1,

    my @dbh_tables = eval { $dbh->tables() };
    return @dbh_tables;

  • look for this line (mine was link 821):

    my @dbh_tables = eval { $dbh->tables() };

  • immediately after that line add the following:

    map { s/^.*?\.//o } @dbh_tables

Here is my patched subroutine:

sub get_list_of_tables {
my ( $db ) = @_;

my $dbh = DBI->connect(“dbi:mysql:${db}${dsn};mysql_read_default_group=mysqlhotcopy”,
$opt{user}, $opt{password},
RaiseError => 1,
PrintError => 0,
AutoCommit => 1,

my @dbh_tables = eval { $dbh->tables() };
map { s/^.*?\.//o } @dbh_tables;
return @dbh_tables;

After I applied the patch, everything was back to working order.

Some people have other approaches that would work also, like downgrading mysqlhotcopy all together.

Personally, I think adding one line of code wasn’t that big of a deal to fix the program