Wednesday, September 21, 2005

Occam's Razor

I listened to two colleagues working on a problem for 40 minutes or so yesterday. Normally I wouldn't have payed them any attention but my ears were perked because my fellow system administrator had suggested to them that they get my help as he was off for the day. It took a while but eventually one of them stuck his head around the partition and asked me to take a look at the problem which they characterised as "this user/script is not reading the environment settings".

Once I had established the nature of the problem, they were running a script on two different hosts which worked on one and failed on the other, my first question was "are the scripts identical?". They were absolutely certain the scripts were identical and quickly went back to the discussion about reading the environment settings. I asked again a couple of times in different ways with no success so I inserted myself on the keyboard and typed "more script_name" and then alt+tabbed to the other host and
typed the same thing. Alt+tabbing between the two showed right up the top of the script one had java /some/stuff and the other had ${some_var}/java /some/stuff

Sherlock Holmes said "When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth." Which is good advice but you have to take the time and do the work to eliminate all the other possibilities first. I prefer Occam's Razor
myself, "The simplest explanation is the best."

Wednesday, September 14, 2005

Star Kits

I've recently become obsessed by starkit and starkit applications. Let me tell you why. I have a linux desktop at work. I have a windows laptop for work use. I sometimes sit at other peoples windows boxes. Where-ever I happen to be sitting there are some things I want access to. Starkits let me do that. The datafile is the same, the application code is the same, I just need one starkit (one file) per architecture. And it just works. I use gorilla for passwords and wikit (a wiki in a file) for general notes. It's very cool.

The only problem is that some applications I want don't exist yet as starkits. I want a general purpose address book which can import and export data to my nokia phone and to evolution email and possibly in the future to Thunderbird. I want a notetaker database the same as I had on my hp200lx, in fact I want to import all that old hp200lx data into it. So I could go off and refine my tcl and learn the starkit and database API's and write my little applications and at the end of the day all the pleasure would be stolen from me because I don't like programming in TCL. I like programming in Perl.

Why can't I do this in Perl? There is no equivalent of a starkit for Perl. A starkit is one executable here that contains everything you need to run your GUI application and database.

I recently came across which covers the database side of it. But it still requires a complete perl install, a complete install of some GUI and then installing SQLite and then my app code.

I have to admit that I do have a bias against the Perl Tk library. Not because there is anything wrong with it in and of itself. Its just that under Linux the resulting applications look pretty ordinary and 1980's. I keep waiting for another GUI toolkit for Perl to develop a userbase so I could go with it, preferably one that is so popular it becomes ubiquitously installed where-ever Perl is, part of the core even. So far it hasn't happened. GTK seemed like it might be a contender for a while but I am still waiting.

I don't want to have to install anything. Not just out of laziness either. It might not be my machine. The tclkit for windows is about 930k. The application kits are about 200k each. Nicely sized for my thumb drive.

I can already here people wondering if I want write once run everywhere why don't I write in Java (or language x), and it's mostly because I like Perl. And Perl already runs OK everywhere I want to work. It just needs to be made easier.

Saturday, September 10, 2005

Take Back The Web

I have been an iiNet customer since 1994. They send out a regular newsletter, which this month has a theme of security. Here is a letter I sent to iiNet explaining why I was dissapointed with their security recommendations.
I read through your newsletter eager to see what security recommendations you made. No mention of Linux (nearly 10 years on my desktop and not one virus!), OK I can guess at why you might not have mentioned Linux. But I was shocked you didn't mention Firefox. The standalone Mozilla web browser. The one that blocks the spyware which arrives on users computers through Internet Explorer. The web browser which won all these awards.

You didn't make the one recommendation which would have made a real difference for users. Get Firefox now!

Take back the web. Pass it on to your clients, they will thank-you for it.

Update: I got a nice email from iiNet support saying that the newsletter was written by marketing and that iiNet do indeed recomend Firefox to their users- mostly in response to queries on how to block pop-ups. Any-way I wasn't the only one to write in about Firefox and they are going to address it in the next newsletter.

Update 2: The September newletter quotes me :) The writer/editor omits that the Mozilla based browsers are more secure by design and because they are not implemented as part of the OS and instead say that they are more secure because they are "often overlooked by virus and spyware creators" bleh!

VNC Server patch

A quick and dirty patch I wrote for the vncserver because it wasn't telling me why it was failing.

$ diff -c vncserver /usr/local/bin/vncserver
*** vncserver Tue Jul 5 14:41:27 2005
--- /usr/local/bin/vncserver Tue Jul 5 14:39:15 2005
*** 264,271 ****
socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n";
eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))';
if (!bind(S, pack('S n x12', $AF_INET, 6000 + $n))) {
- my $port = 6000 + $n;
- warn "Could not setsockopt on port $port\n";
return 0;
--- 264,269 ----
*** 274,281 ****
socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n";
eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))';
if (!bind(S, pack('S n x12', $AF_INET, 5900 + $n))) {
- my $port = 5900 + $n;
- warn "Could not setsockopt on port $port\n";
return 0;
--- 272,277 ----

Thursday, September 8, 2005

Values Statement

These are the values I am committed to in my life and for the world.

  • Peace Relating from the soul. Harmony and empowerment.
  • Family Love at the source. Family as the hearth stone. Youth as the future. Return of the elders.
  • Environment Everything is entitled to its place. Sustainable development and preservation of the wild places. Partnership with the land.
  • Spirit Acknowledging and honouring the spirit in all things. Life as a spiritual journey. The expression of spirit through creativity.
  • Service Joy, laughter and play. Life as service, work as service. Seeking my contribution.

Saturday, September 3, 2005

Fedora Core 4

My desktop got an Linux upgrade last night. I installed a shiny new (as shiny as beige gets any-way) dual layer DVD burner and then popped in a Fedora Core 4 DVD from Everything Linux. The install went without a hitch and I was up and running in fairly short order. I followed these instructions to get sound and video stuff working. Fedora Core 4 was able to recognise my motherboards on board sound card which is great because FC3 didn't. DVD playback through Xine even works.

The only thing I haven't tested is CD/DVD burning- I didn't have any blank media last night. FC2 burnt CD's fine but it stopped working in FC3 so I am hoping it is working again in FC4.

Update: CD burning works fine. I generally prefer Gnome to KDE but when it comes to creating CD's K3b rocks! I tried using Nautilus first since Fedora helpfully auto-ran it when I popped in the blank CD, it seemed straight forward but hitting the burn button did nothing and didn't give me any errors. I then started up X-CD-Roast but gave up fairly quickly in the face of the completely non intuitive interface (I shouldn't have to look at a manual for this stuff). With K3b I had a backup of my home directory burning away within a few seconds. That's how an application should work.

Wednesday, August 31, 2005

Copyright & Disclaimer

Unless otherwise designated the photographs and text on this blog are Copyright © Murray Barton, all rights reserved.

All opinions expressed here are my own they do not reflect the opinions or views of any other individual or organisation real or imaginary.

Everything written here is frozen at a point in time; as I like to think I am capable of learning I reserve the right to disown, contradict or embellish without notice :) Warning: I will occasionally sacrifice my principles for the sake of a joke or story line.

Friday, August 26, 2005

Wedding Crashers

I'm not a big Owen Wilson fan and I really expected Wedding Crashers was going to be cheesy slapstick à la Dumb & Dumber so I was delighted that it was genuinely funny. The humour is raunchy (but not the usual American fare of f-words for the sake of them) and nicely balances the romantic subplot. If you are seeking intellectual stimulation go see something else, otherwise grab a tub of popcorn and enjoy.

King Arthur

I went and saw King Arthur last night. This is not just another retelling of the Arthurian myth. All of Arthur's principal nights are Sarmatians and this Guinevere (the very likeable Keira Knightley) is a woad dyed Pictish warrior. The Merlin depicted is one of my favourites, there were no spells or sourcery though. Lancelot was the only character who fitted the usual mould of Arthurian myth, he was a complete prat, but that's Lancelot.

At the beginning of the movie they try to establish some historical precedent for their version of the story by referring to "recent archeological evidence" yet whilst most of the action takes place on or North of Hadrians Wall at the end of the movie they referred to the battle taking place at Mount Badon which is generally thought to be in Southern England. Whilst I am nit picking there was little consistency in the accents either. It was a good fun rollick of a movie though and as good a guess as any-ones at early post-Roman Britain. Take a suspension of disbelief pill if you need one (it is a fantasy flick after all) and enjoy.

Saturday, August 20, 2005

Firefox Stale Pages

The proxy server I have to use at work is screwed, it keeps serving up stale versions from the cache which is especially obnoxious on dynamic sites like Perl Monks. I don't hold much hope of the proxy server ever being fixed but Firefox lets you work around it. Type about:config in the nav bar look for browser.cache.check_doc_frequency and set the value 1. This forces a compare for the page for every page load.

This (mis)behaviour is discussed on Slashdot and the Firefox preferences are documented at

Friday, August 19, 2005

Don Watson Lecture

Yesterday I was lucky enough to hear Don Watson's 2003 National Trust Heritage Lecture "I still call Australia ... what?" on Radio National's The National Interest. Don Watson is a remarkable writer, with works ranging from the script for The Man Who Sued God to speech writing for Paul Keating. You can read the lecture online at The National Trust, it's well worth reading for his insights on the state of our language and, because they are inextricably linked, our culture as well- "In the beginning was the word and in the word was the truth and the heart and the mind. And if you take away from us words, we are poorer culturally and the democracy is weaker." I have picked up a copy of his new book "Death Sentence: The Decay of Public Language", look out for the report in due course :)

War Of The Worlds

AKA The Ferrier Family Alien Road Trip

Working class arsehole estranged from his children and their mother evades aliens in a tension filled trip across America. Along the way he proves himself to be a "good dad" and delivers his daughter safely to her mum, grandparents and step father who were all untouched by the alien ravages. He is also miraculously reunited with his now respectful son whom we were led to believe couldn't possibly have survived. The aliens die of natural causes and every-one assumedly lives happily ever after.

The beautiful, evocative music and all the atmosphere which made the CD's was sadly missing.

Wednesday, August 17, 2005

Desktop Refugee

Occasionally you might find yourself like me, a desktop refugee stranded in the dark side of desktops and reduced to the windows experience. Herewith are some tools to make life a little more bearable:

* Cygwin- a fairly complete Linux like environment including a great X emulator, Cygwin's Rxvt is my terminal emulator of choice.
* Firefox- Take back the web!
* Sunbird- great cross platform calendar application.
* LeechFtp- As far as I can tell it hasn't been developed in a while and it does have a few niggling bugs (I can't work out how to display filenames beginning with a dot such as .profile for example) but otherwise I haven't found a better free FTP client for windows.
* Vim- Gvim is looking like becoming my favourite editor on Windows, actually it may even stand a chance of beating Nedit under Linux, stay posted :)
* PFE- the Programmer's File Editor is a great little editor. Unfortunately (and typical of the windows environment) its author has given up development and no source code is available, still it beats the pants off of notepad.
* ActivePerl- a binary build of Perl for Windows.
* PuTTY- a great little terminal emulator. If you could set the ANSI underline colours I would probably use it more. My biggest complaint with !PuTTY though is that it stores all your session settings in the windows registry instead of in some sensible (and editable) text format- if you want to change a setting for all sessions you become trapped in GUI hell where a Perl one liner should suffice.

And of course I usually end up installing AbiWord and Gnumeric for word processing and spreadsheet joy :)

If you know of any others or can suggest a good replacement for one of the above leave a comment, I'd love to hear from you.

Tuesday, August 16, 2005

Portable Desktop

Lately I have been a Desktop Refugee. There are a number of applications where the primary data source is my Linux desktop but which I also want to be available wherever I am. Storing them on my thumbdrive is a partial solution but data format, ease of access and security are all issues. Here are three applications I am currently using-

1. Wikit. A Wiki in a script. For each environment (Linux, Windows etc) you need a Starkit, the common Wikit script and the common data file. Works well under Windows and Linux.

Whilst Wikit is a fine Wiki but what I really want is a NoteTaker database like the one on the HP200LX palmtop. (NoteTaker is an indexed and sorted "note book" with fields for "Title", "Category" and "Note"). It has to be able to handle hundreds, possibly thousands of notes. It has to be multi platform with an identical datafile format every-where. It has to allow categories and have a good search capability. Import/export from other formats would be handy too.

2. Password Gorilla- Gorilla is a password manager setup much the same as Wikit above but the data is encrypted. Works a treat.

3. Sunbird Mozilla Sunbird is my desktop calendar of choice at the moment. Under Linux I leave the calendar file in its default location. Under Windows I edited the CalendarManager.rdf (located somewhere like
C:\Documents and Settings\foc17bn\Application Data\Mozilla\Sunbird\Profiles\l6feac9w.default\Calendar) to point it at my thumb drive for the calendar.ics file.

Whats still missing? A cross platform address book which is not tied to a mail client but whose data format is usable by mail clients. A NoteTaker replacement as I described above. A safe and easy way to sync up directory trees between my desktop and the thumb drive -there is probably a solution to this out there but I haven't looked hard. A cross platform encrypted file system would make the whole thing just about perfect.

Thursday, August 11, 2005

HPUX Versus Solaris

After more than five years as a professional Unix Administrator I feel I am entitled to an opinion about the various Unixes, if not qualified to give it. Herewith is a comparison of HP-UX with Solaris both of which I have administered in enterprise environments.

LVM vs Solstice DiskSuite: no argument here, LVM is far better and very well implemented, doubly better if you have online JFS with it. Personally I find LVM streets ahead of Veritas volume manager as well, LVM's command line interface is consistant and simple to work with, Veritas is a bit of a dog by comparison. I heard a rumour that HP is considering dropping LVM in favour of Veritas, that would be a tragedy IMO.

ServiceGuard vs SunCluster: I can't quantify this one but my gut feeling is that ServiceGuard is more reliable than SunCluster, I certainly find it simpler to administer.

At the command prompt: Solaris is the clear winner here, why does HP-UX move things like //etc/init.d to /sbin/init.d? Long command lines don't wrap on HP-UX and their ls has some strange behaviours (eg. with ls -F on a symlink to a directory shows it with a trailing "//" ls -aF on the same will show it with a trailing "@" which is what I think it should show). Solaris also ships with a heap of the GNU toolset goodies which I find make life at the command prompt much friendlier.

Any-one who has ever tried to build the Perl DBI and DBD::Oracle modules on HP-UX is probably with me here, those modules just work on Solaris, whilst I understand it can be done on HP-UX it is way way harder than it should be. These kind of problems seem to be much more prevalent on HP-UX than Solaris.

Hardware: I can't back it up with any statistics but in my experience HP boxes have far fewer hardware failures than Sun boxes.

Support: my experience has been that HP take your call a more seriously and are less likely to push back, I spent a couple of months at one stage convincing Sun support that the memory growth I was seeing in a service was a leak and not "normal useage". Whilst I would probably give this one to HP, Sun also provide great support and their field engineers have always been great. As far as community support goes (mailing lists, web pages, newsgroups etc) Solaris does seem to have more of that kind of support and better too.

Where would I rather work? If I am the on-call bunny, I'd probably pick HP-UX but for life at the command prompt day-to-day, probably Solaris.

Update: Someone elses comparisons- Solaris versus HP-UX

Embedding PHP in .html files

One of the little volunteer jobs I do is as webmaster for The Katharine Susannah Prichard Writers' Centre. For the most part the pages are static and I don't do much at all. One thing that has bothered me though is that the menu code was embedded in every single page (my fault). I wrote a perl script to update each page for me but I still had to re-upload them all individually (KSP's ISP does not allow shell access...). Along with a desire to implement a few bits of dynamic content I thought PHP might be a good solution but I didn't want to have to rename all the pages to .php. Not only would that mean all the internal links would need updating but any external links would break too. A quick bit of Googling around and I found this trick: create a .htaccess file with the following line in it-

AddType application/x-httpd-php .php .php3 .phtml .html

now all .html files will be processed as php scripts which is exactly what I wanted. Want another item in the menu? Simple, change one line in menu.php and it's done! Not only that but the individual pages are suddenly simpler and will be easier to maintain. Now to write the code for that dynamic content...

Update: and if you or your ISP is not running mod_php you need to add this line as well-
Action application/x-httpd-php /cgi-bin/php-handler

Tuesday, July 12, 2005


So currently I am nominated to be the Murray to represent all Murray's at The Campaign For Better Namesakes (cfubbun). I'm up there with Mark Knopfler and Neil Gaiman! Yes I nominated myself, after all no-one who reads this journal was about to :-)

Thanks Steve

If you think I am worth it then by all means provide a link back to me :)

Update: I have nominated Terry Pratchett to be "Terry" number one, unlike me he has a chance of making it *and* deserves it too :-)

Monday, June 13, 2005

Nokia Cellphone

I recently upgraded my cellphone from a Nokia 6610 to a 6230. This is my fourth Nokia so you could say I like them. In general the interface of the phone is consistant, if not intuitive. There are shortcuts for stuff you do a lot- mostly I have found them by accident or talking to others who have found them by accident but they are there (yes I could read the manual :) On the hardware side they are rugged and durable- I'm 6'2" and I have dropped my Nokia's many times onto hard surfaces and never had one break as a result.

My biggest gripe? Data transfer- I want the phone storage area to appear as a normal USB drive when I plug it in to the computer, just like my camera does. None of this proprietry interface stuff. I've paid for the phone, it's my data let me have it. The two most important things I want off the phone are any photo's I've taken and my address book but the calendar and messages need to be accessible as well. I want the address book in an open text format, I don't care which one just as long as it is published. The calendar should probably be in Ical format and messages in plain text. No additional software required, and it will work on every OS with USB support so I can plug it into my Linux box at home or my Wintendo laptop. Do that and the phone becomes way more useful and more multifunctional- I could even leave my USB thumb drive at home.

Nokia are you listening? If another phone manufacturer implements this first you will lose a loyal customer.

Cc'd to Nokia support :)

Wednesday, June 8, 2005

Spiderman 2

I saw Spiderman 2 last night. It could have been a risky move but I read the list of mistakes before I saw the movie, I still only managed to spot one of the mistakes listed though. Maybe I am just not very observant but I suspect the people who spot these errors need to take a chill out pill and lay back and enjoy life a bit more, it is a movie after all, it's supposed to be entertaining not real or true.

I remember reading Spiderman comics as a kid and enjoying them but I wasn't what you would call a fan, I just read them when I could get them, so I can't offer any in depth comparisons to the comics. I did enjoy the movie and if you are planning on skipping it because you think it fits into the "just another brainless action movie" category you might want to reconsider because it isn't. In an increasingly narcissistic society it asks you to think about personal responsibility and role models, where are our hero's? It continues the love story from Spiderman and the themes of growing up and finding your place in the world. You get all of that and a well told action adventure story, the action footage of Spiderman is superbly done.

Kirsten Dunst if you are reading this (haha) I lurve you.

Reset MySQL Password

I installed MediaWiki on a server at work yesterday. The web install is pretty straight forward, even I could get it right.

One thing I learnt was how to reset the root password on an MySQL database when it is not known-

1. stop MySQL (init.d/mysql stop)

2. Restart mysqld with the --skip-grant-tables option (I just added that argument to the init.d script and removed it after).

3. Connect to the mysqld server:
# mysql -u root mysql

4. At the mysql prompt:
mysql> UPDATE user SET Password=PASSWORD('newpasswd')
WHERE User='root';

5. Stop mysqld and restart it normally.

6. test!
# mysql -u root -p

Tuesday, June 7, 2005

Non Proliferation

Politicians often talk about "non-proliferation" it caught my eye again here. When they say non-proliferation they want you to think "abolishment", "dis-arming", "making the world safe". However proliferation actually means to spread at a rapid rate. So when the politicians say non-proliferation the substance is more like "you can't have them but we're keeping ours". For a nation with a stockpile of life threatening weapons there is no cost for jumping on the non-proliferation bandwagon; they maintain their power base by keeping their weapons and stopping others from having them and they get to look good too! (at least if no-one is listening properly). If the politicians really want to make the world safe then start dis-arming, no-one needs nuclear weapons.

Friday, April 29, 2005

Why Am I A Vegetarian?

I get asked this question a lot so I thought I should answer it... For what its worth, I don't have any burning desire to convert anyone to vegetarianism, whatever that might be. My hope is that people think more about the food they eat and make responsible choices regarding where it comes from.

Non-violence leads to the highest ethics, which is the goal of all evolution. Until we stop harming all other living beings, we are still savages. -Thomas Edison

Environment - Growing animal protein is land, water and resource intensive. For example, much of the destruction of Amazon rainforest is as a result of beef production for the American hamburger market. Producing animal protiens is inefficient, more protein is consumed by the cow than you can harvest from its carcass.

Every creature is better alive than dead, men and moose and pine trees, and he who understands it aright will rather preserve its life than destroy it. -Henry David Thoreau

Health - There are many diseases that are uncommon in long term vegetarians: heart disease, bowel cancer and multiple sclerosis are examples. Further, the higher you eat on the food chain the more concentrated toxins become - pesticides, herbicides etc are much more concentrated in flesh than they are in the surrounding environment. Most animals raised for human consumption are also heavily treated with hormones, steroids and antibiotics.

Nothing will benefit human health and increase chances for survival of life on Earth as much as the evolution to a vegetarian diet. -Albert Einstein

Ethical - Animals raised for consumption are rarely kept or treated with respect. The very clever The Meatrix flash movie probably covers this topic better than I could. I don't believe that animals should be accorded the same rights or treatment as humans but I do believe they are entitled to a life of dignity and should be honoured for their sacrifice.

A man is truly ethical only when he obeys the compulsion to help all life which he is able to assist, and shrinks from injuring anything that lives. -Albert Schweitzer

These are complex topics and my bullet points hardly do them justice, I am just giving a flavour of my reasoning. If you want to read more a place to start is Diet for a New America by John Robbins, also worth reading is Diet for a Small Planet by Frances Moore Lappe.

Tuesday, April 26, 2005

Firefox Extensions April 2005

Since its been a while since I plugged Firefox here is my current extension list. My only complaint and not a Firefox problem at all per se is that Statusbar Clock doesn't work with recent versions of Firefox and the author seems to have gone awol or at least he has stopped answering email.

  • Bookmark Backup -creates a backup of the bookmarks file each time Firefox is closed.
  • Dictionary Search -no explanation needed and my favourite extension by far.
  • Disable Targets for Downloads -stops target="_blank" opening a new window/tab for downloads.
  • Duplicate Tab -duplicate a tab to a new tab or to a new window.
  • fireFTP - an FTP client in a browser tab.
  • FLST (Focus Last Selected Tab) -Brings focus to the last selected tab when closing the active tab.
  • Link Visitor -toggle the visited status of links.
  • Sage -lightweight RSS and Atom feed aggregator extension.
  • Single Window -traps links that would normally open in a new window.
  • Plain Text Links -treats selected plain text urls, highlight and right click to open.

Friday, January 21, 2005

Firefox Search Tricks

The linugaphiles out there might appreciate these dictionary search tricks for Firefox. They nicely complement the Dictionary Search extension. search plugin
Create a file called "Dictionary.src" in your Firefox searchplugins directory containing the following:

description="Dictionary Search "

<input name="q" user="">

charset = "UTF-8"

Now select "Dictionary" in the search bar and type your search term.

If you want to get more technical with this sort of search plugin check the documentation. bookmark keyword search
I prefer typing to mouse clicks and so I generally keep the search plugin for google. I have a bookmark setup for with a URL of and a keyword "dict" (you need to go to "Bookmarks"->"Manage Bookmarks" and then "Properties" to edit the keyword value) then to search for "chiaroscuro" go to the nav bar and type
dict chiaroscuro
and hit enter.

Perl programmers might find it useful to have a keyword search for cpan:
keyword: cpan

More on bookmark keywords - *update:* looks like AOL pulled the plug on devedge try this webarchive copy instead.