Friday, February 05, 2010

Desktop dictators

Although I don't use Linux on my shack computer - mainly because Windows has all the best apps - Olga and I both use it on the computers we use for business, both for its stability and its freedom from malware hassles. However, the version we were using (Xandros Desktop) was very old and does not appear to be receiving any updates. This was causing us a few problems, mainly due to being stuck on Firefox 2.0 with similarly outdated versions of Flash. So it was time for an update.

I decided to go for Linux Mint. It is a distribution based on the very popular Ubuntu, but it comes with the multimedia plug-ins (such as Flash for the web browser) already installed. This is an important benefit for those of us who want to be Linux users rather than Linux hackers, because installing plug-ins such as Flash under isn't the one-click job it usually is under Windows (at least, it wasn't under Xandros.)

Installation was pretty straightforward, if still not quite as trouble-free as installing Windows usually is. On Olga's laptop a bit of jiggery pokery was required to get the wireless network drivers installed. And on mine the "live" installation CD had to be run in compatibility mode which presumably resulted in a VESA display driver being used, restricting the screen size to 800 x 600. Fixing that involved deleting one line from an obscure configuration file, a solution I found after some time spent Googling. On Windows it could have been done through the graphical interface.

Having got the new version up and running, I find that I can't store files, or at least see them, on the desktop. Because Xandros Linux was based on KDE, I chose the KDE community edition of Linux Mint which I thought would involve fewer changes than the standard version which like Ubuntu uses the Gnome graphical environment. KDE has now reached version 4.1 and apparently one of the "features" of this version is that you can no longer have icons on the desktop. I started searching for a way to enable desktop icons and came across this post, apparently from the Linux hacker who removed the support. You can still put files and icons on the desktop, but you can only see them using a little pop-up folder view applet.

Because someone has a bee in his bonnet about desktop icons, they get removed - tough if you don't like it. I often gripe about Microsoft changing things in new versions of Windows for no good reason. Clearly Linux is no different.

Relocation accomplished

G4ILO's Blog is now at its new home http://blog.g4ilo.com and I'm hoping that nothing got left behind in the move!

The actual change from FTP hosting to Blogger hosting was fairly easy. It was just a matter of selecting the "custom domain" option from the publishing options, then clicking the Advanced button and putting in the name I wanted: blog.g4ilo.com.

I also had to specify something called a "Missing Files Redirect" which tells the Blogger server where to look for any files used in the blog that it doesn't have. This is important because although the text content is now served up by Blogger (and presumably any images included in new postings will be hosted there) all the images in my existing postings remain where I uploaded them, on the old server. And I certainly did not want to go through over 300 postings editing all the image locations to provide their full path!

Next I had to go to my web host and create a CNAME record for the new domain blog.g4ilo.com which pointed to ghs.google.com. This basically tells the world via the Domain Name Service (DNS) that blog.g4ilo.com is hosted on Google's server. I then had to wait while this information propagated around the Internet, so I went and helped Olga get the shopping.

That was the easy part. The difficult bit - the part I was concerned about - was ensuring that all references to my blog at its old location would automatically redirect to the new one. Google was promising to build a migration tool that would take care of all this, but I was afraid that it would only take care of the situation where people only had a blog on their server. My blog was cohabiting with my G4ILO's Shack website so I wanted only links to the blog pages to be redirected.

Blogger techs told me "you can write an .htaccess file that can do this" but they seemed to have rather more faith in my ability to do this than I had. The .htaccess file is a configuration file used by Apache web servers that allow them to do more than simply serve the page "blah.html" when someone's browser requests that exact page. None of the .html pages at G4ILO's Shack exist as real files at all. They are all generated on the fly from a MySQL database by a content management system which knows what text is required thanks to an .htaccess file that the CMS authors thankfully provided. And I didn't want to break that.

The .htaccess file uses something called "regular expressions" to match against the filenames that are requested. They caused a perplexed expression to appear on my face because I don't have the kind of mind that is good at puzzles and I just couldn't figure out how to use them. So I did what I normally do when I hit a technical problem: Google to see if someone cleverer than me had had the same problem and managed to solve it.

I found several examples where people had transferred their blog from domain.com/blog, or even from just domain.com where the blog was the only thing on the server. But eventually I managed to find some examples which, with a bit of trial and error testing, seems to do the job of redirecting all requests for blog files to the new server. For the benefit of those following in my footsteps, the lines I had to insert in my .htaccess file are:

RedirectMatch permanent ^/blog.html$ http://blog.g4ilo.com/
RedirectMatch permanent ^/rss.xml$ http://blog.g4ilo.com/rss.xml
RedirectMatch permanent ^/atom.xml$ http://blog.g4ilo.com/atom.xml
RedirectMatch permanent ^/20([0-9][0-9])_([0-9][0-9])_([0-9][0-9])_archive.html$ http://blog.g4ilo.com/20$1_$2_$3_archive.html
RedirectMatch permanent ^/20([0-9][0-9])/(.*)$ http://blog.g4ilo.com/20$1/$2
RedirectMatch permanent ^/labels/(.*).html$ http://blog.g4ilo.com/search/label/$1


These take care of, respectively, my old blog main page (blog.html), the RSS and Atom feeds, the archives, the individual posts, and the labels.

The thing that caused the most head scratching in the end was the bit of code that displays the last ten blog topics on the front page of G4ILO's Shack. This is generated from the RSS XML file produced by Blogger but for some reason it worked with the copy that was stored on my server but not with the one obtained direct from Blogger even though they looked practically identical. But after more trial and error that issue was also resolved at around midnight last night.

I'm crossing my fingers, but I think it all works. I have deleted all the blog files off the old server now, apart from the uploaded images of course and a few other files used by the template. Please let me know if you notice anything that seems wrong.

My blog address is now blog.g4ilo.com and you should update it if you are not receiving updates. But because of the redirection, hopefully you won't need to. Now I'm going for a lie down. Somebody please pass me an ice pack!

Thursday, February 04, 2010

G4ILO's Blog is moving

As I wrote in my last post a couple of days ago, Blogger is terminating its FTP service that allowed me to publish my blog on my g4ilo.com server. This will therefore be the last post to this server.

I am hoping to be able to migrate the blog to a new location which will be blog.g4ilo.com. It is frustrating to sit and wait for Blogger to come up with a migration tool that may or may not work, because I have several interesting things that I want to write about that I don't wish to be prematurely consigned to the bit bucket. So I am going to attempt to move the blog myself. Don't be surprised if things go a bit haywire in the process.

If the address you see in your browser address bar is blog.g4ilo.com (instead of www.g4ilo.com) you will know that the move has at least partially worked. The hard part is going to be ensuring that links to pages using the old address are redirected seamlessly to the new one. This is supposed to be achievable using something called .htaccess, but it is rocket science and I will probably need help with it from Blogger techs or other clever people.

So fingers crossed, here we go.

Tuesday, February 02, 2010

Blogger FTP service - end of

Like many ham radio blogs, this one uses Google's Blogger. Unlike most ham radio blogs, this one is hosted on my own web server (well, not really my own web server, just some cheap shared web hosting that I already had for my G4ILO's Shack website.) I use Blogger's FTP option to upload my blog pages to my server. I made that decision when I started this blog simply because I already had a website and server and I thought it would help improve my site's popularity to have the blog pages under my g4ilo.com domain instead of Blogger's. Plus any add-in service that works on a per domain basis such as the ClustrMaps visitor tracker or Ham Banner Exchange works for the whole site, including the blog.

There have been times when I cursed this decision, notably during the occasions when Blogger's FTP uploading didn't work. Also, this is becoming a pretty big blog and any update that affects all the pages means the entire blog has to be re-uploaded, which can take a long time. But I really felt that I had passed the point of no return for changing this decision as my blog now consisted of too many pages and I couldn't see how to switch without losing all my existing content, or at least breaking all the links.

Blogger has now given me notice that they are going to shut down their FTP service on March 26, so I now have no choice. I will not for much longer be able to continue publishing my blog on this site. The email claims that Blogger is developing a tool that will handle redirecting traffic from the old URL to the new URL which will handle "the vast majority of situations." But it would not surprise me at all to discover that one of the situations it will not handle is that where a blog shares a domain with a website running under a content management system that already uses a complicated .htaccess script to create virtual web pages from a CMS database.

This looks like one of those situations where if that's where I have to get to, it would be better not to start from here. I don't like messy solutions, so leaving the existing blog pages as a kind of historical archive and starting afresh isn't an option. There are a couple of ham bloggers (you know who you are) who still have pages from earlier attempts online (and even one or two who appear to have two different blogs containing many of the same posts) and it's confusing when you fetch up at some of those pages and find they don't link to any recent content. So if I have to start over, it really will be a clean, fresh start. Though at the moment the thought of junking over 300 pages makes me wonder why I bother at all.

Until I know where I am going with this, there seems little point in adding more content to the existing blog. If anyone reading this has already done what Google is forcing me to do and could help me do it without waiting to see what tools they can come up with and whether they will work then I would welcome your assistance or advice.

Farewell, Powermate

The latest casualty of my new computer is that I am no longer able to use my Griffin PowerMate. It's a rather nice black anodized aluminium knob with a glowing blue base which can be configured to control various applications. I had written a program called KTune which allowed me to tune my Elecraft K3 using this knob beside the keyboard instead of reaching over to the radio, and I found it really convenient. So I am disappointed that it no longer works.

When I installed the PowerMate for the first time I got a message from Windows that "there was an error with your hardware" but the base started its pulsating thing and I assumed it was just an initialization glitch. However, the knob itself didn't have any effect. I rebooted the system and it froze at the boot menu screen. I switched off the power and tried again - same thing. And I got that sick feeling you get when you think that four days of work has gone down the pan because you have somehow managed to trash the hard disk.

Then I had the idea of unplugging what I'd plugged in since the previous boot, which was the PowerMate, and lo and behold the system started up. Phew! But obviously my PowerMate is incompatible with my HP computer. As the system froze before even Windows had started loading it isn't something that can be fixed with an updated driver - it's obviously the hardware itself that my PC doesn't like. Did I mention that I don't like computers? Obviously they don't like me either!

On the plus side the new system is much faster, which makes a big difference when running computing-intensive tasks. When running JT65-HF, the old computer took so long to decode any calling stations that by the time I saw that someone was calling CQ I'd missed the time-slot for calling them back. Now everything is decoded in a couple of seconds. There's no gain without pain, as somebody once said.