Home Pauline's Pages Howto Articles Uniquely NZ Small Firms Search
Height Padding
Fun with Ubuntu Linux

Fun with Ubuntu Linux | The Road to Freedom - The Journey Starts |The Road to Freedom - Base Camp | Ubuntu All Together - Sharing, Networking, Backup, Synchronisation and Encryption | Ubuntu on the Lookout - Browsing, Email, Contacts, Calendars and Tasks| Ubuntu on the Move | Ubuntu on the Take | Ubuntu making Music | Ubuntu Unity - Evolution or Revolution | The MSI Wind U100 Netbook for Global Communications and Computing

Contents of this page

Introduction

Ubuntu Linux Related Pages

This page was started four years ago and since then a number of topics have been split off into more specialised pages. This page and the pages split off from it are primarily a how I did it story with a lot of detailed information. There are now some additional how you should do it pages for the newcomer. The full set of Ubuntu related pages comprises:

 

Background to the Writing of Fun with Ubuntu Linux

I started experimenting with Linux because I have got so tired of the continual updates to Microsoft Windows XP and the associated Virus checkers, Firewalls and Malware detectors. With Windows, it is almost impossible to prevent a large data flow when one first connects and many programs seek information on updates etc. I have noticed that there are dozens of processes running in the background under Windows XP and the hard drive is now in continuous use even minutes after the last user activity has finished. This all makes Windows XP difficult to use securely whilst traveling on a costly mobile connection rather than Broadband.

Linux has come a long way since I first looked at it and many of the main Linux distributions had what are called LiveCD versions where you have bootable CD which allows you to trial the system without having to load anything onto your machine. The next stage is to install a dual (or multiple boot system) and the install programs will automatically partition your disk and put in a boot loader to allow you to choose when the machine starts up.

I did some research and the best seemed to be a Linux distribution called Ubuntu 6.06 (Dapper Drake) which promised a 3 year support (updates, fixes etc.) for the desktop version and has a LiveCD and a simple install from the LiveCD. For those with some prior knowledge Ubuntu is based on the Debian implementation of Linux with the GNOME desktop interface - Kubunto is a variation with the KDE interface. It is directed towards the desktop and is arguably the most popular version for home use, a position it has achieved in less than 2 years from the first release. A good background introduction to Ubuntu is given in the Ubuntu Wikipedia Entry. The name comes from the African concept of ubuntu one part of which loosely translates as "humanity towards others".

Before we go any further I should point out one important difference between Ubuntu and many Linux implementations - you do not need to be a root user (administrator) to do system work but can use the terminal command sudo (SuperUser Do) to temporarily carry out root activities after entering a password which 'sticks' for 15 minutes - a big security and safety feature. This is one factor in my choice of Ubuntu along with the extensive and growing support for it in the community and by software providers. You will find that Ubuntu Linux system work is still more terminal oriented than Windows although it is fair to remember that it is virtually impossible to avoid the Run Command completely even in XP and Vista.

This page has become a record of my progress with details of all the changes I have made (and how) to the systems so I can repeat them in the future. It is in a sort of chronological order although I have done some re-ordering to avoid swapping back and forwards between different aspects. I have also included many of the links I found useful at the time. I hope it will be useful to others and perhaps avoid yet more reinventions of the wheel - in due course it may become refined enough to became a 'guide'.

It is now in 2010 four years on from the issue of version 6.06 Dapper Drake that I started with. I upgraded most of my machines, without too many tears, to the next Long Term Support (LTS) version 8.04 Hardy Heron and then to 9.04 Jaunty Jacalope. There is now another LTS version 10.04 Lucid Lynx - which all but one of my machines are using - which is more refined and has much better support for some hardware making much of the original document redundant. I have gradually been updated this document and dropping the parts which are no longer relevant as the versions covere lose support although I will keep the Original for reference and users of Dapper Drake and a frozen copy of Fun with Ubuntu Linux for Hardy, Jaunty and Karmic

I have extracted the majority of the mobile aspects to a new page - Ubuntu Linux on the Move and have started another new page covering what is perhaps the second most important activity after communications for inveterate travelers like ourselves, that is handling all the photographs we take with digital cameras, viewing them and ultimately putting them into a form that can be used on our web site. Retaining the fun approach I have called it Ubuntu Linux on the Take - it is currently being extended to include capturing video, editing video and authoring DVDs. Ubuntu on the Lookout - covers installing and setting up the main programs which interact with the outside world through the Internet, namely Browsers, Email, Contacts, Calendars and Tasks. Various aspects of Sharing, Networking, Backup, Synchronisation and Encryption under Ubuntu Linux form another page. Logically the next should be "Ubuntu Linux on the Make" covering Web Authoring!

I have written a guide go with the lectures I have given. This guide enables a normal unsophisticated computer user without programming experience to make the transition to Linux with no more hassle than the change from Microsoft Windows XP to Vista. It is titled The Road to Freedom -A progressive migration from Windows to Ubuntu for Safety, Security and Savings in Computing. It is split into two parts and the first part mainly covers Windows and the Base Camp - part two mainly covers Ubuntu.

The proof of a lot of what I have written here is our MSI Wind U100 Netbook which is more powerful than a Toshiba Satellite yet only weighs in at 1.1 Kgs - this is now entirely used with Linux and I have fully covering the transition in Ubuntu on the MSI Wind U100 - it proved so successful we bought a second one so Pauline and I each have one and Pauline rarely uses anything else even at home.

LiveCD Trials

The first step is to try out an Ubuntu LiveCD on any machines or are thinking of using and deciding if Ubuntu Linux, or any Linux is for you. My first impressions were very favourable. The Dapper Drake LiveCD version ran immediately on both my AMD 2500 based desktop with 512 mbytes RAM and on my new Toshiba L20 laptop with 752 Mbytes RAM. It even recognised the WiFi card in the laptop and it was a simple matter to input the WEP code to give WiFi access. In a few hours with a LiveCD version I had learned enough to have access to Windows shared folders over the network. As a real test I plugged in by Bluetooth dongle and that was recognised and I could find my phone. The LiveCD distributions includes Open Office (compatible with Microsoft Office), Firefox and Evolution which is an email, contacts, tasks etc. package which is close in power to the earlier versions of Microsoft Outlook. The actual desktop and windows are cleaner and better thought out than in Windows and there is a useful workspace switching allowing one to do multitask very efficiently. I was very impressed even when running from CD and for simple tasks a LiveCD offers a safe way to work on any available machine. The trials gave confidence to proceed to first install on the desktop then on the laptop as well as a general understanding of Linux in general and Ubuntu in particular.

How to download the LiveCD and burn it

The LiveCD is available at http://www.ubuntu.com/getubuntu/download and instructions and programs for checking the download and burning the CD are available at https://help.ubuntu.com/community/BurningIsoHowto. I have also given very full details in The Road to Freedom

Wubi

Starting from Ubuntu 8.04 Hardy Heron, there is another option, Wubi which stands for Windows-based Ubuntu Installer) which is another way of accessing and using Ubuntu for an extended period of time by running it in the Windows environment. Wubi installs Ubuntu within a single 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.

The host drive (the Windows drive on which WUBI is installed) is accessible by Places -> host

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 usage 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.

Preparing the system and Installing

Having convinced myself that most of the software I needed was available and that the main hardware would work I decided to firstly install on my AMD Athlon 2500 based machine. This machine has two hard drives and already had the ability to boot both Windows SE and Windows XP with hidden copies of both operating systems on the second drive as well as a variety of partitions with FAT32 shared drives and NTFS drives. I squeezed down the size of a number of the partitions and made room for an unallocated space of 13.5 Gigabytes long so the Ubuntu Installer would have room to make a primary partition for itself and an extra swap drive which all Linux systems seem to use. The existing partitioning and dual boot was done using Partition Magic 8.0 which has never given any trouble in the past. The Ubuntu Install was allowed to use its defaults and used the unallocated space I had provided for the main Linux ext3 primary partition and stole some space from the existing extended partition for the swap file. Unfortunately the partitioning and booting program used by Ubuntu during the setting up conflict with that from Partition Magic which reported partition errors although the Linux tools shoed no errors and everything works fine. In the end I added some unallocated space between the Windows and Linux partitions just in case.

The Toshiba Satellite L20 Pro laptop had one extra NTFS partition for data which I reduced in size to allow 12 Gbytes for Ubuntu and made space in the extended partition for the swap file using Partition magic. I also used Partition Magic to set up the Linux partitions. When Installing Ubuntu it made a sensible looking default choice but I wanted to avoid problems with changing partition sizes so I used the option to set up partitions manually which ran Gparted. I left them as they were and then set the existing ext3 partition I had created to be root "/" , the swap was already set up. I ticked the box to reformat both. The install then proceeded from the CD, the time taken to coming alive being 25 minutes. I then checked set up the Wifi Access point name (case sensitive) and WEP key to get Internet access at elapsed time 30 minutes. I downloaded all the updates from System -> Administration -> Update manager - there were 194 Mbytes so that was all complete set up and rebooted by elapsed time 65 minutes. Interestingly on this installation I have icons for the Windows disks on the desktop and an icon for the network on the top panel which is the equivalent of the tooltray. At a latter stage I used Partition Magic to change the format of the shared drive from NTFS to FAT32 for better compatibility which I would recommend for a basic dual boot system.

Since setting up the two machines for dual booting I have read that it is very desirable if not essential to defragment the disk drives first - I think I did so on the desktop but had not realised the importance.

If you are using Vista it is best to shrink the Vista partition using the built in Vista tool Start -> Run : diskmgmt.msc

Customising The Grub 1 Boot Loader Menu

NB Grub 2 is used from Karmic Koala - see below. This section is for machines still using Hardy until its LTS runs out.

I tend to tidy up the boot order and reduced the options (by commenting them out) in /boot/grub/menu.lst having backed up the original by:

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_bak
sudo gedit /boot/grub/menu.lst

You should read the instructions in the file and you may find that you have to redo some of the commenting out if you have a kernel update unless you also find and change place higher up in the file so it is reapplied.

I also tend to make changes to where savedefault is used so I do not go back after a restart to Windows unless I do so deliberately and I also reduce the time the menu is displayed. I also change the colours of the menu display. After these changes the top of my file looks like this:

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
color cyan/blue white/blue

The Start Up Manager utility

I have recently found that Ubuntu now has a GUI Start Up Manager available which will handle the basic changes you may want to make to Grub in the configuration file. It can be installed by the Synaptic Package Manager by System - Administration -> Synaptic Package Manager and search for startupmanager, tick it and click Apply. It appears on the System -> Administration Menu and seems self explanatory in use.

One change may be highly desirable which unfortunately the start up manager will not handle is to:

Remove a Windows Restore Option from Grub Loader Menu:

At the bottom of the Grub configuration file /boot/grub/menu.lst you will find one or more entries which refer to the Windows systems which were detected during the initial installation. Many modern laptops and some desktops have a restore option which reformats the hard drive and re-installs and image of its state when it left the factory. It is very desirable to comment that out from the Grub Loader Options that are displayed as you are only a few key strokes from disaster if you start it up!

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
# title Windows NT/2000/XP
# rootnoverify (hd0,0)
# savedefault
# makeactive
# chainloader +1

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Microsoft Windows XP Home Edition
rootnoverify (hd0,1)
savedefault
makeactive
chainloader +1

Grub 1 Boot Enhancements

At a much latter stage I discovered how to add a nice background to the boot screen (for example see schultz-net.dk - Grub boot screens) and created a directory under /boot/grub/ with a collection of images including my current image. One only then needs to add a single line to the /boot/grub/menu.lst file which, assuming a dual boot system so boot partition is hd0,2 is

splashimage=(hd0,2)/grub/splashimages/current.xpm.gz

Uninstalling Grub 1

Grub modifies the Master Boot Record (MBR) which can be replaced using either an old Windows boot disk (cd or floppy) with fdisk on it, then run fdisk /mbr . Alternatively you can boot from the Windows XP CD and run the recovery consul. Also see below for utilities to replace the MBR.

A quick and easy way to re-enable or install Grub 1

You can restore GRUB after a Windows installation by following the steps below which are an amalgamation of information from the Ubuntu site and other places:

This is all you need to do if you had initially installed Ubuntu into a Windows system. If you are adding Windows then Ubuntu will not have anything in the grub configuration for Windows and you’ll have to edit the grub boot menu file.

Open the file /boot/grub/menu.lst with the following command having backed up the original by:

  sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_bak_1
  sudo gedit /boot/grub/menu.lst

You’ll see a sample section for Windows, which you’ll want to un-comment and add to the boot menu list in whatever position you want it in. (un-comment by removing the #’s) so, for example:

title Windows XP
root (hd0,0)
makeactive
chainloader +1

The (hd0,0) assumes that Windows is installed on the primary drive and the first partition. If you had installed Windows somewhere different then it should reflect that.

Removing Grub 1 or 2 to return to Windows XP - replacing the Master Boot Record (MBR)

Grub modifies the Master Boot Record (MBR) so you can not just uninstall Grub as the machine will not boot - the MBR has to replaced with one for the Windows system. In Windows 98 and XP the MBR can be replaced using an old Windows boot disk (cd or floppy) with fdisk on it, then run fdisk /mbr .

Ther Windows XP setup CDROMs has a tool called the Recovery Console, which is designed to help you repair a damaged master boot record or boot sector. In the case of XP, to start the Recovery Console and replace the MBR:

This did not work for me on one occassion as the whole recovery consule was unavailable as the program told me it could not find the disk perhaps because Grub was on a ext3 partition. Perhaps the best way is to use a little program called MBRFix (Details and Download) which does the job and works for both XP and Vista. One to add to my utilities disk.

In the case of Vista I understand that one can use the Bootrec.exe tool in the Windows Recovery Environment to troubleshoot and repair startup issues in Windows Vista including a missing MBR.

Grub 2 Customising

The legacy Grub basically used only one configuration file which needed to be customised, namely /boot/grub/menu.lst. Grub 2 uses /boot/grub/grub.cfg which is normally not edited as it is automatically generated by update-grub using templates from files in /etc/grub.d and settings from /etc/default/grub . There is a vast amount of information at https://help.ubuntu.com/community/Grub2 and the following is just enough to get started on configuration. There is also a program which you can install which will do some of this - use synaptic to to search for startupmanager and install it - but it is very basic to that under the legacy Grub or what you can do directly.

gksudo gedit /etc/default/grub

shows /etc/default/grub typically contains:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entry
#GRUB_DISABLE_LINUX_RECOVERY="true"

GRUB_DEFAULT=0 will boot the first menu item and so on. GRUB_DEFAULT="saved" will boot the same entry as last time.

GRUB_TIMEOUT=3 will display for 3 seconds

After making any changes you must run in a Terminal:

sudo update-grub

See https://help.ubuntu.com/community/Grub2#Configuring%20GRUB%202 for more options

The set of configuration files in /etc/grub.d are run in order of their names which start with a number to set up and build up the Grub menu.

You can open the folder with root permissions in a terminal by:

gksudo nautilus /etc/grub.d

/etc/grub.d/30_os-prober finds and adds all the other operating systems - it can be inhibited by setting its permissions so it is not executable. (Right click -> Properties -> Permissions and untick the box at the bottom) - this is useful if you want to customise the menu - see below

/etc/grub.d/20_memtest86+ If you want to inhibit display of the memory test options then make 20_memtest86+ non executable.

/etc/grub.d/40_custom You can then customise the other operating systems by adding them to 40_custom having had a look in /boot/grub/grub.cfg to see and copy what you want. The following will open the file read-only to look at it:

gedit /boot/grub/grub.cfg

My file /etc/grub.d/40_custom looks like

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Microsoft Windows XP Home Edition (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set f6ec309dec305a57
drivemap -s (hd0) ${root}
chainloader +1
}

The red bit is my addition copied from /boot/grub/grub.cfg Note: make sure you copy the closing bracket!

After making all your changes you must run in a Terminal:

sudo update-grub

Making changes to the operating systems which are displayed is of great importance to users of many recent computers, in particular, laptops and netbooks as many computer manufacturers no longer supply the Microsoft CD/DVD for Windows but instead have a hidden partition which has a disk image to restore the machine to exactly the state you bought it. Unfortunately this is not hidden to Ubuntu and it is given as an alternative operating system in the Grub start up menu. It is not always obvious which is which so it is possible for the unwary to boot into the Restore Disk which is not good news and you are only a key stroke away from deleting everything.

There is currently no way to set the number of kernels which are displayed as in legacy Grub but there is an interesting article which shows how to do so at http://www.linuxquestions.org/questions/blog/drask-180603/howmany-for-grub-2-2466/

Restoring Grub 2 after, for example, Loading Windows

If you reload Windows then it will overwrite the Grub2 bootloaded. I have not had to reload yet but the proceedure I have in mind to use is based on https://help.ubuntu.com/community/Grub2#Configuring%20GRUB%202

First you must find out the device name/partition of the installed system (sda1, sdb5, etc). This partition is then located and mounted from the LiveCD. The files are then copied from the LiveCD libraries to the proper locations and MBR.

Boot a LiveCD (Ubuntu 9.10 or later for Grub2).

Determine the partition with the Ubuntu installation by typing in a Terminal

sudo fdisk -l

and/or

sudo blkid

The device/drive is designated below by sdX, with X being the device designation. sda is the first device, sdb is the second, etc. In most cases the MBR will be installed to sda, the first drive on their system. The partition is designated by the Y. The first partition is 1, the second is 2. Note the devices and partitions are counted differently. In my case the Linux root file sytem is typically on /dev/sda4 as I have Windows and data filestems below it

Mount the partition containing the Ubuntu installation by:

sudo mount /dev/sdXY /mnt

eg: sudo mount /dev/sda4

Run the grub-install command to reinstall the GRUB 2 files on the mounted partition to the proper location and to the MBR of the designated device.

sudo grub-install --root-directory=/mnt/ /dev/sdX

eg sudo grub-install --root-directory=/mnt/ /dev/sda

Refresh the GRUB 2 menu with

sudo update-grub

Applications

Many of the important applications and programs are installed automatically including OpenOffice (which is also available Open Source for Windows) and Firefox.

There is also a vast collection of supported and automatically updated Open Source programs access via Application -> Add/Remove -> Search and then tick the relevant box(es). If you do not find the program then tick the boxes to show unsupported and commercial programs. If this does not find the program you want then you will need to use the Synaptic package manager which can be accessed by the Advanced Button and again doing searches. In some cases you may nee to add extra areas to be searched but that will be covered under the program itself. See also below for the Medibuntu Repository to incorporate proprietory programs

Checking my Applications lists I find I have added:

Several of these are from the 'Unsupported List' in the Add/Remove facility or using the 'Advanced' to get to the Synaptic Package Manager . They involve large downloads but note that you can also enable use of the CD if you have a slow link. Skype and Truecrypt need specially procedures. See also the list of Windows programs running under Wine. Several of the utilities can and have been be added to the top panel.

There is an assessment of ease of installation, set up and functionality in the conclusions.


I have now written a new page covering Open Source, Free and Cross Platform Software

OpenOffice

The following sections are common to many uses of OpenOffice - there is also a separate page Open Secrets - Publish with Style Using Open Source Software which has a lot more about using OpenOffice for writing and formatting books for publishing especially about using Styles, Outlines and Navigating complex documents.

Adding Fonts in Linux so they are accessible from Open Office and programs running under Wine.

I initially wanted to install some extra Fonts in Ubuntu, namely the Nadianne True Type font I use for Invitations, Wine Labels etc. and the various Windings fonts which provide ticks and other symbols used by Pauline for marking Open University eTMA scripts. Some of the fonts used by Lulu are not standard under Ubuntu so also need to be added. Nadianne is not a standard Windows font and originally I think came with a printer but the others are common to Windows XP hence the need to import them for marking. There should be no licence issues in using them on a dual booted machine with a valid copy of Windows. You can find the the Windings and other fonts in c:\windows\fonts. The True Type fonts which are available to all users are stored in folders under /usr/share/fonts/truetype in Ubuntu Linux so type in a terminal:

gksudo nautilus /usr/share/fonts/truetype

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

Drag the extra fonts into the ttf-extra folder from where they were stored

The folder (and the files within it??) MUST have the permissions set to allow everyone to access it otherwise you may get some most peculiar errors in Firefox. It should be OK if you use the proceedure above but check just in case.

Then 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 from something else I read that creating a folder .fonts in your home directory and copying the font into it may be sufficient for a single user - I have tried it for a single additional font and it worked. Other Linux systems may store fonts in a different place so you can try a search for truetype or fonts.

Upgrading to the latest OpenOffice 3.x

Ubuntu does not automatically upgrade to the latest issue of OpenOffice, it just applies any updates to the version which came with the original Distribution ie 2.4 in the case of Hardy Heron. There are advantages in some cases in upgrading to version 3.x which is in Jaunty or higher.

There is now a repository set up for the latest versions of OpenOffice which can be used to keep OpenOffice updated automatically. This is the Personal Package Archive PPA set up by the Openoffice Scriblers - see https://launchpad.net/~openoffice-pkgs/+archive/ppa and http://www.rebelzero.com/ubuntu/ppa-for-openofficeorg-301-for-hardyintrepid/94.

The way to include this repository is to:

Add the OpenOffice PPA repository to your sources.list file by System > Administration > Software Sources. Click on the Third-Party Software tab and click the Add… button. Copy the PPA’s repository address in the APT Line box, and click the Add Source button. Hardy users should use:

deb http://ppa.launchpad.net/openoffice-pkgs/ppa/ubuntu hardy main

Replace hardy by jaunty, lucid or the version you are using as appropriate

You will be asked to update the repository list

Next it is important that you click on the Ubuntu Software tab and make sure the universe repository is enabled as the PPA packages need some packages from that repository.

Finally you need to add the authentication keys for this repository, this is most easily done in a terminal by:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 247D1CFF

You can use the Synaptic Package Manager to update everything (Add/Remove was not happy with these changes until I had used Synaptic). System -> Administration -> Synaptic Package Manager

First update the package lists by clicking Reload

Then click Mark all Possible upgrades which shuld show all the ones for Open Office upgrade and click Apply.

You should now find that OpenOffice has been upgraded

It is much simpler for Lucid although you will not get any benefits until a new version is released. Just copy the following as one line into a terminal to add the ppa and update your package lists.

sudo add-apt-repository ppa:openoffice-pkgs/ppa && sudo apt-get update

Adding a Grammar Checker to Open Office (Versions 3.01, 3.1 and 3.2)

Open Office does not have a Grammar checker built in but it is possible to add one as an Extension. The mechanism for Extensions is built into OpenOffice but the Extensions are written by individuals or groups - this is a beauty of OpenSource but one is vulnerable to the quality and support level. At the worst one can always remove or disble the Extension but I would always recommend not working on 'live' documents when testing any new feature. In the case of Grammar checking it was always intended that one would be available and all the menu entries etc are already built in and ready to go

The Grammar Checker for OpenOffice is called LanguageTool. To loosely quote:

"LanguageTool is an Open Source language checker for English, German, Polish, Dutch, and other languages. It is rule-based, which means it will find errors for which a rule is defined in its XML configuration files (and there are close to 500 rules implemented for English). Rules for more complicated errors can be written in Java. You can think of LanguageTool as a tool to detect errors that a simple spell checker cannot detect, e.g. mixing up there/their, no/now etc. It can also detect some grammar mistakes. "

The extension is in the main library of OpenOffice Extensions under LanguageTool. It has been downloaded by over 100,000 people and gets good marks so it is reasonably well thought of! http://extensions.services.openoffice.org/project/languagetool and has had many years of development under OO 2.x.

It needs the machine you are using to have Java from Sun Microsystems installed, which is likely and a the Java runtime environment of 5.0 or later selected before you install this extension. This is set by Tools -> Options -> Java in any OpenOffice program - you will have to wait a long time and the version 5 is 1.50_xx and you are likely to have version 6 1.60_xx. Versions of Java less tha 1.50_xx may fail to work and in version 6 you need higher than 1.60_04.

If you are using Ubuntu then you must also add the java package to OpenOffice as it is not installed in Ubuntu by default. System -> Administration -> Synaptic Package Manager and Search for and Install openoffice.org-java-common before proceeding.

To Install, download the file from the site and Double click LanguageTool-1.0.0.oxt to install it. If that doesn't work, call Tools -> Extension Manager -> Add... to install it. Close OpenOffice.org and re-start it. Type some text with an error (e.g. "This is an test." -- make sure the text language is set to English) and you should see a blue underline.

Catches

There have been problems with LanguageTool if you make any version upgrades to OpenOffice without first uninstalling LanguageTool and it can no longer be uninstalled to sort them out - you may have to reload the earlier version of OO and then remove it, assuming you still have the earlier version. There is a risk with some systems that upgrades take place automatically. This seems to have mainly been a problem after OO 3.0 came out with the first integration of grammar tools alongside the existing dictionaries and these mechanisms were changed in OO in the upgrade to 3.01 - now everything seems much more stable from the OO end. I did an upgrade to 3.2 without problems

Media

Playing and organizing music files.

Ubuntu comes with Rhythmbox Music Player to play and organize your music. Applications -> Sound & Video -> Rhythmbox Music Player.

When you first use Rhythmbox, it will scan your home folder or folder(s) you specify for any supported music files you have and will make them available to be searched for and played automatically.


Playing and and Ripping Audio CDs

The Sound Juicer CD player opens automatically when you insert an audio CD . Sound Juicer will display the CD artist, album and track names if you are connected to the Internet. To play the CD, click the Play button or press Ctrl+P. To play a particular track, double-click on the track or select the track and click Play.

It is possible to extract the music onto your computer (rip) if you prefer to keep a copy of an audio CD on your computer without needing to insert the CD to listen to it. Sound Juicer CD Extractor is able to rip CDs. To start Sound Juicer manually, choose Applications -> Sound & Video -> Audio CD Extractor. Alternatively, it should start automatically when you insert a CD. Follow the instructions in the Sound Juicer manual on how to rip audio CDs.

The Rhythmbox Music Player is also able to play CDs. Simply insert a CD, ignore or close Sound Juicer, start Rhythmbox and double-click the audio CD item in the Devices list.

Record sounds and music

If you have appropriate audio hardware (such as a microphone), you can record sounds onto your computer. Choose Applications -> Sound & Video -> Sound Recorder to start the Sound Recorder.

Editing sounds and music

I am using Audacity to record audio as and edit it. Audacity provides many powerful sound-editing features which make it perfect for transferring music from LPs and CDs, cleaning them up of clicks etc, carrying out noise reduction, normalise and balancing and converting to MP3s.

Burning CDs and DVDs

Another of the critical functions I checked at an early stage was burning CDs and DVDs. Hardy Heron and higher have a CD/DVD burner built in called Brasero which seems to work very well for normal purposes.

K3b is a very sophisticated CD/DVD burner similar to Nero in its professional feel. A trial using K3b successfully burnt a full data CD and verified it - it selected speeds etc. to match the burner and disk. It looks as if it rates as highly as Nero for these jobs. The only slight downside is that it is designed for the KDE interface so it runs with a different look which gives an interesting insight into the differences between GNOME and KDE. I added MP3 burning support to K3b by opening a terminal window and installing a support package:

sudo apt-get install libk3b2-mp3 

 

Setting up for Playing and Ripping media Files with Proprietary and Restricted Formats using the Medibuntu Repository

The Medibuntu Repository is a third-party repository which contains many useful programs which are not true open source, aloows one to enable DVD playback and to add the codecs for MP3 playing and ripping etc. It can be included by way of a quick commands in a terminal - NOTE this must be cut and pasted as a single line:

ssudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update

This will add the Medibuntu repository, import the Medibuntu GPG key and make the new packages available for installing using System -> Administration -> Synaptic Package Manager.

Using the Synaptic Package Manager to add programs including those from the Medibuntu Repository

Open theSynaptic Package Manager by System -> Administration -> Synaptic Package Manage.

When the Synaptic Package Manager has opened use Search to find the package/program you want, click the box and click Mark for Installation each one. When they are all marked, click Apply.

If you want to play commercial encrypted DVDs using the Totem Movie Player there is more information in Ubuntu documentation on Movies, DVDs and Videos

Installing proprietary Programs using the Medibuntu Repository in Hardy Heron

Medibuntu can not only be used to add music and video codecs but also to load commercial/proprietary programs which can not be made available directly in Ubuntu due to legal restrictions in some countries. Use the Synaptic Package Manager and Search for the program you want. The list of items includes:

In most cases they will be added to your “Applications” menu.

If you load GoogleEarth its performance may be improved if one disables the atmosphere rendering by: View -> Atmosphere -> untick

Skype

I have found that there are options in the volume control on the panel to see more options including the Microphone boost tick box. Double click the icon to open the volume control and adjust as required for Skype.

Picasa

I was told about Picasa in feedback on my web page as a replacement for IrfanView. Irfanview is a picture editor which I like because it has batch conversion and renaming which allow me to create different size pictures for the web site differing in name eg xxxxxxxxi.jpg xxxxxxxw.jpg and xxxxxxxxb.jpg for my dual size popups. Picasa is a Google program which does a superb job of handling pictures and runs both under Windows and now Linux. It runs Windows code via Wine which they have put extensive work into developing for the Open Source movement. I have it installed on the Linux laptop and desktop and on a Windows Desktop. The two are almost identical in interface and it is one of the smoothest GUIs I have met on either. Purists may feel that a native Open Source version would be better but regardless of that Google have ported it to Linux rather than Apple and with Debian/ubuntu one of the specific flavours. It is a tremendous step forwards in acceptance of Linux in general and confirmation that Ubuntu is the way forwards in the future.

Picasa allows you to make a series of reversible changes to a picture in a very easy way - the GUI interface makes a rotation and colour balance almost trivial whilst keeping he original files completely intact. You can then 'star' (high level select) many files in multiple folders and then export them (with changes permanently applied) to a folder for making a CD etc. The export allows them to be resized - ideal for my purposes but does not provide the renaming although a single simple command line can do that in a terminal. I will now export each size to a separate directory then rename and merge them. Overall Picasa largely replaces Canon Zoombrowser, Irfanview and Paintshop Pro for dealing with pictures efficiently and without messing up the EXIF parameters.

Batch renaming is well explained in How to Bulk Rename Files in Linux and the command I use to add an i to the filename before the extension is:

rename -v 's/\.jpg/i\.jpg/' *.jpg

Note the bit in ' ' quotes is a perl regular expression and I am not going to explain those here! It however shows the power of Linux to do almost anything quickly in a command line.

ClamAV and ClamTk - Virus Checkers running under Linux to find Windows Malware

There are a number of Virus checkers which run under Linux which are for detection of Windows Viruses. A major reason for there existence is to check for viruses on Email Servers running under Linux but most will also run checks on files and folders. It is therefore possible to check a Windows filesystem on a dual boot machine or from a live CD when it is not running. Many of the virus checkers are from the same providers who make them available for Windows and are, of course, proprietor. These include free versions of my two favourites for Windows, Avast and AVG. Instead I am using the open Source Virus checker ClamAV and its Gui interface ClamTk, they have a good reputation and have a huge virus database which is updated rapidly when new viruses and are detected. The next paragraph has a brief description of ClamAV and its associated packages.

Clam AntiVirus is an anti-virus toolkit for Unix. The main purpose of this software is the integration with mail servers (attachment scanning). The package provides a flexible and scalable multi-threaded daemon in the clamav-daemon package, a command-line scanner in the clamav package, and a tool for automatic updating via the Internet in the clamav-freshclam package. It features built-in support for various archive formats, including Zip, Tar, Gzip, Bzip2, OLE2, Cabinet, CHM, BinHex, SIS and others. It has built-in support for almost all mail file formats and for popular document formats including Microsoft Office and Mac Office files, HTML, RTF and PDF. The virus database is normally updated by the clamav-freshclam package which is automatically loaded alongside ClamAV for Internet updating. An update package package can also be created on an Internet-connected computer and run as a .deb. We do not plan to do any on-access checking or automatic checking of incoming/outgoing email at this point in time so we are not running the daemon and have no overheads other than a small amount of hard disk space unless we are running a specific check.

Ubuntu has all the various packages in the repositories so they can be installed by the Synaptic Package Manager or it can be installed along with a simple but adequate GUI for file and folder testing called clamtk from Add/Remove programs as 'Virus Checker' . The standard install also brings in a package to add virus checking as a right click option in the file browser. I installed it and used the Gui (ClamTk) to check a Windows system on a dual boot computer - you first need to mount the partition with the Windows 'C: Drive' which needs administrative privileges and a password. It automatically updates and can give a comprehensive check - it was slow on an entire 'C: Drive' but found the 'test' files I expected. It also had a number of false alarms detected as PUA.Packed.aspack212, mostly in my Irfanview .dll files which I have been using for years so they were obviously false - two more detections needed a little more investigation but again I concluded they were false but will watch them anyway. The false alarms only occurred when checking using the advanced mode for Potentially Unwanted Applications PUAs which seems to use a heuristic method - this is a known anomaly which I am sure will be solved.

We will ClamAV it to check files from students and others where we want to avoid any chance of passing existing problems on to other users.

There is an updated version of the ClamTk GUI which I downloaded as a .deb and installed as it seemed to offer some better features but I would not regard that as essential. Unless you are very knowledgeable keep to the version in the repository.

Wine

Using Wine (Wine Is Not an Emulator) to run Windows programs

Wine enables one to run many Windows programs in Linux. It is under continuous development and the number of applications it can handle has increased dramatically including a number of the most demanding games.

I initiall used Wine to run two well behaved Windows applications Paintshop Pro and Irfanview, for which there is no GUI replacement for some of the batch functions I use. I got the information from Ubuntu Hacks (See the book list below) and their website at Wine HQ. To loosely quote "Wine is an Open Source implementation of the Microsoft Windows API on top of the X windows system and Unix. Wine is a compatibility layer for running Windows programs and does not require Microsoft Windows - it is a completely free alternative implementation of the Windows API (Application Programming Interface) consisting of 100% non-Microsoft code"

The implementation of Wine was much improved in Ubuntu Hardy Heron. The version installed is 1.0 (1.01 in Jaunty) and it is now fully integrated into the Ubuntu Linux system. It appears on the Applications menu with a slide out menu giving Programs, Browse C:\ Drive, Configure Wine and Uninstall Wine Software. The Programs then slides out to give the programs as they would have appeared in the Start Menu. All very well integrated. The extension .exe is now linked to Wine so you just double click the install .exe or .msi file to set it all going. Most of the configuration of wine is via the Configure Wine GUI.

Wine Example Dreamweaver MX 2004

The following is a screenshot showing how it now looks when one is opening Dreamweaver MX 2004

I installed Macromedia Dreamweaver MX 2004 without any problems by double clicking the install .exe file - it complained that it would require mdac 2.6 to be loaded for all its facilities but it all seems to work anyway. It also automatically downloaded and installed the Ghecko Rendering engine.

I used Dreamweaver on several of my machines fora number of years then suddenly on one of them it stopped working and if I started in a terminal I got an error message about obdc32.dll. Some web searches showed a similar problem and I replaced the eisting copy with one from a windows system and used the configuration manager Applications -> Wine -> Configure Wine -> Libraries Tab -> New Override -> obdc32.dll -> Add -> Windows dll to tell wine I was using a windows .dll and it all came back to life. Only one machine was effected after the upgrade - the others were fine so it remains a mystery until another fails and I can investigate more fully.

F onts

The only thing for me to install were some fonts using System -> Administration -> Synaptic Package Manager so I could load the Windows truetype fonts which many applications use - search for, mark and load msttcorefonts

This will also load a Windows cab extractor cabextractor . msttcorefonts is part is a package in the Ubuntu multiverse repository.

I have not used Dreamweaver extensively but I have tried out many of the facilities without any problems - the only anomalies I have seen have been to do with use of drives on Windows partitions especially those that had not been mounted in advance. The file -> Open route seems to be better and one can also set up a Site on a Windows partition and have all the files accesible. Dreamweaver has been one of the biggest demands for installing under Wine (It was No 3 on the wishlist) and success has been ellusive up till now so overall this is a huge step forwards. I have read that Dreamweaver 8.0 also now installs without problems.

I have looked up about Mdac 2.6 (Microsoft Database Access Components) and it is needed to provide database connectivity which will probably not be required for many pages. I understand it can be downloaded from the Microsoft site and installed using Wine by double clicking on the downloaded mdac_typ.exe but I have not tried to do so.

Some Programs Tested under Wine 1.0 (and higher)

I have loaded a number of programs by the simple expedient of clicking on the downloaded .exe file without any major problems including:

Accessing Ports from Wine

If you want to use a port you need to create a symbolic link in ~/.wine/dosdevices with the name of the device. Windows serial ports are called com1, com2, etc. Similarly, parallel ports use "lpt" followed by a number, such as lpt1. You should link these directly to the corresponding Unix devices, such as /dev/ttyS0 and /dev/lp0. I added a serial port with the following command in the ~/.wine/dosdevices folder:

 ln -s /dev/ttyS0 com1

so I could access my GPS with the GPSU program which ran fine when loaded with Wine and again created a link on the desktop.

I also added a link to my USB-Serial cable which shows up as /dev/ttyUSB0 (see below) by

ln -s /dev/ttyUSB0 com2

Wine Betas (Advanced)

The version of Wine available packaged in Ubuntu Hardy Heron and higher of is probably adequate for all but the most demanding applications but the latest versions can be utilised by adding a new repository to the Synaptic Package Manager. There are full instructions at http://www.winehq.org/download/deb which are the basis of what follows.

First a warning: You will be changing from a tried, tested and stable version of Wine to be utilising the latest beta development packages which will be periodically updated and may suffer from regressions, and an update may break functionality in Wine for an existing program. If you use the development version to get a particular program working you may want to stop updates at that point other than for security reasons.

The latest version is utilised by adding a new repository to the Synaptic Package Manager by System -> Administration -> Software Sources -> Third Party Software -> Add and copy and paste one of the lines below depending on which version you are running.

sudo add-apt-repository ppa:ubuntu-wine/ppa && sudo apt-get update

 

Click close to finish, and then reload the package information when prompted. If you have Wine installed, the system's update manager will now inform you of the latest Wine beta release and prompt you to upgrade.

Returning from a Beta to a stable version of Wine

I had to do this: Whilst Word 2000 seemed to work fine under the beta version 1.126 I found that both of my FirstClass programs did not and I had to change back to version 1.01 to get them back in operation and then Word 2000 stopped again.

To get back to the stable version first uninstal Wine using Administration -> Synaptic Package Manager then untick the Wine Development Repositories reached by Administration -> Software Sources -> Third Party Software then Reinstall using Administration -> Synaptic Package Manager. You may need to reboot as you are running a Windows like system. You should not have lost any of the programs under Wine as uninstalling does not remove the ~/.wine folders and each user has his own version of Wine.

Enhancements to WINE to open native Linux programs such as OpenOffice (Advanced)

This section is not for the total newcomer to either Linux or Windows and is not totaly wthout risk, although the worst would probably be you would have to remove WINE and Add it back as a fresh copy. When you are running a Windows program under WINE there are few built in programs so if you wanted to run an Office application you would have to do the same as on a real Windows machine and install Microsoft Office or OpenOffice. What you actually want to be able to do is to access programs which are available in the Native Linux machine so that if you right click on a document file attachment which is in FirstClass or the eTMA File Handler then it will open up the File using the copy of OpenOffice that comes installed with Ubuntu Linux. This seemes a fairly normal requirement to me and I was surprised that no such facility was built in to make set up such associations and even more surprising that there was no proceedure easily found by Googling. I eventually came on a set of postings which gave a suitable way forwards.

There are several stages.

  1. You need to make the associations for the file types you want to open in native linux - this has to be within the WINE windows registry so is not something to be undertaken lightly.
  2. One needs a mechanism to open a native linux program and pass the parameters, or better still pass the selected files to a utility which can work look at the associations and open the appropriate program. This exists as part of the gnome desktop and is called gnome-open but is not well documented.
  3. You need a script to convert the path to the file from a format such as C:\documents\file.doc to /home/username/.wine/drive_c/documents/file.doc

In practice:

The names used above follow those of the originator of the idea, Tres Finocchiaro, which I found under the unlikely heading of [Wine] Fun Wine Project -- Configure Some Default Registry Entries. The contents of the two files word.reg (this link does not have the additions in red below as it is more tested) and winenative on my system are:

REGEDIT4

[HKEY_CLASSES_ROOT\.doc]
@="linuxnative"
"Content Type"="application/linuxnative"

[HKEY_CLASSES_ROOT\.rtf]
@="linuxnative"
"Content Type"="application/linuxnative"

[HKEY_CLASSES_ROOT\.odt]
@="linuxnative"
"Content Type"="application/linuxnative"

[HKEY_CLASSES_ROOT\.pdf]
@="linuxnative"
"Content Type"="application/linuxnative"

[HKEY_CLASSES_ROOT\linuxnative]

[HKEY_CLASSES_ROOT\linuxnative\shell]

[HKEY_CLASSES_ROOT\linuxnative\shell\open]

[HKEY_CLASSES_ROOT\linuxnative\shell\open\command]
@="/usr/bin/winenative \"%1\""

[HKEY_CLASSES_ROOT\htmlfile]
[HKEY_CLASSES_ROOT\htmlfile\shell]
[HKEY_CLASSES_ROOT\htmlfile\shell\open]
[HKEY_CLASSES_ROOT\htmlfile\shell\open\command]
@="C:\\windows\\system32\\winebrowser.exe %1"

#!/bin/sh
# /usr/bin/winenative
#
# License: GPL >= V3
# Author: A. Tres Finocchiaro
# Modified: May 2008 Hilary BH Wright
#
# Used to call on the native linux OS to launch a filetype in Wine.
# For example, if you have a Microsoft Word document, but want to
# use the Linux version of OpenOffice Writer to open it, simply call:
# @="/usr/bin/winenative "%1""
# in
# HKEY_CLASSES_ROOT\linuxnative\shell\open\command
#
# This assumes you've already added:
# @="linuxnative"
# to
# HKEY_CLASSES_ROOT\.doc --> "Content Type"
#

# The native command to open the file. This can be changed to $1, $2
# if you'd like to set up input variables, or you can type "openoffice"
# or something similar if you'd like to statically map it.
#
# If you don't use gnome, change it to your desktop's equivelant, and
# update this comment!
cmd_open="gnome-open";

# The url of the file. Change to $2, etc if you want to take the 2nd
# input variable in your call.

win_file=$1;

# Transform the windows path to the linux path with the 'winpath' command
# (i.e. C:\Windows\Temp\1.doc to /home/tfino/.wine/drive_c/etc)
# NOTE1: The ticks are (` = tilde key) NOT (' = quote key).
# NOTE2: You need the "" here in order to allow for spaces in the path and file names.
# NOTE3: the -u parameter is there just to be sure that you are chnaging from windows paths to linux paths: it is the default.

lin_file=`winepath -u "$win_file"`;

# Call the native command passing the linux path enclosed in ""

$cmd_open "$lin_file";

# Exit status 1? Manipulate this value to work with errors.
exit 1;

The proceedure is to first save the files word.reg to your desktop and do an import into the wine registry by executing in a terminal:


regedit Desktop/word.reg

The second file is the " winenative " shell script. Save it to your desktop, copy it to /usr/bin, and make it executable by:


sudo cp Desktop/winenative /usr/bin/
sudo chmod +x /usr/bin/winenative

You should now be able to open the common word processor files formats in OpenOffice and PDF files in the Linux viewer. You can add .zip .xls .ppt .ods, .odp etc to the list if you want.

Many thanks to Tres Finocchiaro for the original idea and Hilary BH Wright for the improvements to winenative.

I have also received some excellent addition suggestions from Jorgen Qvartsenklint which are very useful enhancements and have been incorporated in the word.reg file above and highlighted in red. In summary the backslash and quote before and after %1 allows files with spaces and special characters in the file name to be opened in Ubuntu applications via WINE and the remainder allows web links to be opened in Firefox via WINE.

Web Authoring

Kompozer (Nvu) and Tidy

Kompozer (a development of Nvu Which is no longer supported) has proved to be a very adequate WYSIWYG editor which I largely use to produce the Ubuntu Web pages and then uploaded them with gFTP. I noticed that the HTML source is a bit untidy and tends to gain a lot of extra lines. Tools ->Preferences -> General -> Reformat Source Code helps. Kompozer (Nvu) is OpenSource and is also available for Windows.

I discovered there is a HTML syntax checker and re-formatter called Tidy which corrects mark-up in a way compliant with the latest standards, and is optimal for the popular browsers. Tidy is a product of the World Wide Web Consortium and will tidy up the source and indent it etc for easy viewing. It can be installed using Add/Remove -> Advanced and search for Tidy. It is a command line package but fairly intuitive (man tidy or tidy -h will give you the information to run it) Errors are reported. Useful options are -m to modify the source file, -i to indent output and - w nn to wrap at line nn . A typical call is:


tidy -m -i -w 99 ubuntu-mobile.htm

Also note that Kompozer (Nvu) also has built in tools for mark-up clean-up and checking via the W3C on-line HTML validator so there are no excuses for bad code and every page can display the validated symbol at the bottom.

FireFTP a modern fully featured cross-platform FTP program which runs as an extension in Firefox

FireFTP is an extension to the Firefox browser and is normally run in one of its tabs although you can use its Options to choose to always launch in a separate Window.

You need to have Firefox installed before Installing FireFTP as an extension. Assuming you already have Firefox then:



The setting up is easy - the following screens are accessed via the drop down at top left which shows the current connection but at the top of the list is selection for a new connection. You only need to set up the Main tab and you must have three pieces of information from your web space provider

  1. Host: - usually starts with ftp.
  2. Login: Your username for FTP which may be the same as for your email but not always.
  3. Password: Your password for FTP which may be the same as for your email but not always.
  4. Account Name: can be anything but best if it matches your ISP or web site URL
  5. Category: can be blank



The connection screen contains the initial values of local directory and that on the web site. Your ISP should tell you where the web site should be uploaded to. If it is the root directory just enter a / otherwise / and the directory name - it is often a directory called /http or /httpdocs. You may be able to go to / and it should be obvious.


Passive Mode: Unless advised otherwise by your ISP you should leave Passive Transfers ticked as it works best for 90% of ISPs.

Keep directories in sync while navigating: This is one of the big pluses of FireFTP. If you specify both an Initial Local and Initial Remote directory this feature becomes available. Once it's enabled and you've connected to your server - every directory change you make, whether on the local or remote side, will be mirrored by the opposite side. This feature assumes that both sides are similar, if not exactly the same, in content. This is particularly useful for web designers who have local and remote copies of their files and who do not wish to have to change directories on both sides when uploading and downloading files.

Once you have set up the account you use the Connect Button to Connect

Tip - under Linux you can start it directly by typing in a terminal:

firefox -chrome chrome://fireftp/content/

Or create a launcher instead of using a terminal - Al note this trick!

We now have an excellent stand alone FTP program when it is set to run in a window not a tab. Many thanks to the authors for an excellent program and for use of the icon in my launcher.

Arachnophilia

Arachnophilia is another web editor which I used to use a lot. It has recently been updated and the latest versions run under Sun Java 1.4 or higher and are both cross-platform and true Freeware. In fact I use the author's definitions of what freeware is elsewhere. Before running Arachnophilia you need to load the correct version of Sun Java in Ubuntu - the some versions of the free package which may already be loaded are not suitable and you should install the Sun Java and also make a change so it is used by default.

First check for which version you are using by

java -version

GNU libgcj is the one that does not work although it is version 1.4

Now see if any others are present, I found the correct one was loaded but not the default so try:

update-java-alternatives -l

If you have a Sun Java higher than 1.4 then select it by, for example

sudo update-java-alternatives -s java-1.5.0-sun

If you do not have then you have to use Applications -> Add/Remove -> Advanced -> Search for sun-java and Mark the sun-java5-bin sun-java5-jre and sun-java5-plugin for installation (right click) -> Apply then go back through the two lines above to check it is there and select it. Hardy Heron has Sun Java 6 already loaded so this should not be required.

Now you can download the Arachnophilia.jar and put it somewhere safe as you will use it every time you start Arachnophilia - I put it in my home directory but hid it by renaming it to .Arachnophilia.run . Now install by
~/.Arachnophilia
It is rerun by he same invocation but it does not have to waste time setting up and comes up immediately in it's saved state. There is an old write up at Arachnophilia which I am in the process of updating.

Apache Server and PHP

I have been using the PHP (PHP Hypertext Processor) scripting language for writing scripts to process the output from forms - this is all written up as How to Handle the Output from Forms . PHP is a server side scripting language which means that everything has to be tested on a web server with PHP support which results in every change having to be uploaded and tested on ones web site. After a near escape from writing all over the wrong areas of the server at Freezone I realised that testing a powerful language with the ability to write files and call raw Linux commands might not be a very bright thing to do and loaded the Apache web server and the associated libraries for PHP support onto my desktop. I expected it to be complicated but it was very quick and easy and the server is now accessed from a browser as http://localhost on the local machine or by IP address such as http://192.168.1.n from other machines on the local network. The home directory is, by default, in the /var/www directory. Hostname resolution does not work by default but I have found a way of enabling it for ssh which ought to work - I will write it up when I have checked.

Loading Apache can be done by Applications -> Add/Remove -> Advanced -> Search for apache2 then mark apache2 and mark libapache2-mod-php5 You will be informed that some other packages are being included and you just -> Apply and apache is installed and set up to run every time the machine starts.

The only thing you will need to do before you can use it is to change the permissions on the /var/www folder so you can copy your web site files into it. I find the easy way to do this is to run nautilus (the GUI file browser) with root privileges by starting it from the command line with sudo

sudo nautilus

this means I can just right click to properties on any file or folder and use the permissions tab. The command line alternative is

chmod 766 /var/www

You may also wish to create an addition folder with the same permissions so scripts can read and write files and/or set the permissions on your private folders (those requiring a login). PHP is run as user www-data on my local set-up and apache on the Freezone server. The versions recommended for ubuntu are Apache2 and PHP 5 (version 5.1.2) - I was tempted to load version 4 as that is what is on the Freezone Server and some commands are new in version 5.

PHP Test Script fragments including File handling and Encryption

These have all been moved to a new page PHP Scripts and Ubuntu

Backup

This is being moved to be part of Sharing, Networking, Backup, Synchronisation and Encryption under Ubuntu Linux

Hardware Support

Modems

Up to now we have been considering systems with broadband access through a Ethernet or Wifi connection from an ADSL/ Modem/Router/Firewall box. My section covering Modem support for when you have no broadband access and are on the move has got far too large and has been moved to a new page - Ubuntu Linux on the Move.

For completeness here it is worth noting that support for some types of modem is poor in all versions of Linux. The type of modem which is used in many machines and built into many recent cards are often referred to as Winmodems or soft modems because they use Windows and the processor to do much of the hard work in software rather than do it on the chip or card. This includes not only internal modems but many external USB modems and includes ADSL modems. This software is often proprietary and Linux is poorly supported by most manufacturers. I therefore got out my old but very trusty US Robotics V90 external serial interface Fax Modem for the desktop with instant success.

The laptop has a soft modem and again I took the easy way out when I then remembered that I had a Xircom PCMCIA modem and Ethernet card. I plugged it in and it was recognised immediately and I had a telephone connect working a few minutes later during my initial LiveCD tests.

Identifying and dealing with hardware

The Linux Kernel has support for most common hardware built in but you are always going to find that you will have something which is either very old, very uncommon or very new which needs to have additional drivers. In most cases they will be available and somewhere on the internet there will be clear (or not so clear) instructions. But before you can look for thsoe instructions you need to know how to identify what you have and how much progress has been made in using your hardware. Here I am going to limit what I am covering to two sorts of hardware. Firstly hardware which is built in and on the internal PCI bus structure, more likely than not it will be integrated onto the motherboard - this can include video 'cards', sound systems, network 'cards', tracker pads, wifi, webcams and modems. Secondly USB devices which you just plug in and should be detected and set up for you and some sorts of internal hardware are also handled more like peripherals and are on the USB buses - an example is a bluetooth card may be a USB device although it is internal, some webcams and also multipurpose card readers.

Identifying USB Devices

The easy way to see what USB devices the system knows you have plugged in is to use the lsusb command in a terminal. The output for my MSI U100 Wind with every option turned off and nothing plugged in looks like:

lpcurtis@vortex-ubuntu:~$ lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0bda:0158 Realtek Semiconductor Corp. Mass Storage Device
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pcurtis@vortex-ubuntu:~$

And with the Webcam turned on (Fn F6) Bluetooth turned on (Fn F11), a broadband dongle, a mouse and a Memory Stick plugged in looks like:

pcurtis@vortex-ubuntu:~$ lsusb
Bus 005 Device 002: ID 0db0:a97a Micro Star International Bluetooth EDR Device
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 05c7:0113 Qtronix Corp. PC Line Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 012: ID 090c:1000 Feiya Technology Corp. Flash Drive
Bus 001 Device 010: ID 19d2:0063 ONDA Communication S.p.A.
Bus 001 Device 004: ID 5986:0203 Acer, Inc
Bus 001 Device 002: ID 0bda:0158 Realtek Semiconductor Corp. Mass Storage Device
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pcurtis@vortex-ubuntu:~$

We can learn a lot from the output of lsusb. Perhaps the most important when we come to work with devices which, unlike these, have not been fully installed is the ID - the first part is a 4 figure hexadecimal number which is unique to the manufacturer and the second is the product from that manufacturer which is faily unique. The manufacturer's ID is often that of the underlying chip manufacturer which may be used in many hardware implementations. This code is much more useful that that on the box or label - for example the Vodafone K3565 mobile broadband dongle has many varients with different chips or microcode in the chips.

The next step is to have a look at the log file which has all the information on the loading of device drivers etc which can be seen by the terminal command dmesg which gives a huge output but the end will show what happens when you plug in a new device. The following is an example of plugging in a Mobile Broadband stick then a mouse and memory stick:

..........
[ 3153.756154] usb 1-2: new high speed USB device using ehci_hcd and address 13
[ 3153.899948] usb 1-2: configuration #1 chosen from 1 choice
[ 3153.901926] option 1-2:1.0: GSM modem (1-port) converter detected
[ 3153.902581] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
[ 3153.903077] option 1-2:1.1: GSM modem (1-port) converter detected
[ 3153.903613] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
[ 3153.905259] option 1-2:1.2: GSM modem (1-port) converter detected
[ 3153.905740] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
[ 3153.906275] option 1-2:1.3: GSM modem (1-port) converter detected
[ 3153.907237] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB3
[ 3153.908088] option 1-2:1.4: GSM modem (1-port) converter detected
[ 3153.909111] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB4
[ 3153.910123] scsi8 : SCSI emulation for USB Mass Storage devices
[ 3153.911149] usb-storage: device found at 13
[ 3153.911163] usb-storage: waiting for device to settle before scanning
[ 3158.911662] usb-storage: device scan complete
[ 3158.913694] scsi 8:0:0:0: Direct-Access ZTE MMC Storage 2.31 PQ: 0 ANSI: 2
[ 3158.929691] sd 8:0:0:0: Attached scsi generic sg2 type 0
[ 3158.935747] sd 8:0:0:0: [sdc] 3862528 512-byte logical blocks: (1.97 GB/1.84 GiB)
[ 3158.938747] sd 8:0:0:0: [sdc] Write Protect is off
[ 3158.938760] sd 8:0:0:0: [sdc] Mode Sense: 0f 0e 00 00
[ 3158.938768] sd 8:0:0:0: [sdc] Assuming drive cache: write through
[ 3158.950585] sd 8:0:0:0: [sdc] Assuming drive cache: write through
[ 3158.950606] sdc: sdc1
[ 3158.964244] sd 8:0:0:0: [sdc] Assuming drive cache: write through
[ 3158.964265] sd 8:0:0:0: [sdc] Attached SCSI removable disk
[ 3172.672111] usb 3-1: new low speed USB device using uhci_hcd and address 2
[ 3172.847517] usb 3-1: configuration #1 chosen from 1 choice


[ 3172.864295] input: Qtronix Corp USB MOUSE as /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input14
[ 3172.864676] generic-usb 0003:05C7:0113.0003: input,hidraw0: USB HID v1.10 Mouse [Qtronix Corp USB MOUSE] on usb-0000:00:1d.1-1/input0


[ 3182.920158] usb 1-1: new high speed USB device using ehci_hcd and address 15
[ 3183.851070] usb 1-1: configuration #1 chosen from 1 choice
[ 3183.852787] scsi9 : SCSI emulation for USB Mass Storage devices
[ 3183.853744] usb-storage: device found at 15
[ 3183.853759] usb-storage: waiting for device to settle before scanning[ 3188.852791] usb-storage: device scan complete
[ 3188.854247] scsi 9:0:0:0: Direct-Access USB DISK 2.0 0403 PQ: 0 ANSI: 0 CCS
[ 3188.859191] sd 9:0:0:0: Attached scsi generic sg3 type 0
[ 3188.876835] sd 9:0:0:0: [sdd] 7962624 512-byte logical blocks: (4.07 GB/3.79 GiB)
[ 3188.878111] sd 9:0:0:0: [sdd] Write Protect is off
[ 3188.878123] sd 9:0:0:0: [sdd] Mode Sense: 43 00 00 00
[ 3188.878132] sd 9:0:0:0: [sdd] Assuming drive cache: write through
[ 3188.886699] sd 9:0:0:0: [sdd] Assuming drive cache: write through
[ 3188.886713] sdd: sdd1
[ 3188.892339] sd 9:0:0:0: [sdd] Assuming drive cache: write through
[ 3188.892356] sd 9:0:0:0: [sdd] Attached SCSI removable disk
pcurtis@vortex-ubuntu:~$

You can see there is a lot of information here - I have added some blank lines to break out the three devices.

In the case of the USB Mobile broadband Stick it tells us that it has 5 USB serials ports (/dev/ttyUSB0 to /dev/ttyUSB4) and they have been associated with a GSM modem. Also the built in memory slot shows up with a 2 Gbyte microSD card plugged in which is mounted as sdc.

The Mouse is much simpler and is mounted as a generic mouse.

The memory stick is again identified as a 4.07 GB drive and mounted as a removable drive sdd.

You can get a lot more information about the drives you have mounted by System -> Administration -> Disk Utility which will tell you all the mount points for removable drives and all the partition information for fixed drives.

As you will have seen dmesg gives far too much information for easy interpretation and finding what has gone on during the initial mounting of devices rather than those you plug in latter which are at the end. There is a neat little utility called grep which can help here.

First we need to understand the concept of a pipe. When we run dmesg the output is sent to the terminal - instead we can send it to another program this is called 'piping'. If we put a | (vertical line usually at bottom left of keyboard) after dmesg the output is sent as the input to another program such as grep. in its simplest use grep followed by a string only sends to the terminal the lines containing that string so dmesg | grep tty will just print lines containing tty. This is very useful to find if a built in modem has been connected and to what port. This is an example:

pcurtis@vortex-ubuntu:~$ dmesg | grep tty
[ 0.000000] console [tty0] enabled
[ 15.457010] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
[ 15.460537] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
[ 15.464227] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
[ 15.465069] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB3
[ 15.465714] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB4
pcurtis@vortex-ubuntu:~$

I currently do not have any good examples of what these outputs look like when the devices have not been detected and installed correctly although there are plenty of examples in earlier days! What is more common is that the driver which is loaded is the wrong driver, does does not work or is not as good as other drivers. Examples here included wifi and webcam drivers for the MSI Wind U100 under Hardy Heron and Wifi Drivers for my Toshiba Satellite Pro L20 where the latest Open Source drivers do not work as reliably as the earlier MadWifi driver used in Hardy Heron.

Building your own drivers

The following description covers the most common situation but building a driver varies a little in many cases. Building a driver means that you take the source code for the driver and compile it in conjuction with information on it's 'links' into the particular kernel into what is called a module which is then loaded when required - this may be all the time for a built in peripheral or the module may only be loaded when a USB device is plugged in. The additional driver modules you build have to be rebuilt every time the kernel changes which is very inconvenient compaired to using modules built into the kernel. You also need to make sure the replacement module is the one loaded and you may have to delete some files belonging to any built in modules which are replaced every time the kernel changes. The place where the module is installed may differ between distributions so using a driver for a different distribution may need internal changes to some of its files. This all sounds difficult but in most cases it is all documented on the web site associated with the driver or in ubuntu conference postings and faqs. Once you have done the job the first time rebuilding is much simpler and may only be six or sevenl lines in a terminal or can be put into a simple script.

The basic proceedure the first time you ever build a driver is:

  1. Install the utilities you need to build drivers - at a minimum you need build-essentials but your particular driver may need additional utilities (sudo apt-get install build-esentials).
  2. Download the driver - this will almost certainly be in an tar archive which is a single file containing lots of compressed files in folders.
  3. Extract the archive to somewhere where you can work on it and keep it for the future (double click and drag the enclosed folder where you want it). The best place to keep the tar archive and the extracted folder structure is your home folder.
  4. The following need to be done after every kernel change using a terminal.
  5. Download the Linux Headers for your current kernel - this is where the build operation picks up the 'links' it needs to the kernel. Most Ubuntu distributions have this installed automatically every time the kernel is updated but it does no harm to ask for it a second time - you will just be told it already present. Or use the Synaptic Package Manager and search for linux-headers-generic. The latest version can be found by uname -r and a common trick is to use `uname -r` instead of an explicite name in terminal commands and scripts ie sudo apt-get install linux-headers-`uname -r` - Note these are back ticks from top left of keyboard
  6. Now change folder to the one containing the driver (where you extracted the archive) by cd extractedfoldername
  7. Carry out the instructions to create and install the driver module. These will vary a little but mostly the writers of drivers use a utility called make which uses a script file called makefile which has all the actions contained in it to create the driver structure within the folder you are using. Another call to sudo make install then copies everything to the correct place. There may first be a call to make clean which gets rid of the previous versions and/or some other script to unload the current driver. Some of these commands need a sudo in front as they need to be run as root to make changes in the root file structure.
  8. In some cases the hardware needs to have firmware loaded every time and this firmware will usually be in a file with an extension of .fw which is placed in a standard folder location of /lib/firmware
  9. You will need to remove the existing driver, make the system aware of the new one and load it if you want to try it out without rebooting - sudo modprobe -r old_module sudo depmod -ae and sudo modprobe new_module
  10. You may need to 'blacklist' the driver module prefered by the kernel so the new module is loaded and used by adding a module name to a 'blacklist' file.

A good example to look at to see all this in action is my write up of how to use the madwifi driver (module ath_pci) instead of the built in wifi driver (module ath5k) on my Toshiba Satellite Pro L20 which is at Using MadWifi drivers for the Atheros Wifi card under Karmic Koala and Lucid Lynx

 

Wifi Connections and drivers

Wifi cards in laptops are much better supported than modems but even so there may be a need to install drivers. The problem is that the drivers for a WiFi card are complex and few manufacturers support Linux. There are however a limited number of chips which are used by a large number of manufacturers and some of the most popular now have built in support in the kernel. Even then proprietary considerations mean that in some cases such as the Broadcom 43xx chips used by many manufacturers including Belkin and Dell need the proprietary firmware installed.

Those that have no native Linux support can often be installed by a technique of 'wrapping' part of the Windows drivers in code to integrate them into Linux - the ndiswrapper mechanism. The basic windows .inf and .sys files needed for this can be obtained in many ways including from your Windows system or the CDs provided.

Reverting to the MadWifi drivers for the Atheros Wifi card under Karmic Koala, Lucid Lynx and Oneiric Ocelot

I needed to do this to be able to fully utilise the Wifi built into our Toshiba Satellite Pro L20 as the new ath5k driver now built into the latest kernels does not yet support the Atheros driver version used in the Satellite Pro L20 and a number of other machines as well as the madwifi driver especially if you want to use WEP or WAP security.

After much searching I found a good set of instructions here: http://art.ubuntuforums.org/showthread.php?t=1163380 and there is more information at http://ubuntuforums.org/showthread.php?t=1309072 .

The following is my procedure for use under Ubuntu Karmic Koala using Grub 2 which is the default for a new install if you still have the original Grub loader then you need to modify different files to blacklist the ath5k driver.

First install the utilities for building a kernel driver by typing the following in a terminal:

sudo apt-get install build-essential

Now sort out which drivers will be available by typing the following in a terminal for Karmic:

sudo gedit /etc/modprobe.d/blacklist-ath.conf

The file has been renamed on Lucid so type:

sudo gedit /etc/modprobe.d/blacklist-ath_pci.conf

In both cases change the last line by adding a # at the start to comment out the blacklisting of the MadWifi driver so it reads # blacklist ath_pci and save it then type the following in a terminal:

sudo gedit /etc/modprobe.d/blacklist.conf

now add blacklist ath5k on a new line at the end.

These two actions mean we will be able to use the new MadWifi driver ath_pci instead of the built in driver ath5k.

We now need to obtain the new driver by downloading the latest version from http://snapshots.madwifi-project.org/madwifi-0.9.4-current.tar.gz , it will initially download to the desktop where you can unpack the archive by double clicking it and dragging the folder within it to somewhere you can easily find it as you need to compile it again every time you update kernel - the best place is your home folder and also renaming it to madwifi from a name which includes the version number. The follow steps assume that is done and the folder is in your home directory. Once this has been done we need to compile the driver and install it into the kernel.

The stages above only need doing once per distribution update ie downloading a new driver was required when changing from 10.04 to 11.10 - the following needs to be repeated every time the kernel is updated - you will know when as the Wifi will stop working!

The following is a list of the commands one needs to type in a terminal after every kernel change. I have put them in the form of a script file but the commands can be individually cut and pasted into a terminal.

#!/bin/bash
# Last updated and tested 28th July 2010
echo 'Script to update the madwifi driver after a kernel update'
echo 'You must have installed software, blacklisted drivers and downloaded madwifi before running this'
echo 'It expects to find madwifi in your home folder'
echo 'Confirm before proceeding (y or Ctrl C to exit)'
read yn
cd ~/madwifi
sudo ./scripts/madwifi-unload
make clean
make
sudo make install
sudo depmod -ae
sudo modprobe -r ath5k
sudo modprobe ath_pci

If you want to run it as a script copy it into a text file and save it and the make it executable and run in a terminal. If you do not understand that then just cut and paste each command into a terminal!

This reports warnings about an option -e which seem to cause no problems - you can try taking the e off the end of the line sudo depmod -a which should solve some of them but I need to test at the next kernel change.

ndiswrapper example - Broadcom 4306 chip

Broadcom chip based wifi cards need firmware to be loaded every time they are turned on. The two ways that follow are based on a thread  Broadcom (4306) - Ubuntu Forums  Both these mechanisms which use Windows drivers or place drivers into the kernel have a downside in that they need to be repeated if you upgrade to a new kernel - you do have the choice at boot-up which kernel you chose so you can use the old one until you are sorted. In some simple cases you may even be able to experiment using the LiveCD before you commit to Ubuntu..

The ndiswrapper route is shown first to indicate that it is not rocket science. First the tools are installed (that can be from Add/Remove Advanced). Then you find the windows drivers and put them in a directory ready for the next time, make the modules, install them and check and add them into the drivers loaded during booting up. In this case there may be an incomplete driver already present which needs to be removed from the sequence loaded at boot-up which is covered in the thread.

sudo apt-get install ndiswrapper-utils

Change into directory where bcmwl5.inf and bcmwl5.sys are saved (assumed to be folder bcw15 in your home directory) run ndiswrapper and load driver

cd ~/bcmwl5_drivers
ndiswrapper -i bcmwl5.inf
sudo modprobe ndiswrapper

Following should respond  hardware detected etc.

sudo ndiswrapper -l
now make sure ndiswrapper is run in the future at boot time

sudo ndiswrapper -m
There are a number of useful commands which help find out what is going on - use man xxx to find out details.

iwconfig
iwlist scan

Broadcom 4306 Alternative Driver - bcm43xx-fwcutter

An alternative approach installing bcm43xx-fwcutter to load the extra firmware follows noting that the kernel version has been defined by using uname -r . This is not needed from Jounty as it is the kernel.

Copy the bcmwl5.sys and bcmwl5.inf files used in Windows to new directory ~/bcm4306

sudo apt-get install bcm43xx-fwcutter
sudo bcm43xx-fwcutter -w /lib/firmware/`uname -r` ~/bcm4306/bcmwl5.sys
sudo rmmod bcm43xx
sudo modprobe bcm43xx

Configuration can be done using the System -> Administration -> Network or possibly wifi-radar on Dapper Drake but the Network Manager Applet takes care of it all in Hardy Heron

 

USB 2.0 to Serial RS232 Hardware Installation (FTDI Chip)

I have put this at the end as it males an interesting comparison of Linux and Windows XP on which to finish. The background is that I had to obtain a RS232 to USB converter because the new laptop has no serial connector and I needed to download and upload waypoints to my Garmin GPS. I did a bit of Googling and I chose a device which used a FTDI chip because I found their chips were supported in Linux - others may be but it seemed best to play safe.

It was purchased from Tronisoft for £11.42 ref 2446 as USB 2.0 - RS232 cable with 25 way adapter and delivered the following day. I spoke with them before ordering and they were very helpful but had no Linux machines so said they would be glad for feedback. The disk provided has drivers for Linux, Mac and Windows 98/2000 and XP. I thought it would make an interesting comparison so I kept notes.

Windows: I first tried to install under Windows XP by turning the machine on and then plugging in the cable - it detected new hardware and started the install wizard. It found the two drivers only when it could check the web. A small CD with drivers was also provided. Total time about 5 minutes and another 10 or so to connect my serial modem and check it worked. It installed it as Serial port 4. I repeated it on the laptop taking a bit less time although I had to change the allocated port (13 which was beyond what the GPS software could handle) by Control Panel -> System -> Hardware -> Device Handlers and Properties of the device -> Port Settings -> Advanced - fortunately ports 1 and 2 were free although all higher ports had been allocated already.

Ubuntu Linux: I plugged in the cable and nothing seemed to happen and I then had to find out a way of deciding if it had installed - which I did not really believe - it was too easy! I looked in the Device Manager and there was evidence that it had done something as there was new 8-bit FIFO so a quick look on the Internet provided a couple of commands which could be run to find out more namely lsusb and dmesg. The first produced a few lines which showed that the device had been identified and the second produced far more output, most of which I could not understand, but repeat runs with and without the device plugged in convinced me it was worth fetching my serial modem to use as a test. The output also indicated the device was detected as an FT232BM made by FTDI and installed as /dev/ttyUSB0 and watching the /dev directory showed it coming and going as one plugged in and out. The modem was also detected and I set up Networking to use ttyUSB0 and worked fine on a short trial. If I had been more confident and known where it would be installed it would have been easier and much quicker than Windows XP.

Although Ubuntu came out ahead for ease and speed I must admit that I had chosen a device with a FTDI chip knowing that they were more likely to be supported. Time was taken going up a learning curve as there was ten years to one week difference in experience, even so the complete investigations and trials on two machines to working solutions on both were completed in only just over an hour after delivery - this write up has taken longer!

Epson Printers, Scanners and 'All-in-Ones' under Ubuntu Linux

This is an update on my earlier Howto which described the steps necessary to use the Epson Perfection V200 Photo scanner with Ubuntu Hardy Heron which was based on an excellent Howto in Uellue's Blog. I have been using the V200 now for 3 years mostly under Ubuntu Lucid 10.04 and have had an Epson C66 printer for even longer which finally died and led to this update.

Epson SX515W All-in-One Multifunction Printer/Scanner

It is now very difficult to buy stand alone Printers or Scanners - most are 'All-in-One' Multifunction Devices. My old Epson C66 printer has been used via a wifi router as a wireless device so I looked for a printer offering wifi operation supported under linux. The other and main criterion was that I could get cheap ink cartridges. My hasty search led me to Epson once more and the SX515W printer was reduced in price at Argos to £59, offered Wifi and used the T0711 series of cartridges with the black available at 7dayshop.com for £8.99 for 10 and a full set including colour for £5.99 one off. But above all Epson offer good Linux support through their web site for both Printing and Scanning.

Wifi Setup on the SX515W - control panel details will be specific to the SX515W.

The SX515 is one of the modern Epson Printers which already has support built into Ubuntu for normal operation so although I downloaded ESC/P drivers from the Epson site for the first machine I found it was not needed on the others for direct USB cable or Wifi operation. In fact the majority of the work was in setting up the SX515W to connect to my Wifi Network via the small built in screen and keys - 26 long WEP key was a pain! The procedure is Setup -> Network Settings (two right arrows OK) - > Wireless Lan Setup (OK) -> Setup Wizard (OK) and follow instructions - you can Back out any time. The only difficult entry is the WEP or other key as the Menu key is used to select between Capitals, Lower Case and Numbers then the arrow keys and OK for the entries - all 26 in my case. I used an IP provided by DCHP but should have used a static one as next time the Wifi box is reset the IP may change so you need to know the range of IP addresses for your Wifi and choose one just outside or at the top of the DCHP range. The Wifi light should now be on. Once you have finished you can check the settings any time by Settings -> Network Settings (two right arrows OK) -> Confirm Settings (two down arrows OK) and scroll down through ( down arrows) then Back(s) till out of settings.

Epson Printer Drivers - should cover most if not all Epson Printers

The Printer and all other drivers are available on the Avasys - Epson Japanese vendor's site - this is much easier to navigate than it used to be but there are still a few things to note. Firstly there are several drivers for printers available in different sections. I loaded the driver from the link to Epson Inkjet Printer Driver (ESC/P) for Linux rather than follow the All-in-One Link as that was what I had used in the past. That presented a huge list and I picked the SX515W link and downloaded and double clicked to install it. That went fine. Later on I followed the links to All-in-One Printers and the print driver there would not install due to a dependence problem - there were scanner drive options to get round the problem with late copies of Ubuntu but not for the printer (but http://avasys.jp/eng/linux_driver/faq/id000613.php may give a way forwards). When I plugged in the USB connection the printer was installed automatically with just a notification - Linux has come a long way. On the first machine I did the driver install for Wifi using System -> Administration -> Printers and + Add Printer and then set up by hand. The next time I found that just selecting network was sufficient for it to go away and find the printer under 11.04 and I confirmed the same happened under 10.04! Forward then took me to an automatic search for the driver and all left was to edit any descriptions - I changed the port number to just be Wifi in the description. All trivially easy.

Epson Drivers for Scanners and Scanner functions of All-In-One Multifunction Printer/Scanners.

I have only tried these procedures on two scanners but other Epson scanners should work in a similar way, there is a list of supported devices on the Epson web site. The drivers provides support for 8 bit and 16 bit colour depth and 300, 2400 and 4800 dpi resolution when used by GIMP through Sane and an ImageScan! for Linux Scanner package from Epson.

Firstly a number of Ubuntu packages need to be added via System -> Administration -> Synaptic package manager and Search for each package and Install it. The packages are:

All the drivers are available on the Avasys - Epson Japanese vendor's site. Choose your scanner/multifunction scanner/printer and your distribution, fill out the small questionnaire and submit the form. You are directed to a download page.

From now on it will be a little different for a pure scanner or an All-in-One multifunction device

Scanner Only Example V200

To install the three .deb packages either just double click them or use dpkp from the folder containing them - note the iscan-data must be installed first and that you need the package with ltd7 in the name - the version numbers will probably have increased:

sudo dpkg -i iscan-data_1.9.0-1_all.deb
sudo dpkg -i iscan_2.26.4-2.ltdl7_i386.deb
sudo dpkg -i iscan-plugin-gt-f670_2.1.2-1_i386.deb

The third iscan-plugin package is a scanner specific extension only required for some scanners, most do not need it.

Multifunction Printer/Scanner Example SX515W

This part of the web site also offers print drivers but they need an extra library not in latter versions of Ubuntu as it has been superceded so use the ESC/P printer as described above in preference (although http://avasys.jp/eng/linux_driver/faq/id000613.php may give a way forwards if you want to experiment)

Now you need to download and install the scanner driver files. The procedure is well documented but note the one with iscan-data must be installed first and that you need the iscan package with ltd7 in the name.

sudo dpkg -i iscan-data_1.9.0-1_all.deb
sudo dpkg -i iscan_2.26.4-2.ltdl7_i386.deb

You will note that the files in this case are the same as for the V200 and in the case of the SX515W a plug-in is not required.

There is no mechanism to update these files and the only way is to uninstall the old version and install the new from the .deb. After doing that I found the set up above runs both my scanners, depending on which is plugged in/turned on, through 'ImageScan! for Linux' but we are getting ahead of ourselves.

There is a third file available for download to enable one to access the scanner via Wifi. I have not installed it as there seems no point in scanning remotely - I use USB cables to the desktop machine closest to the scanners and plug/turn on the one I want to use. If I need to scan onto a laptop or netbook I can carry it to the scanner.

Common to both

Now plug in and switch on the scanner and use lsusb in a terminal which should show the scanner. The output will look like this for V200:

pcurtis@triton-ubuntu:~$ lsusb
Bus 004 Device 003: ID 04b8:012e Seiko Epson Corp.
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
pcurtis@triton-ubuntu:~$ ]

Now use the utilities from sane-utils in a terminal. First use sane-find-scanner to check whether Sane finds the device. With scanimage -L you can find out if the driver is properly installed. The output looked like this for the SX515W

pcurtis@triton-ubuntu:~$ sane-find-scanner

# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.

# No SCSI scanners found. If you expected something different, make sure that
# you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04b8, product=0x0856) at libusb:001:005
# Your USB scanner was (probably) detected. It may or may not be supported by
# SANE. Try scanimage -L and read the backend's manpage.

# Not checking for parallel port scanners.

# Most Scanners connected to the parallel port or other proprietary ports
# can't be detected by this program.

# You may want to run this program as root to find all devices. Once you
# found the scanner devices, be sure to adjust access permissions as
# necessary.
pcurtis@triton-ubuntu:~$ sudo scanimage -L
device `epkowa:usb:001:005' is a Epson Stylus NX510/SX510W/TX550W Series flatbed scanner

Requirement to be member of Scanner Group: Depending on your exact installation only root may have access to the scanner although my original user was already in the scanner group. To allow other users to access the scanner, they must be members of the scanner group which has been renamed to saned in 9.10. You can do this by using System -> Administration -> Users and Groups -> Click to Unlock -> Groups and look for scanner or saned -> Click Properties and tick your username. You then need to reboot after adding the extra member.

After that my scanner works fine and can be accessed via GIMP and can also be accessed directly by xscanimage or xsane. Ubuntu and the new driver package between them give you two direct routes to scanning from the Applications -> Graphics menu - Xsane which is a multiwindow application with many options and tweaks to the scan and a simpler package ImageScan! which seems to be part of the Avasys Driver download, to quote Avasys:

Image Scan! for Linux

You will find Image Scan! for Linux has been installed under Applications -> Graphics at the same time as the Epson Scanner Drivers. It makes it easy to obtain high quality images on Linux with an EPSON scanner. It:

Scanning over the Network with Image Scan! for Linux

I expected this to be a major issue but the Instructions on the Epson web site seemed clear and it all worked first time for me. The following is my version of the Epson instructions.

  1. If you already have an earlier version of Image Scan! you will need to uninstall it using the synaptic package manager before you can install the latest version.
  2. Download and install the latest version of Image Scan! including the iscan-network-nt plugin version appropriate for your system from here
  3. Configure your device for network access if you have not already done so for a printer and find out the IP address of the device. I have covered all this for the SX515W above for Wifi printing.
  4. Configure Image Scan! for Linux to connect to your device by editing /etc/sane.d/epkowa.conf. You need administrative privileges so the best way is to open gedit in a terminal by:

    gksudo gedit /etc/sane.d/epkowa.conf

  5. Read the instructions in the file about network configuration and add an entry for your device. I only needed to add the single line net 192.168.2.104 which you will need to change to match the IP address of your scanner.
  6. Finally Epson recomend disabling the epson2 SANE backend which can cause conflicts. You can do so by changing the line consisting of epson2 to "#epson2" in /etc/sane.d/dll.conf. The terminal command to open the file is:

    gksudo gedit /etc/sane.d/dll.conf

Now when you run Image Scan! it uses the Wifi link. You can only access it from one machine at a time which should not also have a USB link.

Conclusions on Epson Drivers for Linux

Epson are obviously trying very hard to support all their printers and scanners including the multifuntion printer/scanners which have been a problem in the past. The terms and conditions seem to be consistent with true Open Source Software. One wishes everyone else gave such good support.

Installing on a Legacy Laptop - Toshiba Portege 3440

Having had so much success, I spent some time working out how to install Ubuntu on my old but much loved Toshiba Portege 3440CT. It has been upgraded to a 30 Gbyte drive and 192 Mbytes of Ram with a 500 Mhz processor but it is below the recommended specifications. Despite that it ran the Dapper Drake LiveCD at a reasonable speed especially after I had created a Linux Swap File - the LiveCd will use any Linux Swap files it locates - an undocumented facility. As this runs under Dapper Drake I have removed the details from here but they are still accessible at Fun with Ubuntu Linux - Dapper Drake

Disabling Suspend and Hibernate in Ubuntu Linux

I had problems when testing suspend and hibernate on the Portege which resulted in some very peculiar happenings. It is also a recipe for disaster to use hibernate on a dual booted machine. GNOME contains a database for storing your preferences called 'gconf, which is a similar database to the Windows registry.

There is a Configuration Editor Program for Gnome which can be accessed via Applications -> System Tools -> Configuration Editor to easily make changes for the current user. To make global changes it is best called in a terminal by:

sudo gconf-editor

Navigate through the left hand tree to apps -> gnome-power-manager. Find the options named 'can_hibernate' and 'can_suspend' and uncheck them both.

Right-click on each in turn and click Set as Mandatory to make sure that it applies to all users then exit the Configuration Editor. Changes will not appear until after a reboot.

Suspend and Hibernate bug workround

There is however a bug in Karmic and higher https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/432598 which means that the suspend/hibernate disabling through gconf-editor do not work. The following is a short term fix from http://ubuntuforums.org/showthread.php?t=1305081 and extra information in https://bugs.launchpad.net/ubuntu/oneiric/+source/gnome-settings-daemon/+bug/860485 the options still show up in the menu but if you click on one of them it just locks the screen. The following is correct for Lucid to at least Oneiric:

sudo gedit /usr/share/polkit-1/actions/org.freedesktop.upower.policy

And change the code:

<allow_active>yes</allow_active>

entries for suspend and/or hibernate to:

<allow_active>no</allow_active>

and restart.

The following shows results:


pcurtis@matrix:~$ pkaction --action-id org.freedesktop.upower.suspend -v
org.freedesktop.upower.suspend:
description: Suspend the system
message: Authentication is required to suspend the system
vendor: The UPower Project
vendor_url: http://upower.freedesktop.org/
icon: system-suspend
implicit any: no
implicit inactive: no
implicit active: no

Motherboard and SATA drives (initramfs and busybox error running LiveCD or booting)

It is possible that one can not even start up with a Hardy Heron LiveCD with some motherboards, BIOS and SATA drive configurations. At an early stage one is dumped into a terminal with a statement about busybox and initramfs. This is unlikely and has only happened to me once and all is not lost as there are various options at GRUB boot time which can be appended to the startup string. There has been much discussion and it still comes down to trial and error but the most likely string is:

all_generic_ide floppy=off irqpoll

Some other options mentioned are:


pci=nomsi
nomsi
noirqpol
noirqdebug

Timer/acpi errors may respond to:

nolapic
noapic
acpi=off

The proceedure is:

When you boot the LiveCD and it askes what to do, press F6 and add the chosen option string(s) after quiet splash, so for example it looks like

quiet splash all_generic_ide floppy=off irqpoll

After you have installed Ubuntu you may have the same problems when Grub runs. If that is the case on rebooting wait until you get to the GRUB menu, hit esc and then hit the "e" key and arrow down to the kernel line and hit "e" again, then enter all_generic_ide floppy=off irqpoll then hit enter, and then "b" that should get you booted, once booted open a terminal and


sudo gedit /boot/grub/menu.list

find this line:

# defoptions=quiet splash

edit it to look like this

# defoptions=quiet splash all_generic_ide floppy=off irqpoll

save your changes and exit gedit,

then in the terminal do:

sudo update-grub

and it should all be sorted at the next boot!

 

Some Useful Tips and Scripts

The following are a miscellaneous selection of useful tips, in particular ones to do with configuration, and a collection of scripts to carry out a few of the more common activities.

Put a Trash Can on the desktop:

Ubuntu has an option for adding a Trash Can icon to the desktop. Open a run dialog by Alt+F2 and open the Gnome Configuration Editor by typing:

gconf-editor

Now browse down to the apps \ nautilus \ desktop key amd on the right hand side, you'll see an entry called trash_icon_visible. Just check the box - you can also change the trash_icon_name to Recycle Bin if you have a Windows background! You can also add your Home Folder and there are many other useful changes you can make using gconf-editor which are not accessible in the programs but without having to edit configuration files if you explore - try searching for a program name using Edit -> Find

Turning off a Synaptic's touchpad tap-to-click feature.

There is also a program called gsynaptics which allows you to control the touch pad via a GUI interface which can be installed via the Synaptic Package Manager and search for gsynaptics. It is accessed via System -> Preferences -> Touchpad.

 

A terminal command to Search for and Replace a character string in a folder of files

Searching and Replacing is one of the more common activities, both in a single file and in a folder of files of the same type. Linux provides a Stream EDitor (sed) which can search for and replace a search string with replace string throughout a file. A example of use on a single file follows. The -i (in place) parameter carries it out in the same file.

sed -i 's/searchstring/replacestring/' filename

The sed command can also make a backup automatically - if you follow the -i parameter with a string it will add that to the filename when it makes the copy. The following line is my actual test and you will note that I have added the time and date in the backup name to avoid overwriting the original if I run the command several times by accident or to refine the search - perhaps even more important is that it provids an audit trail of changes.

sed -i.bak_`date +%d-%m-20%y_%H%M-%S` 's/sounds and music/SOUNDS AND MUSIC/' search_replace_test

The above is a single line which must not be split if you do a cut and paste from a display on a small screen. The quotes round the date command are back ticks `` which are usually at the top left on your keyboard and are used to evaluate the expression within them. Do a man date to understand the format parameters used by the date command. The next set of quotes are ordinary single quotes and are needed if the strings contain spaces.

What I have called searchstring above is actually a regular expression and can be very complex - one simple addition is a ^ at the front which forces the match to be at the start of a line.

We will now look at how to wrap this to carry out the search and replace on a whole folder. This is a very useful activity and another example of the power of linux commands especially when piped together.

find ./ -type f -exec sed -i.bak 's/searchstring/replacestring/' {} \;

This command visits everything in . ( your current folder when it is run) and it’s subdirectories, and makes the substitution in files. This line has two main parts - the find command whose -exec parameter executes the following sed command for every file that is of type f (normal file). The string {} is replaced by the current file name matched by the find. The final ; (which has been escaped by a \ so it can be used in scripts) terminates the -exec . Take great care when testing this command and never add a sudo in case you change every system file on the machine. Note that the backup is created whether changes are made or not. Replacing -type f with, for example, -name *.htm will limit the damage to .htm files!

If you are using this within a script you may need to look at man find and make use of $HOME and put the {} in quotes like '{}' to avoid the script processor misinterpreting the brackets. I have not experimented with using find in scripts yet!

A Script to make a backup of a file with date and time in the backup name

The techique to make backups in my search and replace command led me to create a simple script to make a backup of a file the new name including the date and time:

#!/bin/bash
# Script to copy single file to the same name with ending in .bak_date_time
# Addition arguments to cpbk are ignored.
# Lives in ~/bin/cpbk where it must be given execute permissions
# and ~/bin should have been be added to to #PATH in ~/.bashrc
# If you wish to use it on system files using sudo in must also be in /usr/bin
# with ownership changed to root and given execute permissions
#
arg2="$1.bak_`date +%d-%m-20%y_%H%M-%S`"
cp "$1" "$arg2"

Note that my script files are self documenting. Script files need to be made executable (Right click -> properties and tick box near bottom) and also need to be files with unix line endings - bash hates windows files and the scripts do not run properly. If you ever get a file with Windows line endings which can happen when you download a script then create a new file under Linux and copy and paste the old contents into it. The task for the reader is to add a check if a backup file exists and the first time just call it .original

Changing the name of a user (Advanced)

This is much more difficult than one might imagine but there is a utility which does the basic work and updates many of the files but only in the home directory.

Code to change a username - user must not be logged in if numeric uid changed

usermod -l <newname> -d /home/<newname> -m <oldname>

-u accepts uid as parameter, and you can move the directory by using -d with the -m

Also, you may want to change the group name - by default the group name is same as user login
Code:

groupmod -n <newgroup> <oldgroup>

Note: This does not sort out address which are hard coded which are used by Wine and some mozilla profiles

Changing the Computer name

This is stored in /etc/hostname alone so this is a very easy change in a terminal

sudo gedit /etc/hostname

GUI alternatives to The Terminal

It is interesting that the commonest objection to Linux is that newcomers believe they have to use a terminal for many operations. It is often the best, simplest and safest way when you ar familiar with it but you almost everything in a GUI with a few tricks. Firstly you will need to be comfortable with right click menus as they will be used extensively to access operations from a GUI interface which would otherwise be done in a terminal. Mostly we will be working from the file browser rather than a terminal which is fine if one is working on ones own files and in ones own home folder - but what do we do if we want to work on system files owned by root? In a terminal we put sudo or gksudo in front and after entering a password we can temporarily run commands as if we were the root user. The trick if you want to work on the system files from within the file browser is to start up the file browser useing sudo so from then on every activity from within the file browser is done as if you were root including opening the text editor for editing system files and setting the permissions, ownership etc of a file via properties. This is very powerfual and also very dangerous if you forget that you are 'root'. All you need to know is the the command to open the file browser is nautilus and you can then open the browser (nautilus) as root by typing the following command in a terminal.

gksudo nautilus

But you you say, we are still using a terminal! If you are using an early version of Ubuntu you can get round it by to creating a 'Launcher' on the desktop or in a panel by

Right click on an empty bit of desktop
Click Create Launcher
Leave Type as: Application
In name enter: Root File Manager
In Command enter in lower case: gksudo nautilus
In Comments enter: Herein lie Demons - you will be running as Root - if you do not understand that back off!
Click OK

You can do the same sort of thing to add it to the Application Menu under System after Right click on Applications -> Edit Menus

But what do I do if I have a Ubuntu 12.04 with the Unity Desktop to open Nautilus (the file manager/browser) as Root?

This is a chicken and egg situation as Ubuntu 12.04 Precise Pangolin now uses Unity and no longer offers the facility to create a launcher or equivalent. You have to install some additional 'Tweaking' software which requires you to use a terminal to load it! The software needed Ubuntu Tweak is not in the main Ubuntu Repositories - it is in what is called a PPA - so there is no way round the need for a terminal to load it. It is however quite simple - all you need to do is to open the terminal (start to type terminal in the Dash to find it) and cut and paste the following three lines. You will need to do one 'Enter' and answer y and Enter to another question as it installs it all - but that is not too bad is it?

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

You can now start Ubuntu Tweak from the Dash - when you start to type tweak it will appear.

Ubuntu Tweak has many useful features but for now we just need to go to Admins -> Scripts (under Personal) and you will see a long list on the right hand side. Drag Browse as Root to the left hand side and thats it. You can now close Ubuntu Tweak.

Now when you right click anything you will find a new item called Scripts on the menu and in that you will find Browse as Root which opens nautilus, the file browser, as Root.

There are lots of other useful scripts available that you can add to the list

Using the file manager (browser) as Root

So how does this work in practice? In setting up Ubuntu the way I want I have to back up then edit about 7 system files owned by root so I open my file browser as root using the launcher we have just made, enter your password and navigate to the folder holding the file. I use the drop down at the top right to put the file browser into the 'View as Icons' view. If the file is a hidden system file starting with a dot then you also need to do a Cltr h to display it. I now hold down the Ctrl key and drag the file I want to work on to an empty space - this makes a copy with (copy) added to its name. I now right click on the original file and click Open which will bring up a box offering to run in a terminal or display - we want Display which will open a text file in the text editor (gedit) as root so we can now make the changes we want and save then. We then close the text editor and then the file browser and that is it. WARNING do not delete files when running as root in a GUI as they go into roots Deleted Items folder which you have no easy way of emptying without loading and using a special tool in a terminal which defeats what I am trying to do here!

 

 

Setting up and using Scripts

Scripts are a very powerful feature of Linux. At their simplest they enable you to carry out any sequence of commands you could run in a terminal and need to repeat but they can also include constants, variables, logic, flow control and functions etc like any other programming language. Script files need to be made executable (Right click -> properties and tick box near bottom) and also need to be files with unix line endings - bash hates windows files and the scripts do not run properly. If you ever get a file with Windows line endings which can happen when you download a script then create a new file under Linux and copy and paste the old contents into it.

At this point I ought to introduce the concept of a shell as it will turn up if you do any reading about scripts. A Linux shell program interprets user commands, which are either directly entered by the user in a terminal, or which can be read from a file called a shell script. Shell scripts are interpreted, not compiled. The shell reads commands from the script line per line and searches for commands on the system which are passed them to the kernel to be run and other scripts which it runs in a sub-shell. In contrast a compiler converts a program into machine readable form, an executable file - which may then be used in a shell script. Don't worry if it does not all make much sense at the moment, you do not need to know even the grossly simplified details I have given above to make use of simple scripts.

It makes life easy if the system knows where to look for scripts, they can then be just refered to by the filename rather than having to explicely provide the 'path'. It is common practice to keep ones own scripts in a folder in your home directory called bin ie in /home/yourusername/bin or to use the abreviation built into the system ~/bin where ~ is short for the path to your home folder. You will meet ~ in lots of scripts so remember what it means - the advantage is not only that it is quicker to write but also that a script is independent of the username it is run from. Likewise . refers to the current folder you are in and .. the folder one level above.

One important piece of information for those who have used other Linux distributions is that the addition of a path to a /bin directory is set in Ubuntu linux in .bashrc not .bash_profile as is described in some places. Also note that files starting with a . are hidden - use View -> Hidden Files in the File browser to find them. The lines I added were:

# Additions to the standard ~/.bashrc file to set up path to
# /bin directory in home folder
PATH=$PATH:~/bin

 

Updating Your Distribution

Backing up a Home Directory prior to a Distribution Update

Backup using a Standard Tar Archive

There is also a very powerful command line archiving tool round which many of the GUI tools are based which should work on most Linux Distributions. In many circumstances it is best to access this directly to backup your system. The resulting files can also be accessed (or created) by the archive manager accessed by right clicking on a .tgz .tar.gz or .tar.bz2 file. The following commands will back up your home folder /home/yourusername if you change pcurtis to yourusername - all other programs must be closed.

In a terminal type:

sudo tar cvpPzf "/media/WD Passport/mybackup.tgz" /home/pcurtis/ --exclude=/home/*/mybackup.tgz --exclude=/home/*/.gvfs

This is a single line if you cut and paste. The options cvpzf are: create archive, verbose mode (leave this out after the first time) , retain permissions, -P do not strip leading backslash, gzip archive and file output. Then follows the name of the file to be created, mybackup.tgz which in this example is on an external USB drive called 'WD Passport' - the backup name should include the date for easy reference. Next is the directory to back up, in this case /home/pcurtis). Next are the objects which need to be excluded - the most important of these is your back up file if it is in your /home area (so not needed in this case) or it would be recursive! It also excludes the folders (.gvfs) which is used dynamically by a file mounting system and is locked which stops tar from completing. The problems with files which are in use can be removed by creating another user and doing the backup from that user - overall that is a cleaner way to work.

The backup process is slow (15 mins plus) and the file over a gbyte for the simplest system. After it is complete the file should be moved to a safe location, preferably a DVD if you did not use an external device. If you want to do a higher compression method the command "tar cvpjf mybackup.tar.bz2" can be used in place of "tar cvpzf mybackup.tgz". This will use bzip2 to do the compressing - j option. This method will take longer but gives a smaller file.

You can access parts of the archive using the GUI Archive Manager by right clicking on the .tgz file - again slow on such a large archive. A backup is most useful if you can effectively restore your entire system or data. This can be again done by a few commands but do not try this for fun as it will overwrite the entire part of the Ubuntu file system we archived, thus restoring the older image that we took.The following assumes the backup image is in the root directory of an external drive called 'WD Passport' :

sudo tar xvpfz "/media/WD Passport/mybackup.tgz" -C /

The restoration uses the options - extract, verbose, retain permissions, from file and gzip. This will take a while because all your files will be overwritten with the versions from the image you previously backed up. The "-C / ensures that the directory is Changed to the root so the files are restore to the original locations.

If the old system is still present note that it only overwrites files, it does not deleted files from the old version which are no longer needed.

you want to delete the archive file then you will find it is owned by root so make sure you delete it in a terminal - if you use a root browser then it will go into a root Deleted Items which you can not easily empty so it takes up disk space for ever more. If this happens then read http://www.ubuntugeek.com/empty-ubuntu-gnome-trash-from-the-command-line.html and/or load the trash-cli command line trash package using the Synaptic Package Manager and type

sudo empty-trash

Updating your Distribution

The above backup of ones home folder(s) is all in preparation for a distribution upgrade. In theory this is possible without lose of any of your files or configuration - in practice I and others have had some problems especially if you have loaded any addition software via extra repositories or directly via .deb files as the automated update is very good but can not cover every contingency. You should also use the procedure for backing up your home folder if you intend to try the automated system in the Synaptic Package Manager then you have the choice of doing a full reinstall if it is not what you expect. Distribution upgrades only work for a single change of version or to the next Long Term Support version so if you have skipped versions you either need to do a succession of updates or a full system install.

The approach when you do a full install of the system varies a little depending on whether you have created or installed with your home folder /home on a dedicated partition. If you have a separate home partition you should still back it up as above but hopefully you will not need it as you can use the advanced option when the installer gets to the partitioning stage and edit the existing partitions so the mount points are as before and make sure you only format the root partition - this should leave your /home partition intact for when you restart with the new distribution which will find all your old settings for applications even if you have to reload them.

If you do not have a separate /home partition already this is the time to consider generating one and there are full instructions at Moving a Home Folder to a dedicated Partition (Expert level) on you can create one during the partitioning stage of the installation of the new Distribution to make life easy for the future and then use you backup from above to reload it.

My standard procedure splits into a number of parts which I use on all my machines:

  1. I periodically make a backup of my /home folder in a tar archive, as cover above, which should have all the data and configuration.
  2. I keep a record of all the programs, utilities and libraries (packages) I have loaded on all my machines and I have created a script to both load them and as a way of documenting for the future ie as every PPA or other repository is added and every package is loaded, I add it to the script for the future. You can have a look at my latest script for Lucid Lynx - loadstandardprograms-lucid or for Oneiric loadstandardprograms-oneiric
    • Note - Script files need to be made executable (Right click -> properties and tick box near bottom) and also need to be files with unix line endings - bash hates Windows files and the scripts do not run properly. If you ever get a file with Windows line endings which can happen when you download a script in your browser then create a new file under Linux and copy and paste the old contents into it.
  3. I keep a list of packages added which are separate of the PPA and repository system such as Picasa3 (there is development repository which has it), Adobe Acrobat (now in the partner repository), Truecrypt, and in some cases special drivers for Wifi, Scanners, Printers etc and keep all the downloads in a folder so I can access them easily - again it self documents.
  4. I likewise keep copies of all the extensions for firefox and thunderbird
  5. I make a copy of the latest version of every system file I have had to edit such as fstab, rfcomm.conf, ppp.conf, menu.list and bashrc etc so again it is self documenting.
  6. Any special set up procedures are documented on my web site, there are a number of examples on this page.

Now when I need to rebuild the system or come to do clean install of a new distribution like Lucid Lynx I can:

  1. Do a fresh install from CD or from a USB stick. On systems with the /home on a separate partition your home folder with all the configuration information for your desktop and programs should be left intact if you make sure you do not reformat that partition during the installation.
  2. Optional - Carry out any tuning of the Grub boot procedure - Grub2 on Lucid and higher is quite different and this is best left as it is or done at an early stage so you can start again. This is documented at Customising Grub2 - The new Bootloader used in Ubuntu Lucid Lynx rather than on this page as it is rather specialised.
  3. Install all the extra repositories and packages, in my case using the scripts described above.
  4. Install any extra packages such as Picasa and Truecrypt from the folder of .deb files and install scripts or from the latest copies downloaded from their web sites.
  5. Edit/replace the system files which were changed and check that drives mount and the boot is as you want.
  6. Carry out any special procedures for installing drivers, permanently mounting drives, using modems and mounting Truecrypt volumes without an administrator password etc.
  7. Extra steps needed if you do not have a separate home folder.
    1. Create an extra user with Administrative privileges (so it can sudo), change to the new user, rename your normal user's home folder and replace it with the home folder folder from the tar archive.
    2. Log back into your usual username.
    3. Delete the backup user home folder - use sudo in a terminal or use the proceedures above or you will end up with it root's trash.
  8. Set up File Sharing by System -> Administration -> Samba. Samba requires a reboot.
  9. Set up Printers by System -> Administration -> Printers -> Add printer and follow through the screens.
  10. Set up SSH - some system files need to be changed to allow host resolution to work correctly.

You should now be back to where you were.

I have used the same basic proceedure to change partition sizes, add a partition for the /home directory, upgrade from Hardy to Jaunty, Jaunty to Lucid, Lucid to Natty and even to move a complete 'user' from a netbook to a laptop all in one operation.

Specifics on partitioning when installing if you have a separate /home partition

Make sure you know which partitions are used for the various mount points before you start. Usually it is obvious from the sizes and file system types but if you are unsure then running blkid in a terminal is also a good way to find out – typical output (on Lucid) looks like:

pcurtis@vortex-ubuntu:~$ blkid
/dev/sda1: LABEL="WINRE" UUID="80AE-9D55" TYPE="vfat"
/dev/sda2: LABEL="WINDOWS" UUID="F6EC309DEC305A57" TYPE="ntfs"
/dev/sda5: LABEL="DATA" UUID="49D3-6030" TYPE="vfat"
/dev/sda6: UUID="8993fcc3-6a5a-4f94-9e6a-c77f5091c1ad" TYPE="swap"
/dev/sda7: UUID="50fca34f-45d2-4231-8663-71ba99fc756f" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda8: UUID="e31b581a-85fa-4681-bf11-aebb9a9656cd" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb1: SEC_TYPE="msdos" UUID="3934-3935" TYPE="vfat"
pcurtis@vortex-ubuntu:~$ gedit /etc/fstab

combined with looking at your existing file system table (red bits of both) which is /etc/fstab which on my system looks (under Lucid) like:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda7 during installation
UUID=50fca34f-45d2-4231-8663-71ba99fc756f / ext3 errors=remount-ro 0 1
# /home was on /dev/sda8 during installation
UUID=e31b581a-85fa-4681-bf11-aebb9a9656cd /home ext3 defaults 0 2
# /media/DATA was on /dev/sda5 during installation
UUID=49D3-6030 /media/DATA vfat utf8,uid=pcurtis,umask=000,gid=46 0 1

# /windows was on /dev/sda2 during installation
UUID=F6EC309DEC305A57 /windows ntfs defaults,nls=utf8,umask=007,gid=46 0 0
# swap was on /dev/sda6 during installation
UUID=8993fcc3-6a5a-4f94-9e6a-c77f5091c1ad none swap sw 0 0
/dev/scd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

all should be clear!

Backing up and reloading the entire package list

This is an idea I got from the book Ubuntu Hacks (which is in my book list) as an alternative to my script LoadStandardPrograms . One copies the entire list of installed packages to a file and then loads them all, some 1600, back in - of course most of them will already be there but the system ignores them and just loads the extra 30 packages which should all be in my script with associated dependencies, perhaps 100 in total. It should work well for a reload of the same distribution or a minor upgrade. The terminal command to write the list of packages is:

sudo dpkg --get-selections | grep '[[:space:]]install$' | awk '{print $1}' > package_list
The operation is a nice example of piping throuagh a series of programs and redirection of the output to a file. grep selects the lines containing the string 'install' and awk is used to select and print only the first item on each line. awk, with its own self-contained language, is actually one of the most powerful data processing engines in existence — not only in Linux, but anywhere. It allows you to create short programs that read input files, sort data, process it, perform arithmetic on the input, and generate reports, among myriad other functions. To put it the simplest way possible, AWK is a programming-language tool used to manipulate text. When first created, AWK was designed to work in the text-processing arena, and the language is based on executing a series of instructions whenever a pattern is matched in the input data. The utility scans each line of a file, looking for patterns that match those given on the command line. If a match is found, it takes the next programming step. If no match is found, it then proceeds to the next line. This link is a good starting point http://www.oracle.com/technology/pub/articles/dulaney_awk.html . In fact the grep action could also be carried out in awk and when I have more time I might try that out.

The command to read the file back in is also a good example of the power of linux commands and piping output from one into another:

cat package_list | xargs sudo apt-get install

cat is used to send the list through a pipe to xargs which calls apt-get install with parameters made up from the input piped into it. It divides the input into chunks and calls apt-get install as many times as are required.

Whenever I see command lines such as these I look up the various commands using man commandname to see what they do. You will often find that people have piped together a series of simple ways of using the commands which they know and understand rather than save a a few characters by using many options with a single command.

Is it ever worth changing to a non Long Term Support (LTS) version?

The pace of development of hardware means that each version is likely to support some of the latest hardware much better than earlier versions. This was true of Jaunty where the network manager was dramatically improved and supported many of the USB Mobile Broadband Sticks in an integrated manner. It also had a one year support which took it to the issue of the next LTS version.

The issue was much less clear when Ubuntu 9.10 Karmic Koala came out and one had to ask if the advantages are sufficient to merit an upgrade when a LTS version is due in 6 months. I did end up upgrading 3 of our 5 machines each for different reasons. The Toshiba Satellite Pro L20 lost a hard drive so a new install was required anyway and 9.10 had less problems with some of the hardware than 9.04 and was much better than 8.04. The HP Compaq DX2250 needs the most up to date versions of software as it is used for Video work and the Home Build desktop was in need of a reinstall as it had been progressively upgraded from 6.06 to 8.04 Hardy Heron and also needed more disk space and repartitioning of the disk drives. The MSI Winds were not upgraded as there were issues with Webcam support and also random Brightness variations. These seem to be a chip problem and the surprise is more that they work perfectly under Jaunty!

So what are the major changes from Hardy/Jaunty to Karmic/Lucid:

There are many changes under the hood (hal and pulse audio to name a couple) and some have had unexpected results on some systems - Karmic was an essential development step before the next LTS version Lucid but it does mean that you should check out carefully with a LiveCD version before upgrading. If you are happy with what you have then it is prudent to stay with it until you have had a chance to do some comprehensive web searches for peoples experiences with your own machine and also to read the Ubuntu Release notes with great care. That said you will find that the improvements are well worth getting used to a few changes.

How to change to Ubuntu Lucid Lynx

This has been a good test of my own procedures and I have updated them where possible.

  1. I firstly backed up the home directory on each machine and re-partitioned the drives so I could use a separate /home directory. I have always regarded that as a high risk 'expert' activity but my latest way seems to be much lower risk and have an easy fallback if it does not work. (GUI and Terminal - moderate experience needed)
  2. The next step is to backup everything once more then do a fresh install into the existing root partition - you can also specify and use the existing and separate home partition but make sure you do not reformat it! (GUI)
  3. You need to modify one file to automatically mount any 'data' drives (partitions) which you use and create folders for their mount points. (Terminal)
  4. You now need to reload all the programs which will find all there setup data in your home partition a reuse it. I have a script to do most of that for my standard system set up. (Terminal)
  5. There are a few programs which need to be installed separately and need some system configuration - Truecrypt is my main example. (GUI and Terminal)
  6. You may need to install extra fonts for OpenOffice (Terminal/GUI)
  7. You need to set up your printer (GUI)
  8. You need to set up your network and sharing (GUI)
  9. You need to set up for file synchronisation (unison and ssh) which involves changes to a couple of configuration files (Terminal).
  10. You may want to make changes to the Grub Boot Loader to speed it up (Terminal)

Loss of Calendar and Project Data from Lightning.

If you have profiles for Thunderbird/Lightning which you have set up in Jaunty or earlier you may find that all the calendars seem to have disappeared when you change to Karmic Koala or Lucid Lynx which is very disturbing. This is because Lightning is now integrated into Thunderbird in Ubuntu rather than just being in the profile and this intergration also includes the extension for Google Calendars. These extensions can not be in two places at once and even if you have not installed it in Ubuntu explicitely the framework is still in place and the extension in your profile conflicts with it and the calendars disappear from view - this is a bug in my book but once you realise what is going on there is, at least, a simple workround.

The workround this is relatively simple if you just have a single profile. First you need to close Thunderbird then uninstall lightning-extension using the Synaptic Package Manager (if it has been installed) - I did a full uninstall which removes all the control files. Once you have removed the conflict you now run Thunderbird with each of the problem profiles and Uninstall the Lightning 0.9 extension using the Extension Manager (Tools -> Add-Ons -> Extensions) - do not fear it does not remove the calendar data from the profiles. When this is complete you can reinstall lightning-extension in Ubuntu which brings in calendar-google-provider and calendar-timezones as dependences with it and the calendars will now reappear when you open Thunderbird. If you have multiple users you should clean out each users profiles before reinstalling with Synaptic.

Ubuntu 10.04 Lucid Lynx

This is currently 'work in progress' and can be found in draft in my 'Diary' under Ubuntu Lucid Lynx 10.04

Fine Tuning Lucid Lynx

Moving the Minimise, Maximise and Close buttons to the right.

Lucid has chosen to move the buttons to the left as in Apple rather than the right. To restore theusual placement then in a terminal do

gconf-editor

and follow apps -> metacity -> general and change the button_layout value to menu:minimize,maximize,close

Themes for Lucid

I do not like the very dark Ambience theme and prefer a blue one but I found many of the themes that were in previous versions had been lost. I found many can be loaded using the Snaptic Package Manager or apt and this terminal command will load a lot of useful ones at the expense of 50Mbytes of disk space

sudo apt-get install gnome-themes gnome-themes-extras gnome-themes-more humanity-icon-theme tango-icon-theme tango-icon-theme-extras human-theme tango-icon-theme-common tangerine-icon-theme

Note: The above is a single line when you come to cut and paste into a terminal

Display Timeout settings and request for passwords

The defaults seem to have been changed and the screen has been blanking after about 10 minutes idle time which is tedious but what is worse is that it needs a password to log back in again. These settings are controlled by several mechanisms and settings and are not easy to fathom out. Firstly one should try via System -> Preferences -> Screensaver and System -> Preferences -> Power Manager and one should be able to set the screensaver to blank the screen after 2 hours and not request a password and by clicking at the bottom you can also reach the power manager and set suitably long times there as well - this seems to have worked for me.

If this does not work there are more settings accessable via a terminal and gconf-editor -> apps - gnome-power-manager and gnome-screensaver. I assume some of these will be overwritten if you use the Preferences route. Note these settings as there is no undo or reset to defaults available. The sections of interest have names like lock and timeout. There is also a box to use the lock setting from the screensaver for other choices on presenting a login box. I will report when I am satisfied I have settings which work as one needs several hours before on knows that the settings are correct. If this does not work there is a can of worms called DPMS and X configuration files to open!

Changes in Wine

The Wine version has been changed to the beta version 1.1.42. If you want an earlier version for compatibility uninstall the higher version just called Wine using the Synaptic package Manager and instal version 1.0.1 which is available as Wine 1.1 . Search for Wine and they will all show up. You will need the matching Gecko. Even after that I could not get First Class Personal to work any more as it needs a different version of a library ld-2.11.1.so which is called by a link called ld-linux.so-2 - both are in /lib and in earlier versions of Ubuntu it was ld-2.9.so which was called. So far only FC personal has been affected.

Installing Sun Java on Lucid

The Java now used by default is the Open Source rather than Sun Version which is now only in the partner Repository which has to be enabled. The Open Source plugin is called IcedTea or something like that. I have installed the 'proper' Sun Java but had difficulty in making it the default as the proceedures I used earlier give lots of warnings but still seemed to work and the Sun java seemed to turn up. There is a test page at: http://www.java.com/en/download/help/testvm.xml to check.

First I have modified my script to load the Sun java before ubuntu-restricted-extras which loads the Open Source equivalent.

Having installed Sun Java 6 one must now make changes so it is used by default.

First check for which version you are using by opening a terminal and doing

java -version

Now see what others are present, 

update-java-alternatives -l

I found the correct one was loaded but not the default. So if you have a Sun Java loaded then select it by name, for example 

sudo update-java-alternatives -s java-6-sun

This gave a series of comments as not all the facilities could be replaced but it did seem to have changed the Firefox plugin correctly

I have since found a better option

sudo update-alternatives --config java

This provided the following output

Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
* 2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode
Press enter to keep the current choice[*], or type selection number:

Looking Forwards

Reference Books

I did virtually everything that I have covered above without purchasing any new reference books or even buying any magazines - everything came from the documentation on the Ubuntu web sites, forums and other internet sources plus a very old book on Red Hat Linux 7.2 - a weekend crash course which cost a couple of pounds in an an 'end of line' bookshop many years ago. I have very few books because the only ones worth getting cost to much and even then rarely go into the depth one really needs. Once I was sure I was hooked on Linux and Ubuntu in particular I kept an eye open as some of my web searches ended up pointing to books. I had a look in the huge Waterstones in London at one which had caught my eye on the internet and it seemed to cover a lot, as you would expect in 800 pages, and not be too specific to ubuntu whilst covering the differences. At £35.99 I procrastinated and looked at others including the '100 Hacks' series from O'Reilly. When I got home I checked on Amazon who were offering 40% off Ubuntu Unleashed and above it in the sales popularity list was 'Ubuntu Hacks' I had not seen in the shop - I broke and bought Ubuntu Unleashed and invested the savings into Ubuntu Hacks giving me 1300 pages total of reference material and coverage of problem areas/tweaks. So far I am very pleased with both and they are joining my Special Edition using JavaScript by McFerdries as prime reference material in the 'replace if lost class'. I also had a bargain already on the shelf. The full references are:

Ubuntu Unleashed by Andrew Hudson and Paul Hudson published by Sams (31 July 2006) ISBN: 0672329093 900 pages paperback £35.99 (Amazon £23.75) - solid reference book covering much more than Ubuntu

Ubuntu Hacks by Jonathan Oxer, Kyle Rankin and Bill Childers published by O'Reilly Media (June 2006) ISBN 0-596-52720-9 425 pages £20.99 (Amazon £13.85) - full of useful stuff, both general and specific.

Red Hat Linux 7.2 Weekend Crash Course in 15 hours, Naba Barkakati and Kurt wall published by Hungry Minds (2002) ISBN 0-7645-3642-7 350 pages (£2.00 in el cheapo books) - actually quite useful for non specific background and version comparisons.

 

A Roadmap for your future transition to Linux.

I hope that this page has persuaded you that Linux is now a real alternative to Windows - a desirable and arguably essential change if you are going to use use a laptop 'mobile'. Try out Ubuntu Linux with a LiveCD, there is little to lose. It may even work on a machine which no longer runs Windows effectively as long as you can fit 256 Mbytes memory and preferably 384 Mbytes for Hardy Heron. I even got Dapper Drake running in 192 Mbytes

Even if you do not change immediately there are some things you can do which will make both your existing computing safer and the transition easier. Avoiding the use of Outlook Express and Internet Explorer and the replacement of a USB ADSL modem by a ADSL/Firewall/Router reduces risks by 4 fold even with good security software. So my beliefs and recommendations are:

  1. Reduce your dependence and use of Microsoft Software and proprietary software and instead use Open Source equivalents available for multiple operating systems.
    • Firefox is better and more secure than Internet Explorer
    • Thunderbird is better and more secure than Outlook Express
    • Open Office is equivalent to a Microsoft Office Suite and uses compatible file formats
    • The Lighting extension to Thunderbird adds calendars and task management making it is equivalent to Microsoft Outlook
    • Kompozer is an adequate WSYWYG HTML Editor
    • GParted is an alternate to Partition Magic
    • TrueCrypt is an excellent Encryption package which can be used under Linux
  2. Change to an ADSL Modem/Firewall/Router/Wifi unit for your connection to broadband - many are under £50 and often have a free Wifi card with them. I use ones from 3Com. This combined interface will allow you to connect many machines by cable and Wifi and, more importantly, give valuable protection to you under Windows and be easy to use with Linux. In contrast the USB modems which you got free from your Broadband provider are soft-modems and will not work easily with Linux.
  3. Avoid buying hardware which you know is Windows dependent such as soft-modems which include most internal landline, USB landline and ADSL modems. Wifi connections are also going the same way.
    • I you have or find an old fashioned serial external V90 or V92 modem buy or keep it even if you need a USB to Serial converter.
    • Keep any PCMCIA modems such as those from Xircom
  4. Do some checks before you buy your next Laptop, Wifi card/dongle or other hardware. My Toshiba with an Atheros chip WiFi chip was autodetected and set up from the Live CD whilst some WiFi chips such as those from Broadcom are less well supported at the time. A Google search for the hardware including Ubuntu may help.
  5. Think ahead and check other hardware. I deliberately got a USB to serial adapter which I knew was supported under Linux, others are not. Most Printers are supported but combintion Printer-Scanners are less well supported.

Presentations

The more time goes on the more I believe that Linux distributions such as Ubuntu have now reached the point that they are a practical alternative to Microsoft Windows and offer considerable advantages. This was brought home to me when two of my friends, both extremely careful and professional, contacted me the same day saying they were infected with Viruses on their Windows machines.

I have recently given some lectures on the QE2 looking at the options for the normal home user who is wondering if change is desirable and feasible with the title:

Linux and Open Source
A Real alternative to Windows ?

Or, why settle for Windows when you
can have the whole house for free ?

I am now in the process of writing a guide book to go with my lectures which will give a real possibility for an unsophisticated computer user without programming experience to make the transition to Linux with no more hassle than the change from Microsoft Windows XP to Vista titled The Road to Freedom -A progressive migration from Windows to Ubuntu for Safety, Security and Savings in Computing

Conclusions

The following tables show how Ubuntu matches up to Microsoft Windows XP for normal applications and utilisation on a desktop and for Mobile use on a Laptop. The sections on the darker background are those which are desirable or essential somewhere on our machines especially on the 'Power User' desktop which have not or can not be met using Linux. It looks as if we will only need to keep one dual boot system at home. The optimum system configuration of our machines will be addressed when we have gained a little more experience and investigated Linux networking more fully but we are now committed to Linux, whilst on the move, and very much more open source software everywhere. It has been a fascinating and enlightening investigation. The bottom line is that after a week I rarely switched back to Windows but from the start I thought the final step would be to convert Pauline which might need a new laptop for her! In the event the continual updates and problems with Windows ment that her time under Ubuntu increased and after less than two years she was also fully converted without a new laptop.

Before you Leave


I would be very pleased if visitors could spare a little time to give me some feedback - it is the only way I know who has visited, if it is useful and how I should develop it's content and the techniques used. I would be delighted if you could send comments or just let me know you have visited by sending a quick Message to me.

Requirements and Support Tables


Hardware Support

Hardware Windows XP Score
0-10
Ubuntu Linux Score
0-10
CD and DVD writers Plug and Play 10 Plug and Play 10
Ethernet cards
Desktop and Laptop
Plug and Play 10 Plug and Play 10
Internal WiFi Card (Laptop) Drivers installed
WEP Code setting easy
9 Installed automatically
WEP Code setting easy in Network Manager
10
Xircom PCMCIA Modem (laptop) Not required as internal modem
(Plug and Play without driver)
10 Plug and Play
Port can be automatically identified in Networking
10
US Robotics External Serial Modem (Desktop) Plug and Play without driver loading 10 Plug and Play
Port can be automatically identified
9
USB 2.0 Hub Plug and Play without driver loading 10 Plug and Play
Links appear on desktop
10
USB Disk Drive (250 Gbyte with FAT32 and NTFS partitions) Plug and Play without driver loading 10 Plug and Play -
Links appears on desktop
10
USB - SD card reader Plug and Play without driver loading 10 Plug and Play
Links appears on desktop
10
USB Multi-Card Reader Plug and Play without driver loading 10 Plug and Play
Links appears on desktop when cards inserted
10
USB Bluetooth Dongle Software suite has to be installed plus some configuration 7

Plug and play. Some utilities available. Two Dongles tried.

9

USB Floppy Plug and Play 10 Plug and Play
Link appears on desktop
10
PCMCIA Compact Flash Converter Plug and Play 10 Plug and Play 10
Vodafone Connect Card Install CD provided by Vodafone 9 Plug and Play
Installed as two USB ports
Accessible via Network manager. 3 dongles tried
10
Internal Modem (laptop)
Soft HSF type modem by ATI based on Conexant Chip.
Pre-installed 9 Very easy if you pay the licence fee of $19.99 or accept restrictions to 14 kbaud. 5
Epson Perfection V200 Scanner and Epson SX515W All-in-One Scanner Install Proprietary Software which is very powerful and has OCR software 9 Install drivers, Software not as powerful and versatile as the full Epson software 7.5
WiFi Card (Desktop)
Belkin PCI
Install Proprietary Software 7

Plug and play just WEP key needed

10

USB WiFi 3Com dongle 3CRUSB10075 Install Proprietary Software 7 Plug and play just WEP key needed 10
Generic PCI WinModem Card (Desktop) Had to Search out and Install Proprietary Drivers 5 May be possible but very difficult - not followed up as external serial modem available. ?
Pinnacle Firewire DV In/Out and Analog Video Input Install Proprietary Software 6 Plug and play - several video editors available 7

Pinnacle USB TV Tuner

Artec USB TV Tuner

Install Proprietary Software

Plug and Play

8 Needs driver to be built or download .deb (every kernel change) then kaffeine and me-tv offer similar control and use as Pinnance software

7

9


Software Requirements

Description Windows XP Score
0-10
Ubuntu Linux Score
0-10
Web Browser Firefox
Free download
10 Firefox
Open Source and pre-installed with system
10
Communication and Information Manager
  • Email
  • Contacts,
  • Calendar,
  • Tasks and
  • Notes
Outlook 2003
  • Email
  • Contacts,
  • Calendar,
  • Tasks and
  • Notes
~£85 stand alone
10+ Evolution Suite
  • Email
  • Contacts,
  • Calendar,
  • Tasks and
  • Notes

Thunderbird with Lightning extension

  • Email
  • Contacts,
  • Calendar,
  • Tasks

8

 

 

 

 

9.5

Office Suite
  • Word processor
  • Spreadsheet
  • Presentation Graphics
  • Database
  • DTP
Student Microsoft Office 2003.
  • Word,
  • Excel
  • Powerpoint
£105 - £150
(Much more if not pre-installed on machine or bought as Student version)
9 Open Office
  • Word Processor
  • Spreadsheet,
  • Presentations,
  • Graphics,
  • DTP and
  • Database
File and functionally compatible with Microsoft Office
Free and pre-installed with system
8.5
Web Editor (HTML)

Hotdog 6.6
Code View
£40

Kompozer WYSIWYG and Code view

Arachnophilia

Dreamweaver MX 2004
current versions ~£400

8

 

7

 

6

10

 

Nvu now called Kompozer
Free and installed on demand by Add/Remove
Used for much of this page

Arachnophilia runs under Java on most platforms

Dreamweaver 7 (MX 2004) now runs under Wine 1.00 - 1.4

8

 

6

 

 

9.5

FTP WS_FTP LE
Free Download
9

gFTP Free and Installed on demand by Add/Remove

FireFTP extension to Firefox

8.5

 

9.5

CD and DVD Writer Nero
Free OEM
£50 Full
9 Brasero for Audio CDs

K3b which uses the K interface seems very similar in power to the basic version of Nero

7


8

 

Graphics Editors, Viewers and Batch Converters Paintshop Pro 4.1
~£30
Current version ~£80

Irfanview (free) viewer and batch image converter

 

7

9


7



Paintshop Pro 4.1 and Irfanview versions up to 3.93 run under Wine

GIMP - very comprehensive but opaque - also available under Windows

Picasa from Google - available free but not OpenSource under Windows and Linux. Excellent Viewer, editor and organiser

Irfanview runs under Wine

7

 

7



9.5

7

Encryption and Secure Deletion

PGP 8

The optional PGPDisk package we have brings the cost up but makes using secure files easier. (~£80 for PGP 9)

Secure Deletion supported

TrueCrypt 6.37 - Opensource

7


9



9

 

9.5

Linux has built in support for OpenPGP which defaults to be compatible with PGP.
gpg provides command the line support in Ubuntu and
seahorse (unsupported) can be add/removed to provide GUI support
Shred provides secure deletion via a terminal interface.
Evolution has built in Encryption support.

TrueCrypt 7 - Opensource Xplatform


8

6


5

8

9.5

IP Telephone Skype 9 Skype 9
Mapping

Google Earth - easy to install from Google site

10

GoogleEarth - runs under its own version of Wine under Linux.

8.5

CD, DVD and MP3 Player Media Player 9
inbuilt
Nero 6 package
8

9
Various - all seem acceptable 9
CD Ripper (MP3) Audiograbber 8 Sound Juicer and RipperX 8 - 9
Disk Partition Utility Partition Magic 8
Simple version on Bootable CD and good installed version
£45 per machine if installed
9

7


Gparted Free and installed on demand by Add/Remove
GParted downloaded and put on LiveCD
Ubuntu LiveCD has Gparted

 

8

8
Photo Organiser Canon ZoomBrowser
Included in camera package
9

Picasa - see also above

F-Spot - does most of what ZoomBrowser does and perhaps better

10

8

GPS Utility to download/upload and organise waypoints via a serial cable to a Garmin GPS 12 GPSU
£20
7 GPSU Runs under Wine with some limitations on USB/Serial input converters 6.5
Video and DVD Editor Pinnacle Studio
£65 with hardware
8 Several available and investigated. 8

Before You Leave

I would be very pleased if visitors could spare a little time to give me some feedback - it is the only way I know who has visited, if it is useful and how I should develop it's content and the techniques used. I would be delighted if you could send comments or just let me know you have visited by sending a quick Message to me.

Fun with Ubuntu Linux | The Road to Freedom - The Journey Starts |The Road to Freedom - Base Camp | Ubuntu All Together - Sharing, Networking, Backup, Synchronisation and Encryption | Ubuntu on the Lookout - Browsing, Email, Contacts, Calendars and Tasks| Ubuntu on the Move | Ubuntu on the Take | Ubuntu making Music | Ubuntu Unity - Evolution or Revolution | The MSI Wind U100 Netbook for Global Communications and Computing

Home page | Pauline's Pages | Howto Articles | Uniquely NZ | Small Firms | Search

Copyright © Peter and Pauline Curtis
Most recent significant revision: 20 th, May 2012
Valid HTML 4.01!