‘Til All Are One

Freedom is the right of all sentient beings

March 31, 2007

What’s wrong with my script?

Filed under: Software, Ubuntu, syndication-floss — Sridhar Dhanapalan @ 11:12 pm
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Are you receiving syntax errors when running a shell script on Ubuntu 6.10 (Edgy Eft)? If so, you might want to check what shell you are using. While testing scripts for the LCA A/V Team a few months ago, I discovered that the Ubuntu developers decided to symlink /bin/sh to dash, for faster and less memory-intensive script execution. For POSIX-compliant scripts, this isn’t a problem at all. However, there are many third-party scripts which call /bin/sh but use shell-specific (typically bash) syntax. They can be fixed by altering their first line to call the most appropriate shell, for example:

#!/usr/bin/env bash

env makes it possible to call bash, wherever it may lie. While my Ubuntu and Gentoo systems have a /bin/bash, there are other distributions which have /usr/bin/bash or /usr/local/bin.bash.

While you can and should fix your own scripts to operate in this way, constantly mending others’ mistakes can become tiresome. You can return your /bin/sh to point to bash with the following command:

$ sudo dpkg-reconfigure dash

When asked if you wish to install dash as /bin/sh, tell it to go to hell emoticon

Note that bash does use more memory, but on a modern desktop machine the difference is negligible. This change will not affect the default login shell, since that is already bash.

 

LotD:  Obese Aussies get big ambulances

March 20, 2007

Eh-Oh!

Filed under: Ubuntu, User interface design, syndication-floss — Sridhar Dhanapalan @ 12:07 am
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

I have been completely floored by Ubuntu’s new Migration Assistant. It’s certainly something that we have needed in the FLOSS world for a long time. Anything we can do to reduce migratory hurdles is by all means welcome.

To play devil’s advocate, however, I’d like to point out a deficiency of such migration tools. To take an established example, witness Mozilla Firefox on Windows. When you first start it, you are greeted with a friendly wizard to port settings and bookmarks from Internet Explorer. If, like most people, you allow it to proceed, it will replace the carefully-selected default Firefox bookmarks (not to mention the awesome BBC Headlines live bookmark) with those from IE. The result can be a cluttered, advertising-laden (Windows Marketplace, anyone?) monstrocity that has lost the simplicity and original intent of the product being loaded.

The Ubuntu Migration Assistant potentially raises this application-level misdemeanour to an OS-level atrocity. As this review of the utility demonstrates, even the Teletubbies wallpaper of Windows XP can be migrated with ease, not to mention the aforementioned bookmarks. This can ruin the intended look and feel of the OS, thus preventing the user from experiencing the OS in a clean, ‘pristine’ state.

Is this a good or a bad thing? I’m not sure, but what I do know is that the designers of this tool should be careful to select default settings which do not unnecessarily alter the user experience. Tread carefully.
 

LotD: Linux Genuine Advantage

March 14, 2007

Pickle me grandmother! (AKA: The January Chronicles, Part III)

Filed under: Activities, Health & General Wellbeing, Personal — Sridhar Dhanapalan @ 4:37 pm
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

When I was little boy In Grammar school
Always went by the very best rule
But Evertime the bell would ring
You’d catch me playing with my ding-a-ling

Thus goes Chuck Berry’s classic, ‘My Ding-a-Ling’.

At the ripe old age of twenty-five, I have been the lucky recipient of an inguinal hernia. As mentioned earlier, I carried it through linux.conf.au (whilst exercising a degree of diligence). My operation was one week later, conveniently scheduled for January 25. That left me mostly immobile for Australia Day. I passed the time with my laptop whilst the Fox Classics channel broadcasted a marathon of Kingswood Country. I have harboured fond memories of this classic piece of Australiana since my childhood, and I was glad to be able to see it again. Presumably, modern-day political correctness keeps it off the air for most of the time, which is a grand shame considering that the un-PC elements were intended as humorous plot devices and were not meant to be offensive to viewers.

Two days later, against my better judgement, I was walking around and playing Wii tennis. I had never played a Wii before and it looked like so much fun that I just had to do it! Apart from some dressings which lost adhesion (due to the abdominal twisting associated with tennis), I was no worse for wear. Now, nearly two months later, I feel completely fine. It sure feels good to have the procedure over and done with. Now I can resume my ironman training…

The content on this site is © Copyright 2002-2008 Sridhar Dhanapalan. Unless otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 2.5 Australia Licence.
Creative Commons BY-SA Licence
Powered by Linux and Free Software