Home Uniquely NZ Travel Howto Pauline Small Firms Search
Diary of System and Website Development
Part 13 (January 2008 - August 2008)

3rd January 2008

Bandwidth Monitor

I have found some ideas at http://phaster.com/golden_hill_free_web/ghfw_connection_speed.shtml on how to get a measurement of download speeds and have developed these to get an automatic setup for the size of popup images based on bandwidth and screen size. The technique is very simple but not very accurate as it depends on timing the download time of an image. This is very dependent on other traffic - most browsers can download up to 4 images in parallel with the main page. Placing the image at the top of the page is desirable to make sure that it starts to load first and then, even with the multiple image and page downloading problems, the measurement enough to make a decision whether one is on a broadband connection. An image forming a title would be perfect. The first timing measurement is made as the image tag is written to the page by JavaScript and the second measurement when the onload event fires for the image.

/* The following code can be used to calculate the connection speed by measuring the time to load one of the images on the site. The image tag is replace by a Script call to writeImageTag{}. Based on an idea at http://phaster.com/golden_hill_free_web/. It uses routines for setCookie and getCookie provided earlier in epopup.js It can be cut and pasted into the .js file.

bandwidth = 30; // Connection Speed set to mid range until measured

function writeImageTag( imageURL, fileSize, imgTagProperties ) {
/* Writes the image tag which is used to calculate the bandwidth on the fly. Needs URL, filesize in bytes and string containing any properties. */
start = (new Date()).getTime();
loc = imageURL + '?t=' + escape(start); // Append start time to ensure the image is not cached.
document.write('<img src="' + loc + '" ' + imgTagProperties + ' onload="bandwidth=computebandwidth(' + start + ',' + fileSize + '); ">');

function computebandwidth( start, fileSize ) {
// Called by writeImageTag to calculate approximate connection speed
end = (new Date()).getTime();
connectSpeed = (fileSize * 8) / (end - start);
if (connectSpeed > 40 && screen.width > 799 ) { setCookie('broadband',"true",0,"/"); };
if (connectSpeed < 10 ) { setCookie('broadband',"false",0,"/"); };
return connectSpeed;

function showSpeed() {
// For testing puposes
alert('The Connection Speed during the download of the test image was: ' + Math.floor(bandwidth) + ' kbps.');

3rd May 2008

Hackers and spamers

Much of my time since returning home has been spent on the Internet battlefield. I first spent 3 days trying to remove malware and viruses from one friends machine. In parallel another friend's small business has had their forms attacked by an automated spam generator running on multiple 'zombies' (machines which have had malware loaded which is called into action on demand) whilst their email address was spoofed to send out close to a million spam emails most of which were returned so their inbox was receiving 30,000 emails a day even after all the spam filtering on the server etc I could set up on the server. In the end the attacks on the forms took an extra two levels of protection over the three levels already in place to stop misuse for spamming. Another small business has had its machine so infected that the two laptops have been junked, I guess they will end up on my doorstep when Adrian next returns from Cambodia.

Protecting forms

I have always taken great care to make sure that my form handling scripts can not be called from anywhere other than from the hosting domain by spammers. That has not proved sufficient as spam is being injected into the the page by some automated form filler. I first added the IP address of the visitor to the form output which enabled me to see that the spamming was coming from a large number of different machines. This is picked up in PHP by the following code which first checks to see if a proxy server is in use.


The next step was to add a hidden variable to transfer the address of the page calling the form and check that that has been called from a page on the website rather than directly. As a side benefit this has enabled me to put the name of the calling page into the title of the email sent - I stripped off the path with the following JavaScript code:

if(document.referrer) {
page_name = document.referrer.slice(document.referrer.lastIndexOf("/")+1);

Ubuntu - Version upgrades to Hardy Heron

The latest Long Term Support version of Ubuntu came out at the end of April and I have upgraded two of the four machines I have running Ubuntu.

The Homebuilt Desktop had the previous LTC version Dapper Drake so I expected that would be a big problem but it all went very smoothly - I have lost some of the launchers for script files off the desktop although the scripts are still present where I had saved them. The Wifi card was detected and just needed the WEP key rather than all the hastle when even a minor kernel change took place - hopefully Wifi Radar is now redundant as such good facilities seemed to be built in. NVu is no longer supported and I found it had been replaced by Kompozer which is the version now being looked after by a new support group. The only major problem I have not sorted is that Google Earth does not work any more - I will have to uninstall it and reinstall I suspect. I also note that GPSU which runs under Wine has some problems I have yet to check although the other programs under Wine such as Paintshop Pro and IrfanView seem OK. I have also lost the Google toolbar which is not supported yet in Firefox 3 which is a beta version. Open Office is up from 2.0 to 2.4. Picassa is fine. Overall well worthwhile and keeps me in business for another 3 years.

The old Dell XPS 700 was running version 7.10 and also upgraded smoothly but slowly. The new version needs 384 Mbytes memory for a new install but upgraded with the 320 Mbytes available to my relief. Again everything seems to still work but it had little on it and it looks good for another three years. It detected a 3Com 3CRUSB10075 USB Wifi adapter so it is also now wireless.

I will not be able to upgrade the old Portege as it only has 192 Mbytes memory.

I hope the Toshiba Laptop will be OK but I am too dependent for the next few months to risk it especially as I have not checked Gnome PPP and bluetooth for connecting via the mobile phone.

30th May 2008

Multiple level drop down menus using CSS (Suckerfish Menus)

I have been looking into adding drop down menus to a web site I am building at present and I have found some examples of coding them using Cascading Style Sheets instead of complex JavaScript which is very browser dependent. I first found it on the Met Office web site where I was looking at the source code. The original idea was from Patrick Griffiths and Dan Webb and the original Suckerfish Dropdowns article published in A List Apart proved to be a popular way of implementing lightweight, accessible CSS-based dropdown menus that accommodated Internet Explorer by mimicking the :hover pseudo-class.

Since then they have been considerably refined and involve just a dozen lines of JavaScript to bring compliance to the CSS standards to Internet Explorer, have greater compatibility (they now work in Opera and Safari without a hack in sight) and can have multiple-levels. The latest information can be found at HTML Dog and there is generator for advanced versions at PixoPoint .

I have put the CSS required into a file which can be included on every page where the Dropdowns are needed and likewise the JavaScript. There is a test page with all the current contents of the .css and .js files at New Document Template with Dropdown Menu

Blog Software

I have spent quite a lot of time looking into various Open Source software that I could load onto a web site for continuing discussions after meetings - there is an associated requirement that the discussions can be kept private.

I found several possibilities, all written in PHP which is supported for normal web pages by both of my web site hosting packages. For a Blog the software needs to be able to write files and send emails which is normally restricted. I narrowed down to SimplePHPblog and WordPress. The two are however quite different in their detailed requirements. To find out if PHP is on your server create and upload a file called phpinfo.php containing the single line

<?php phpinfo() ?>

and then enter your.web.site/phpinfo.php in the browser - that will probably be the simplest script program you will ever write and you will use it often for useful information!


SimplePHPblog looks a perfect solution for portable no-frills blog software that didn't rely on a back-end database, however the consequence of no database is that it needs to be able to write files directly. The installation instructions therefore indicate that PHP must not be running in 'Safe Mode' and that you may have to sort out the file and folder permissions and possibly the owner. This means that it is very dependent on your server set up if you are on a Linux (Apache) server but probably in good shape on a Windows server which takes no care over security and permissions.

My Fasthost server runs under Windows NT and SimplePHPblog worked straight off with only one file to configure and that was just a cut and paste from the installation. One downloads the installation as a zip file, Extracts it to a folder and then uploads the whole folder to your web space. One then accesses it with your browser and that set off the installation process and configuration during which a few lines of code are produced with instruction on creating a file from it and where to upload it. Even that is only done for security as you are uploading your password to an area inaccessible via the web. The only precaution I had to take was to use an email address with the same domain name otherwise email notifications failed - that is a Fasthosts feature to protect against spam. You can see the result on my Uniquely NZ Feedback Blog

Installing on Freezone was another story and I never cracked it fully. Firstly I knew that my Apache server was running in Safe Mode but Freezone support are extremely flexible and offered to change that if required. The install failed saying it could not create directories and told me how to do it and the permissions required and after that to seemed to work but I quickly found that it could still not write any of the files and folders needed for storage of posts. A look at the folders and files showed that most were owned by me as pcurtiscom but the program was running as apache hence the problem. I put the project on hold whilst I tried installing WordPress.


WordPress has three server requirements:

Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings. A permalink is what another weblogger will use to link to your article (or section), or how you might send a link to your story in an e-mail message. The URL to each post should be permanent, and never change hence perma link. In my case the Freezone Apache server has the mod_rewrite module loaded so I will be able to implement permalinks in due course. I have MySQL available at no additional cost and it was trivial to activate and set up in Plesk control panel which Freezone uses. Three pieces of information from the SQL set up (database name, username and password) have to be edited into one of the files before you upload it - there are other settings but normally the defaults are used. The first access then takes one through a brief set up and that is it. I found an email reminding me of the password had been sent. It took little more than the five minutes they promised.

WordPress seems to do most of what I believe is needed for my original objective of setting up a secure discussion area for a group I belong to - it tends towards the Blog (horrible word) format rather than a Forum format in that the initial Posts are by an administrator after which anyone can contribute to the discussions with further posts. I have set it up on my site and password protected the folder again using the Plesk control panel so one needs to log in every time at present and I can not give a link to it. WordPress also has an internal mechanism for password protecting individual postings which may be good enough. Personally I hate the word Blog sufficiently that I propose to call it a Discussion Area or Feedback Area when I start to use it.

Overall WordPress looks more comprehensive than SimplePHPblog and has nice touches like formatted posts and has a spell checker (which I definitely need). You can also use a huge number of themes some of which effectively hide that it a blog as well as being able to add and arrange a number of widgets such as calendars. The options for 'moderation' are excellent. It is possible to run several blogs using the same MySQL database and separate 'installs' of WordPress by a single change in each of the configuration file one sets up to link to the MySQL database. I will probably replace the SimplePHPblog with a WordPress one on our own site.

17th June 2008

Sharing A Thunderbird Profile between Windows and Linux

Firstly we have to know where your existing profile folders are stored which can also be useful if, for example, you want to make a backup of your personal data.

Where %AppData% is a shorthand for the Application Data path on Windows 2000/XP/Vista. To find it, click Start > Run... (use the search box on Vista), enter %AppData% and press Enter. You will be taken to the "real" folder, which is normally C:\Documents and Settings\[User Name]\Application Data on Windows XP/2000, C:\users\[User Name]\AppData\Roaming on Windows Vista.

Now one has to place a profile for the Linux and the Windows systems which is on a partition accessible from both ie normally on a FAT32 partition. The shared partition must be one which is automatically mounted under Linux. There are several documents on the Internet concerning profiles accessible from both operating systems and the problem is that the specification of the paths are different in Windows and Linux and initially the paths are absolute in one of the files called prefs.js .

The first time I tried this I copied the Windows profile to a folder on the shared drive (in my case E:\ ) and edited all the fixed paths in prefs.js to be relative. ie lines such as user_pref("mail.root.none", "C:\\Documents and Settings\\P Curtis\\Application Data\\Thunderbird\\Profiles\\c6c9klmd.default\\Mail"); were edited to user_pref("mail.root.none", "\\Mail");

I then used the new profile wizard to create profiles under Windows and Linux which I called shared which pointed to the same common profile. When Thunderbird was run all the folders and accounts appeared identical in both and changes and email downloads etc all seemed to work and propagate as did adding a new account although that created new absolute paths which initially I edited back to relative ones. I however found that changes made in Linux did not seem to matter and it seemed to work out in Windows as well which I do not understand fully - any absolute paths created in Linux seem to be ignored in Windows.

On the next machine I started from the Linux machine and copied the profile folder to the shared drive (in my case was mounted at /media/hda6/Exchange/Thunderbird and the account manager used create a new account pointed at /media/hda6/Exchange/Thunderbird/profiles/abcdefgh.default . I then booted into Windows and again created a new account pointing to E:\Exchange\Thunderbird\profiles\abcdefgh.default and again all the email, accounts etc seemed to be visible without having to change anything in prefs.js.

I have not tried out adding any extensions and I have seen warnings to remove any extensions if one uses this approach. I initially had two different versions of Thunderbird 1.5 and 2.0 but I do not think that is a good idea long term so I now have the same version.

17th June 2008

Synchronising Windows Mobile machines with a Dual Boot Desktop and Laptop.

I have been looking into ways of working with our Windows Mobile PDAs and our dual boot machines with Linux and Windows XP/ Vista is similar but the Windows programs have different names. The standard way of synchronising a Windows Mobile based PDA is using a program called Active Sync which links between Microsoft Outlook 2000, 2003 or 2007 with a Bluetooth of USB cable connection. There are various limitations including that PDA can only Synchronise with two PCs although the PCs can link with many PDAs and can not separate address books so that entries for a home address book migrate to a work machine and vice-versa.

However Microsoft Outlook is arguably the best overall integrated email, contact, calendar and task manager application so we have kept using it for home machines and for archiving whilst using Thunderbird for email whilst mobile. We have kept emails in step on all our machines by the simple expedient of leaving them on the server so each machine can download them we periodically clear older emails from the server at a time we know that all the machines have downloaded them using a utility such as IMAPsize. It is also possible to set the machines up to leave emails for a limited time such as 120 days, ie the longest period we ever expect to be away.

Contacts are kept in step between our PDAs, a Palm 750 and an O2 Executive and the main machines running Outlook 2003 by periodic synchronisation with ActivSync - the PDAS serve as the transfer mechanism between the laptop and desktops. That does not help with Thunderbird. This was achieved by running Thunderbird on a Windows machine and periodically importing a copy of the Outlook Address book. Transfer to Thunderbird on the Linux machines was via an export and import process.

We now want to reduce our dependence on any Microsoft software so we are looking for solutions where we can use Thunderbird on all our dual booted machines under Windows as well as Linux yet still be able to use the PDAs. The first step was to share the Thunderbird profile data between Windows and Ubuntu Linux so emails etc could be collected and address books updated whichever was booted up. This has been covered above and has been implemented on two dual boot machines so far without any immediate problems although we have not tried using any Extensions so far. This now leaves the Synchronisation of Windows Mobile devices with Thunderbird under Linux (or Windows) has proved a considerable problem to many people. Several pieces of software exist to replace ActiveSync but seem to give problems in practice judging by reading the many entries on bulletin boards etc. In looking into all of this I discovered a synchronisation package between Thunderbird and a Windows Mobile device call FinchSync which I have been experimenting with and which others seem to make work reliably.


FinchSync is a tool for synchronizing contacts, appointments and tasks from Mozilla email and calendar products such as Thunderbird and Sunbird with a Pocket PC or SmartPhone.

The PC part of FinchSync is written in pure Java and runs on every platform which runs Mozilla software namely Windows, Mac OS X and Linux although the Sun Version of Java may need to be installed. We already have Sun Java installed on all our Ubuntu Linux and Windows machines.

The Pocket PC part is written in C#, using the .NET Compact Framework. The application is claimed to run on all Pocket PCs with .NET installed regardless of the processor or OS version. All Pocket PCs running Windows Mobile 2003 second edition or higher should have the .NET Compact Framework already installed.The only condition is that Pocket PC must be able to connect to the PC via TCP/IP by, for example, a WLAN connection. If this requirement is fulfilled, synchronization can be done from everywhere, even over the internet - the HTTP protocol is used for the communication between PC and Pocket PC so it should work even in firewall-protected environments.

FinchSync is designed to manage contacts, appointments and tasks from different sources and , unlike ActiveSync, keep them separated. The mechanism is powerful and uses the Categories field in Outlook and Pocket Outlook to do this - Categories are not used in Thunderbird or other Mozilla software and they can not be used within a Pocket PC for sorting so this is only a problem if you are a long term user of the full Outlook and have used them extensively. We have implemented many Categories but in practice have only used one to allow us to print Xmas mailing lists so I am sure there will be a work round.

So far I have installed the Client software on the Xda Executive and the server software on on my main HP Windows machine and the two are talking but I have not carried out a synchronisation on my address books until the Categories issue has been address and backups made of everything. Instead I have installed Sunbird on the Windows machine so I can test out the synchronisation of Calendars. and Tasks which I hardly use so it will be no loss. I have this working. The instructions with Finch Sync need to be read carefully but I am going to make a list suggestions and some hints on aspects I found were less obvious until looking back at the instructions.

I have followed the instructions on how to set up to synchronise several PCs running Mozilla Sunbird to the one PDA and transfer Appointments etc between. This involved:

  1. Setup the server on the main (home?) PC. Add the SyncSources you need.
  2. Setup the servers on your other PCs and Laptops. Add SyncSources with exactly the same type and name as on the main (home) PC.
  3. I also chose to use identical usernames and passwords for the clients

On the PDA:

  1. Add a server configuration for your main PC, name it (for example) 'Home'.
  2. Add a server configuration for your laptop, name it (for example) 'Laptop' AND select 'Home' as alias.
  3. Do the same for any more PCs, I have two additional PCs running Ubuntu Linux
  4. It is best to also set up a default for the category so everything from the PDA is synchronised

You will notice, that the alias name is shown in brackets behind the server name and items should now be transferred between your PCs using your PDA. If you still have Outlook in use you can still use ActiveSync to synchronise Outlook and keep Sunbird, Thunderbird and Outlook all synchronised together between mixed Windows and Linux machines!

I am currently doing this just with Sunbird whilst I work out how to deal with all the multiple Categories I have set up in Outlook 2003. I think the way ahead will be to export to a 'comma delimited' file (.csv file) and clear the Categories completely in Excel then re-import perhaps separating off those with important Categories I need to replace.

Ubuntu Hardy Heron Install on Legacy Dell XPS 700r Desktop

I had upgraded from Dapper Drake 6.06 to the new LTS version Hardy Heron 8.04 however there was very little on the machine so I thought a new install from the 8.04.1 LiveCD would be sensible so I could see the differences. The fresh install is better as some of the features were more reminiscent of Dapper and it has become clear that a number of points covered in my existing Ubuntu 'Howto' page need to reflect this.

Windows Drives on a dual booted machine is one example. Previously drives on the Windows formatted partitions were visible in 'Computer' but were un-mounted and could not be mounted until some fudging was done. They now show up in the Places dropdown and can be mounted/un-mounted but this is not permanent.

Sharing data on on a Dual Boot machine.

I have set up all my Dual Boot machines to have at least one common Drive/Partition which can accessed from Windows or Ubuntu. I have made this a FAT32 partition because there were some concerns over the reliability of writing from Ubuntu to the proprietary format NTSF which Microsoft has developed. This has been overcome I understand and Hardy heron should be OK with an NTSF common drive.This FAT32 common partition has to be created before starting to install Ubuntu or created at the same time in an unused part of the drive using the Linux partitioning tools – do not try to modify a Windows Partition especially one used by Vista from outside of Windows. Vista allows one to shrink its partition to make unallocated space. Under XP I use an old copy of Partition Magic 8 to create and resize partitions.

Once one has the common partition and made it permanently mounted under Ubuntu we can start to set up a shared system. Up to recently I had a DATA drive which had all my Documents etc. I had a set of folders for My Documents, My Backups, My Pictures, My Music etc. I also had a folder with the Outlook data files to make backing up easy. Recently I realised that if I was running Thunderbird, Sunbird and Firefox under both Ubuntu and Windows I could put their internal and configuration data (which is all in a 'Profile' folder) on the common drive and access my emails, address books, calendars, browser favourites, cookies and history etc from both machines. This is a big step forwards and so far has worked very well although I have yet to merge the two set of favourites. I can also run Truecrypt on the same encrypted Vaults from both Windows and Linux and obviously I have Open Office on both for document writing, spreadsheets and presentations. Backing up become very easy as both are in synchronisation at all times.


Hibernation works by writing the contents of memory to the disk and then retrieving it again when you turn back on. If you have been working on the same data or even access the same directories then the 'hibernated' data can and usually will overwrite it. It is possible to hibernate provided you go back to the same system but I have forgotten too many times that I turn off hibernation on both systems.

In Windows you use Start -> Control Panel -> Power Saving. I have covered it for for Ubuntu on the Fun with Ubuntu Page.

The only problem other than hibernation I have found in sharing the profiles for Firefox is with Extensions. In Windows AVG forces in a couple of extensions which are not available under Linux and there is an extension for Ubuntu when running in Linux which is clearly not available in Windows. I find that when I swap I get a popup saying extensions are being installed when I swap from one system to the other - this is to be expected but it would be nice if the messages could be suppressed.

I have yet to make a final break from Outlook 2003 for our master email archive and address books because it is so easy to synchronise with the XDA and Palm 750 PDAs. FinchSync is viable for Calendars but falls over on large address books but there is another option under Windows called Birdie sync which uses ActiveSync to link a PDA using Windows Mobile to Thunderbird. If one is sharing everything between Windows and Ubuntu it is then possible to boot into Windows just to sync the PDAs. If this is done without having a live internet connection this should be safe even if one has not been able to keep Windows updated. There is a 21 day free trial before purchase which is 19 Euros – this looks the way to go whilst FinchSync is completing development which I doubt will happen.

Permanently Mounting a shared drive in Ubuntu 8.04

If we are going to use a shared drive for data and settings used by programs we must ensure that it is permanently mounted. The mounting points in all major flavours of Linux are defined in /dev/fstab and and the convention is that the mount points are in /media. We therefore need to set modify /dev/fstab to set up to mount points in /media and we must also create the directories for them using sudo to make them owned by root and set the permissions so they are accessible to all users – I cheat and use sudo nautilus to allow be to use a gui to create the directories and set permissions. It is best to make these directories identical to those created by mounting from 'Places' which is derived from the partition label if it is set – see below. The procedure for modifying /dev/fstab is the same as it was for Dapper except that it is now recommended to use the drives UUID rather than the device's location ie append lines to /etc/fstab looking like:

# /dev/sda1
UUID=F006-E8EA /media/SYSTEM vfat iocharset=utf8,umask=000 0 0
# /dev/sda5
UUID=706B-4EE3 /media/DATA vfat iocharset=utf8,umask=000 0 0
# /dev/sdb7
UUID=EEC0-FA2D /media/SHARED vfat iocharset=utf8,umask=000 0 0

Note – these strings are for FAT32 partitions and differ for NTSF partitions.

The UUID can be found by typing sudo blkid in a terminal – typical output looks like:

pcurtis@dimension-ubuntu:~$ sudo blkid
/dev/sda1: LABEL="SYSTEM" UUID="F006-E8EA" TYPE="vfat"
/dev/sda5: LABEL="DATA" UUID="706B-4EE3" TYPE="vfat"
/dev/sdb5: TYPE="swap" UUID="b7c865a1-e4b6-447f-a89b-0b4deb3ba302"
/dev/sdb6: UUID="731adef2-0cdf-44c0-b6e1-006a90a14949" TYPE="ext3"
/dev/sdb7: UUID="EEC0-FA2D" TYPE="vfat" LABEL="SHARED"

After modifying /etc/fstab and rebooting the three Windows Drives are mounted and appear on the desktop in addition to being in 'Places' - they can not be un-mounted without root privileges which is just what we want.

Creating a common partition when installing Ubuntu 8.04

I have been experimenting and reinstalled Ubuntu Hardy Heron a couple of times whilst experimenting with making changes to the partitioning using the built in partition manager in the installer. First BACKUP everything. Then start the install from the LiveCD and when you get to partitioning select custom. You can now edit the partition layout on the disk(s). If you are using Vista you must shrink the Vista drive (partition) using Windows tools to make space. It seems to be safe to shrink FAT32 partitions without losing data using the tool and I am not sure about NTSF partitions. You can have to use the free space to create:

If you specify a mount point for the FAT32 partition it should be /media/LABEL where LABEL is the name you will want to end up using – I suggest SHARED.

Note that you will still have to do some setting up to achieve that including labeling the file-system you have created!

Labeling a new FAT 32 file-system (partition) in Ubuntu Linux

New partitions which you create when installing Ubuntu Hardy Heron will not have a label and will show up as a size when mounted on the desktop. The easy way is to do it under Windows by right clicking on the disk in My Computer -> Properties and entering a label. Labeling in Linux is a black art and it took a lot of searching to find the way below which I have have used on principle rather than do it in Windows! The article referenced below also covers labeling file-systems in other formats and is very useful for USB sticks so they have a meaningful name and mount point.

Reference information: https://help.ubuntu.com/community/RenameUSBDrive

Install the tools required

sudo apt-get install mtools
Find out device corresponding to the partition:

sudo blkid
Unmount device which we have found is /dev/sdb7 :

sudo umount /dev/sdb7
Check existing label (note the double :)

sudo mlabel -i <device> -s ::
Change label to SHARED

sudo mlabel -i /dev/sdb7 ::SHARED
and that's it

We are now set up so we can start to configure our programs to share their data and settings between Windows and Linux.

Mozilla program profiles

All the configuration and data for Mozilla programs are held in what is called a profile and the profile folders for all the main Mozilla programs look very similar. The profiles have what is called a salted name – that means it is randomly generated and 8 characters long so it is difficult for a hacker to identify. However the first default profile is in standard place and has an extension of .default and new profiles are reached by pointers in an .ini file one level up in a folder often called profiles. The easy way to find your profiles is to do a search for files with a *.default search. Ubuntu Hardy has a file search under Places.


I have been looking through the Firefox extensions and came upon FireFTP which is an addon to Firefox which transforms it into an FTP program. I will have to try this out but the hope is that it will be possible to again work seamlessly between Windoz and Ubuntu on a dual boot system. The facilities look as comprehensive as the WS_FTP LE program I use under Windoz and gFTp under Linux. If I am using Komposer which is once more Mozilla based I should be able to again move to a common profile and keep all my settings although that is not a serious problem in any case.

Medibuntu Repository for Hardy Heron

Setting up this third-party repository can be done by way of a few quick commands:

sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list

sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

This will add the Medibuntu repository, import the Medibuntu GPG key and make the new packages available.

Installing Google Earth from Medibuntu

To then install Google Earth simply use:

sudo apt-get install googleearth-4.2

You should now have Google Earth added to your “Applications” menu. Performance may be improved if one disables the atmosphere rendering by: View -> Atmosphere -> untick

TrueCrypt 6.0

TrueCrypt has now reached version 6 which can be downloaded as a .deb file for both 32 and 64 bit versions of Ubuntu – make sure you get the correct version. The .deb is packed into a compressed file .tar.gz just double click truecrypt-6.0a-ubuntu-x86.tar.gz to open the archive and drag the folder to the desktop, open it and double click the .deb to install. It now gas a GUI interface like Windows and it can be run by just truecrypt in a terminal or from a launcher. It opens virtual disks which are placed on the desktop. Making new volumes (encrypted containers) is now trivial – just use the wizard. Old files can be opened but it is best to create a new volume and copy the contents across. This is now a very refined product under Linux.

Adobe Acrobat

This can be downloaded from the Adobe Site for Linux as a .deb which just needs to be double clicked to install including a plug-in for Firefox for viewing PDF files within the browser.

Sun Java

The Sun version of Java (currently 6.0) is required for many applications and viewing web sites - it can be installed by Add/Remove which seemed to take an age to complete.

14th July 2008

Bluetooth Phone Dial-up connection

I have just done a trial set up of a Bluetooth connection to my mobile phone prior to updating my laptop to Hardy Heron on the machine which had been reloaded rather than a distribution upgrade. There are some differences.

When the Bluetooth dongle is inserted there is an icon in the system area for Bluetooth.

I first paired from the phone and a window opened below the system tray asking me for the pairing password. Much easier than on Dapper Drake and everything was preinstalled.

I could connect to the phone and see lots of files using the 'bluetooth tray icon' but once I had connected I had to remove the dongle to continue the setup using

hcitool scan

sdptool search DUN

I then copied my existing rfcomm.conf to /etc/bluetooth as the above showed no differences to before.

I however found that the command to restart bluetooth after the change to rfcomm.conf is now

sudo /etc/init.d/bluetooth restart

I installed Gnome PPP and set up a number to dial, username, and password and changed to /dev/rfcomm0 and immediately got an internet connection on a simple dial-up.

The GPRS connection may need a change in other PPP files as written about before but at least the basics worked very quickly.

However I had difficulties on the laptop where I done a distribution upgrade and nothing of the Bluetooth worked. I found that hcitool and other utilities did not work and I did not get a Bluetooth icon in the notification area when I plugged in the dongle. This was the same on both the machines I had done distribution upgrades on. I eventually found that I had to uninstall bluez-utils using System -> Administration -> Synaptic Package Manager and use the option to completely remove all the associated files. This however meant I had to recreate /etc/bluetooth/rfcomm.conf . Once that was done I got the bluetooth icon immediately I plugged in the Dongle and could do an hcitool scan.

15th July 2006

Truecrypt 6.0a with GUI interface

The new version 6.0a of Truecrypt is a great improvement and has a GUI interface almost identical to that in Windows. The only feature I have found is that one has to have administrative privileges to mount ones volumes. This means that one is asked for ones administrative password on occasions as well as the volume password. There is a way round this by providing additional 'rights' specific to just this activity to a user (or group) by additions to the sudoer file. There is information on the Sudoers file and editing it at:


Because sudo is such a powerful program you must take care not to put anything formatted incorrectly in the file. To prevent any incorrect formatting getting into the file you should edit it using the command visudo run as root or by using sudo ( sudo visudo ). In Ubuntu 8.04 the default editor for visudo has changed to vi, a terminal editor, which is an incomprehensible at least to those used to Windows. To change this behaviour we can edit the users setup file:

gedit ~/.bashrc

Add the lines to use gedit as the standard GUI editor and nano as a terminal editor:

# Addition to standard file to select visual and terminal editors
[ $DISPLAY ] && \
export VISUAL="gedit" || \
export EDITOR="nano"

Now you can launch visudo in a terminal with the standard editor gedit by:

sudo -E visudo

There are now two ways to proceed, if you have a lot of users then it is worth creating a group for truecrypt, changing truecrypt to be a member of that group and adding all the users that need truecrypt to that group. You then use sudoer to giving group members the 'rights' to use it without a password. See:

http://wiki.archlinux.org/index.php/Truecrypt or

If you only have one or two users then it is easier to give them individual rights by adding a line(s) to the configuration file by launching visudo in a terminal into the standard editor gedit by:

sudo -E visudo

and appending the line

USERNAME ALL = (root) NOPASSWD:/usr/bin/truecrypt

Save and exit - if there are errors there will be a message and a request what to do in the terminal.

I used the simple way and Truecrypt now runs without continual prompts for passwords on my machine.


Wubi which stands for Windows-based Ubuntu Installer) is another way of accessing and using Ubuntu for an extended period of time by running it in the Windows environment. Ubuntu is installed within a file in the Windows file system as opposed to being installed within its own partition . This file is mounted as a virtual file system and looks to Ubuntu Linux just like a real hard disk. Wubi also creates a swap file in the Windows file system which is seen by Ubuntu as additional RAM. The standard Windows mechanism is used to add an entry to the Windows boot menu to provide a choice of system to boot into when the machine is started up. It can be uninstalled (including the boot-up option) just like any other Windows program

The Wubi Installer for Windows can be downloaded from the internet and is also on the LiveCD. It can either use the Hardy Heron LiveCD for the data 'image' for installing or download it directly (900Mbytes so you need broadband). This gives a way of testing Ubuntu on machines which do not have CD reader such as many of the new ultra portable laptops often known as subnotebooks or 'Netbooks'. The only real requirement to try out Ubuntu with Wubi is that you have 4 Gbytes of disk space empty - ideally you need 8 if you are going to do an extended trial.

If you want to change to a fully installed system in its own partition(s) using Linux file systems you can use LVPM (Loopmounted Virtual Partition Manager) program to set up partitions and transfer the Wubi-generated Ubuntu installation to dedicated partition(s). The advantage of this route is that users can test the operating system and install any drivers before they install it to a dedicated partition. This is ideal for Netbooks and other machines without a CD/DVD drive.

So what are the disadvantages and reasons not to use this as a permanent solution if you are using Ubuntu for most of the time.

I have installed a Wubi system on my otherwise Windows only machine for Video editing etc for very occasional use.

I see Wubi as an ideal solution for mobile use by those who do not want to change but can not tolerate the security and data cost implications of Windows over a GSM/3G network. They can collect email and browse the web in safety then boot back into Windows. Others should review usuage every month or so and transfer to a dedicated or dual boot system as soon as you are confident you intend to continue using Ubuntu.

Vcards and address book transfers from Outlook to Thunderbird

Thunderbird allows you to attach your own Vcards to outgoing mail and to add incoming Vcards to your address book from emails. It does not however allow you to import them directly but you can forward a Vcard or selection of Vcards as an attachment to an email you send from Outlook to Thunderbird by using Actions -> Send as Vcard. You can also drag a Vcard into an email you are composing then open and save it. A bizarre but practical way to add a few contacts which you have updated in an Outlook Address book.

26th July, 2008

Adding Fonts in Ubuntu Hardy Heron 8.04

I wanted to install an extra Font in Hardy Heron, namely the Nadianne True Type font I use for Wine labels etc. This is not a standard Windows font and originally came with a printer. I eventually found a web reference at http://vitalbodies.wordpress.com/tag/installing-fonts-in-ubuntu/ where I discovered that True Type fonts available to all users are stored in /usr/share/fonts/truetype so type in a terminal:

sudo nautilus /usr/share/fonts/truetype

Now create a new directory for your extra fonts which I called ttf-extra by a right click -> create folder etc.

Drag the font into the ttf-extra folder from whever it is stored

Then alert Alert Ubuntu that you added the fonts by typing the following in a terminal

sudo fc-cache -f -v

This rebuilds the font cache - the options are verbose and to force complete regeneration of the cache (neither may be necessary but I followed the instructions before reading the manual page)

It is possible that creating a folder .fonts in your home directory and copying the font into it may be sufficient for a single user - I have not tried it.

18th August 2008

More on Thunderbird Profiles, Address Books and Synchronisation


I have finally given up on Finchsync as it just does not work reliably and has no support left. In order to sync my XDA and Treo PDAs I have resorted to using a Windows based program which actually costs money, it however does seem to work and I suppose it is too much to be able to expect to avoid use of Windows altogether when one is using a Windows based PDA as Bill really hates to make life easy. Birdiesync extends Microsoft ActiveSync so that it will also synchronise the Windows Mobile to Thunderbird and Sunbird with the usual limitations that each mobile can only synchronise to 2 other other machines. There is one additional feature in that Thunderbird and Sunbird have to be running so that they are automatically started up when you plug in the mobile on the USB link. Another feature with Windows Mobile 5 is that the synchronisation is carried out every 5 minutes regardless of what you specify.

So what is the procedure - I have dual boot system but normally I am using Ubuntu 8.04 Hardy Heron and Thunderbird 2 but when I want to synchronise the PDA I reboot into Windows and plug in the PDA by USB. Thunderbird and Sunbird are fired up and synchronisation takes place - it takes a while as Birdiesync also seems to check and remove any duplicate entries which is good if you make mistakes and end up with double entries. I can then reboot back to Ubuntu and because I have a shared profile my Thunderbird address books and calendars are now all up to date and synchronised. For an occassional activity this is not too bad. One very good thing about Birdie sync is that is also deals properly with some of the fields that do not exist in Thunderbird at present although there must be some fields reserved for future expansion. In my case I made extensive use of categories and they are implemented in Windows Mobile. These get synchronised although you can not see them which is not the case when you import from Outlook when you lose them.

The MoreFunctionsForAddressBook Extension for Thunderbird

There was a throw away statement somewhere on the Birdiesync site saying that this happened but you could only see/use them in Thunderbird with a Thunderbird Extension. I finally found a really useful extension for Thunderbird which enables one to see and use several of the hidden fields which are not yet implemented and I have installed it on one machine toassess it. It is called MoreFunctionsForAddressBook and seems almost too good to be true. It addsin many of the functions which are missing in the Thunderbird address book as well as allowing display and use of some hidden fields such as Categories and Birthdays. You can also select and copy addresses and notes from the 'preview' and do searches which include extra fields such as categories and notes. It also extends the actions to handle exporting, sending and importing vcards. I have done an extensive search looking for the catch but have not found any problems on the internet so far, if you search for problems you just get examples of the problems it solves! I still think that Outlook 2003 is the best overall email, contact management and calendaring package against which the opposition must be judged but Thunderbird with the Lightening and MoreFunctionsForAddressBook Extensions is now coming very very close before you take into account the costs, security and general Windows issues.


Valid HTML 4.01 Copyright © Peter & Pauline Curtis
Content revised: 2nd August, 2020