Old Ubuntu Still Lives!
I’m building an old Karmic box from scratch ( I need PHP 5.2 ) but the original
/etc/apt/sources.list
is broken now that Karmic has reached end of life.
sed s/us\.archive/old-releases/g sources.list > new_sources.list
Then just replace the original sources.list with the new one. That should get updates working again. You can also do
sed s/security\.ubuntu/old-releases\.ubuntu/g sources.list > new_sources.list
but most everything in security is held back by default so apt-get upgrade won’t work. You’ll need to force and upgrade using apt-get install $package_name.
Ubuntu and Intel
I’ve got a stack of older Compaq Evo desktops that came over from the office when they upgraded last year. Most of them are still running Windows XP, but some I’ve been switching over to Ubuntu 10.04 to use as EDI scanning stations (CUPS works better with the printing in my setup). The problem: Intel.
The computers all have built in Intel 82845G/GL [Brookdale-G] graphics. And every so often (when my USB barcode scanner is plugged in) X and GDM lock up in an infinite black screen – to – pinstripe loop. The only recourse is to shutdown the system. None of the virtual terminals (CTL-ALT-F1 through F7) respond which seems kind of odd. Anyway, it’s a known bug for older Ubuntus. I’ve tried every work around posted but none seem to work. Switching to KMS mode made it crash the whole system instead of just X. So I’m giving up in the Intel driver.
Start by rebooting the system and holding down SHIFT to get the GRUB2 menu to come up. Then choose recovery mode (probably the second line down). Select root shell from the old-school menu and run
# Xorg -configure
to get a base xorg.conf file. Copy it to /etc/X11/xorg.conf (assuming you don’t already have one or backed up the current one) and open it in vim. One of the work-arounds is to add
Option "Shadow" "False"
and
Option "DRI" "False"
to the Device section. But there is no Shadow option in the current i910 driver and DRI didn’t seem to matter which way it was set. Instead, change the driver line:
Driver "intel"
to
Driver "vesa"
The system’s been running now for several days and so far no pinstripe screen crashes. The graphics look just as good as they did with the Intel driver. The only change I had to make was adjusting the resolution back down to 1024 x 768.
DHCP and Broadcast IP
I’ve just found out that my network at the warehouse is somewhat broken and has been for quite a while. I’m running a ClearOS firewall as a DHCP server configured in the 192.168.1.1 – 192.168.1.255 range. When I first set up the firewall I used the development IP range 192.168.5.1 – 192.168.5.255 for testing. Evidently, when I moved it from testing to production the broadcast IP address didn’t get changed to match the new IP range. It’s stuck handing out the broadcast address as 192.168.5.255.
There’s no way to change that in the ClearOS webadmin tool, so I ran a backup and then adjusted /etc/dnsmasq/dhcp.conf with the right IP address. Unfortunately, dnsmasq loves caching so I have to reboot the firewall tonight to get it to notice the new config file (I tried “kill -HUP dnsmasq-PID”, but that doesn’t re-read dhcp.conf).
The main thing I’ve noticed is that most of the computers don’t care that the broadcast address is outside the netmask range. I’m not sure if the systems are correcting it automatically or just using it broken. But everything still seems to work (or I don’t notice any bad traffic).
EtherApe is a great tool for seeing where the traffic is going. That’s how I noticed some of the computers pinging the wrong address which I though was just a rouge test machine pushing packets out the wrong interface.
Sidenote: I’d file a bug with ClearOS, but they don’t make it easy. I have to sign up as a developer first to get permission to file bug reports. I think I’ll just post it in the forums and see if it gets picked up.
Testing EasyONIX
The marketing department needs to run off some reports in Onix (a fancy XML format) so I set up a server running EasyONIX for them on an old XP machine. It takes a little bit of hammering to get it up and running. It can use IIS or Apache to run the web based front end, but it needs Windows to run the EasyONIX server.
- Install Apache 2
- Install EasyONIX
- Move C:\Program Files\EasyONIX to C:\Program Files\old_EasyONIX
- Unpack the update and move it to C:\Program Files\EasyONIX
- Edit C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf
- Restart Apache
- Launch EasyONIX server
- Browse to http://localhost/easyonix/index.htm
The only trouble part is updating httpd.conf with the right settings. There’s several lines that need to be added to the default config. The first two lines need to be added to the correct section:
<ifModule alias_module> Alias /easyonix/ "C:/Program Files/EasyONIX/" <ifModule>
<ifModule mime_module> AddHandler cgi-script .exe <ifModule>
The last part is the main folder permissions:
<Directory "C:/Program Files/EasyONIX/"> Options Indexes Multiviews ExecCGI AllowOverride None Order allow,deny Allow from all </Directory>
The mapping looks pretty easy although I haven’t tried any test data yet.
Excel Spreadsheet for Worldship
We’ve been doing a lot of promo mailings for the marketing department. They’re giving me an Excel spreadsheet of addresses and I’ve been converting them into CSV format to hand to UPS Worldship to process as a batch job. There’s several problems:
- UPS expects columns to be in the correct order (and the right number of them)
- UPS hates UTF8 (specifically “–” \x2014)
- There’s PO Boxes scattered throughout. And UPS doesn’t do PO Boxes.
So I wrote up a Perl script this week to handle the conversion from now on. CPAN has a Spreadsheet::ParseExcel that can read Excel data, and writing CSV is pretty trivial. The hard part is getting the columns in the right order.
First, I scan through row 0 (the header row) and try to find the columns I need:
# Try to match actual header with desired header
my $count = -1;
SWITCH:
foreach (@header) {
++$count;
/customer/i && do { $link_header{'Customer_ID'} = $count; next SWITCH;} ;
/outlet/i && do { $link_header{'Outlet'} = $count; next SWITCH;} ;
/first/i && do { $link_header{'First_Name'} = $count; next SWITCH;} ;
/last/i && do { $link_header{'Last_Name'} = $count; next SWITCH;} ;
/title/i && do { $link_header{'Title'} = $count; next SWITCH;} ;
/address.+1/i && do { $link_header{'Address_1'} = $count; next SWITCH;} ;
/address.+2/i && do { $link_header{'Address_2'} = $count; next SWITCH;} ;
/city/i && do { $link_header{'City'} = $count; next SWITCH;} ;
/state/i && do { $link_header{'State'} = $count; next SWITCH;} ;
/postal/i && do { $link_header{'Postal_Code'} = $count; next SWITCH;} ;
/weight/i && do { $link_header{'Weight'} = $count; next SWITCH;} ;
/department/i && do { $link_header{'Department'} = $count; next SWITCH;} ;
}
# if none of the fields match, there's no point to going on
die "No Header Row\n" unless scalar(keys %link_header) > 1;
Then, swap the keys with the values so I can look up the values later
my %reverse_header = reverse %link_header;
Then scan through the spreadsheet and try to match the column I’m reading with a header I want:
for my $row (1 .. $row_max) {
for my $col (0 .. $col_max) {
my $cell = $worksheet->get_cell( $row,$col);
next unless ($cell);
my $data = $cell->value();
# if the column of $data is in headers, save the $data.
if (exists $reverse_header{$col} ) {
my $keys = $reverse_header{$col};
...
$temp{$keys} = $data;
}
Then filter out the PO Boxes and the UTF8 stuff and write it out to a CSV. It makes life much easier!
Updating my Desktop
Along with the NAS box I got last week I picked up a Corsiar H60 CPU cooler to try to get my home system running a little better. Under heavy load the stock fan sounds like someone’s running a vacuum cleaner under my desk. And if the temperature in my apartment gets over 80F the power supply overheats because it’s sucking up the heat from the CPU just below it.
The H60 was easy to install and it’s much quieter. The hardest part was trying to remove the stock heatsink without breaking anything. Corsiar ships the kit for use with new builds and doesn’t cover heatsink removal and CPU cleaning in the instructions. Also, all the videos show how to install on an Intel CPU. None of them show the AMD install. It’s not hard once I figured out which parts come off and which parts go on the unit for AMD.
So far it’s working well. And it’s quiet!
The case before the install:
The new cooler in place:
Home NAS
I’ve been shopping for a home NAS device for a while but the pricing has made me hold off. I need something large and redundant to run backups to, and something that can run as a media server would be a plus so I don’t have to keep my desktop running constantly. But all the ones I found were pretty expensive or of questionable quality. We have an Iomega NAS at work that we bought years ago (it’s a 200G capacity running Windows Storage Server 2003) that’s worked really well. So when Newegg had a closeout sale on an Iomega StorCenter ix4-200d I grabbed one (quite possibly the last one, the 4x500G model is discontinued now). It’s been running for a week now with no problems and is almost 1/2 full.
The Microsoft OS has been replaced with a linux based OS making management completely web based instead of web / RDP based. The first problem I’ve run into is that some of the features (users and share settings) can only be accessed through the StorCenter software which looks like it just connects to the web interface with an extra security key. But they do have a Windows and Linux version of the software.
The other problem: it can do rsync through it’s own rsnycd server but only to the public folder. I have to mount my SMB share and rsync to that for backups. It would be nice to be able to rsync directly to my folder. Instead I’m using
#!/bin/bash rsync -av --no-p --stats --exclude-from '/home/tony/Programs/exclude.txt' /home/tony /home/tony/.gvfs/tony\ on\ nasdrive/rsync
to run my backups. The --no-p fixes the mkstemp failed error because permissions don’t travel well over SMB to the StorCenter’s filesystem. It’ll still complain about symlinks but I don’t need those anyway.
Firewall Rebuild
The hard drive in my ClearOS firewall died this morning. That drive was old (at least 10 years) so I wasn’t too surprised to find it was the culprit when the firewall stopped responding. I planned for this, sort of, by having a stack of Otiplex GX150′s in a closet to use for spare parts. I was able to grab a spare hard drive and swap it, install ClearOS 5.2, restore the config from the monthly backup, and have it back in service within a half an hour.
The only issue I ran into was after running the restore the system froze completely. I couldn’t even pull up a local TTY to log into. But after a hard reboot it came back up with the correct settings.
Well, there was one other issue. I keep forgetting that every service defaults to OFF after an install. So I had to keep going back to start services that weren’t responding (DHCP, POP, IMAP, SMB, Snort…) I finally realized that I should be looking at the services list in System -> Resources -> Services to find out what I had missed.
I Gave in to Thunderbird 3
I finally gave in and switched over all my workstations to Thunderbird 3. I’ve been using the last build of Thunderbird 2 (you can still grab .debs in the Hardy repository) since the last time I tried Thunderbird 3 in 2009. I didn’t like the new interface but either I didn’t play with it enough or they managed to fix the problems I had.
I can have separate folders for each account: View -> Folders -> All will get rid of the single inbox issue I didn’t care for. Messages can be opened in windows: Edit -> Preferences -> Advanced -> Reading & Display -> Open messages in a new window gets rid of the tabs.
There’s still a few issues, though. It doesn’t work with mozilla-traybiff / thunderbird-traybiff, the mail notification tool that put an envelope in the panel when new mail comes in. I installed mail-notification on my work desktop so I’ll see if that does the same thing. Also, the Buttons! extension is not compatible. I had to switch to RealPrevNextButtons to get the Prev / Next buttons to work like I want (not on only unread messages). And as far as I can tell they haven’t added an import / export feature that works with Thunderbirds .mab format. That means I have to export my addresses first and then import them or copy the .mab file and hope I don’t overwrite anything important.
It is nice to be using a current mail program again. And I no longer get the flicker that Thunderbird 2 used to have.


