100% found this document useful (1 vote)
252 views148 pages

Linux The Complete Manual - 2nd Edition, 2021

This document introduces the reader to Linux and provides reasons for using it instead of Windows. It notes that Linux is completely free to use and easy to install. It comes with many useful applications pre-installed like LibreOffice for productivity tasks and photo, music, and video software. Linux can run on almost any computer, regardless of its age or specifications. Overall it presents Linux as a viable free alternative to Windows.

Uploaded by

Kurniawan Såkti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
252 views148 pages

Linux The Complete Manual - 2nd Edition, 2021

This document introduces the reader to Linux and provides reasons for using it instead of Windows. It notes that Linux is completely free to use and easy to install. It comes with many useful applications pre-installed like LibreOffice for productivity tasks and photo, music, and video software. Linux can run on almost any computer, regardless of its age or specifications. Overall it presents Linux as a viable free alternative to Windows.

Uploaded by

Kurniawan Såkti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 148

WELCOME

Welcome to the world


of free computing

T
here’s a lot of mystery surrounding Linux. Until recently,
it was an operating system used exclusively by geeks
who knew how to control a computer by typing
unfathomable commands such as ‘sudo apt-get
install pkgnames emerald’.
The good news is that Linux is now as good-looking, easy to
install and simple to use as Windows. What’s more, it’s absolutely
free – you’ll find your copy of Ubuntu on the back page of this book
ready for you to try out straight away. You can install it on as many
computers as you like, try as many different versions as you want
and download thousands of free applications to use with it.
In this book, we’ll show you how to do everything in Linux
that you can do in Windows, such as browsing the internet,
sending emails, organising and editing your photos, creating a
spreadsheet, listening to music (and transferring it to your MP3
player), watching DVDs and much more.
So whether you’re building a computer from scratch
or you’re simply fed up with how slow your current
Windows PC is, this book is for you.

Jim Martin, Editor

THE COMPLETE LINUX MANUAL 1


Contents
Find out how to do everything in Linux just as easily
as you can in Windows – and all for free!

CHAPTER 1 CHAPTER 4

Introduction to Linux Basic desktop tasks


Find out why this free OS is better than Windows Everyday activities are as easy in Linux as they
are in Windows, as our step-by-step guides show
Why should I use Linux? 6
How to get Linux 8 Using LibreOffice 54
Burning CDs and DVDs 56
Connecting a digital camera 58
CHAPTER 2 Getting started with Gimp 60
Improving your photos using Gimp 62

Installing Ubuntu
Organising your photos with Picasa 64
Connecting a video camera to your PC 66
Our step-by-step guide to installing your new OS Editing video 68
Playing DVDs 70
Installing Ubuntu 12 Playing music files with Banshee 72
Installing Ubuntu on a laptop 16 Connecting an iPod 74
Welcome to the Ubuntu desktop 20 Connecting an MP3 player 76
Adding peripherals 22 Synchronising a mobile with Linux 78
Installing software 28 Using Google Desktop 80
Improving the look and feel of Ubuntu 82

CHAPTER 3

Getting to know Linux


Finding your way around is simple with our help

Getting started 34
Sharing files between Linux and Windows 38
Transferring files to your new computer 42
Configuring Ubuntu 46
Creating user accounts 50
Using the Launcher 51

2 THE COMPLETE LINUX MANUAL


FRE
11.04 D E UBUNTU
ISC
BACK CON INSIDE
OVER

CHAPTER 5

Internet on Linux
Find out how to get your web browser, email,
instant messaging and VoIP working

Getting connected 88
Controlling the web 92
Configuring email 96
Using VoIP 100
Enhance your web browsing 102
Social networking 104 CHAPTER 7
C
Firewalls and internet security 106
Storing files online
Uploading files with FTP
110
112 Network storage
Backing up with Ubuntu One 114 Why not use Linux to turn an old PC into a NAS?

Making your own NAS 132


CHAPTER 6 Configuring FreeNAS 136

System health CHAPTER 8


Linux is as vulnerable to system faults as any
other operating system. In this chapter we’ll
show you how to protect it – and your data Troubleshooting
Stuck? Our guide will help you fix any problems
Choosing a backup destination 120
Making backups 122 Troubleshooting 142
Making an image of your system 126 How to use your free Ubuntu 11.04 disc 144

THE COMPLETE LINUX MANUAL 3


CHAPTER 1

4 THE COMPLETE
E LINUX MANUAL
Introduction to Linux
The Linux operating system is a great alternative to Windows.
As you’ll learn over the next few pages, there are plenty of
reasons to use it other than the fact that it’s free.
One important point to note about Linux is that there are many
different versions, or distributions as they’re known. Each version is
based around a kernel (the core part of the operating system), but
they vary when it comes to the interface and software they include.
Ubuntu is one of the most popular and easy-to-use distributions,
and it’s the one we’ll use throughout this book. You’ll find a copy of
the latest version of Ubuntu on the free disc on the back page. Of
course, you can try any other distribution if you prefer; Linux Mint,
Mandriva, Debian, Fedora and Qimo are all popular choices.

Why should I use Linux? 6


How to get Linux 8

THE COMPLETE LINUX MANUAL 5


CHAPTER 1

Why should I
use Linux?
There are many reasons to use Linux beyond the fact that it’s free.
Here we’ll explain why it’s a viable alternative to Windows

inux really will cost you nothing. 25 times, or that it isn’t installed at all. You won’t

L Well, nothing more than price of this


book, of course, but beyond that you
shouldn’t need to spend a single
penny. Not only is the operating system itself
have that problem with Ubuntu. The LibreOffice
suite is installed by default, and has compatible
versions of Word, Excel, PowerPoint and Outlook.
That means you can create letters, presentations
free, but all the software and utilities you’ll need and spreadsheets and start sending and
are either included as part of Linux or you can receiving emails immediately.
install them with just a few clicks, all for free. There’s plenty else besides: photo-editing
For another thing, it couldn’t be easier; we’ve software, music and video players, instant
even stuck a CD in this book so you can try it messaging and disc-burning utilities – the list
immediately. All you need to do is pop it into goes on and on. You’ll find guides to many of
your CD or DVD drive and boot from it; you these applications in Chapter 4.
don’t even need to install it.
If you’re still not convinced, here are another Ubuntu will run on just about any
eight reasons why you should switch to using 2 computer. Whether you have the latest
the Ubuntu operating system. quad-core PC or a relic with hardly any RAM,
Ubuntu will work. In fact, it will use the full
The programs you have to buy for Windows power of both those machines, so whatever you
1 are free in Linux. It can be incredibly have it isn’t wasted by running Ubuntu on it.
frustrating when you get your new PC home, set Whether your PC is
Because Ubuntu is a very lightweight operating
it up and go to load Microsoft Word. You’ll either heading for the scrapheap system, older computers can be given a new
or has the latest quad-core
find that you have a trial version that can be run processor, Linux will make
lease of life. Instead of feeling sluggish and
the most of it taking 10 minutes to boot up, they can feel
snappy simply by swapping a clogged-up version
of Windows with Ubuntu.

Viruses and malware are virtually non-


3 issues. Because most computers run
Windows, the vast majority of viruses are written
to target that operating system. There are almost
no cases of Linux suffering from virus attacks,
and as Ubuntu is updated regularly, potential
security holes are patched very quickly.
Extra reassurance comes from the fact that,
unlike Windows, the main computer user doesn’t

6 THE COMPLETE LINUX MANUAL


INTRODUC TION TO LINUX

have administrator rights. In simple terms,


this means there’s a limit to the parts of the
operating system that can be accessed, and this
provides greater safety from malware.

Updates are easy. Ubuntu has a central


4 update manager that manages updates for
all the programs you’ve installed. This means
there’s just one place you need to go to get new
Ubuntu is really easy
versions, and one program to run. Windows, to use, and provides help
on the other hand, doesn’t manage updates at every turn
for third-party software. A typical Windows PC
is littered with programs that run constantly,
checking to see if a new version of the program WHAT CAN’T LINUX DO?
is available. This uses up system resources and There are many games available for Linux, but
makes your computer run more slowly. you won’t be able to play the latest titles that
are available for Windows. This is Linux’s only
You don’t need a second monitor. In real weak area. However, you can run Ubuntu
5 Windows, you have only one desktop. alongside Windows – a technique known as
Open more than a few windows and you’ll soon dual-booting – so you can still enjoy Call of Duty,
become tired of juggling them all. In Ubuntu, you Colin McRae: Dirt 2 or whatever your favourite
have multiple workspaces, which are like virtual games are on the same computer.
monitors. Click on an icon, and you switch to a If we’re honest, though, Linux does have
new, clean desktop. It’s so easy to flip between other failings. Although it includes a heady array
workspaces that you’ll never be able to go back. of applications, there are a number of small
omissions; for example, Ubuntu needs a codec
There’s no shareware, adware or serial to be installed manually to record music in MP3
6 numbers. If you want to install extra format. Hardware support, as we’ve said, is very
programs, you do it through Ubuntu’s Package good, but it’s possible that some things may
Manager. There are thousands of applications not work on your computer. In the process of
to choose from, and all are free. If you like the writing this book, we installed Linux on many
software, you keep using it. If not, you simply PCs and laptops; some worked perfectly, while
uninstall it. You’ll never have to enter your others caused headaches. Problems ranged from
details, nor will you be bombarded by emails. major issues such as not being able to boot
after installing Ubuntu on a Sony Vaio laptop to
It’s just like Windows. If you know how niggles such as unreliable wireless networking.
7 to use Windows, you’ll be right at home You may also find that buttons on laptops
with Ubuntu. Almost everything works the same such as brightness and volume controls don’t
way, from the ‘start’ menu to navigating through work. The good news is that someone is bound
files and folders. Tooltips will pop up to help to have hit your problem before, and you’re
you learn what each icon and button does, and highly likely to find the solution in a forum such
there’s also a comprehensive Help Center. as http://ubuntuforums.org. If not, ask in the
forum, and you’re sure to get an answer.
Hardware support is much better than
8 it used to be. One reason many people
Help for trickier problems
haven’t tried Linux is because they think it is always at hand through
won’t work with their hardware. The truth is friendly community forums

that, unless you have a really obscure bit of kit,


Ubuntu is likely to work with it. You’ll probably
find that most of your computer’s features work
as soon as Ubuntu is installed, from wireless
networking to your memory card reader.

THE COMPLETE LINUX MANUAL 7


CHAPTER 1

How to get Linux


Now that you’re ready to give Linux a go, we’ll outline the
different versions on offer

opefully you’re now convinced that

H Linux is worth trying. The trouble


is, how do you choose between the
multitude of different distributions?
Each ‘distro’, as they’re called, has a particular
kind of user in mind, and if you’re just starting
out with Linux it’s best to choose one that’s
specifically tailored to new users.
There’s another consideration, though: the
type of computer on which you want to run it.
There are distros for desktop PCs, laptops and Linux Mint is the best-
looking distribution. It has a
netbooks. The latter, though, deserve special Windows-style Start menu,
attention. While most distros will happily work complete with a search bar
on a desktop or laptop, some may be too much
for a netbook. It may be a question of resources,
such as RAM, screen resolution or hard disk applications, plus user reviews, which makes it
space, but whatever the reason, a cut-down easy to decide whether a package is what you’re
Linux distro could be the answer. after. Adobe Flash and Sun Java are installed by
default, so most websites containing music and
DIFFERENT DISTROS video, such as YouTube, work straight away. You
A version of Ubuntu for specifically designed for can download it from www.linuxmint.com.
netbooks used to be available, but the standard If you’re after a distro for the whole family,
edition has now been updated to work on all try Qimo (www.qimo4kids.com). It’s based on
computers. The new design makes the most Ubuntu and has a friendly interface and built-in
of low screen resolutions, making it perfect parental controls for controlling internet access.
for netbooks, and means you no longer need a It even comes with educational games.
special version of the operating system. That Fedora (http://fedoraproject.org) and
said, you may find there’s a version of Linux for Debian (www.debian.org) are more mainstream
your specific netbook. Easy Peasy, for example, choices, but aren’t quite so user-friendly. Fedora
was designed for Asus EeePC netbooks, but you prides itself on having the latest versions of
can use it on all netbooks; download it from applications, while Debian is exceptionally
www.geteasypeasy.com. stable and has an enormous choice of software
If you plan to run Linux on a PC or laptop, available through its package manager.
there’s a wide selection of user-friendly distros. However, we think the best distro for most
The most obvious difference between them is people is Ubuntu. Its look and feel is very close
the number and type of programs they include. to Windows, and unfamiliar aspects such as
Linux Mint, for example, is based on Ubuntu but the Package Manager and virtual desktops are
has a start menu much like the one on Windows. hidden away. It’s because of this that Ubuntu has
The installer shows screenshots and ratings of become the most popular Linux distribution.

8 THE COMPLETE LINUX MANUAL


INTRODUC TION TO LINUX

ALL ABOUT UBUNTU


Ubuntu has excellent compatibility, which means
it will run on just about any hardware. It also
optimises itself for your computer, including
setting the correct screen resolution for your
monitor and finding your home wireless network.
In fact, Ubuntu can sometimes be even easier to
use than Windows. Connect an external monitor
to a laptop, for example, press the function key
combination on the keyboard to enable it and If you’re looking for a
version of Linux that can be
Ubuntu will automatically set the right resolution used by all the family, give
and configure an extended desktop to the side of Qimo for Kids a try
your laptop’s screen.
Ubuntu is updated every six months. Some
versions have the letters ‘LTS’ after the version We realise, though, that not every computer
number, which stands for ‘long-term support’. has a CD or DVD drive. In this case, all you
This lasts for three years, while standard need is a 2GB USB flash drive, plus a computer
releases have support for 18 months. Upgrading running Windows. This method should work for
to a new version is simple and can be done from all modern computers made in the past two or
the Update Manager. In between releases are three years. If you don’t have a flash drive, you
constant minor updates, so your PC always has can buy one for a couple of pounds from high-
the latest versions of applications installed. street stores such as PC World or WH Smith.
Boot times are fast, and you’ll realise just You’ll find a step-by-step guide to installing
how slow Windows is when you see your Ubuntu from a flash drive at www.ubuntu.com/
desktop appear in under 30 seconds. As well getubuntu. Simply choose the latest version from
as LibreOffice, Firefox is preinstalled, so you the Download options menu (if you want the 64-
can get online straight away. bit version, select it from the menu below) and
click the Start download button.
INSTALLATION OPTIONS While the 700MB file is downloading, plug
For most people, installing Ubuntu will be a in your USB drive, go to http://unetbootin.
breeze. Simply pop the CD that comes with this sourceforge.net and click Download for Windows.
book into your computer’s drive and press the This will download UNetbootin to your PC. As
power button. It’s then just a case of following we’re downloading the latest version of Ubuntu,
the onscreen instructions. You’ll find our there’s no need to select the distribution from
Ubuntu will run smoothly
complete guide to installation in Chapter 2. even on low-powered
the menu. Instead, select Diskimage.
computers such as netbooks Once Ubuntu is downloaded, click the ‘…’
button to the right of Disk Image and navigate to
the Ubuntu ISO file. Finally, choose the correct
drive letter for your USB flash drive (check in
Windows Explorer if you’re unsure) and click OK.
This will copy Ubuntu to your flash drive and
configure it so your computer can boot from it.
Plug the flash drive into the computer on
which you wish to install Ubuntu and turn it on.
If it doesn’t boot from the USB drive, you’ll need
to change the boot options in your computer’s
BIOS. Restart your computer and press Delete,
F1 or F2 (or look for a message telling you which
key to press to enter Setup). Look for the boot
options and change the settings so that the first
boot device is either an External drive or a USB
drive. Save your changes and reboot.

THE COMPLETE LINUX MANUAL 9


CHAPTER 2

10 THE COMPLETE LINUX MANUAL


Installing Ubuntu
Installing Linux is incredibly easy. Once your computer has booted
from the CD (or USB flash drive), the step-by-step instructions
explain everything. In this chapter we’ll show you what to expect
and give you some tips on how to make sure things run smoothly,
whether you’re installing Ubuntu on a desktop or a laptop.
Although Ubuntu looks a little different to Windows, its desktop
should still be familiar. We’ll give you a whirlwind tour of where
everything is on page 20.
We’ll also show you how to check whether your hardware
is working correctly and, if not, how to install the components
that aren’t. Finally, on page 28, you can find out how to install
additional software.

Installing Ubuntu 12
Installing Ubuntu on a laptop 16
Welcome to the Ubuntu desktop 20
Adding peripherals 22
Installing software 28

THE COMPLETE LINUX MANUAL 11


CHAPTER 2

Installing Ubuntu
It’s just as easy to install Linux as it is to install Windows. Here, we’ll
show you what to do with a step-by-step guide

ou’ve probably already found the Put the Ubuntu CD from this book (or the

Y CD stuck to the inside of this book. 1 one that you’ve created) into your optical
We’ve included it to save you the drive and wait for the ‘Press any key to boot
hassle of downloading the 700MB from CD’ message.
file yourself. It’s the Desktop Edition of version If you miss this message, you’ll have to
11.04, which was the latest at the time of writing. restart your computer to load the Ubuntu
Linux is regularly updated, so check the installation routine. The first splash screen
website www.ubuntu.com/getubuntu to see if should load very quickly.
there’s a new version, or if you want to install
a different version, such as the 32-bit edition. You’ll then be presented with a Language
If you do download one of these ISO (disc 2 menu and a choice of two options. The
image) files, you’ll need to burn it to a CD default installation option is to try Ubuntu
before you can use it. We recommend using without making any changes to your computer.
CDBurnerXP, which is a free download from This simply loads Ubuntu from the CD and
http://cdburnerxp.se. Alternatively, you can use doesn’t write any files to your hard disk.
the free UNetbootin utility (see page 9) to create This is an excellent way to try out Linux
a bootable USB flash drive with the ISO image. before making any commitments and filling
You don’t need to commit to using Linux at up your hard disk, and is the wisest option
this stage; if you just want to give it a try, you if you’re not totally sure about the operating
can run it directly from your installation disc system. If you do want to install Ubuntu
(see Step 2 for more details). properly, select the Install Ubuntu option.

1 2

12 THE COMPLETE LINUX MANUAL


INSTALLING UBUNTU

3 4

5 6

You’ll now see a splash screen that has a are kept and to create separate partitions for
3 list of criteria to make the installation go as program files and virtual memory. Linux stores
smoothly as possible. Make sure your computer user files in the /home folder, and moving this to
is connected to the internet, as this allows it to its own partition is easy. However, if you opt to
download the latest updates. Select Download set up one partition manually, you’ll have to set
updates while installing. them all up this way.
For the best results, Ubuntu will need to If you want to stick with Ubuntu’s default
install some third-party software in order to be option, click Install Now and skip to Step 11.
able to play MP3, Flash and other multimedia
files. Select Install this third-party software and To define your hard disk’s partitions
click Forward. 6 manually, select the advanced partitioning
tool. The installer will scan your hard disk and
If your hard disk has any other operating display the disk partitioning tool. The first step is
4 system installed on it, you’ll see a warning to delete all existing partitions on the hard disk,
on the next screen. You’ll have the option to so select each one in the list and click the Delete
install Ubuntu 11.04 alongside your existing OS button. If you have more than one hard disk in
or, if you’re running Ubuntu already, upgrade it. your PC, your first disk is /dev/sda or dev/hda
For the best results, select the Erase option. (dev/sdb or dev/hdb is your second disk).
This will wipe your hard disk and let you start
from scratch. Doing this will mean you’ll lose all You should now have free space listed
data on your hard disk, so make sure you have a 7 under /dev/sda. Since we’re making
backup of your important files first. When you’re partitions by hand, we need to create all the
ready, click Forward. partitions that Linux requires, starting with the
/boot partition. Select free space in the list
Ubuntu uses a simple partitioning system of partitions and click New. Enter a size of 50
5 on your PC’s hard disk. Tweaking this (we’re working in megabytes) and then select
will enable you to choose where your user files /boot as the mount point. Click OK to continue.

THE COMPLETE LINUX MANUAL 13


CHAPTER 2

7 8

9 10

Linux also needs a /swap partition, has more memory than it actually does, enabling
8 which is the equivalent of the Windows you to run more applications.
swap file used for virtual memory. When your First, create another new partition in the
PC’s real memory fills up, Ubuntu will swap free space and then enter a size (in megabytes)
bits of the memory that aren’t currently being that is equal to the amount of RAM in the
used – such as RAM being used for inactive computer, remembering that one gigabyte is
applications, for example – to the hard disk. 1,024MB. Select Swap area from the ‘Use as’
This gives the impression that your computer drop-down list, leave the other settings at their
defaults and click OK.

11 9
Next, you need to set the /home partition,
which is where user files are kept. This
is the equivalent of Windows’ My Documents
folder, but it is kept on a separate partition. The
advantage of this method is that if you ever
need to reinstall Linux, you can do so and your
documents won’t be overwritten.
Make this partition as large as you like,
but keep around 15GB free for the final /root
partition. Select /home as the mount point
before clicking OK.

The final custom partitioning task you need


10 to perform is to set the root or / partition.
This is where Ubuntu is installed, and it will use
all the remaining space. Set the mount point
as / and click OK. You can see the final partition

14 THE COMPLETE LINUX MANUAL


INSTALLING UBUNTU

structure from the screen above. Click Install With your configuration options set,
Now when you’re ready to continue. 13 Ubuntu will now go through the process
of finalising the installation and copying the
Ubuntu will now start installing to your remaining files to your hard disk. This process
11 computer. While it’s copying files, you need takes a fair while, so you can leave it copying.
to specify a few settings. First, you need to set
your current location on a map of the world Once Ubuntu has finished installing, go
in order for Ubuntu to set the date and time 14 to the Software Centre, the online app
correctly. You can also start typing the name of store available from the Launcher on the left-
your town or city into the text box. Click Forward hand side of the screen, to find and install new
when you’ve done this. Next you’ll be asked to programs. New applications are downloaded
configure your keyboard and mouse settings by from the internet using an intuitive package
selecting the language and type from the list. manager. Any additional components (known as
Click Forward when you’re done. dependencies) are automatically downloaded
and installed. Applications already installed can
You’ll then be prompted to enter a also be removed using this tool.
12 username and password for your computer.
Enter your password twice, and Ubuntu will tell Because of its rising popularity, Ubuntu
you if it’s a weak, fair or strong password. You 15 Linux is attracting some interest from
can now change the name of your PC. malicious hackers, so you need to make sure the
You then need to decide how you want to log latest security patches are installed.
in. Logging in automatically will boot straight to Ubuntu has its own update manager and
the desktop, but the ‘Require my password to log checks periodically for updates. When new
in’ option is much more secure. If you choose updates become available, you’ll see a warning
the latter option, you can also select ‘Encrypt on the application bar. Click on the warning to
my home folder’ for extra security. Click Forward bring up the list of updates and then click the
when you’re ready. Install Updates button.

12 13

14 15

THE COMPLETE LINUX MANUAL 15


CHAPTER 2

Installing Ubuntu
on a laptop
Installing Ubuntu on a portable computer – even a relatively
low-powered one – can give it a new lease of life

ne of the best things about Linux it work on all computers. However, as not all

O is that it requires comparatively


few resources when compared with
Windows. This is particularly handy
on low-powered computers such as netbooks.
laptops have CD drives the steps for installing
Ubuntu on your netbook or laptop differ from
those on the previous four pages.
Before you start, you’ll need to power on
It can also give normal laptops a speed boost. your computer and go into Windows. Many
Windows can be a resource hog and isn’t really netbooks or laptops require Windows software
designed to run on small screens, whereas for the shortcut keys to work. These keys may
Ubuntu is designed to make the most out of low not work in Ubuntu, so it’s best to turn on
resolutions and relatively slow processors. the wireless networking, sound and any other
The Netbook Edition of Ubuntu – which was devices while you can. Once this is done, shut
tailored specifically for installation on low- down your computer.
powered machines – is no longer available, but The Universal USB Installer The installation file is a free download
turns a USB flash drive into
the standard version has been tweaked to make a bootable disk for installing
from www.ubuntu.com. Selecting the link will
Linux download a CD-sized ISO file to your computer.
If you have a USB optical drive for your netbook
or laptop, you can simply use CD-burning
software (CDBurnerXP from http://cdburnerxp.
se is a good free choice) to write this ISO file to
a blank CD from which you can boot, or you can
use the CD included with this book and follow
the instructions on the previous pages.
However, as most of us don’t have a USB
optical drive, it’s better to use a USB flash drive.
You’ll need a model with at least 2GB capacity.
Make sure you back up any files stored on it,
as the drive will get formatted when you use it.
We’ve known some USB flash drives that refuse
to be recognised by a computer’s BIOS, so if one
drive fails to work, you may need to try another
one. Turn on a computer with Windows on it and
plug your chosen drive into your PC and make a
note of its drive letter by clicking on Computer in
the Start menu. It’s vital that you remember this
or you could wipe important data.

16 THE COMPLETE LINUX MANUAL


INSTALLING UBUNTU

You’ll need to tell your


netbook to boot from the
USB drive by using the
Boot Priority menu in the
computer’s BIOS

BOOTABLE FLASH DRIVE this may be listed as a USB device, or your flash
To make a USB flash drive bootable, you’ll drive may appear in the hard disk boot priority
need to download the Universal USB Installer menu if there is one.
from http://tinyurl.com/USBbooter and run When you’re done, select the option to save
it from your hard disk. You can choose the the settings and exit the BIOS. Your laptop
Linux distribution you want to install from the should restart and boot from the USB flash
drop-down list. You’ll find a massive choice of drive. The first thing you’ll see is a menu.
all the most popular distributions, and there’s The first option lets you try Ubuntu without
even an option to download the relevant ISO installing it, while the second option lets you
file; however, Ubuntu 11.04 may not be in the install the operating system on your laptop.
list. If it isn’t, select ‘Try Some Other Live Linux
ISO’ from the first drop-down menu. Click the HOW TO… INSTALL UBUNTU ON
Browse button and navigate to the Ubuntu ISO YOUR NETBOOK OR LAPTOP
file you downloaded earlier. On the first screen, you’ll see a checklist
Finally, select your USB flash drive using 1 of criteria your PC needs to match for the
the drive letter you noted down earlier, tick the best installation. Being connected to the internet
box to format the drive and click Create. Your is the most important, as Ubuntu can download
USB flash drive is automatically turned into a the latest patches while it installs; select the
bootable disk. ‘Download updates when installing’ option.
For the MP3 player, Flash and other
BOOTING FROM USB multimedia files to work, Ubuntu needs to install
Next, you need to configure your netbook or additional software. Tick ‘Install this third-party
laptop to boot from the USB flash drive. Plug the software’ and click Forward.
drive into a USB port and turn on your laptop.
You’ll need to get into the BIOS by pressing the You now have to decide what to do with
correct key; this is usually Del, F2 or F10, but 2 your hard disk. If you don’t want your
look out for any onscreen messages. Once in the existing operating system any more, select
BIOS, look for a Boot Priority screen. This won’t the Erase option and click Forward. This will
be in the same place on every computer, so you wipe the entire disk, including any restore
may have to hunt around. Once you find it, look partitions that you have. If you want to go back
to make the first boot device your USB drive; to Windows, we recommend backing up the

THE COMPLETE LINUX MANUAL 17


CHAPTER 2

1 2

3 4

entire hard disk using imaging software such You now need to configure your first
as Paragon Hard Disk Manager, or following the 4 user account and the name of the
instructions that came with your laptop on how computer. For security you have to enter a
to create recovery media. Alternatively, you can password, although you can choose the ‘Log
choose the ‘Install Ubuntu alongside’ option, in automatically’ option. For the best security,
which will give you a choice of Linux or Windows click ‘Require my password to log in’ and
when you start the computer. Click Install Now ‘Encrypt my home folder’ and click Forward.
when you’re ready. The final files will now be copied to your hard
disk and updates will be installed. Depending
On the next screen, use the world map to on the speed of your USB drive and internet
3 set your location; you can also type your connection, it could take a while to finish the
location into the box underneath the map. While installation. When it’s done, click Restart Now.
you’re doing this, the installation process will
copy the necessary files to your hard disk. Click Once your computer has rebooted, you’ll
Forward when you’re done. On the next screen, 5 need to log on at the prompt. You’ll then
your keyboard layout should be picked correctly, be taken to a clean-looking desktop. The icons
but change it if it’s wrong and click Forward. on the left of the screen let you access all your

18 THE COMPLETE LINUX MANUAL


INSTALLING UBUNTU

applications, while the status bar at the top and click on Update Manager. Click the Check
shows the current battery status, unread emails button, let the software build a list of updates
and the network status. Clicking on the Ubuntu and then click Install Updates if there are any.
logo at the top left of the screen takes you back Depending on the number of updates and
to the Home menu. the speed of your network connection, it may
take up to 30 minutes for your system to finish
It’s worth connecting to the internet now updating to the latest version. You’ll probably
6 to download any updates, just in case your be prompted to restart your computer once it’s
computer didn’t do so automatically during the finished updating.
installation. You’ll also now be able to browse
the web, configure your email and more. If Once your computer has restarted, you
you use a wired connection, it should connect 8 can begin using it as normal. All your
automatically. Otherwise, click the wireless icon applications are located in the menu down the
at the top right of the screen and select your left-hand side of the screen.
wireless network. Type in the password when Now is probably a good time to get your
prompted; it’s important to get this right, as email set up using the built-in email client,
Ubuntu will accept an incorrect password but Evolution, which will be listed in the main menu.
not warn you. Then click Connect. We’ll cover configuring and using Evolution in
more detail in Chapter 5.
Next, you should update your Ubuntu For now, you can use the menu system to
7 installation with the latest updates. Click find your installed applications and the Power
on the Application icon in the left-hand menu, button at the top right of the screen to shut
then click on System. Scroll down to the bottom down your computer.

5 6

7 8

THE COMPLETE LINUX MANUAL 19


CHAPTER 2

Welcome to the
Ubuntu desktop
Once you have Ubuntu up and running, it’s easy to find your way
around. Here we take you on a whistle-stop tour of the desktop

Ubuntu 11.04 has the brand new Unity


interface, which does away with lots of the
old menus. Click the Ubuntu button to open
the search bar. Start typing and matching
applications and documents will be shown,
in a similar way to how the Windows 7 Start
menu system operates.

Click this icon to launch the Ubuntu Software


Centre, which lets you install and remove
applications. There are thousands of
applications to choose from, and they’ll be
automatically downloaded from the internet.

Click this to zoom out and view all four


available workspaces, which are virtual
desktops. You can drag and drop open
applications between workspaces, keeping
your desktop neat and uncluttered.

This is Ubuntu’s Wastebasket. It works in


exactly the same way as Windows’ Recycle
Bin, and allows you to recover deleted files.

20 THE COMPLETE LINUX MANUAL


INSTALLING UBUNTU

This is the notification area, and looks just


like Windows. Icons appear here to inform
The Launcher is a dedicated dock for
you of the status of various functions. Here
application shortcuts. Applications that are
you can see the strength of your Wi-Fi signal,
currently running have white arrows next to
indicated by the blue bars, and change or
them. To keep an application in the Launcher,
mute the volume by clicking on the speaker
right-click it and select Keep in Launcher.
icon. Clicking on the envelope shows a menu
To remove an applicationfrom the Launcher,
listing all the messaging applications, including
simply remove the tick. If the Launcher
Empathy, which is Ubuntu’s default instant-
disappears, move the mouse to the left of
messaging program.
the screen.

Clicking on your username brings up a menu


similar to Windows’ shut-down menu. This
allows you to reboot the computer, put it into
sleep mode, switch to a different user account
or shut down the computer. The icon to the
left of your username shows your current
status for instant messaging.

As with Mac OS X, applications share a


common title bar, which houses the menus
(File, Help and so on). Roll the mouse over this
area to view the available menus.

Navigating around your files and folders


is simple with Ubuntu. If you can do it in
Windows, you’ll feel right at home here. Almost
everything looks the same, from the menus to
the navigation icons and folder listings. Just
like Windows, there are pre-created folders for
Documents, Music, Pictures and Videos.

THE COMPLETE LINUX MANUAL 21


CHAPTER 2

Adding peripherals
If the thought of installing hardware has been putting you off Linux,
think again: it’s now easy to add peripherals in Ubuntu

here was a time when using the show you how to install a range of common

T words ‘Linux’ and ‘hardware’ in the


same sentence was enough to make
IT gurus cry, but not any more.
Linux has grown up and works just as easily as
peripherals using Ubuntu.

SOUND ADVICE
Getting sound hardware up and running should
Windows with peripherals. pose no problems in Linux, and any modern
Over the past few years, open-source sound card should work straight away. Linux
developers have been busily writing drivers manages sound hardware in a different way to
and applications for a wide range of peripherals. Windows, so it’s worth taking a closer look at
USB and Bluetooth have made their job far what’s going on.
easier, but there are still a few issues to look out Click on the Ubuntu logo and type System
for, just as there are with any operating system. Settings and hit Enter to load the Control Centre.
Windows often has problems with drivers Select the Sound option; if you can’t hear
for current hardware, whereas in Linux it tends anything when playing CDs, for example, this
to be obsolete hardware that causes problems. should be the first place you look. The resulting
In Ubuntu, support for popular hardware is so Sound Preferences dialog box lists the available
good that the only problem you’re likely to have sound devices on a pull-down menu under the
is deciding which applications you want to use Hardware tab. In most circumstances, these will
with your devices. Over the next few pages we’ll all be for the same sound card.
One common sound problem is caused by
plugging speakers into a PC’s analogue audio
Checking the state of
your sound output is really socket and leaving Linux set to use a digital
easy in Ubuntu output. This error should be obvious if you see
the word ‘Digital’ in the name of the selected
audio devices in the Sound Preferences dialog
box. To correct this, use the pull-down menu to
change it to ‘Analog Stereo Duplex’ and click
the Test button. This should generate a steady
tone. If not, try the Open Sound System (OSS)
drop-down option for the device. If you still hear
nothing, try the Autodetect option.
You can also use this dialog box to change the
sounds played for specific system events. Click
on the Sounds tab and you’ll see a list of events,
each with a status of Default or Disabled. If you
click the status and select Custom, you’ll be able
to navigate to the sound file of your choice.
Once onboard sound is working, you can play
music directly from just about any USB MP3

22 THE COMPLETE LINUX MANUAL


INSTALLING UBUNTU

player. We used an old Tevion 512MB


MP3 player packed with music ripped
from CDs by Windows Media Player.
Plug your MP3 player into a USB
port on your Ubuntu PC. A dialog box
will open to explain that the operating
system has recognised the connection
of an MP3 player. It will also ask if
you’d like to open the Banshee Media
Player. Click OK and the Banshee
application will open.
When it first runs, Banshee may complain
that codecs are required to play the contents of
the connected MP3 player. Click OK to search for
these online. After a few moments, a dialog box
will open offering a choice of two codecs: one for
audio file formats and one for video. When you
tick the box next to each codec, you’ll be asked
to confirm that you want to install it. Click the
Confirm button each time. Finally, press Install.
You’ll need to enter your system password to
confirm the changes, after which Ubuntu will
download and install the necessary files.
Ubuntu makes it easy to
Once installed, your MP3 player’s track add a printer directly or use
listing will appear in Banshee’s main window. one shared by a Windows
PC, but there are still driver
Try playing a song. The MP3 player also appears issues for older models READ THE SMALL PRINT
on your desktop and you can open it in Banshee Unfortunately, some printers – especially older
by right-clicking on it. Before disconnecting the or less popular models – aren’t supported
MP3 player, right-click on its icon and select by Linux. Printers require proprietary drivers
Unmount Volume. If you don’t do this, you’ll risk if an operating system is to access all their
corrupting its contents. The same applies to any features, and Linux drivers don’t exist for
Connect an MP3 player
external storage device. and you can play its contents
certain models. Fortunately, however, many
using Banshee Media Player printer manufacturers have made considerable
efforts to provide Linux drivers for current and
some of the more popular older models.
It’s wise to find out whether your printer is
supported before you plug it into your Linux
PC. You’ll find an active database of supported
printers at www.linuxprinting.org. Click on the
Printers link on the left of the page and enter
the make and model. The ranking system runs
from three penguins for fully compatible to no
penguins for incompatible or ‘paperweight’
printers, as the database calls them.
If your printer isn’t listed, or if it’s listed
as a paperweight printer but uses PostScript,
you should find a PostScript Printer Definition
(.ppd) file on your printer’s original driver CD,
which will tell Ubuntu all it needs to know. To
load this file, plug in your printer, click on the
Ubuntu logo, type printing and hit Enter. A
dialog box should appear showing your printer;

THE COMPLETE LINUX MANUAL 23


CHAPTER 2

double-click on the printer’s name and another SCANNER TIME


box will open giving its details. Using a scanner in Linux has also become much
Next to Make and Model, it should say easier, and the Simple Scan scanning application
that it’s a generic printer. Click the associated – which is installed by default in the Graphics
Change button and another dialog box will section of the Applications desktop menu –
open. Select Provide PPD file and insert your should detect your scanner automatically.
printer’s driver CD. If you press the button Plug your USB scanner into your Ubuntu PC
marked None, a file browser window will open. and run Simple Scan. The application will probe
Browse to and select the .ppd file on your CD the PC’s USB ports for connected scanners. It
and click OK. may think there are two instances of the same
If you’d prefer to use a printer shared by a scanner, but it should be safe to select the
Windows PC, you can, provided that there’s default option and use that.
a suitable Linux driver available. From the When the main Simple Scan user interface
desktop’s System menu, select Administration, opens, there are a few things to note. It may be
Printers and click New in the dialog box that set up to read binary data from the scan, which
appears. Select ‘Windows printer via SAMBA’ reduces the image from full colour to black
and click Browse. This brings up a Windows and white. If it is, click the Document, Scan
Workgroup browser window. Browse to the PC menu and select Photo to scan in colour. This
with the shared printer and select it. Click OK adds the controls for manipulating full-colour
followed by Forward, and you’ll see the familiar images to the interface. You may also find that
printer driver installation window. Select the scanned images appear grainy. If so, increase
make and model of your printer and, when the DPI setting from the default of 300 in the
you finish the wizard, you should be able to Documents, Preferences menu.
print to the shared printer.
If your printer isn’t a supported model, there CAMERA ACTION
isn’t much else you can do short of writing your Webcams are ubiquitous these days, and Ubuntu
own driver. However, remember you can always has dedicated applications for shooting, editing
save your documents to a Windows share and and applying special effects to your images
print them from a Windows PC. It’s a cop-out, and video clips. We’re using an old Logitech
You can scan images but printing is the last great stumbling block in QuickCam Express camera. Because it’s a USB
directly into GIMP, the
standard Linux image-
Linux and it’s getting easier all the time. device, using it should be as simple as plugging
manipulation program it in and installing a suitable application.
First, select Ubuntu Software Centre from the
Launcher. Type ‘cheese webcam’ into the search
box. Press Enter and the program will bring up
a list of webcam programs. Click the Cheese
Webcam Booth application and click Install.
After the program downloads and installs
Cheese, select the graphics section of the
Applications menu. When Cheese runs, it will
display a live image. It can record a video or
take a still snapshot from the webcam. You can
also apply several trippy effects to the video
stream by clicking the Effects button. Vertigo, for
example, produces an effect that wouldn’t look
out of place on Top of the Pops circa 1973.
Ubuntu also has access to plenty of video-
editing applications. PiTiVi is a good substitute
for Windows Movie Maker and contains
everything you need to edit your movies. It also
renders the final cut ready to be burnt to DVD
with a program such as DeVeDe, which is also

24 THE COMPLETE LINUX MANUAL


Virtual Private
Servers
128MB RAM
5GB Disk
50GB Bandwidth
£8p m
Reliability need not
come with a high price
We do not cut any corners when it
comes to providing a quality service

1 MONTH

FREE
*

JUST QUOTE
LINUX

Your VPS is hosted on servers near to London (Spectrum House),


San Jose (California, USA) and Frankfurt (Germany), on some of the
fastest networks in the world. Feel free to ping or download sample
files from any of our servers.

Friendly support staff are available to help you get up and running with
any Linux distribution of your choice.
Virtual
Private Servers
Virtualisation technology is provided by Xen, a well proven solution for
managing virtual private server isolation and partitioning of physical

v a il ab l e i n t he resources.
a
UK, USA, Each Linux VPS has its own dedicated RAM and hard disk space. This is
not shared with anyone and is not oversold.
GERMANY Your choice of Linux distribution and full root access, including tun/tap
and iptables on your hosting package.

[email protected] l gigatux.com
Virtual Private Server Hosting • Web Hosting • Linux Specialists
* This offer is available on any VPS package lasting at least three months
CHAPTER 2

the shared title bar at the top right of the screen.


With the vast majority of devices you won’t need
any specific drivers, as they’re already built
into Ubuntu. When you want to connect to a
Bluetooth device, click on the icon and a dialog
box will appear with options for setting the
visibility of your PC. You can choose to make it
hidden, visible or visible for a short while after
being plugged in. For now, make it visible.
After making sure your Bluetooth phone is
turned on and its Bluetooth service is enabled
and visible to other devices, press the button on
the dialog box marked with a plus sign. A wizard
pops up to add the phone. Click Forward and the
Bluetooth device should appear in the list. Select
the phone and click Forward again. The wizard
will connect to the device and ask you to enter a
security PIN to establish that it has the correct
device. On the phone, add the Ubuntu machine
to its list of devices and enter the same PIN.
Ubuntu has plenty of video-
editing software, including Your phone is now ready to take advantage of
PiTiVi, which is similar to bundled with Ubuntu. You can run this directly any Bluetooth management software you install.
Windows Movie Maker
from the Applications menu or search for it by Your phone will also automatically connect to
clicking on the Ubuntu logo. your Linux PC when in range.
Linux’s support for all kinds of popular
WIDE BLUE YONDER gadgets is becoming so good as to be virtually
Ubuntu has excellent Bluetooth support. If your transparent. If you’ve been frustrated using
PC lacks the necessary adaptor, connect a cheap older Linux distributions, now’s a great time
USB Bluetooth dongle to a spare USB port on to try again. Before you buy anything new, look
your PC and the Bluetooth icon will appear on for Linux support to make your job easier.

Close call Working with the BlueProximity utility


BlueProximity is a useful utility that locks
Ubuntu when you (or a Bluetooth phone
paired with your PC) move away from it, and
unlocks it again when you return. You can
install it from the Ubuntu Software Centre on
the desktop’s Launcher. It runs automatically
when you boot the PC, placing a small icon on
the title bar at the top of screen.
Click on the icon to open the Preferences
window, then click Scan For Devices to detect
your Bluetooth phone. Click Use Selected
Device, then select the Proximity Details tab.
Use the sliders to choose how far away you
must be from your PC before the screensaver
kicks in (go for three metres or thereabouts), BlueProximity allows your
Bluetooth phone to lock your
and how near you need be to turn it off. Walk screen automatically when
away with your phone to test it. you move away from it

26 THE COMPLETE LINUX MANUAL


CHAPTER 2

Installing software
Although Ubuntu is packed with programs, you can easily add more.
Here we’ll show you how to bring your system to life

veryone knows how to install how to keep your system up to date and upgrade

E software in Windows: just double-


click the setup program and answer
a few questions. If that sounds
simple, you’ll be amazed to discover that adding
your version of Ubuntu without losing any data.

DECISION TIME
Click Software Centre, which is located in the
programs to a Linux system is even easier. Launcher. This allows you to browse a large
In many cases, you won’t even need to archive of software. Across the top of the
download the software yourself, because interface, you’ll see the View pull-down menu,
Linux’s software-management system knows which enables you to filter the programs lists.
where to download it from. In other words, Select ‘All applications’ (some of which are
Linux does the hard work for you. closed source) to show everything, or choose to
One of Linux’s major advantages is that it see Canonical Maintained Applications to see
grants you easy access to a huge library of free programs certified for Ubuntu.
applications, ranging from astronomy tools to You can also search the names and
virtualisation programs that let you run Windows descriptions of applications for keywords. This
or other operating systems inside Linux. These means you can find a program that does a
programs are pre-built and ready to install. Here Installing software into particular job even if you don’t know its actual
Ubuntu has never been easier
we’ll show you how to do this, and also explain – all you need to do is point
name. In fact, you can sometimes generate a
at the application and click long list of programs that deal with a certain
subject. For example, entering ‘graphics’ and
hitting Enter brings up a long list in the right-
hand pane. You can sort the list by clicking on
the column headers.
Sometimes you know the type of application
you’re looking for in broad terms. Look in the
left-hand pane and you’ll see several categories.
When you click on one, the right-hand pane will
fill with the software available in that category.
If you click on the first (‘All’), you’ll see a full list
of all available applications.
To install an application, simply click the
tickbox to the left of its name. If the software is
closed source, a pop-up message will ask you
to confirm that you want to install it. When you
install software in Ubuntu, you can click on as
many applications as you like. When you click
the Apply Changes button at the bottom right,
you’ll be asked to confirm the list of programs
and to enter the system password, which is the

28 THE COMPLETE LINUX MANUAL


INSTALLING UBUNTU

Synoptic Package Manager


provides access to a wealth
of other software, but it’s still
easy to use

one you use to log in. The applications are then press Enter. The full list of Apache 2 packages
added to the system one after the other. will appear in the main pane. Tick the box next
to the ‘apache2’ entry. This ‘metapackage’ brings
PACKAGE HANDLING together all the packages upon which the main
The list of applications available may seem application will rely. If any other packages are
extensive to some people and restricting to required, a dialog box will appear asking you to
others. If you’re in the latter group, don’t despair. confirm that they should also be installed.
There’s a galaxy of software available with the The tickboxes on all the packages to be
Synoptic Package Manager. This is the main installed change to show an arrow wrapped
choice for experienced Ubuntu users, because around them. To begin installing Apache 2, click
it gives access to individual packages. It also the Apply button. A dialog box will ask you to
provides direct access to server software for confirm the actions to be taken. Click the Apply
advanced Linux users. The Package Manager button again and Synoptic Package Manager
software does a lot of work in the background will begin downloading the latest versions of all
to ensure that everything installs properly. the packages and install them. This should take
You can find The Synoptic Package Manager around a minute or so. If you now point your
by clicking on the Ubuntu logo and typing in web browser at http://localhost, you should
‘Synaptic’. The Package Manager is near the see a web page served from the newly installed
bottom of the resulting menu. Run it and click Apache 2 web server exclaiming, “It Works!”
the Reload button. This contacts Ubuntu’s
website and re-reads the list of available MOVING ON UP
packages. The number of categories that appear Once you’ve installed a package, the Synoptic
in the left-hand panel are larger than those listed Package Manager will be able to help you when
by the Add/Remove applications utility. However, it’s time to remove or upgrade it. The tickboxes
using Synoptic Package Manager is just as next to the installed packages should be green,
simple. To demonstrate it in action, we’ll show indicating that they’re installed properly. If
you how to install the Apache 2 web server, after you click one, a context menu will give you the
which we’ll show you how to uninstall it. option of re-installing it (which is useful if you
First, select All in the left-hand categories make a mess of things while configuring it) or
pane, type ‘apache2’ into the search box and uninstalling the package completely.

THE COMPLETE LINUX MANUAL 29


CHAPTER 2

minutes. Occasionally, you’ll need to reboot


the system after updating certain packages –
notably, those to do with the Linux kernel.
You have several options for upgrading to a
new version of Ubuntu. You can download a disc
image (ISO) from a peer-to-peer service or from
Ubuntu’s own website, and then burn the ISO file
to a DVD and boot this to begin the installation
process. However, you can also upgrade Ubuntu
from within the Gnome desktop itself, thereby
saving you time and the cost of a DVD.
Before deciding to upgrade, make sure your
favourite third-party applications will work with
the new version of Ubuntu. If not, you could be
left waiting until someone builds them for the
new version. Check the software maintainer’s
download page for the latest version.
When a new version of Ubuntu is released
and you’re ready to upgrade, run the Update
Manager. Its icon is near the bottom of the
The Update Manager
allows you to apply patches
Administration menu, which can be found
to Ubuntu quickly and easily using the launch bar’s System menu. You may
recognise the Update Manager as being the
same window that pops up when you opt to
You can also upgrade packages. When an apply system updates.
upgrade becomes available for one of your At the top of the Update Manager, you’ll see
packages or applications, open the Synoptic a message announcing that a new version of
Package Manager and hit the reload button. Find Ubuntu is available. Click the Upgrade button
the package you want to upgrade and click its and a window will open, displaying release notes
tickbox. Click the upgrade option and hit the that explain the features of the new distribution.
Apply button, just as you did when installing it. Click the Upgrade button on this window and
The procedure for removing a package is Ubuntu will download its upgrade tool and work
much the same as for installing it. In Synoptic out which packages to install.
Package Manager, simply select the package After completing this process, you’ll be told
you want to remove from the system by clicking how much data will be downloaded; when we
on its tickbox. Hit the Apply button and a dialog tried this, we had to download a few hundred
box pops up asking you to confirm your actions. megabytes to upgrade from version 10.10 to
Choose Apply on this box and the package will
be removed from the system.
Upgrading Ubuntu is a
pain-free process, but it takes
UPDATING UBUNTU about an hour to complete

From time to time, Ubuntu publishes updates


that fix bugs, improve functionality and fill
security holes in the operating system and its
installed packages. When this happens, you’ll
see a red arrow or orange star on the title bar
at the top of the Gnome desktop. Click this and
Ubuntu’s Update Manager will open.
This lists all the available updates. Click the
Apply button and enter your system password.
The Update Manager will download the relevant
updates for your system, which can take a few

30 THE COMPLETE LINUX MANUAL


INSTALLING UBUNTU

the system so that they work properly. There’s


nothing to do now but wait until the process
completes, which can take up to an hour.
After the installation process is complete,
the upgrade tool will ask if you want to delete
all obsolete packages from the system. Select
Remove to free up some disk space.

BEST OF THE REST


Finally, you can take some control over system
updates and package installation. From the
Administration menu on the launch bar’s
System menu, select Software Sources. This
brings up a box with several tabs. The first is
for installing Ubuntu software.
On this tab, click the Download from pull-
down menu and select Other…. This brings up
a dialog box that enables you to select a new
download server. However, you can have Ubuntu
You can exert some control
over the system update and find the fastest server automatically by pressing
11.04. You’ll also be told how many packages package installation process, the Select Best Server button. Ubuntu contacts
such as finding the fastest
will be installed and how long it will take to download server each update server in turn and selects the one
download everything given the speed of your with the best response time. When it’s finished,
broadband connection. When you’re ready, close press Choose Server to finish the procedure.
all other applications and click Start Upgrade. You can also define when to check for updates
A progress bar will keep you informed of the using the Updates tab. Use the pull-down menu
amount of time left and how many packages in the Automatic Updates section of the tab to
have been downloaded. Once downloaded, the decide how frequently to check for updates. It’s
upgrade tool performs all the tasks required usually fine to leave it on every day, and most
to install the new packages and to reconfigure updates don’t require a reboot.

Pack it in Installing Debian packages


It used to be a nightmare to install packages
in Linux, but that’s all changed thanks to a
raft of excellent graphical desktop tools.
Ubuntu is based on the Debian distribution
of Linux, so it can easily install any .deb
packages you download from the internet. By
default, this process is handled automatically
by the GDebi package manager.
Take Sun’s free VirtualBox virtualisation Installing Debian
packages for your version
software (www.virtualbox.org/wiki/Downloads). of Ubuntu is handled
There are different versions available, and automatically by GDebi
the one you need depends on the processor
in your PC and the version of Linux you’re
running. There are versions for five different to using GDebi. Once the file is downloaded,
kinds of Ubuntu, in fact. GDebi will run. Hit Install Package and enter
If you visit the VirtualBox website and try your system password, and the installation
to download it, Firefox will ask which package process begins. Who said installing software
manager to use to open the file. It will default in Linux was difficult?

THE COMPLETE LINUX MANUAL 31


CHAPTER 3

32 THE COMPLETE LINUX MANUAL


Getting to
know Linux
If you’ve been following the previous chapters and have already
installed Ubuntu, you should have a fully working computer and be
familiar with the desktop. In this chapter, we’ll dig a little deeper
into the operating system and show you how to use the desktop,
copy files and customise the look and feel to suit your own tastes.
You’ll also learn how to transfer files to Ubuntu from your old
computer, both over a network and by using removable storage
devices such as memory cards and USB flash drives.
Finally, we’ll show you how to create new user accounts so that
several people can share one computer, and explain how to change
your logon options, allowing you to choose whether to enter a
password or not.

Getting started 34
Sharing files between Linux and Windows 38
Transferring files to your new computer 42
Configuring Ubuntu 46
Creating user accounts 50
Using the Launcher 51

THE COMPLETE LINUX MANUAL 33


CHAPTER 3

Getting started
Allow us to guide you through your first steps with this
powerful, free operating system

ow that you’ve installed Ubuntu Linux. Within minutes, you’ll be doing the same

N Linux, the next step is to explore


the interface and find out how to
perform tasks that were second
nature to you in Windows. Here, we’ll give you a
things you were doing in Windows, and hopefully
finding that life’s even smoother.
Many of the options you’ll need are available
via the launch bar, which is similar to Windows’
whistle-stop tour of the default Gnome desktop, taskbar. This is a narrow area that runs across
which is what you’ll be looking at if you installed the top of the screen. It displays a number of
Ubuntu using the default options. We’ll explain clickable icons and text links. The left-most
how to perform common tasks as easily as you option is the Ubuntu logo along with a text label
did in Windows, if not more so. that reads Applications. This is the equivalent of
Using a new operating system can be a the Windows Start menu. If you click it, a drop-
scary business. To start with, you don’t know down menu appears showing a list of programs
where anything is, so even just running a you can run. Click on the System menu, which
simple program can be tricky. Tasks such as appears further to the right of the launch bar,
customising the look and feel of the interface, and you’ll see the sort of options you find in
searching for files or writing data to a DVD may Windows’ Control Panel.
seem distant goals. Over the next few pages, There’s a wealth of free,
we’ll show you how to get started with Ubuntu well-supported open-source
software for you to install, and
INSTALLING AND RUNNING
it’s easy to do so APPLICATIONS
Click Applications on the launch bar to access
the programs that were installed when you
first set up Linux. These will be listed in a
number of different categories. Move the
mouse over a category to open it, and left-click
on an application once and it will run.
To add a new application, click Software
Centre on the Applications menu. A three-paned
window appears. In the left-hand pane, you’ll see
the categories available. Select one, and a list
of applications appears in the main pane. Pick
one, and its description appears in the lower
pane. You can select one or more programs
to install by clicking the tickboxes. Then press
Apply Changes. After you’ve been given a final
chance to change your mind, you’ll be asked to
enter your password. Ubuntu will download the
latest relevant packages and install them. Your
new programs will now be available from the
Applications menu.

34 THE COMPLETE LINUX MANUAL


GET TING TO KNOW LINUX

After a short wait, you’ll be able to view video


footage on YouTube.

CHANGING SCREEN RESOLUTION


Changing the screen resolution is simple. On
the System menu, select Preferences. Near
the bottom of the menu, you’ll see the Screen
Resolution option. When you select this, a
window will open displaying a pull-down menu
of resolutions and monitor frequencies that your
hardware supports. Simply select one and press
Apply, and the resolution will change.
A slight glitch affects certain machines when
changing from a lower resolution to a higher
one. It may seem to have no effect, but logging
out and back in again automatically picks up the
correct resolution. In other cases, you may be
unable to use a resolution higher than 800x600.
If you see a small green icon at the top-right,
Many popular sites such
as YouTube rely on Adobe’s hover over it. If you see a ‘Restricted drivers
INSTALLING FLASH PLAYER Flash Player to work properly available’ message, click it and choose the
To view YouTube videos and get the most out recommended graphics driver. Click the Activate
of many other sites, you need Adobe Flash button and the driver will be installed, thereby
Player. If you visit YouTube using your web enabling higher display resolutions.
browser, you’ll see a link to Adobe’s site. Follow
this and select .deb for Ubuntu 8.04+ as the CUSTOMISING THE DESKTOP
software type. Then click Agree and Install Now. To change the desktop wallpaper, right-click
In the pop-up, click OK. This opens the file using on the desktop and select Change Desktop
the package installer. Press Install Package. Background. A window will pop up showing a

Changing your passwords Tough to crack, easy to remember


It’s important to use secure passwords and Make sure you change
your password regularly
change them regularly. This is especially true if
you use Ubuntu on a laptop. This method will
help you create easily remembered passwords
that are very tough to crack.
Think of a song or poem you know well.
Take the initial letter of each word in the first
two lines. Turn each vowel (except ‘u’) into
the number that physically resembles it, so
A=4, E=3, I=1 and O=0. So the first two lines
of All Things Bright and Beautiful gives you
4tb4b4cg4s. There’s no way a hacker could
guess this, and it’s also easily remembered.
To change your password, select About Me
from the Preferences menu. Press Change
Password, enter the current password and
press Authenticate. Enter and re-enter your
new password and press Close.

THE COMPLETE LINUX MANUAL 35


CHAPTER 3

selection of pictures. Press the Add button to Right-click it and select Properties. You can
bring up a file selector that gives you the chance set its height in pixels and whether it appears
to add your own pictures to the list. Select one as a centralised bar or stretches the width of
from your collection and press OK, and it will the screen, as well as if it should be hidden
become your new wallpaper. automatically. You can also choose to display
You can open this window another way if you manual hide and show buttons (which is
prefer. Click on the System menu and choose useful if you don’t use the auto-hide feature).
Preferences and Appearance. You’ll see a Click the Background tab and you can set
number of tabs. Click the Theme tab, and you’ll the launch bar’s transparency.
be able to change the overall theme Gnome You can also add gadgets and applications
uses, just as you can in Windows. By selecting a to the launch bar. Right-click it and select Add
theme and pressing the Customise button, you to Panel. Choose from the list of available
can change the shape of the borders, colours options. For example, you can add the Network
and so on. If you click on the Fonts tab, you can Monitor to see your IP address and the amount
set up the look and feel of these, too. of network traffic processed. Select Application
You can also install downloaded themes. Launcher… and click the Forward button. Choose
The Gnome website has a theme area (http:// a category, click the triangle button to expand
art.gnome.org/themes) that contains an ever- the list and select a program. Press Add. Finally,
growing list of free themes. Select a category, you can move gadgets and applications around
browse until you find one you like and then click the launch bar by right-clicking and pressing
the download link. Save the file (it’s saved to Move, or delete them by choosing Remove.
the desktop by default) and press Install Theme.
In the subsequent file selector, navigate to the USING THE HOME FOLDER
desktop (stored in your home folder) and select Click the Places menu on the launch bar. The
the theme file, and it should install. first few entries are standard folders set up
during installation. These are in your Home
CUSTOMISING THE TASKBAR Folder, the equivalent of My Documents in
You can customise the Gnome launch bar in Windows. Left-click once on your Home Folder
more ways than you can the Windows taskbar. to open the file browser window.
As in Windows, right-clicking allows you to
create a new folder, rename it and delete it.
Get your mouse responding
the way you like and your You can also increase and decrease the size of
Ubuntu experience will be the icons. Furthermore, Gnome remembers the
more positive
various zoom levels that you set for different
folders. Across the top of the folder window,
you’ll see several icons that represent steps in
the path from your home folder down to the
current subfolder. This enables you to navigate
and move files quickly. Simply drag and drop
the file on to one of these icons. To delete a file,
right-click it and select ‘Move to the Deleted
Items folder’. You can find this on the right end
of the launch bar. If you click it, you can get rid
of all deleted files, delete individual items and
restore them, just as you can in Windows.

FINDING THINGS
To find a file or folder, click Places and select
‘Search for files’. Enter a snippet of the filename
into the field called ‘Name contains’. There
are more options available if you click on the
triangle next to ‘Select more options’.

36 THE COMPLETE LINUX MANUAL


GET TING TO KNOW LINUX

You can add extra search criteria, such as the


number of days since modification, the owner
or the file size. You can also search the content
of files. Use the Available Options list to select
a criterion and press Add. The list builds as
you add and remove options. Press Find, and a
list of files matching your requirements should
appear. Right-click on a result to open it, open
its location or delete it.

EXPLORING THE NETWORK


NEIGHBOURHOOD
Ubuntu has excellent support for Windows
shared folders. Make sure you have at least one
folder shared on a Windows PC on your network.
Click Places and select Network. The window
that appears will show an icon called Windows
Network. Double-click this to see its contents;
you should see the Windows workgroup.
Gnome supports multiple
Double-click this to display a list of PCs with desktops, which is very useful
shared folders. If you double-click one, you’ll You can switch quickly between workspaces for organising your work

see the shared folders themselves. Click on by holding down Ctrl-Alt while pressing the left
one of these and you’ll see the shared files. or right cursor key. The icon at the top left of
all windows gives you the same options as in
MAKING MOUSE ADJUSTMENTS Windows (Restore, Minimize and so on), but
If you’re used to slow mouse movements in also allows you to move the window between
Windows, the speed at which Ubuntu initially workspaces, as well as allowing you to display it
moves the pointer may be too fast. You can in front of all other windows each time.
easily slow it down. Click on the System menu
in the launch bar and select Preferences. Then WRITING FILES TO DVD
click on the Mouse category. In the subsequent Trying to save files to optical media in Windows
window, pull the acceleration slider to the left can be a deeply frustrating experience. In
and test the mouse until it moves the way you’d Ubuntu, it’s easy. Simply insert a blank DVD or
like. Finally, click the Close button. CD and wait for the system to open a window
asking which application you’d like to use. Leave
CHANGING BETWEEN DESKTOPS the selection on Open CD/DVD Creator and
Ubuntu supports multiple desktops called press OK. Drag and drop the files you want to
workspaces. These let you switch between virtual save into the subsequent file browser window.
monitors, which is an excellent way to jump Then enter a name for the disc and press Write.
between lots of programs. On the second launch That’s all there is to it.
bar at the bottom right of the screen, you’ll see
two small boxes: one brown and one grey. These KEEPING UP TO DATE
represent the default two workspaces. Each time you log in, the system contacts
Right-click on them and select Preferences. Ubuntu’s servers for updates to its installed
You can then select the number of workspaces packages. If there are any, it displays a small
you want, rename them (by double-clicking on speech bubble on the launch bar that you click
a name in the list) and stack them rather than to start the update. Press Install Updates on the
displaying them in a line. If you select ‘Show pop-up window and enter your password. Ubuntu
workspace names in switcher’, the names will asks for your password this way whenever you’re
appear on the toolbar; by default, you use Desk about to change the system. Enter it, and the
1. If you click Desk 2, Gnome displays a second system downloads and installs the updated
view of your desktop. packages. You may be asked to reboot.

THE COMPLETE LINUX MANUAL 37


CHAPTER 3

Sharing files between


Linux and Windows
Your home network probably includes more than just your Linux PC.
Here’s how to share files between Linux and Windows systems

hances are that you have at least Linux may use a file system that’s

C one Windows PC at home in addition


to your Linux system, and it makes
sense to share files and folders
between them. Fortunately, this is easy to do
incompatible with Windows, but sharing
files over a network is different: both Linux
and Windows use the SMB protocol for file
sharing. This means that a file is read from
in Ubuntu, because Linux has the same file- the Windows or Linux hard disk, sent using the
sharing protocols Windows uses. Over the next mutually compatible SMB protocol and saved
few pages we’ll show you how to share files and to the receiving computer’s hard disk in the
folders easily. native format. Consequently, Linux is a simple

You have to install the


sharing service to share files
and folders

38 THE COMPLETE LINUX MANUAL


GET TING TO KNOW LINUX

If this happens, you can either rename the


Linux folder so it has fewer than 12 characters,
or you can change the Share name, which is
basically the way network computers see the
folder, leaving the Linux folder name intact. The
second option is the easiest. In our example,
we’ve shortened the share name to ‘docs’. You
can add a description of the shared folder in the
Comment box, but this is optional.
There are two more options to select. By
default, every folder you share is read-only, so
other people won’t be able to modify existing
files or write new ones. Click ‘Allow others to
create and delete files in this folder’ if you want
to allow read and write access. If you don’t
want people to have to type in a username
or password, select ‘Guest access’. When
you’re done, click Create Share. Depending on
the choices you make, you may see a dialog
The sharing service will
be downloaded and installed box telling you that permissions need to be
operating system to integrate into your network. automatically changed, in which case you should click ‘Add the
All the tools you need are built in, so it’s quite permissions automatically’. Your shared folder
easy to share files and folders between Linux will now have a red arrow and a green arrow
PCs and Windows PCs. above it, indicating that it’s being shared.
Before you can access your shared folder
SHARE AND SHARE ALIKE from another computer, you need to know a
In principle, sharing a folder in Linux is exactly few details about your Linux computer. First,
the same as it is in Windows. You can share to find out the Host (computer) name, open a
pretty much any folder you like. To create Terminal window, either by typing ‘terminal’
and share a new folder, first click on Places, into the search box or by going to More Apps,
Documents to view your documents folder, Accessories, Terminal. Type ‘hostname’ and
then right-click and select New Folder. Give the make a note of the name of your computer. Next,
folder a suitable name, such as My Shared Files, you need the IP address. Type ‘ifconfig’ and
and press Enter. press Enter. The first reply (probably eth0) is
To share the new folder, right-click on it and your network card. Note down the number after
Create a new folder to
select Sharing Options. Click the ‘Share this contain your shared files in
‘inet addr’, which should be akin to 192.168.0.3.
folder’ box and you’ll see a dialog box informing the normal way
you that the sharing service isn’t installed. Click
the ‘Install service’ button, type your password
in the next dialog box and press OK. The sharing
service will then be downloaded and installed
automatically. You’ll be prompted to restart, so
click the Restart session button.
Once you’ve logged back in to your computer,
go back to your new folder, right-click on it and
select Sharing Options. Tick the ‘Share this
folder’ box and the other options will no longer
be greyed out. At the bottom of the dialog
box you may see a message telling you that
the share name is too long – this is because
shared folders are allowed a maximum of just 12
characters in their names.

THE COMPLETE LINUX MANUAL 39


CHAPTER 3

If you want to access the shared folder from


your Windows PC on a frequent basis, you can
right-click it and select ‘Map network drive’. You
can then select a drive letter. From this point on,
the shared folder will appears as a normal drive
in Computer, giving you quick access to it.

ACCESSING SHARES FROM LINUX


Accessing a shared folder from a Linux PC is
easy. We’ll assume you’ve already shared some
folders on your Windows computer. To access
them from a Linux system, you need to know the
Use Sharing to share a
folder with other computers
computer name and, preferably, its IP address.
on your network To get the computer name, go to your
Windows computer, right-click Computer and
select Properties. The name will be listed on
If you want to change the name of your that page. To get the IP address, bring up a
computer, you can do so by typing ‘sudo command prompt, type ‘ipconfig’ and press
gedit /etc/hostname’ and pressing Enter. Enter. Make a note of the IPv4 address.
In the document that appears, replace the On your Linux computer, click on Places,
existing name with the one you want. Network. Double-click Windows Network; you
should see your Windows computer listed here,
CONNECTING VIA WINDOWS so double-click it. If it isn’t there, click Places,
Once you have all this information, you can Connect to server and change the Service type
connect to your Linux computer from a to Windows share. Type the name of your PC
Windows PC. Your Linux computer should into the Server box and then click Connect. If
appear automatically in Windows if you click this doesn’t work, you should be able to type in
on Computer, Network, but this doesn’t always your Windows PC’s IP address instead.
work. If it doesn’t, it’s best to connect directly. In both cases, if you’ve turned on password-
Press Windows-R to bring up a Run command protected sharing, you’ll be prompted to type
You need to know the
and type ‘\\<name of your linux computer>’, name and IP address of
in your Windows username and password. You
and if that doesn’t work, type ‘\\<IP address your Linux computer
of your Linux computer>’. The problem with
the second method is that, unless you’re using
a static IP address, a computer can change its
address but its name won’t change.
Once your Windows PC has connected to
your Linux computer, you can see all the shared
folders. Double-click on one to open it. If you
didn’t turn on Guest mode, you’ll be prompted
for a username and password. Type in your Linux
username and password to access the folder.
Click ‘Remember my credentials’ to save the
password for the next time you wish to access it.
You can now drag and drop files from this
shared folder to your computer. If you allowed
people to write to the folder, you can also
rename, create and copy files and folders to the
share. You can change the permissions you set
earlier by following the steps above or, if you
want to stop sharing the folder, untick the ‘Share
this folder’ option.

40 THE COMPLETE LINUX MANUAL


GET TING TO KNOW LINUX

You can create bookmarks


to commonly accessed shares

should also set the domain name to


the name of your Windows PC. You
can choose to remember the password
until you log out (the default setting),
Accessing a Linux share
forget the password immediately or from a Windows PC is just
remember it forever. When you’ve made your Unlike Windows, Linux doesn’t have network like accessing a Windows
shared folder
choice, click to see the available shares. Double- drives. Instead, it has bookmarks, which perform
click the one you want to access and you’ll be a similar function. To add a bookmark for a
able to access the files. The permissions you set shared folder, follow the process described
on the Windows PC will dictate whether you can above to access a share, then click Bookmarks,
only read files or write them as well. Add Bookmark. When you restart your computer,
the bookmark to the shared folder will remain.
CONNECTING ELSEWHERE You can view it by bringing up a Nautilus File
Connecting to other Linux computers is just Browser window (do this by clicking Places,
as simple as connecting to a Windows PC. To Home), where you can view your bookmarks in
do this, click Places, Connect to Server. Select the bottom-half of the left-hand panel.
Windows share, type the name of the Linux You may occasionally see an error where
computer to which you want to connect in the the bookmark renames itself as SMB; if this
Server box and click Connect. When you access happens, right-click on it and select Rename,
a share and are prompted for a username and then type in a useful name.
password, you have to type in a valid username You can also create a bookmark when
and password on the Linux computer to which you connect to a computer using the Places,
you’re connecting. Note that you don’t need to Connect to Server dialog box: just tick the ‘Add
change the domain name. bookmark’ box and type in a bookmark name.

THE COMPLETE LINUX MANUAL 41


CHAPTER 3

Transferring files to
your Linux computer
Now Ubuntu is up and running, you’ll want to transfer your
documents and media to the computer. Here’s how

ow that your computer is set up

N just the way you want it, you can


hopefully already tell that Linux feels
considerably quicker than Windows.
It should shut down faster and boot up in just a
few seconds.
However, you probably have lots of files from
your old Windows PC that you want to transfer
to your new one, such as documents, music,
photos and videos. Alternatively, you may need
to copy files from an external hard disk or USB
flash drive to which you’ve backed up files. If
your computer has a memory card reader, you’ll
also want to be able to transfer files from the
card to your hard disk. Over the next few pages,
we’ll show you how it’s done.

CONNECTING OVER A NETWORK


You need to share folders
In most cases, your Ubuntu computer will be in Windows before they’ll be
connected to your home network by a network visible on the network

Your Wi-Fi network


should provide the correct cable or Wi-Fi. Somewhere on your network is
connection settings, but you likely to be a broadband router that allows you to
can alter these easily
share internet access between all the computers
on the network. This router will also allow PCs to
share files with each other, and this is one way
to transfer files to your Ubuntu computer.
Before you can do this, you have to share the
folders that contain the files you want to transfer
on the other computers on your network,
otherwise Ubuntu won’t be able to access the
files. In Windows XP, use Windows Explorer to
navigate to the folder you want to share, but
don’t open the folder itself. For most people, it

42 THE COMPLETE LINUX MANUAL


GET TING TO KNOW LINUX

Windows 7’s folder-sharing


options are a little different
to Windows XP’s, but it’s
still simple to share files
on the network

In Windows 7, you need


to enable several options
in the Networking and
Sharing Center before
folders can be shared

makes sense to share the My Documents folder. the Start menu will open it and show all the
Right-click on the folder and click Sharing and folders within it. From the Start menu, click on
Security. If you want to share a whole hard disk, Computer, then the hard disk on which Windows
you’ll need to tick the box next to the warning is installed (usually drive C:).. Click on the Users
that says “If you understand the risk but still folder and you should see a folder with the name
want to share the root of the drive, click here”. of the user account you want to share. Now you
On the Sharing tab, which should be visible, can right-click on it and share it as normal.
tick the box next to Share this folder on the Head back to your Ubuntu computer and
network. You can change the name of the folder click Network on the Places menu. You should
so you can easily identify it on your Ubuntu see a Windows Network icon. Double-click on it
computer. For example, you might change ‘My and you’ll see icons for each PC on the network.
Documents’ to ‘Jim’s Documents’ if you need Double-click on the one you want, and you may
to share the My Documents folders for multiple see a password window open. Enter the correct
users on the PC. Click OK, and Windows will username and password for the account in which
apply the changes. This could take several the shared folder is, and check the Remember
minutes if you have a lot of files within the folder. forever option before clicking Connect.
If you find that this doesn’t work, and you
HASTA LA VISTA To share your entire user get a message saying, “Unable to mount
folder in Windows, you’ll
For computers running Windows 7 and Vista, go have to navigate to it through
location”, there may be a firewall on the
to the Control Panel and click on the Networking Windows Explorer
and Sharing Center. Under the Sharing and
Discovery heading (in Windows 7, click Change
advanced sharing settings), click the downward-
pointing arrow next to both Network discovery
and File sharing. Set both so they are turned
on. If password-protected sharing is enabled,
you’ll need to know the user account name and
password of the Vista account in order to access
files over the network.
Next, as in Windows XP, head to the folder
you want to share. Right-click on it, choose
Share… and a window will open asking who you
want to share the folder with. Simply click the
Share button at the bottom, and you’ll see a
progress bar until all the files are shared.
If you want to share your Windows 7 or
Vista user folder, you’ll have to browse to it
through Windows Explorer, as clicking on it from

THE COMPLETE LINUX MANUAL 43


CHAPTER 3

If you need to find


your computer’s IP
address in Ubuntu, head
to Network Tools in the
Administration menu

If your Windows computer


requires a password, enter
the username and password
for the account to which the
shared folder belongs

Windows PC blocking access. This commonly


happens if you’ve installed a third-party firewall
such as ZoneAlarm, which blocks incoming switch between these using the drop-down menu
connections from computers on the local near the top-right corner of the File Browser
network by default. You’ll either need to disable window. You can select the files you want to copy
the firewall temporarily or add your Ubuntu in a number of ways:
computer to the list of ‘trusted’ IP addresses. 1 Click and drag your mouse to select a block
You can find the IP address by opening of files. Don’t click on a file, though, as this will
Network Tools from the Ubuntu search menu. simply move it around in the window. Instead,
Select the correct network adaptor from the click on an area of white space and make your
drop-down box next to Network device. If you’re selection cover the block of files you want.
connected by Wi-Fi, this will usually be wlan0, 2 If you want to select all the files in a folder,
but if you’re using a network cable, it will usually click Edit, then Select All. You’ll notice that, just
be eth0. Next to the IPv4 protocol, you’ll see as in Windows, keyboard short cuts are shown
your computer’s IP address, which you’ll need to on the right-hand side of the menu. For Select
enter into your firewall software. Now, you should All, the shortcut is Ctrl-A, which means that
be able to connect to the Windows computer instead of clicking on the Edit menu and clicking
without any problems. Select All, you simply press and hold the Ctrl
key and tap the A key.
VIEWING SHARED FOLDERS 3 To select some files but not others, hold down
When you’ve successfully managed to connect to the Ctrl key and click on each file that you want
the remote folder over the network, you should to select. Alternatively, if the files you want are
see all the files, just as you would if you were in a block, click on the first file, then hold down
sitting at the Windows computer. Ubuntu has the Shift key and click on the last file you want.
three views: Icon, List and Compact. You can Only the files between the first file clicked and

There are several ways


to select the files you want:
making a selection with your
mouse, selecting everything,
or selecting just some files

44 THE COMPLETE LINUX MANUAL


GET TING TO KNOW LINUX

Now you can simply select the files you want


from the remote computer using one of the
methods we’ve already described, then click and
hold on one of them and drag it to the right-
hand pane in the other File Browser. The mouse
pointer will turn into a hand, and you’ll see
outlines of the other files being taken with it.
Look out for the extra icon that appears to
the bottom-right of the hand before you let go
to drop the files. If it’s an arrow pointing to the
hand, the files will be moved rather than copied.
If you want to make copies of the files and leave
the originals in place, hold down the Ctrl key
before you let go of the mouse button.

EXTERNAL DRIVES
The process of transferring files from a USB
When you plug in a USB
storage device, its contents hard disk, flash drive or memory card is almost
last file clicked will be selected. You can use should automatically appear identical to the process we’ve just described
in a File Browser window,
a mixture of the Shift and Ctrl keys to select and a shortcut icon will for networks. The only difference is that when
several blocks of files. appear on the desktop you plug one of these storage devices into your
When you’ve selected the files you want, computer, a File Browser should automatically
either press Ctrl-C to copy them or choose appear showing the contents of the drive. A neat
Copy from the Edit menu. Navigate to the folder feature of Ubuntu is that a shortcut to the drive
on your Ubuntu computer to which you want will appear on the desktop so you can quickly
to transfer the files (you can open a new File access the drive while it remains connected.
Browser window; just head to the Places menu You can now select files and copy them to
and choose one of the folders there). Then your hard disk using the same methods as
choose Paste from the Edit menu or press Ctrl+V for transferring files over the network. Before
if you prefer to use keyboard shortcuts. unplugging USB flash drives, hard disks or
If you want to move the files rather than copy memory cards, it’s a good idea to hit the eject
them, choose Cut from the Edit menu when icon, which appears to the right of the drive in
you’ve selected them. However, this will work the Places pane of the File Browser window. This
Ubuntu will recognise a
only if you ticked the ‘Allow network users to USB drive or memory card,
helps to prevent files from becoming corrupted.
change my files’ box when sharing folders in just like Windows
Windows XP. This shouldn’t be a problem with
shared folders on Windows Vista computers, as
the default permission level is ‘Owner’.

WHAT A DRAG
Another way to transfer files, which may be the
easiest way for some people, is to have two File
Browser windows open on your desktop. One
window will show the files stored on the remote
computer, while the other will show the folder
on your local hard disk that you want to copy
the files to. To resize the File Browser windows
so they sit neatly side by side, simply hover
your mouse over the bottom-right corner of
each window until the cursor changes, then click
and drag until the window is the right size; it’s
exactly the same process as in Windows.

THE COMPLETE LINUX MANUAL 45


CHAPTER 3

Configuring Ubuntu
Everyone likes to customise their PC to their liking. Here we’ll show
you how to tweak Ubuntu’s themes and enable its special effects

n the same way that you can set The default themes are a little limited, so

I Windows’ wallpaper to an image of


your choice, you can do the same
in Ubuntu. You can also change the
theme so that the colour scheme, icons and
it’s worth installing some new ones. Leave the
Appearance Preferences window open and head
to the System menu again, but this time click
Administration, then Synaptic Package Manager.
windows are personalised to your taste. Enter your password, and the Package Manager
will open and update the list of packages. In
To see Ubuntu’s default themes, go to the the Quick Search box type ‘gnome themes’. You
1 System menu at the top of the screen, click should see the package list update and show
Preferences, then Appearance. You’ll find there gnome-themes-extras at the top of the list. Click
are 11 themes to choose from, and that Human on the grey square to the left of it, and then
is already selected. Click on any theme and it Mark for Installation in the menu that appears.
will be applied immediately so you can see how
it affects not only the window you have open, Click on the green Apply button near the
but the whole desktop, including the top and 2 top of the window, and you’ll be asked if
bottom bars. Some are more subtle than others. you want to mark additional required changes.
Clearlooks, for example, makes very minor This is simply saying that additional packages
changes to the icons and switches the default need to be installed or other packages need to
orange/brown colour to a light blue. However, be updated, so click on the Mark button. You
click High Contrast Inverse and the changes are should now see a progress bar showing three
much more noticeable. If you like a particular files being downloaded. Once this is complete,
theme, simply click the Close button and the click OK on the box that appears.
theme will remain applied.
You should see the new themes in the
3 Appearance Preferences window, so click
1 on them to find one you like. We’ve chosen
Nuvola here. Of course, if you don’t like any of
them, you can install more theme packages

46 THE COMPLETE LINUX MANUAL


GET TING TO KNOW LINUX

3 4 5

from the package installer. You can also click across both screens. Resizing an image so it fits
the Customise button at the bottom of the properly on your screen using the Gimp image-
Appearance Preferences window and modify a editing application (see page 60) is simple.
theme. You can change the look of the controls,
the colours, icons, window border and pointer. You’ll see three more tabs in Appearance
You can pick from the lists under each tab. 6 Preferences. Fonts allows you to change
the system fonts, while Interface lets you tweak
Even though you’ve now changed the menus and toolbars, so you can decide whether
4 theme, you still need to set a wallpaper, to show text labels under icons, beside them or
or background as it’s called in Ubuntu. In the not at all, for example.
Appearance Preferences window, click on the If you have a PC with a relatively modern
Background tab and you’ll see Ubuntu’s default graphics card – virtually all computers made in
backgrounds, plus the option of no desktop the past three or four years will –
background (the top-left thumbnail). then you’re more likely to want to
If you don’t like any of the images, you can try skip straight to the Visual Effects 6
a solid colour by clicking on the ‘no background’ tab. The default setting is Normal,
thumbnail. You can choose the colour by but we recommend selecting the
clicking on the colour swatch at the bottom of Extra setting. This turns on lots
the window. This opens another window with a of nifty effects that you’ll notice
colour wheel on it. Click on the eyedropper tool when doing mundane tasks such
to pick a colour from somewhere on the screen as dragging a window to another
– we’ve clicked on the title bar of the dialog box position or maximising a small
to choose its blue shade. You can click anywhere window. It’s effects like this that
on the colour wheel or inside the triangle to pick make Ubuntu a lot of fun to use. 7
your own colour.
One final tweak you may
If you’d prefer to use a photo or other 7 want to make is to adjust the
5 image, click the Add… button and browse sensitivity of your mouse. Head to
to where your image is stored. If you don’t yet System, Preferences, Mouse. This
have any pictures on your computer, see page 42 will open a window that lets you
to find out how to transfer all your documents adjust the pointer speed, double-
from your old computer to the one running click speed and more.
Ubuntu. Alternatively you could download a If you have a laptop with a
photo from the internet, or plug in a USB flash touchpad, there’s another tab
drive or memory card from your camera. Here with touchpad-specific options,
we’ve chosen a photo from an SD memory card. such as disabling it when typing –
If you have more than one monitor, it’s worth this prevents the cursor jumping
noting that Ubuntu doesn’t deal with the screens around the screen when you brush
separately, so the image will appear stretched the touchpad while typing.

THE COMPLETE LINUX MANUAL 47


1&1 – DOUBLE THE RELIABILITY

1&1 DUAL H DOUBLE SECURITY THROUGH GEO-REDUNDANCY


No one can afford downtime of their website. This is why 1&1 Dual Hosting
now offers ultimate security through geo-redundancy. This means your website
exists simultaneously in two of our high-tech data centres that are in two
completely different locations. If service in the first location is unexpectedly
interrupted, your site will automatically continue running in the second
location - without any loss of data.
NEW!
OSTING 1&1 DUAL UNLIMITED
■ 3 .uk Domains Included
■ UNLIMITED Web Space
■ UNLIMITED Traffic
■ UNLIMITED MySQL Databases (1 GB each)
■ UNLIMITED IMAP/POP3 E-mail Accounts
No other web host offers as much expertise, know-how and quality as 1&1: ■ UNLIMITED FTP Accounts
1&1 combines many years of web hosting experience with the latest technology in our ■ UNLIMITED 1&1 Click & Build Apps
high-speed and high-performance data centres. More than 1,000 IT professionals will (choose from 65 Apps)
continue to develop our top performance web solutions for years to come. ■ NEW: 1&1 SiteAnalytics
NEW: 1&1 is now the world‘s first web host offering double website security with ■ PHP5, PHP Dev, Zend, Ruby, SSI, Version
1&1 Dual Hosting. And all this at unbeatably low prices! Control Management (git)
■ NetObjects Fusion® 1&1 Edition or
Adobe® Dreamweaver® CS4*
Double security: ■ NEW: Geo-redundant Servers

Geo-redundant data centres! ■ 60-Day Moneyback Guarantee

Top performance: 1&1 DUAL


High-end servers! UNLIMITED
from

Superfast:
210 GBit/s connectivity!

Environmentally friendly:
£
12 .99 per month*

* Visit www.1and1.co.uk for full promotional


Powered by green energy! offer details. Prices exclude VAT.

Future-proof:
Over 1,000 in-house developers!

Call 0871 641 21 21 or visit us now www.1and1.co.uk

Calls cost 6p per minute from a BT landline, calls from other operators and mobiles may be higher.
CHAPTER 3

Creating user accounts


Creating separate user accounts for all the people who use your
computer has many benefits. Here’s how to do it

f you share your PC with several You can also set the type

I family members, it makes sense of account using the Profile 2


to create a user account for each menu. Ubuntu gives you
person. Creating separate accounts three choices: Administrator,
means that each user will have their own set of Unprivileged and Desktop
folders to store documents and media. user. You should only choose
Separate accounts also allow each person to between the latter two, as
customise the theme and background to their Administrator accounts give
liking. They can also put whichever shortcuts more access to the operating
and files they like on the desktop, which can system than is necessary for
otherwise become cluttered with everyone’s junk. a normal user, and can be
In Windows you can create multiple accounts a security risk, as the user
when you first install it, but in Ubuntu you have could delete crucial system 3
to do it via the Administration menu. files. Desktop user is the
best choice in most cases, as
Go to the System menu, Administration, this allows users to access
1 then Users and Groups (the final entry external storage devices,
in the list). This will open the Users Settings connect to the internet, use
window, but you’ll notice that the Add User CD or DVD drives and use
button is greyed out. You won’t be able to make the computer’s audio system.
any changes until you click on the key at the Unprivileged users can do
bottom of the window and enter your user none of these things.
password and click Authenticate.
You can change the
The buttons for adding and deleting users 3 privileges manually by clicking on the User
2 are now active. Click Add User and the Privileges tab. This lists the various tasks that
New user account window will open. Here you the user can or can’t do, but the only items you
can enter a username, real name and password. might want to change from the default Desktop
user profile is to allow a user to configure
printers and share files with the local network.
1 You can fill in the user’s address and phone
numbers on the Contact Information tab, but
this won’t usually be necessary. Settings on the
Advanced tab will be greyed out and should be
ignored. Click OK to close the window and add
the new account. You may have to enter your
password and click Authenticate to complete the
process. The new user will appear in the list, and
you can repeat the process for additional users.

50 THE COMPLETE LINUX MANUAL


1&1 DUAL HOSTING

Using the
Launcher
Keep your favourite programs and gadgets
to hand by customising the Launcher 1&1 DUAL BASIC
From
&
1
5 GB Web Space

he Launcher is the new way of interacting with


UNLIMITED Traffic
NEW: 1 MySQL Database
NEW: 1&1 SiteAnalytics
£ .99 per month*

T applications in Ubuntu, partially replacing the old 1000 IMAP/POP3


Task Bar and Applications menu. The Launcher E-mail Accounts
appears on the left-hand side of the screen,
although it slides out of view if you’ve got an application
maximised: just move the mouse to the left to bring it back.
1&1 DUAL PERFECT
1 .uk Domain Included From

£ .99
3
Right-clicking on an icon may give you new options for an
10 GB Web Space
application, such as Open a New Window in Firefox. If the
UNLIMITED Traffic
application isn’t always visible in Launcher, you can click Keep
NEW: 10 MySQL Databases
in Launcher to pin it there. This gives you a quick shortcut. per month*
NEW: 1&1 SiteAnalytics
3000 IMAP/POP3 E-mail
The icons are shortcuts to your Accounts
favourite applications. Icons
with white arrows next to them

.co.uk
denote running programs.
1&1 DOMAINS
starting at

£ .49
2
now only £2.49 first year

This icon launches the search


bar for documents. It gives
you access to your favourite
.biz
now only £3.99 first year
first year*

folders, thumbnails of recently


opened files and a search bar.
The All Files menu narrows a
HURRY – OFFER ENDS 30/06/2011!
search down to documents,
folders, images, audio, videos,
presentations or other. Click this to view
The icon above, with a Plus files you’ve deleted.
sign, does the same thing for * Visit www.1and1.co.uk for full
To delete files promotional offer details.
programs. You can also click the permanently, right- Prices exclude VAT.
Ubuntu logo at the top to open click on the basket
a search box for applications and select Empty Bin.
and documents combined.

Call
0871 641 21 21 www.1and1.co.uk

Calls cost 6p per minute from a BT landline, calls from other operators and mobiles may be higher.
CHAPTER 4

52 THE COMPLETE LINUX MANUAL


Basic desktop tasks
Once you’ve installed and configured Linux, you’ll want to start
using it. This chapter is devoted to showing you how to do all the
common tasks in Ubuntu that you can do in Windows.
Ubuntu comes with a wide range of preinstalled applications,
from the excellent LibreOffice suite to the comprehensive image-
editing program, Gimp. We’ll show you how to use these useful
tools, as well as how to achieve a host of other tasks, including
burning CDs and DVDs, watching movies and playing MP3s.

Using LibreOffice 54 Editing video 68


Burning CDs and DVDs 56 Playing DVDs 70
Connecting a digital camera 58 Playing music files with
Getting started with Gimp 60 Banshee 72
Improving your photos Connecting an iPod 74
using Gimp 62 Connecting an MP3 player 76
Organising your photos Synchronising a mobile
with Picasa 64 with Linux 78
Connecting a video camera Using Google Desktop 80
to your PC 66 Improving the look and
feel of Ubuntu 82

THE COMPLETE LINUX MANUAL 53


CHAPTER 4

Using LibreOffice
Ubuntu comes with a complete office suite that caters for your word
processing, spreadsheet, presentation and business graphics needs

f you’ve ever used an office suite easily disable it by going to Tools, AutoCorrect

I such as Microsoft Office or Works,


you’ll be right at home with
LibreOffice. In fact, you’ll be hard
pushed to tell the differences between Word,
Options… and unticking Enable word completion
on the Word Completion tab.
Another change you’ll probably want to make
is to prevent Writer from saving every file using
Excel or PowerPoint and Writer, Calc or Impress, the .ODT format. Head to Tools, Options… and
their LibreOffice equivalents. then click on Load/Save in the left pane. This
LibreOffice wouldn’t be much use if you will expand to show the General tab; click on
couldn’t save documents in a format that this and change the format in the Always save as
Microsoft Office users could open. Fortunately, box. A good choice is Word 97/2000/XP, but the
LibreOffice can save documents in many latest 2007 XML format is also there.
formats, so you can pick one that’s compatible
with the people you’ll be sharing it with. CALC
Calc is the application to use if you need a
WRITER spreadsheet, and is happy to open most Excel
Writer is almost indistinguishable from Microsoft spreadsheets without fuss. Whether you just
Word and has a very similar set of features. Writer mimics Microsoft want to create a basic sheet to keep track of
Word so closely that you may
Even the menus are organised in the same way, not even realise you’re not
a project’s costs or you need more complex
so you should be able to find all the commonly using Word
used function in seconds.
Since Ubuntu comes with the latest version
of LibreOffice, you’ll always get updates when
they’re released. However, few people will need
more features than Writer provides. In addition
to the usual text-formatting controls, you can
insert pictures, tables, videos, audio, headers
and footers.
As you’d expect, Writer includes spelling
and grammar-checkers, and you can also add
notes to a document; these appear in the margin
with the author’s name and a date. The Format
Paintbrush works just like Word’s: highlight some
text, click the Paintbrush icon and everything
you subsequently highlight adopts the formatting
of the text you originally selected.
By default, Writer’s word completion is
turned on. This predicts which commonly
used word you’re typing and automatically
displays it onscreen. If you don’t like it, you can

54 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

Not too many people will


need Draw’s vector drawing
capabilities, but it’s there if
you need it

Calc deals with all


your spreadsheet needs,
whether it’s a basic table
of information or complex
formulae that you need

formulae, Calc will be up to the job. There’s saving in .PPT format for the best compatibility.
a Function Wizard that helps you to build You can also export files as PDF files.
formulae, a Chart Wizard for graphs and a neat
Navigator pop-out window that helps you set and DRAW
return to specific areas on large sheets. Draw is most similar to Microsoft’s Publisher
As with Writer, there’s spelling and grammar- or Adobe’s Illustrator graphics packages. It
checking built in, and it’s easy to alter the page won’t be useful for everyone, but it could
settings before printing to fit a whole sheet on come in handy if you need to create a logo
a single page of A4, for instance. Also common or any other vector-based image.
across the suite of applications is a zoom control Vector images can be resized without losing
in the bottom right-hand corner. There’s also a quality. When you enlarge a JPG image, for
PDF button in the toolbar at the top so you can example, it can become blocky and lack detail.
export spreadsheets directly as PDF files, which With a vector drawing, the quality remains the
just about every computer can read. same no matter what size you scale it to.
Calc will save in .ODS format by default, so Draw has lots of tools for drawing shapes,
make sure you select a format that’s compatible lines and speech bubbles, and its interface
with anyone that needs to see the spreadsheet. shares the same design as Writer, Calc and
Microsoft .XLS formats are supported. Impress, so it’s fairly easy to find where things
are. If you need to draw a chart, you’re better off
IMPRESS If you’re familiar with
PowerPoint, Impress will be
using Calc, but Draw can do it if you have the
If you need to create a presentation, Impress is easy to use. It doesn’t mirror patience. As with the other applications, you can
every single feature of its
just as flexible as Microsoft’s PowerPoint. Built- rival, but still lets you create
export files as PDFs and preview before printing.
in templates mean you can follow the wizard clean, attractive slides
to choose a background you like, the transition
effects between slides – there are lots to choose
from – and whether you want slides to advance
automatically after a preset time.
Once your basic presentation is created,
there are lots of slide layouts from which to
choose, and you can add text just as you would
in PowerPoint, by typing directly on to the slide.
You can also easily insert charts, images, movies
and audio clips into slides.
Impress has several different views of each
slide, one of which lets you add notes below a
slide for printing it out on A4 paper. There’s also
a Handout tab so you can print nine slides per
sheet to give to your audience.
Impress saves files in .ODP format unless
you change the default settings. We recommend

THE COMPLETE LINUX MANUAL 55


CHAPTER 4

Burning CDs and DVDs


Brasero is Ubuntu’s built-in disc-burning application and it offers a
range of easy-to-use options. Here’s how to use it

reating data discs and audio CDs Click Add and the files will be added to the

C is easy with Brasero. The friendly 3 project. You can type a title for the CD in
interface has a selection of large the box at the bottom, and double-click on each
buttons that allow you to burn track to edit the information; useful if you have a
audio CDs and data discs, create video DVDs, CD player that displays text. You can split tracks
make direct copies of CDs and DVDs and burn using the knife icon in the toolbar, while the
ISO images of a CD or DVD. It can also erase pause icon adds a two-second pause after a track.
rewritable CDs and DVDs.
Click the Burn button in the bottom-right
HOW TO… BURN AN AUDIO CD 4 corner. The only option you may want to
Insert a blank CD-R into your CD writer change if you have problems burning discs is
1 and launch Brasero Disc Burner, which to reduce the burning speed to a setting lower
you’ll find by searching in the Applications than the default Maximum. Once you’ve clicked
menu. Click the Audio project button under the Burn, Brasero will make all the tracks the
Create a new project: heading. same volume (normalisation), write the CD text
information and then burn the tracks. When the
Add some audio files by clicking the green process is complete, the disc should eject and
2 + button and browsing to your music. will be ready to play.
Brasero supports any format for which you have
the codecs installed. Fire it up immediately after
you install Ubuntu and you’ll find it won’t even 3
support MP3s. To install a codec, simply search
for the formats you need in Synaptic Package
Manager and mark them for installation. When
this is done, choose the files you want to burn.
Ctrl-A selects all files in the folder, or click on
the first one you want, hold Shift and click on
the last to select a block of files.

1 2
4

56 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

1 2

HOW TO… BURN AN ISO IMAGE


There are often times when you’ll want to
burn a CD or DVD from an ISO image you’ve
downloaded, perhaps when a newer version of
Ubuntu becomes available or you want to install
another Linux distribution. Brasero can handle
this with the minimum of hassle.

An ISO image is like a ZIP archive of all


1 the files on a CD or DVD. When you burn
an ISO image, the files contained within it are
written to the disc in the correct folder structure.
Download the ISO image that you want to burn, All that’s left to do is click the Burn button.
then launch Brasero and click the bottom-most 4 Brasero will display a progress bar telling
button, Burn image. you long is left and what is being written to
the disc. When the disc is burned, it should
Insert a suitable disc for the size of the automatically eject from the drive, unless you
2 image to be burned into your CD or DVD unchecked that option.
writer. Usually, the size of the ISO file is the It’s a good idea to write on the disc so you
size of the disc you’ll need. As we’re burning a remember what’s on it, but it’s now ready to use.
Ubuntu 11.04 disc, we’ll need a CD-R or CD-RW, In this case, the disc is bootable, so it can be
as the ISO file is 699MB. popped into the drive of the computer on which
The Image Burning Setup window will appear. we want to install Ubuntu. If you do the same
You’ll need to select the ISO image, so browse to but find the computer doesn’t boot from the
the folder or drive where it’s located. CD, you may need to enter your PC’s BIOS
to change the order of boot devices, making
Now, click the Properties button. You sure the CD or DVD drive is the first, or at least
3 can alter the burning speed here, but comes before the hard disk.
it’s advisable to choose a speed less than the
maximum rated speed of your disc only if you
find there are errors when you burn the disc. 4
You can choose to leave the disc open – so
that more files can be added later – but as
we’re leaving just 3.9MB of free space, there’s
no point in this example. If your CD or DVD
writer supports a ‘burnproof’ mode (which
most do), ensure that this box is ticked.
Finally, click the Close button.

THE COMPLETE LINUX MANUAL 57


CHAPTER 4

Connecting a
digital camera
Before you can edit your photos, you need to transfer them from your
digital camera. This is as easy in Linux as it is in Windows

inux has come a long way since it

L was first created. It’s now just as


friendly towards multimedia devices
such as digital cameras as Windows
is. In this guide we’ll show you how to connect
your digital camera to your computer and
download your photographs.

USING A CARD READER


One of the easiest ways to download pictures to
your PC is to use a USB card reader, just as you
would in Windows. These simple devices cost
around £10 for a reader that will work with pretty
You may need to change
much every camera format in the world. Make your camera’s mode for your
sure that your format is supported before you computer to recognise it
buy, remembering that you need a device that
will support SDHC if you use SD cards larger
than 2GB in size. your digital camera. This, too, is very easy to
Other than that, it couldn’t be do, but there are some things you need to look
A USB card reader is an
easier. You simply plug in the easy and convenient way to out for first. To start with you should check the
card reader into your computer transfer pictures from your modes that your camera supports. Many modern
digital camera
and Ubuntu will recognise it digital cameras can be set to be recognised
immediately. When you plug in as either a mass storage or a Picture Transfer
a card, it will be recognised in Protocol (PTP) device.
a similar way to a USB disk, When set to mass storage, the camera is
allowing you to copy files from recognised by your computer as a standard
it using the File Browser; the USB storage device. PTP mode lets the
memory card will be listed on computer know that it’s a camera that’s been
the left where all your other connected. We tested both modes and found
drives are listed. that Ubuntu supports them both, so you
probably won’t need to change anything;
IMPORTING FROM however, if you’re having problems, we
YOUR CAMERA recommend changing your camera’s mode.
The alternative method is to We typically set our cameras to use PTP, as
download pictures directly from this is slightly easier to use with a computer.

58 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

You can choose how you


deal with image files when
you connect a digital camera
to your PC

The thumbnail previews


help you manage which
pictures you want to copy
from your camera

GETTING CONNECTED
Plugging your camera in is as simple as display RAW images from our Nikon D80 DSLR.
connecting the provided USB cable to your All you have to do is select the images that you
computer and camera, and then turning your want to copy. Pressing Ctrl-left-click lets you
camera on. Depending on the make and model select individual images; using Shift-left-click
of your camera, you can also select the PC selects a range of images.
mode, so that the camera knows it will be When you’re happy with your selection, click
transferring images to a computer. Import Photos. Your pictures are copied to your
Once connected, a window will pop up Pictures folder and sorted into folders by year,
onscreen telling you that you’ve just inserted a date and then day.
medium with digital photos. You then need to When you’re ready, click Copy to start copying
choose what application to launch. the images from your camera to your hard
Here you have two options: the Shotwell disk. Depending on the size of your memory
photo manager or Open Folder. The latter card, the size of the images and the number of
option lets you access the camera directly photos, this process can take anything from a
and manually copy files from it. We prefer the few seconds to a good few minutes to complete.
Shotwell Photo Manager option; select this and Once the process has completed you’ll get a
click OK. success message and then are asked if you want
to delete the pictures from your camera.
SHOTWELL
Shotwell will start and display a window with a IMPORTING PICTURES
list of photos on your camera, complete with a When you’ve completed copying files from
thumbnail preview. The software supports pretty your digital camera, the photos will be stored
Once you’ve imported your
much every major image format and could even photos, you can edit them in
on your computer. You can then edit them
Shotwell Photo Manager and organise them using Gimp (see page
60 for more information). Alternatively,
you can view them in Shotwell. To do this,
click Last Import to view all your recently
imported files or click Library to view all the
image files on your computer.
You’ll now be able to see thumbnails of all
your photos. Double-click on an image to open
it up in the photo editor. Here you can view the
image full-screen, adjust its colour, straighten
and crop it and remove red-eye effects. If you
need to make only a few basic changes, these
tools will probably be enough for you. However,
they’re fairly simplistic; Gimp (see page 60) is
a far more capable image-editing application,
while Picasa (see page 64) enables you to
organise your photos into searchable libraries.

THE COMPLETE LINUX MANUAL 59


CHAPTER 4

Getting started
with Gimp
It may have a funny name, but Gimp is a powerful photo-editing
application, and it comes free with Ubuntu

f you can look past the unusual over the past few years. In fact, the three-

I name, Gimp is an excellent image-


editing package. Its interface isn’t
quite as easy to use as Adobe’s
Photoshop Elements, but it has improved hugely
separate-window approach makes it much
more like the full-blown Photoshop, and
there are lots of features that will keep even
enthusiastic photographers happy.

This is the main window and Click this button to show the
shows the photo you’re editing. undo history.

This is where you’ll


find the bulk of the
Layers let you work
tools, including
on different parts of
selection, scaling and
an image without
perspective, cloning,
affecting the rest
blur, sharpen and
of it, a little like
smudge. There’s even
transparencies on
a Healing Tool, which
a projector; placing
can automatically fix
several on top of each
blemishes.
other will result in an
image being projected
on the wall. In this
The brush options case, the final image
let you choose the is the one in the main
shape of the brush, its window. You can show
size and opacity, and or hide a layer by
a number of other clicking the eye icon.
advanced settings.

The zoom control lets you zoom in and out of The brushes palette can be switched
the image. Selecting 100% shows you the actual for patterns or gradients by clicking
pixels that make up the image. the respective icon at the top.

60 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

You can undo changes by


using the Undo History and
clicking on the point just
before you made a mistake

You will have to install Gimp from the Ubuntu LAYING IT ON THICK
Software Centre, as it’s not installed by default. Layers are a powerful way to edit photos. You
It loads quickly, but doesn’t automatically ask if can load multiple photos as different layers of
you want to open a photo. You can either drag the same image, but you’re unlikely to want to
a photo from a File Browser window or use the do this. Only the photo in the top-most layer will
File, Open… menu. be visible unless you make it more transparent.
Be careful when dragging images into Gimp This will then let the layer behind show through,
if another image is already open as, by default, creating an effect likely to be ghastly.
Gimp will add a new layer to the existing image There are many uses for layers, one of which
and plant the new photo on top of the old one. is to create high dynamic range photos. This is
The quickest way to zoom in and out of a where you load the same photo shot at different
photo is to hold down Ctrl and roll your middle exposures: one underexposed, one correctly
mouse wheel up or down. You can also use the exposed and one overexposed. By blending the
magnification box at the bottom, or click on the three together and erasing portions of each layer,
magnifying glass icon in the tool palette and you can create some striking results.
click and drag on the area you want to zoom to. Each new layer uses up more of your PC’s
memory, so if you find that Gimp feels sluggish
ROLLING BACK THE YEARS as you have lots of layers in your image, you
If you think you’ve made a mistake and want to may need to upgrade your computer’s RAM.
go back to a previous version of your photo, click
on the yellow arrow near the top of the Layers TOUCH-UP JOB
palette on the right. This switches the view from Layers may be interesting, but for the most part,
Layers to Undo History; to switch back, click on you’ll probably want to improve photos in order
the stack of white frames, or press Ctrl+L. to print them, send them to friends and family
In the Undo History, you’ll see all the changes or post them on the internet after a party, for
you’ve made to the photo. Each time you make example. On the next two pages, we’ll show you
a change, the list is updated with a small icon how to use Gimp’s tools to turn a rather flat-
showing the change and a description of the tool looking photo into something that looks as if
or effect used. Just click on any entry in the list. you’ve got real photographic flair.

THE COMPLETE LINUX MANUAL 61


CHAPTER 4

Improving your photos


using Gimp
For the first-time user, Gimp’s interface can be a little overwhelming.
These brief tutorials will guide you through using the main tools

imp may not be the easiest photo the shade is darker than the outside of the eye.

G editor to use, but it is one of the


most powerful. It gives you much
more control over your photos than
programs such as Picasa.
You can adjust the hue if necessary to match
the actual colour of the subject’s eyes, but once
zoomed back out, it’s unlikely anyone will notice.

Press Ctrl-Shift-A to deselect the eye and


DEALING WITH RED EYE 4 you’ll see that it’s looking reasonably good.
There are bound to be photos in your collection Now repeat steps 2 and 3 for the other eyes
in which the subjects are suffering from red in the image. Finally, change the zoom level to
eye. Otherwise great photos can be ruined by 100% using the drop-down box at the bottom
laser-red eyes staring out at you. It’s caused of the window, and you can admire your skilful
by the light of the camera’s flash reflecting off work. Don’t forget to save the image before
the subject’s retinas, and you’ll almost always moving on to the next one.
see the effect in photos taken indoors at night.
Fortunately, red eye is easy to remove using
Gimp, and should take only minutes. 1 2
Start Gimp and open the photo you want
1 to edit. Our shot was taken in a restaurant
at night, and we used a compact camera with its
flash turned on. Both subjects’ eyes have that
devilish look, which we’ll need to address.

Zoom into the first eye you want to tackle,


2 to around 400 per cent magnification. Use
the lasso tool (third from the left on the top row 3 4
of tools) to draw a circle around the offending
area. If necessary hit Enter to complete the
selection. Then hold the Ctrl key and select the
white highlight in the middle of the eye, as we
don’t want to adjust this portion.

In the Tools menu, click Colour Tools, then


3 Hue-Saturation. Drag the Saturation slider
to the left, and also the Lightness slider, until

62 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

Now we need a little saturation boost, so


1 2 2 open the Hue-Saturation tool from the
Colours menu. Drag the Saturation slider a
little to the right – depending on your camera’s
processing you may need more or less than the
+15 we’ve applied here.
If you want to increase the saturation of
individual colours – say, green for grass or blue
for skies – just click the white circle next to the
colour you want and adjust the slider for each
one you want to modify. If you make a mistake,
3 4 just hit the Reset button.

If the Levels adjustment hasn’t given you


3 quite enough contrast, you can add it
easily with the Brightness-Contrast tool, which
again you’ll find in the Colours menu. Simply
adjust the Contrast slider until you see the
desired result.

Sharpening your photos is always a good


4 idea, as digital cameras tend to err on the
ENHANCING YOUR SHOTS side of caution and leave images a little soft.
This shot, which we took in the Lake District, Gimp’s Unsharp Mask tool is excellent for doing
almost didn’t make it into our ‘Best images’ this. You’ll find it in the Enhance section of the
folder after sorting out the good ones from Filters menu. Move the preview window to an
the not so good. However, despite its flat area of the image that shows fine detail and
appearance, we could see it had the potential to toggle the Preview tick box on and off to see
be great. Gimp came to the rescue and allowed the difference the default settings make. Don’t
us to enhance it. Here we’ll show you how to use oversharpen an image, or you’ll cause unwanted
Gimp’s main retouching tools. artefacts to appear.
Now the image is looking good, and we’re
Open the image in Gimp and head straight finished with the retouching. It’s a good idea
1 for the Levels tool, which you’ll find in the to save a copy rather than saving over the top
Colours menu. This opens a window that may of the original photo. This means you can start
look daunting, but it’s worth getting to know again from scratch if you decide you don’t like
as it’s one of the most effective tools in Gimp’s the changes you’ve made.
arsenal, especially for injecting contrast into
lifeless shots such as this one. The histogram
shows a representation of
the intensity of pixels in the
image. At the left are very
dark pixels, which become
progressively lighter as you
move to the right. Drag the
left-hand arrow inward until
it’s in line with the start of
the rising curve. This deepens
shadows. On the right, grab
the white arrow and drag it left
to the point the graph trails off.
This brightens highlights. BEFORE AFTER

THE COMPLETE LINUX MANUAL 63


CHAPTER 4

Organising your
photos with Picasa
Google’s photo-management software is hard to beat, and it works
well in Linux. Here we’ll show you how to use it

ometimes, there are better

S applications for a job than Ubuntu


provides. Shotwell photo manager
isn’t bad, but Google’s Picasa can do
a whole lot more, and it has a slicker interface.
If you already know the Windows version
of Picasa, you’ll be pleased to hear that it’s
identical in Linux, since it uses Windows
Emulator (or WinE). To download Picasa, go to
Picasa has a friendly
http://picasa.google.com/linux and click on the interface that’s easy to get
large download button. We’ve chosen the beta to grips with
version 3, but you can install 2.7 if you prefer a
more stable program. Make sure you download
the .deb file for Debian/Ubuntu, and choose the sudo dpkg -i /tmp/picasa_2.7.3736-15
appropriate version for your operating system: _i386.deb
i386 for 32-bit or AMD64 for 64-bit.
There are various ways of installing Picasa, Picasa should now install, and you’ll find it by
but the easiest is to double-click the file on your searching for it in the Applications menu. Load
desktop and see if it installs. If it fails, copy the it, and it will automatically scan your disks for
file to the /tmp folder and hit Alt-F2 to open a photos. You should then see something similar
command prompt. Type in this command: to the screenshot (above). If it hasn’t found your
photos, you can import them using the Add
Folder to Picasa… option in the File menu.
There are several ways to
install Picasa. Downloading Picasa can monitor folders and add new
and double-clicking the .deb photos when they’re copied to those folders. To
file is the easiest method
choose which folders Picasa monitors, use the
Folder Manager, which is under the Tools menu.

STARTING TO USE PICASA


As you’ll see, Picasa is split into two main panes:
a folder list and thumbnails of the images in
each folder. In the bottom-right corner is a
zoom slider that lets you change the size of the
thumbnails. The shuttle control on the right
doesn’t work like a normal scroll bar: the more

64 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

Folder, along with left and right arrows to move


between them. To return to the library view, just
click Back to Library on the left.

SHARING PHOTOS
You’ll probably want to show others your photos
at some point, and one way is a slideshow. If
you’re in the Library view, you’ll see a little green
play arrow at the top-left corner of each Album
or Folder. Clicking it will display a full-screen
slideshow. Move your mouse to display the
hidden menu at the bottom of the screen. This
lets you pause the slideshow, set the interval and
transition between photos, and even rotate them.
Hit Esc or click Exit to return to the Library view.
Picasa also lets you share photos with distant
You can enhance your
photos with ease in Picasa. friends and family using Web Albums. There’s a
you move it higher or lower, the faster Picasa There are tools for cropping, link to Web Albums in the top-right corner. You’ll
straightening, removing red
scrolls up or down through your photos. This is eye and adding effects need to create a free Google account if you don’t
handy when you want to scan through a folder already have one. Once you’re signed up and
slowly to find the image you’re looking for. logged in, you’ll be able to use the Sync to Web
Just above the Folders list is an Albums list. toggle button at the top-right of each Folder or
These are collections of pictures that can be Album to upload the photos to the web.
stored in multiple folders on the disk. Albums When you click the button, Picasa will ask you
make it easy to view your favourite photos from what size you want the photos to appear, and
an occasion, without having to copy them to a whether to make them public, unlisted (hidden)
separate folder. To create an Album, click New or require a password to view them. Click the
Album… in the File menu. Type a name for it, Change Settings… button to make your choices.
and you can then drag and drop photos into it When the photos are uploaded, you can click
from the thumbnails you see on the right. on the View online link to see how your photos
look in your web browser. Alternatively, you can
IMPROVING YOUR PHOTOS click the Share button to invite people to view
Picasa doesn’t just allow you to organise your the photos. This will open a window where
photos; it lets you enhance them, too. Picasa is Full-screen slideshows
ou can enter email addresses. These will
what’s called a non-destructive photo editing make the most of your auto-complete if the person is one of your
photos, and Picasa lets
application, which means that it doesn’t touch you decide the interval and
Google Mail contacts.
the photos stored on your hard disk. Instead transition between images
it saves the changes you apply to the photo
and combines these with the original photo to
display your edited version.
Double-click on a photo to open it in the
viewer/editor. You’ll see three tabs on the left:
Basic Fixes, Tuning and Effects. These allow you
to crop and straighten photos quickly. It’s very
easy to remove red eye or apply auto contrast
and colour. Under the Effects tab you can turn
colour photos to black and white, increase
saturation, or apply effects such as soft focus.
There’s none of the fine control offered by Gimp
(see page 62); everything here is a quick fix.
Above the photo you’re tweaking are
thumbnails of other images in the Album or

THE COMPLETE LINUX MANUAL 65


CHAPTER 4

Connecting a video
camera to your PC
Linux is perfectly capable of editing your video files. Here we’ll show
you how to transfer your files from your camcorder to your PC

onnecting your digital video camera

C to Ubuntu should be pretty easy, as


the operating system has built-in
support for camcorders. However,
there are some areas that could give you
problems. Before we start, we’ll talk you through
the difficulties that you might face.
There are two types of video camera
that you’re likely to want to connect to your
computer: MiniDV and modern flash storage
models. In short, MiniDV models will be very
tricky to install. Many require a FireWire port to
connect to and a specific driver to be installed.
It’s not impossible to work around the problem,
but you’re likely to run in to a number of
Modern flash-memory or
difficulties when doing so. Our advice is to hard-disk-based camcorders
keep a PC running Windows handy for are easy to connect to Ubuntu CONNECTING YOUR CAMERA
connecting this kind of camera. Depending on the type of camera that you own,
If you have a flash-based or hard-disk-based you’ll have a choice of connection methods. If
camcorder, things are a lot easier. In this your camera uses removable storage, such as
section we’ll show you how to connect this an SD card, you can use a USB card reader.
type of camera and copy files from it to your Ubuntu recognises these devices in the same
Ubuntu computer. way as Windows does. All you have to do with
a card reader is take the memory card out of
your camcorder and plug it in to your card
Select Open Folder to view
your camcorder’s files reader. The card will become available in
Computer from the Places menu. All you have
to do is copy the files that you require from it.
If your camcorder uses internal memory
or a hard disk, or you don’t have a memory
card reader, your only option is to plug in
your camcorder using USB. In our experience,
camcorders can use a weird and wonderful
collection of USB cables, so remember to use
the one that came in the box with your camera.

66 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

Digital cameras may offer multiple connection


modes, such as the Picture Transfer Protocol
(PTP), but video cameras only have one: mass
storage. All you have to do is plug your camera
in via USB and it will be recognised as a flash
storage device. If you have photos stored on your
camera, using its stills mode, as well as videos,
you’ll see a dialog box telling you that “You
have just inserted a medium with digital photos.
Choose what application to launch.”
The default option will be the Shotwell photo
manager. Don’t select this option; instead select
Before you can play a
Open Folder and click OK. video file, you may have to
Alternatively, you can view your camcorder’s install an additional codec
files by clicking on Computer from the Places
menu. You can then browse your camcorder
as though it were any other folder or storage
device. Any videos that you find can simply be
copied from the device to your hard disk by
dragging and dropping.

VIEWING FILES
Before you start editing your videos (see page
68), you may want to check the files first and
delete any that you don’t want to use. Ubuntu
can play back most file types, and we had
no problems with 1080p HD video files from
our Samsung camcorder. However, some HD
cameras have been known to use strange
You can preview your video
formats, so you may need to search the files and just keep the ones
Ubuntu forums for help. worthy of being edited the gstreamer0.10-ffmpeg H.264 codec. Select
To view a file, simply double-click it and the the default option and click Install.
Totem Movie Player will start. By default this Once the codec has been installed, you’ll
player doesn’t have a lot of video codecs (the be able to preview your video. The software
software used to display a video file) installed, doesn’t always get it right, so if the picture looks
but it can detect automatically what it needs to squashed, select 16:9 from the View, Aspect
install. When you first try to play a file you’ll see Ratio menu. This should fix the video and make
an option to install additional plugins, such as it look right. Once you’ve previewed your clips,
you can simply delete the ones you don’t want
and save the others to be edited.
You can browser your
camcorder’s files just like any Installing the codec also means that
other folder or storage device supported videos will automatically have a
thumbnail image generated in the file browser.
This is similar to the way in which Windows
handles video files. It makes it easy to see
quickly what you’ve got and always select the
right clip without having to preview it first.
Once you’re happy with the files that you’ve
copied from your camcorder, you can edit them
in the package of your choice. We’ve got more
details on how to do this in our guide to video
editing with Kdenlive on the following page.

THE COMPLETE LINUX MANUAL 67


CHAPTER 4

Editing video
Want to cut out the chaff from your video footage before uploading
it to YouTube? We’ll show you how using Kdenlive

ou may have noticed that Ubuntu started work on programs for this purpose.

Y doesn’t come with an application


to edit video. That’s because it’s
only recently that developers have
Currently, the best choice is Kdenlive, but as it’s
still an unfinished project, you may experience a
few bugs and crashes. However, as long as you

The render button. Click this when you’re Drag an effect from the list on to The project monitor shows the
ready to export your finished movie in a a clip to add that effect. You can whole movie, but you can switch
format that your player is compatible with. add multiple effects to each clip it for a view of the current clip
and adjust their properties with by clicking on the Clip Monitor
the Effect Stack tab on the left. tab below.
Click the Add Clip
button to import video
clips from your hard
disk, memory card
or directly from your If you make a mistake,
video camera. you can use the Undo
History to jump back
to the point you want
These are the video to restart from.
clips in your project.
They can be added to The zoom control lets
the timeline as many you see more detail
times as you like. when you need to
adjust and edit clips
more precisely.

These two waveforms


The Razor tool lets
represent the left and
you split video clips
right audio channels
into multiple chunks
in each video clip.
while on the timeline.

The playback marker shows the


current position in the movie.

The selection tool is used for


There are two clips on the timeline. The tracks work like layers
dragging and trimming clips on
in photo-editing software. Video on top will obscure clips below
the timeline.
unless the top video is transparent or occupies part of the frame.

68 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

1 2

3 4

regularly save your work, you can just reload the Trim clips by hovering your mouse over the
application and carry on. 3 left or right edge of it and, when the cursor
As Kdenlive’s interface is relatively complex, changes, drag the clip to the desired point. If you
it’s worth spending a few moments acquainting want to add transitions, you’ll need to overlap
yourself with the various elements and controls. clips in adjacent video tracks. Right-click on one
To install Kdenlive, use the Synaptic Package of the clips, hover over Add Transition and then
Manager, under Administration in the System choose Dissolve from the menu that appears.
menu. Search for kdenlive in the Quick search
box, and mark it for installation. Accept the You can add a title to the start of your
extra packages needed when asked, and allow 4 movie by clicking the down arrow next to
the installation to complete. You’ll find Kdenlive the Add Clip button and choosing Add Title Clip.
under Sound & Video in the Applications menu. Using the text tool (the icon with the letter T on
it), type in the title you want, changing the font,
Copy any video clips from your camcorder size and colour as appropriate. You can move
1 to your hard disk. You can’t work with clips it around using the X and Y controls at the top.
stored on the camera itself or on a memory card, Click OK and then drag the title from your clip
as they are too slow. Start up Kdenlive and click list to the beginning of track 0.
the Add Clip button. Browse to the folder where You can now click the Render button to
you’ve stored your clips, select the ones you save your movie in whatever format is most
want and hit the Open button. appropriate. You’ll find lots of presets in the
Destination drop-down menu. To save to a DVD,
Clips may take a few minutes to be indexed, choose DVD, then PAL 16:9 VOB (assuming your
2 and until they are they’ll be greyed out. video camera is widescreen). Tick ‘Open DVD
Once this is done, drag clips one by one on to the wizard after rendering’ and you’ll be able to burn
timeline into track 1. Order the clips as you like. a DVD with the resulting MPEG file.

THE COMPLETE LINUX MANUAL 69


CHAPTER 4

Playing DVDs
Using your computer to watch movies and videos is easy with
Ubuntu. All you need to do is download and install VLC

buntu comes with Totem Movie watch movies. You may already be familiar with it as

U Player, but due to licensing laws


in certain countries, it can’t play
commercial, encrypted DVD movies.
Don’t worry, though, as it’s simple to install the
it’s also available for Windows and Mac OS X, and it
looks and works identically under Linux.
It supports more than just DVDs, however. In fact,
it can play MPEG2, MPEG4, H.264, DivX and MPEG1
excellent VLC media player. video formats, as well as MP3, OGG, AAC and other
You can install the MPEG2 codec required to audio files. You can even use it as a media converter
play DVDs, but installing VLC is an easier way to or for streaming video across a network.

Double-click on the
Menus are self- video to make it
explanatory, and full screen. Another
many functions can double-click will
be accessed quickly return it to a window.
by right-clicking on
the video itself.

Drag the bar to


jump to a point in
the movie. Hover
Click and drag on
your mouse over
the volume control
the handle to
to increase or lower
display the time.
the volume.

Controls let you play


and pause the move,
jump to the menu or The extended settings
go to the next or button lets you tweak
previous chapter. audio and video effects.

70 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

1 2

HOW TO… INSTALL AND USE To play a DVD, insert the disc into your
VLC MEDIA PLAYER 4 drive and wait until it is recognised. A pop-
Open the Synaptic Package Manager by up window may appear asking you to select how
1 searching for it in the Applications menu. to open the Video DVD. We recommend choosing
Enter your password and then type vlc into Open VLC media player and ticking the Always
the Quick search box. The first result should perform this action box, before clicking OK.
simply say vlc. Right-click on the grey square
to the left of the result and choose Mark for The DVD should play automatically, but if it
installation. A window will appear asking you 5 doesn’t, choose Open Disc… from the File
to approve additional downloads; just click menu. A slightly bewildering window will open,
the Mark button. but you can simply click the Play button.

The package files will be downloaded and You can now use the menus with your
2 then installed. Once this is complete, you 6 mouse, selecting scenes or playing
can close the Package Manager. You’ll find VLC the movie from the beginning. To play video
media player has been added to the Applications files stored on your hard disk or an external
menu under Sound & Video. USB device, simply browse to the file using a
File Browser window and drag it on to VLC’s
A warning will appear asking for your interface. As VLC supports most video formats,
3 authorisation to download CD covers, it should play your file. To play high-definition
track information and check for updates. files, you’ll need a reasonably powerful
Choose your preferred option from the menu computer. If yours isn’t up to the job, you may
and click OK. The minimal VLC player will open. see stuttering video or no video at all.

4 5 6

THE COMPLETE LINUX MANUAL 71


CHAPTER 4

Playing music files


with Banshee
Ubuntu’s built-in music player lets you organise your music, create
playlists and listen to podcasts and internet radio stations

anshee Music Player is the default Specific tab. Select Audio CDs from the Source

B application for importing music,


replacing Rhythmbox. If you prefer
Rhythmbox you can install it from
the Ubuntu Software Centre. We’ll focus on
menu. Under Import Format select MP3 (Lame
Encoder), then click Edit. Select the Bitrate that
you want to use. We recommend a minimum
of 192Kbit/s, but 320Kbit/s will give you higher
Banshee in this guide, which is a powerful quality audio that rivals that of the original CD.
media manager that you can use to rip your To rip an audio CD, simply insert it into your
CDs to MP3 format. computer’s optical drive. The disc will appear
Before you start, you need to install the in the left-hand panel of Banshee, and its name
necessary audio codecs. Click on Ubuntu and track title will be automatically downloaded
Software Centre from the Launcher and type from the internet. Simply right-click the CD and
Restricted into the search bar. Double-click select Import “Audio CD” to convert the tracks to
Ubuntu restricted extras and click Install. You MP3. A status bar at the bottom shows you how
can now start Banshee. far through the process it is. When it’s finished,
On the left, you’ll find a pane with your library you can remove your CD.
shortcuts, music stores and playlists. On the
right, when Music is selected under Library, IMPORTING OLD MUSIC
you’ll see three panes for artist, album and a The best place to store tracks that you already
track listing. These will be blank, of course, until have in MP3 format is in the Music folder,
you import your music collection. which you can access in Ubuntu’s Places
To import tracks from a CD, you need to set menu. To import your existing MP3 tracks,
your import preferences. Click on Preferences head to the Media menu in Banshee and choose
from the Edit menu, then click on the Source Import Media. Select Folders, then click Import.

The first job you need to


do in Banshee is import your
music collection

Banshee supports album


art and will show garish
visualisations when playing
tracks if you so desire

72 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

example, navigate to the Friday Night Comedy


podcast on Radio 4’s website and you’ll see an
RSS link. Click on this and copy the URL from
the address bar in your browser. Now, back in
Banshee, cright-click on Podcasts and select
Add Podcast. Banshee should download the
most recent episode automatically. You can
download other episodes simply by double-
clicking on them.

BLAST FROM THE LAST


Last.fm is a website (www.last.fm) that lets
you listen to music you choose for free, like a
personalised radio station. Visit the website and
sign up for a free account. Return to Banshee
and click on Last.fm then Account Settings.
Enter your username and password and you’ll
Playlists are easy to create
and are useful for listening to see Neighbour radio and Personal radio. The
Click on the Music folder in the left pane of the a variety of music latter sticks with artists you like, while the
window that opens and click Open. All your former also includes tracks from similar artists.
music will now be added to Banshee’s library.
You may have music in several formats (MP3, RADIO STAR
WMA and AAC, for example), and the codecs Banshee comes with a small selection of preset
for some of these formats may not be installed. stations, but you’re bound to want to add your
If they’re not, Banshee will ask if you want to own. As with podcasts, you’ll need to get the
search for the appropriate codec using Ubuntu’s URL of your chosen station before you can
Package Manager. Follow the instructions to add it. To add BBC Radio 2, for example, we
download any required codecs. searched on www.radiofeeds.co.uk and found
Radio 2’s address of www.bbc.co.uk/radio/
PLAY TIME listen/live/r2.ram. Right-click on Radio in
Once the importing process has finished, Banshee and select Add Station. Paste or type in
you can browse the library and play tracks the URL and click Add. It should now appear in
by double-clicking on them. Unless you want the Radio list. Just double-click any station that
Adding podcasts can be
to listen to a single track, you’ll want to use tricky as you’ll need to know
you’ve added to play it.
playlists. The simplest way to do this is to drag the URL of the feed
an entry from the Artist or Album panes to the
Play Queue on the left. Now click on Play Queue
to start the first track. Banshee will play all
the tracks in order unless you click the Shuffle
button at the top of the window.
Playlists are listed under Music in the left
pane and there are three pre-defined lists:
Recently Added, Recently Played and Unheard.
To add a new custom playlist, right-click on
Music and select New Playlist. A new playlist
will appear in the list. Once you’ve entered a
name, drag tracks to it.

LISTENING TO PODCASTS
To listen to a podcast in Banshee, you’ll first
need its URL. Usually, the best place to find this
is at the website that hosts the podcast. For

THE COMPLETE LINUX MANUAL 73


CHAPTER 4

Connecting an iPod
iPods can be a little trickier to use with Ubuntu than other MP3
players. Here are some tips on how to synchronise music and video

f there’s one area in which Ubuntu

I might prove frustrating, it’s


compatibility with iPods. This is
mainly Apple’s fault, not Ubuntu’s.
Most iPods don’t show up as generic mass
storage devices, which means you can’t copy
music and videos to them using Ubuntu’s file
manager as you can with most MP3 players.
The portion of storage that does appear when
you connect a modern iPod to Ubuntu is the
part that stores photos and possibly contacts,
calendars, notes and recordings.
The internal database is in a proprietary
format, which Apple created to prevent music Most iPods, such as this Classic,
and videos being illegally copied from an iPod will work fine with Ubuntu
to another computer. However, there are ways to
use your iPod with Ubuntu, and plenty of models
can be successfully synchronised, just as you which may not yet be supported by Ubuntu
would in Windows or on Mac OS. applications. Don’t hold your breath for support
The only models that are likely to cause to be added quickly after a new generation is
problems are the iPod Touch, iPhone and the released, as Linux applications can sometimes
latest generation of Nano, Classic and Video, take an age to catch up.

Amarok is great for music,


VIRTUAL WINDOWS
but it doesn’t support video As you’ll see, it isn’t just different applications
that support iPods; you can also run iTunes in
Ubuntu using VirtualBox, which is an application
through which you can install and run a virtual
copy of Windows, and subsequently, iTunes.
A word of warning, however. Don’t try using
WinE (Windows Emulator) to run iTunes in
Ubuntu. It supports only old versions of iTunes,
and many iPods require newer versions, so won’t
work at all. In addition, previously purchased
music won’t play, and the Apple Store won’t work.
The bottom line with iPods in Ubuntu is that
there’s no guarantee that it will be easy to get
your particular model working. Some programs
require your iPod to be ‘jailbroken’. If that’s

74 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

meaningless to you, suffice to say that they


won’t work with your iPod. Another point to
note is that you’ll need to format (or initialise)
your iPod on a Windows PC if it’s previously
been formatted on a computer running Mac OS,
otherwise Ubuntu won’t be able to recognise it.
If you have another computer running
Windows or Mac OS, or you’re running both
Windows and Ubuntu on the same computer, it’s
likely to cause far fewer headaches if you stick
to the ‘real’ iTunes. However, if you own an older
iPod and are made of sterner stuff, read on.

USING GTKPOD
Gtkpod is a lightweight application that’s solely
designed to synchronise media with iPods.
Search for it in Synaptic Package Manager and
it will appear immediately. When it’s installed,
Banshee is a slick-looking
you’ll find it under Sound & Video in the iTunes alternative, but even
Applications menu. It supports first-generation the latest version lacks well with most iPods and can synchronise your
support for the iPod Touch
iPods through to fifth-generation models, and the iPhone music. The only snag is that music is all it does
including the Mini, Photo, Shuffle, Nano and – forget synchronising any videos you may have.
Video, but not the iPod Touch or iPhone. As a music management application, though,
It’s capable of transferring MP3, WAV, M4A, it’s well worth trying out as it’s a powerful music
audiobooks and various video files to your iPod, manager with a simple interface.
but you’ll additionally need to install bashpodder Banshee is the default music manager in
or gpodder if you want podcasts. The interface is several Linux distributions, and it now supports
basic, but it gets the job done. videos as well as music. It can sync both music
and video to your iPod, and also supports
AMORAK podcasts. Unfortunately, although it has the
Amarok is a music player that has a Linux polish that gtkpod lacks, it still doesn’t support
Amarok is great for music,
version and looks a lot like iTunes. It works but it doesn’t yet support
the iPod Touch or iPhone.
video files
VIRTUALBOX
Virtualbox can run whole operating systems in a
Ubuntu window. As long as you have a legitimate
Windows disc and product key, you can use it to
install, say, Windows XP in Linux. You can then
install any Windows programs you like, including
the latest version of iTunes.
Virtualbox doesn’t provide direct access to
your computer’s hardware so Windows may not
run particularly quickly, but it should allow you
to synchronise your iPod properly. For many
people, though, this is a cop-out, and almost
pointless as you could just as easily install
Windows on a separate hard disk partition to
Ubuntu, and use it independently.
If you do decide to give Virtualbox a try, you
can find it in the same way as find any other
application by using the Quick search box in
Synaptic Package Manager.

THE COMPLETE LINUX MANUAL 75


CHAPTER 4

Connecting an
MP3 player
Transferring music, videos and podcasts to your MP3 player is
simple in Ubuntu. Here we’ll show you how

e’ve already looked at Banshee on does. A window should pop up asking which

W page 72, and seen that it’s extremely


easy to use. It’s also great for MP3
players, as it autodetects most
portable players that use the MSC standard
program you’d like to open, and an icon should
appear on the desktop. You can then access the
device just like any hard disk.

and shows them in the left-hand pane under MSC OR MTP?


the Devices heading. Some MP3 players support both MSC and
MSC stands for Mass Storage Class, and MTP standards. MTP – the Media Transfer
is essentially the standard used by most USB Protocol – is closely linked with Windows Media
devices that have storage capabilities. Ubuntu Player and allows DRM-protected audio files
(and Linux in general) is able to recognise when (usually those that have been purchased from
these devices are plugged in, just as Windows an online music store) to be transferred to
authorised audio players.
If you find that Ubuntu doesn’t automatically
Most MP3 players should
be recognised by Ubuntu detect your MP3 player, check its settings menu
without any problems to see whether you can switch its USB mode
from MTP to MSC. Some players, such as
certain models in SanDisk’s Sansa range, require
a combination of buttons to be pressed to switch

If you prefer to transfer


files manually, just use a
File Browser window to copy
music – and video if your
player supports it – straight
to its internal memory

76 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

MANUALLY MANAGING MEDIA


Banshee supports videos, but it may not meet
your needs if you have an MP3 player that can
also play video. In this case, the best method
may be to copy files to it manually, just as if it
were an external hard disk.
If you browse your player’s contents in a
File Browser window, you’ll probably find it has
several folders on it, perhaps Music, Videos,
Podcasts and Voice Recordings.
While a File Browser will let you transfer
any files you like into any folder, your player
will support only certain formats. If you need
a program to convert tracks from one format
to another, try searching in Synaptic Package
Manager for soundconvert; this will install Sound
Converter, which you’ll find in the Applications
MP3 players that support
MSC should work fine menu under Sound & Video.
modes, rather than having a menu setting. If in with Banshee Any videos you download will almost certainly
doubt, check with the manufacturer. need to be converted. WinFF can also be
While it’s possible to install programs that installed via the Package Manager, and supports
allow MTP devices to be detected by Bansheeit’s most formats. As with audio files, you’ll need
usually easier to use a File Browser to copy to know the specific format your player can
music and other files to MTP-only players handle, including both the video and audio
manually. It’s also best, if possible, to avoid any codecs, the resolution, plus the maximum bit
DRM-protected music, as you’re likely to run into rates for audio and video. A process of trial and
problems getting Banshee to play it or transfer it error should help you find the best settings, and
to a player. once you’ve done that, you can carry on using
them for batches of other files. As we’ve already
MANAGING MUSIC IN BANSHEE Amarok is an alternative said, check the manufacturer’s website for these
music player that can
Banshee makes it easy to get music on to your synchronise tracks with
details, or contact its technical support.
player. Once you see your MP3 player listed MP3 players
under the Devices heading, all you need to do
is drag and drop tracks on to it. You can select
a range of tracks, artists or albums to transfer,
or you can drag the All artists or All albums list
entries on to your player if it has enough room
for your entire library.
When you drop tracks on to your player,
you’ll see a progress bar appear in the bottom-
right corner of the window. This shows you
how many tracks have been transferred in
the current queue.
The same goes for podcasts. Just drag and
drop them on to your player, and they’ll be
transferred. Unfortunately, Banshee doesn’t
have any synchronisation capabilities, so it can’t
fill your player automatically with a random
selection of music in the same way as Windows
Media Player. If you want an application that can
sync music, you’ll have to install Amarok using
the Synaptic Package Manager.

THE COMPLETE LINUX MANUAL 77


CHAPTER 4

Synchronising a
mobile with Linux
Backing up your phone to a PC is a great way to save your settings
and make sure you have the same contacts wherever you are

ith Windows PCs, all the phone

W manufacturers provide software that


lets you synchronise your phone
with your computer. With Linux,
this isn’t the case. Fortunately, that doesn’t
mean you’re stuck, as there’s third-party
software that should work with most phones
When Bluetooth is installed
so that you can back up your messages. on your computer, you’ll see a
There’s no simple way to synchronise your new icon to show it’s working
phone directly with Ubuntu’s email client,
Evolution, so think first about what you want to
do. If your phone can synchronise its settings phone appear as a normal flash storage device;
with an email service over its data connection, a native mode, such as Nokia, will make your
such as Google Mail, this might be the best handset appear as a phone, and you’ll need
option, as you can simply synchronise Evolution other software to connect to it.
with the same source.
Even if you decide to use a different method, CONNECTING WITH BLUETOOTH
connecting your phone to Ubuntu can be useful To use a Bluetooth connection, you need a
for other reasons, such as downloading pictures. Bluetooth adaptor on your PC. If you’re using a
First you need to work out how you want to laptop this may be built in, but for a PC you’ll
synchronise: Bluetooth or USB. USB is easier need to buy a Bluetooth dongle. These cost
as you just have to plug just a few pounds and should be recognised
in a compatible phone; by Ubuntu when you plug one in. Once you’ve
You can easily synchronise
Bluetooth is arguably mobile phones with Ubuntu connected your adaptor you should see a
more convenient, as you Bluetooth icon at the top-right of the desktop.
never have to physically If you don’t, restart your computer.
connect your phone to When you click this icon you’ll see a list of
your PC. options, including Setup new device, which lets
If you’re using USB, you search for a new Bluetooth device. However,
you’ll probably see this doesn’t always work, so it may be easier to
several connection manage the connection from your phone. First,
options when you plug click the Bluetooth icon and select Preferences.
in your phone. A Mass Click the Make computer discoverable box and
Storage, or similar, type in a name for your computer, which will
option will make your appear on the phone you’re searching from.

78 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

Type in your passcode


to connect your phone to
your computer

Wammu makes it
simple to connect your
Go to the Bluetooth menu on your phone and Linux computer to
make sure it’s turned on. Next, look for an option most mobile phones
for Paired devices. Follow the instructions to
start a search and your Ubuntu computer should
be discovered. Select to pair and then type in a To connect to your phone, select Connect
numeric code of your choice and select OK. A from the Phone menu. If there’s an error, try
dialog box will appear on your PC asking you to running the wizard again and selecting different
type in the same code. Do this and click OK. connection options. To view contacts, phone
Once your devices are paired, your phone messages, calls made and calendar entries from
will appear in the list of devices, along with your phone, select the appropriate option from
the type of device it is (Phone). On your phone the Retrieve menu. You can edit existing data,
you may get an option to connect to your PC and create new calendar entries, contacts and
automatically. Select Yes, and your phone messages using the Create menu. All changes
will connect to your computer every time it’s are automatically written to the phone.
in range. This prevents you having to make a To back up your data, select Save from
physical connection each time. the Backups menu. You can either save all
data or use the drop-down menu to save only
BROWSING YOUR PHONE contacts (vCard and LDIF formats) and calendar
When you click on the Bluetooth icon, your (vCalendar and iCalendar) entries. If you save
phone will appear under the Devices entry. contact and calendar information separately you
Select it and you’ll see an option to browse files. can import them into another application, such
Choose this and you’ll be able to copy files to as Evolution mail. If you export your calendar
and from the phone’s internal memory. and contacts from Evolution, you can import
them into Wammu and save them on your phone.
BACKING UP YOUR PHONE
To back up your phone, you’ll need to install
You can export just
the Wammu application. Select Software Centre your calendar or contacts
from the Applications menu and type ‘wammu’ and import them into
another application
into the search box. Double-click on Wammu in
the results and then click on the Install button.
Once Wammu has downloaded, run it from
the Applications, Accessories menu. Follow the
wizard through using the Guided configuration
to select your connection type and the type of
phone you’re using. The default options are
usually the best. If you’re using Bluetooth, you’ll
need to make your phone temporarily visible,
otherwise Wammu won’t find it.

THE COMPLETE LINUX MANUAL 79


CHAPTER 4

Using Google Desktop


Just as Google makes searching the web easy, it can do the same for
your PC. We show you how to make finding files and emails simple

he fact that Ubuntu does everything On the next page you’ll be presented with a

T slightly differently to Windows can


make it a bit confusing at first. In
particular, locating your files can be
tricky, as they’re stored in different places.
choice of applications. Choose the .deb version,
which is for Ubuntu. Make sure you get the right
version for your operating system (32-bit or 64-
bit). After clicking the correct link, select Accept
While the built-in search tools help to improve and Install on the next page.
this, you may prefer to use the Google Desktop You’ll be prompted to install the file to your
you can search your PC for files and emails hard disk. Once the download has completed,
(including those stored in Ubuntu’s email client, double-click the file in Firefox’s Downloads
Evolution) as quickly as you can search the window. This will launch the Package Installer.
internet. Click the Install Package button, type in your
Google Desktop is available for Windows and password and click OK. The necessary files and
Linux and works in the same way on both. If any other required components are downloaded
you’ve already used the Windows version, you’ll automatically and installed on your computer.
be right at home with the Linux version and it The whole process should take only a few
will help you get used to the new OS However, minutes to complete. Once it’s done, click Close
the installation steps differ for the Linux version, and shut down the Package Installer.
so here’s how to get started.
RUNNING GOOGLE DESKTOP
DOWNLOAD AND INSTALLATION Google Desktop is accessed through the
Google Desktop isn’t available from Ubuntu’s Applications menu. The first time you run it
Software Centre utility, so you have to download you’ll be prompted to set your homepage to
it manually. Go to http://desktop.google.com/ Google. You should leave this option selected as
linux/index.html and click on the Download it makes it easier to search your computer. You
Google Desktop button. can also choose to send Google crash reports,
which can be used to improve the software in the
future. When you’ve selected all the options that
Google Desktop has to be
downloaded manually you want, click I agree.
Before it becomes useful, Google Desktop
has to index your computer. Depending on the
number of files you have, this can take anything
up to a few hours to complete. Until the process
has finished, Google Desktop won’t be able to
present you with accurate search results.

SETTING PREFERENCES
While you’re waiting for your computer to index
your files, it makes sense to configure Google
Desktop to work the way you want it to. At the

80 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

Search Desktop. You can use the other options


here to select how many search results you want
to see. Click Save Preferences when you’re done.

SEARCHING YOUR COMPUTER


The easiest way to search your computer is to
tap Ctrl twice. This will bring up a search box.
Type what you’re looking for into this and results
will appear in the drop-down list. The icons next
to each result tell you if it’s an image, file or
email. If one of the options listed is what you’re
after, select it and it will be opened directly.
Alternatively, if you can’t see what you’re
You can tell Google
Desktop the types of files looking for in the short list, you can select ‘See
top-right of the desktop you’ll see a coloured it should index and where all results in a browser’. This will start Firefox
they’re located
swirly icon. This is the short cut to access and display the standard Google page, only it’s
Google Desktop, and it loads automatically searching your computer not the internet. You
every time you start your computer. Right-click can either change the search term by entering
it and select Preferences. something different in the search box, or you can
The first page shows you which folders and filter the results using the links at the top of the
files are indexed. You can select which file types page. These let you refine your searches to view
you want to index using the tickboxes, and add only emails, media files and websites you’ve
new folders to search, too. You may want to visited recently, and all other types of file.
select ‘Remove deleted files from search results’, Where available, search results will be
otherwise you’ll find that performing a search accompanied by a thumbnail of the file and a
also returns results from files and emails that text extract. Both help you narrow down the
have long since disappeared. search results to find the file that you’re after.
By default Google Desktop will index only the Once you’ve chosen a type of search result,
contents of your email client, but you can click you can use further options to find a specific file.
on the Gmail tab if you’d like it to index your For example, if you select Media, you can then
Google Mail inbox, too. Just select Index and specify from the drop-down menu that you only
search email in my Gmail account and type in want to look at JPEG files; for email, you can
your username and password. The software will specify that you only want to look at emails from
automatically scan your online inbox, too. a particular person.
Finally, Google Desktop will by default search Finally, the search results pages will also tell
the internet first, rather than your computer. To you how complete the index of your computer
change this, click on the Display tab. Change the is. If you see a red warning message, you should
‘Default search type for the quick search’ box to wait until the index has been completely built
and then search again; searching too soon
means there’s a good chance that the file you’re
looking for hasn’t been indexed yet.

You can quickly search


your computer using the
pop-up search box

You can refine your search


results to the type of file that
you’re looking for

THE COMPLETE LINUX MANUAL 81


CHAPTER 4

Improving the look


and feel of Ubuntu
Multiple workspaces, graphical effects and shortcut keys can all
make using Linux faster and easier. Here we show you how

n its default state Ubuntu Linux

I looks and feels very similar to


Windows in the way it handles
applications. However, with a
few tweaks and settings it can be even more
powerful. With its graphical effects and multiple
workspaces, Ubuntu can also be made more
attractive and easier to use than Windows.
Using Ubuntu for the first time is pretty
simple, as its interface and window-handling
Ubuntu’s impressive range
are similar to those in Windows. However, of graphical effects make it an
sticking with the default setup will limit the even more attractive OS
usefulness and speed of this great operating
system. Here we’ll explain how you can make
Ubuntu look, feel and handle better. to follow this guide first to get them working. It’s
The box over the page shows all the keyboard worth the effort, as Linux becomes an amazing
You need to enable your
shortcuts you’re likely to need, but you’ll have computer’s 3D driver to use
graphical operating system that wipes the floor
Ubuntu’s graphical effects with Windows 7.

GOING GRAPHICAL
Ubuntu 11.04 has lots of graphical effects turned
on by default, but there’s no way to manage
them. To do this, you’ll need to install Compiz so
that you can manage the graphical effects. Open
the Ubuntu Software Centre and type Compiz
into the search box. Select OpenGL window
and compositing manager, then click Advanced
Desktop Effects Settings (ccsm). Click Apply
Changes and the software will be installed.
For graphical effects, you need a 3D graphics
chipset. Any graphics card made in the past
few years will be able to cope with 3D graphics,
as will PCs that include integrated graphics.
You’ll also need to install your graphics card’s
restricted driver. If you haven’t done this already,

82 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

With Opacify turned on


you can quickly focus on
one window, making the
others transparent

select the Restricted Drivers icon in the title bar that conflicts with another setting, you’ll be
at the top of the screen. From the list of graphics given a warning and the option to proceed or
drivers that appears, select the recommended continue with the current settings. Don’t enable
one and click Apply. The driver will be the Desktop Cube or anything that will disable
downloaded and installed. Once it’s finished your the Ubuntu Unity Plugin, as this will break the
computer will have to be restarted manually. user interface and make your PC practically
impossible to use. Some options require you
ADVANCED LEARNING to click them to get a sub menu, where you
Once you’ve enabled your driver, you’re ready
to start enabling the desktop effects you
With the Advanced Effects
want. These are all managed by Compiz. The switched on, windows wobble
application we installed earlier is used to control as they move

its settings. You can find this in System Settings,


Personal, CompizConfig Settings Manager, and
from here you’ll be able to enable all the extra
desktop effects.
The side panel on the left contains all
the shortcuts for the various sections, which
we’ll cover in turn. ‘All’ lists every setting on
one page, while ‘General’ includes only basic
options. For each option, you can select the
tickbox to enable it or click the words to change
advanced settings. If you try to enable a setting

THE COMPLETE LINUX MANUAL 83


CHAPTER 4

Before you can manage


any effects, you have to install
the Advanced Desktop Effects
Settings application

can turn on further settings before everything options, such as Enhanced Desktop Zoom, and
works. When following this guide, have a look applications that make text easier to read. The
through the options to make sure you’ve enabled box on the right explains which keys you need to
everything you want. press to activate these shortcuts.
Other accessibility options adjust the
IMPROVING ACCESSIBILITY brightness and contrast of windows and invert
Accessibility options are designed to make their colours. One feature you may want to use is
Accessibility options
include an enhanced zoom
Linux easier to use. Here you’ll find standard Opacify. With this selected, hovering the mouse
tool and the Opacify feature over a window makes all the other windows
opaque, so you can focus on the selected
application. It can make working on a crowded
desktop a lot easier.

ON THE DESKTOP
The Desktop settings contain all the features that
really improve how you use your computer. Once
you’ve enabled these features, you’ll wonder how
you ever lived without them.
The Desktop Wall gives you a handy way to
switch between workspaces. The shortcut keys
in the box on the right show you how to move
between the workspaces. You can also drag
applications to the side of the screen to rotate
the cube and place them on another workspace.
With Expo enabled, pressing the Windows
and the S keys simultaneously will zoom out
and show all your workspaces. You can grab a

84 THE COMPLETE LINUX MANUAL


BASIC DESK TOP TASKS

Short and sweet Keyboard shortcuts


DESKTOP SHORTCUTS
Open the Search menu
+ Similar to the Windows Run command, but it also displays the results of previous
commands. The standard Search menu is an easier option for most users

DESKTOP EFFECTS ENABLED SHORTCUTS


+ + / Move left or right between workspaces
+ + / Move up or down between workspaces
+ Switch between currently open windows across all workspaces
+ View all windows from all workspaces in an Mac Exposé-style view
+ + View all windows from the current workspace in a Mac Exposé-style view
+ Invert the current window’s colours
+ Invert the colours of the entire screen
+ Mouse Scroll Wheel Zoom in and out
+ Middle Mouse Button Select a region to zoom into using a rectangle
+ Middle Mouse Button Resize the selected window
+ Left Mouse Button Click anywhere on a window to move it
+ Show all workspaces using Expo. This replicates the Launcher button

window and drag it with the mouse to move an WINDOW MANAGEMENT


application from one window to another. These settings control how open windows are
controlled. Scale is the most interesting option,
EFFECTS and provides a Mac Exposé-style task-switcher.
You can use the Effects settings to control Press Shift-Alt-Up to display all open windows
the fancy windows effects, such as wobbly on all workspaces or Windows-W to display all
windows. The best way to see what each open windows on the current workspace. You
option does is to enable it and start using your can then use the mouse or cursor keys to select
computer. You may find that some of them are an application. This is considerably easier than
a little overbearing, but we find that they can using the standard task-switcher and means
add a bit of interest to the desktop. you’ll never lose another window.

Expo allows you to view


all your virtual desktops
and even drag and drop
files between them

You can view all open


windows and switch quickly
between tasks, as with Mac
OS X’s Exposé

THE COMPLETE LINUX MANUAL 85


CHAPTER 5

86 THE COMPLETE LINUX MANUAL


Internet on Linux
Ubuntu has been designed from the ground up for the internet.
In fact, it’s more tightly integrated into the online world than
Windows, and most of the applications you install are automatically
downloaded from the web.
However, there are some tricky online jobs that you’ll want to do
in Linux that are easy in Windows, such as viewing videos online,
uploading files to your website and more. In this chapter we’ll
take you through all these options and show you how to turn your
Ubuntu computer into the ultimate internet PC.

Getting connected 88 Social networking 104


Controlling the web 92 Firewalls and internet security 106
Configuring email 96 Storing files online 110
Using VoIP 100 Uploading files with FTP 112
Enhance your web browsing 102 Backing up with Ubuntu One 114

THE COMPLETE LINUX MANUAL 87


CHAPTER 5

Getting connected
Here we’ll show you how to connect your Linux PC to a local
network and take advantage of the mobile internet

hat use is a computer that isn’t on way of networking your computer. There’s no

W a network? A few years ago, that


would have been an odd question to
ask. Times have changed, however,
and connectivity is now as much a part of
likelihood of data leakage, as there is with Wi-Fi,
and Ethernet has a considerably higher data
throughput. Ubuntu should have no trouble
recognising any network card built into today’s
computing as USB flash drives and flat-screen PCs and laptops.
monitors. Over the next few pages, we’ll outline As long as the rest of your network is
the different options for connecting your Linux connected to the internet, several things
computer to your home network. We’ll also help should happen automatically when you boot
you set up wireless networking and 3G so you Ubuntu. First, it will try to obtain an IP address
can use your laptop on the move. automatically using a service called DHCP.
The internet has revolutionised the way we There’s usually only one DHCP server on a
use computers. Once, PCs were standalone network, which is probably your broadband
devices that communicated with the outside router. DHCP largely takes the hassle out of
world through the medium of floppy disks, networking, so you don’t need to manually
but now almost every home PC in the UK is configure anything.
connected to a global network. Not only that, Ubuntu usually refers to your Ethernet card
but the connection is probably provided by a as eth0. If you have two cards, the other will
high-speed broadband service. The idea that be known as eth1. You can add more cards and
you would forgo an internet connection is almost Ubuntu now supports these will be labelled in a similar way. Finding
low-cost Wi-Fi equipment
inconceivable, so we’ve explored all the issues such as this Digitus Wireless
the IP address that’s assigned to PC is easy.
you’ll encounter when connecting your Linux PC, LAN USB dongle From the Ubuntu search menu, run Terminal.
whether you’re at home or on the move. This brings up a command
The good news is that if you have a working line. Type ifconfig, and
home network with an internet connection, you some information will
can simply attach an Ethernet cable to your appear. Part of the
Linux PC and connect it to your broadband information associated
router. Turn on the computer and it will connect with eth0 contains
to the internet automatically. However, if
you want to customise your setup, or if you
experience problems, read the Using an Ethernet
connection section below. To connect on the
move, skip to Going Wireless opposite.

USING AN ETHERNET CONNECTION


The typical way to connect a PC to a network
is to use a standard Ethernet network card
and cable, which plugs into a simple router
or hub. This is arguably the most secure

88 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

a line that starts ‘inet addr:’


The address that follows
is the IP address for that
network interface.
The first three numbers
in the address are called the
network address. This sequence
of numbers will depend on how
your router is configured, but
on a home local network the
default is usually 192.168.0.
You’ll need to know this
address if you want to assign a
permanent or ‘static’ IP address
to your Ubuntu computer, rather
than using an ever-changing DHCP address.
This is easy to achieve.

ADDRESSING THE SITUATION


First, before you close the terminal window,
enter the command ‘route –n’. The last line of
Configuring a static IP
the output that appears will contain an address address for the computer’s
something like 192.168.0.1, which is the address Ethernet card
of your network’s default gateway. This is your
broadband router, through which all non-local
traffic flows – in other words, it handles all GOING WIRELESS
traffic destined for the internet. Next, enter the Ubuntu has excellent tools for connecting to
command ‘more /etc/resolv.conf’. The last line Wi-Fi networks, making it a great low-cost choice
here contains the name of the DNS server that for people on the move. We’ve used a cheap
machines on your network use to turn domain Digitus Wireless LAN USB dongle bought from a
names into IP addresses. Note down these two local computer shop for around £14.
pieces of information. First, plug the dongle into a convenient USB
Select Network Connections from the port. Next, look for an icon on the right-hand
System Settings. This will cause a small box side of the taskbar that looks like two flat-screen
to appear. Next select your hardwired network monitors. This is the Network Manager icon.
adaptor from the list and click Edit. A second Click this and a menu will appear listing all the
box will then pop up, displaying the network networks that Ubuntu recognises, including any
card’s configuration options. Wi-Fi networks that are in range. Your wired
Click the IPv4 Settings tab. By default, this network is selected by default, so choose your
will show that the method of assigning an IP Wi-Fi network and a window will pop up asking
address is set to Automatic (DHCP). Use this for the password. Enter this and a message will
pull-down menu to select Manual. When you appear on the desktop to tell you that you’re
do, the other options on the window become connected. To swap back to the wired network,
active. Click the Add button and enter the same click on the Network Manager icon again and
network address noted above, but append a select your network card.
number between two and 254 for the fourth Your Wi-Fi network should automatically
number in the address. For example, you could supply Ubuntu with details of security and other
choose 192.168.0.50. Enter a Netmask value settings, but sometimes you may need to change
of 255.255.255.0 and, in the Gateway field, these. You can do this by accessing Network
enter the IP address of the default gateway Connections from System Settings. Click the
(for example, 192.168.0.1). Click Apply to make Wireless tab, select your network and press Edit.
the changes permanent. A second window will appear. The three tabs

THE COMPLETE LINUX MANUAL 89


CHAPTER 5

Your Wi-Fi network tab. Select your 3G connection and press Edit.
should provide the correct
connection settings, but you
Enter the username, password and any other
can change them easily settings your mobile broadband service provider
has given you.
Apply your changes, close the Network
Connections dialog box and select the mobile
broadband connection from the Network
Manager icon. You’ll see a message that says
“GSM network connection established”.

USING NETWORK TOOLS


Ubuntu comes equipped with a range of network
troubleshooting tools. For convenience, the
most important tools have been gathered into a
single multi-tab window. Open Gnome’s System
menu, select Administration and then choose
Network Tools. The window that pops up has
several tabs. Select a network device from the
menu on the Devices tab and it will display its
details and statistics.
The Ping tab lets you contact other machines
on your local network and over the internet to
test if they’re working and to discover how long
packets take to reach them. The ‘ping’ command
The mobile connection
allow you to enter any special details supplied wizard supports a wide range
sends a stream of packets to the destination
by your ISP’s technical support. of 3G providers

USING 3G MOBILE BROADBAND


Public Wi-Fi hotspots are available in many
towns and cities, but it’s sometimes better to
use your mobile operator’s own 3G network.
Linux used to struggle with new external
communications hardware, but those days are
long gone, and you no longer have to fiddle
with the command line to make things work.
To demonstrate how Linux has changed, we’ll
show you how to connect a Virgin Media 3G
USB dongle.
Insert the dongle into a convenient USB port
and the New Mobile Broadband Connection
Wizard will appear. Click Forward to continue.
Enter your country and your mobile broadband
service provider, then press Forward again. The
window will show a summary of the connection
and ask you to give it a name.
Click Apply and you’ll be able to open the
Network Manager icon on the title bar. Your new
mobile option should appear in the list of known
connections. Before you can connect, however,
you need to enter your details to authenticate
yourself to the mobile network. Reopen Network
Connections and click on the Mobile Broadband

90 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

computer and waits for a response. This is an


incredibly useful diagnostic tool (see the ‘Ping
commander’ box below for more details).
To use this tab, simply enter the DNS name
or IP address of a destination computer and
press Enter. The screen will slowly fill with a
bar chart showing how long, in milliseconds,
each of the five ping responses takes. If you’re
having trouble reaching a website, visiting this
tab will tell you if the machine has crashed or
if the connection is just very slow. It’s a good
way to verify that your network connection is
working correctly.
The Netstat tab provides low-level routing
information, but the Traceroute tab is far more
interesting. If you enter the IP address or DNS
name of a destination computer and press
Enter, this tab gradually fills up with information
about the route taken to get to it. Each entry
is called a ‘hop’ along the route. It’s fun to find
out the route taken to get to your favourite
websites, but if your network contains several
subnets connected by routers and you have a
connectivity problem, it will indicate where the
problem lies by failing at that point.
The Port Scan tab is strictly for use on your
own network. Port scanning tells you which of a
target computer’s ports are open and listening
Pinging another computer
for traffic. Type in a DNS name or IP address is a good way of establishing
and press Enter. If you try this on machines on The Lookup tab lets you find details of where any connection
problems lie
the internet, you may trip an intrusion detection public machines easily. Enter a DNS name or IP
system and the site may complain to your ISP. address and select the type of information you
This is because port scanning is a technique require. Related to this is the Whois tab. Enter a
that hackers use to find vulnerable computers. domain name (without the ‘www’ prefix) and the
If you’re found using a port scanner over the tab will contact a public Whois server to retrieve
internet, you may get banned from your ISP. details of the domain’s owner.

Ping commander Testing a network connection


Network administrators have a procedure for Now ping the local machine’s IP address.
testing network connections that can quickly This traffic enters the network and comes
pinpoint a problem. Ubuntu’s Network Tools straight back, proving that the local subnet to
make it easy to perform similar tests. the hub or switch is working.
On the Ping tab, enter ‘localhost’ as the If you have two subnets, ping a computer
hostname. Localhost is a special machine on the other subnet to make sure the router
name that refers to the computer you’re between them is working properly. Finally,
using. When you send traffic to localhost, ping a website that’s outside your local
the network card detects that the address network, such as www.google.co.uk. If you
is local and responds itself, thereby proving can’t reach it, check that your broadband
that it’s working properly. router is working.

THE COMPLETE LINUX MANUAL 91


CHAPTER 5

Controlling the web


Linux doesn’t come with all the technologies you need to view web
pages, but you can add them easily. Here we show you how

indows-based browsers have got to

W the point where they’ll prompt you


to add missing web components.
The same isn’t true with Linux, and
you may run into problems getting common
websites such as YouTube to work properly.
Over the next few pages, we’ll show you how
to get everything working.
The internet is filled with an impressive array
of videos, applications and rich multimedia You can install Adobe’s
for you to enjoy – at least, it is if you have the Flash manually. Once done,
you’ll be able to view videos
right browser and addons. Ubuntu comes with on YouTube and use other
just about everything you need to get going, Flash-enabled websites
including the excellent Firefox web browser.
However, not everything will work straight away,
and you may find that a few websites, such as Internet Explorer is a Windows-only browser,
YouTube, won’t display video. Fortunately, these and you can’t install it on Linux unless you’re
things are easy to fix. prepared to mess around with the WINE
Our instructions focus on Firefox, as it’s Windows emulator (see the ‘Don’t bank on it’
The installer lets you
currently the default browser for Ubuntu. choose which language
box on page 95 for details). Google’s Chrome
Firefox will use is available for Ubuntu, and we show you how
to use this on page 102. You can get other
browsers, but they’re not as popular and don’t
have the same level of support as Firefox.

UPDATING YOUR BROWSER


The first thing you should do is make sure
that you have the latest version of Firefox.
Unfortunately, you won’t simply be able to
check this using Ubuntu’s Software Centre on
the Applications menu, so you’ll need to update
the software manually. This is easy to do with
the free Ubuntuzilla application, which you can
download from http://sourceforge.net/projects/
ubuntuzilla/files.
Click on Files and download the .deb file
for your operating system (32-bit or 64-bit).
When the file has downloaded, find it on your
desktop and double-click on it. Then click the

92 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

Install button. Once it has completed, you can


use Ubuntuzilla to install Firefox. Bring up the
Terminal from Athe Ubuntu search menu and
type in the following command:

ubuntuzilla.py –a install –p firefox

If the installer says that it can’t get a PGP key,


try this command instead:

ubuntuzilla.py –a install –p firefox -g

Press y to accept the latest version of Firefox.


Then type 13 to choose EN-GB as the language
and press y to accept the choice. The new
browser will be downloaded and installed on
your computer automatically.
Once the installation has finished, you can
launch the new version of the browser from the
Applications, Internet menu. It will be called
Firefox and the old quick-launch icon will also
You can watch WMV
point to the new Firefox installation. movies in Firefox thanks to
the gstreamer plugin To do this, open Firefox and go to http://
GONE IN A FLASH get.adobe.com/flashplayer. From the drop-
Flash is one of the main internet technologies down menu, you can select different versions
and is used for items as diverse as menus in depending on your Linux distribution. For
websites and videos in YouTube. To use Flash, Ubuntu, select .deb for Ubuntu 8.04+ and click
you need to install the Flash plugin. If you visit the Agree and Install Now button. The file will be
a site that requires Flash, you may be prompted downloaded to your computer’s desktop. Once
to install it automatically, but this isn’t always With Flash installed, it’s finished downloading, double-click on the
you can view websites that
the case, so it’s best to install it manually. use the technology, such
install file (install_flash_player_10_linux.deb).
as YouTube Cancel any messages about a newer version
being available and click Install Package. Type
in your password when requested and Flash
will install automatically. This will take a few
minutes. Click Close to complete the installation.
Once the installation has completed, restart
your browser. Shut down all your open browser
windows, including the download manager, and
start Firefox again. To make sure it’s working
properly, you should visit a website that uses
Flash, such as YouTube. In YouTube, click any
video. If it plays, then Flash is working; if you
get an error message, you should download
Flash again and reinstall it.

CUP OF JAVA
Java is another common web technology that is
used by many websites. It’s not always visible, as
it’s often used behind the scenes to make jobs
such as filling out forms easier. Ubuntu comes
with its own Java virtual machine (VM) installed,

THE COMPLETE LINUX MANUAL 93


CHAPTER 5

sudo mkdir java


cd java
sudo cp /home/<your username>/Desktop/
<name of file you downloaded>
chmod a+x <name of file you downloaded>
sudo ./<name of file you downloaded>

You’ll then get a few pages of text containing


the terms and conditions of use. Just press the
spacebar to flick through the pages and type
‘yes’ when prompted. Java will install on your
You can easily extend
Firefox’s capabilities by
computer. Once it’s done, you’ll see a message
installing addons onscreen saying ‘Done’.
You now have to add Java to Firefox’s plugins.
To do this, go back to your terminal window.
but we found that it wasn’t always detected Type the following:
by Firefox 3.5, so it’s best to install Sun’s Java
VM. Go to www.java.com and click Free Java cd /usr/lib/mozilla/plugins
Download. On the next page, select Linux (self- sudo ln –s /usr/java/jre<version>
extracting file) for 32-bit Ubuntu and Linux x64 /plugin/i386/ns7/
for 64-bit Ubuntu. Download the file to your libjavaplugin_oji.so
desktop. To install it, open a terminal window.
Remembering that you can press the Tab key to This will install the Java plugin in Firefox. To test
autocomplete file and folder names, type in the that it’s working properly, shut down all your
following: browser windows and launch Firefox again. Go to
www.java.com and click on the ‘Do I have Java?’
cd /usr link. A short test will run on your computer

Install Java through the


command line

94 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

and you’ll then be told that you have the latest


version of Java installed. Websites that use this
technology should now work.

VIDEO ZONE
It’s possible to get video working in websites
that don’t use Flash. Visit a website that you
know has video and force Firefox into asking you
to search for a relevant plugin. For example, to
get streaming WMV video to work, go to www.
football365.com. A video will attempt to load
and fail, but a dialog box will appear that asks
you if you want to search for a suitable plugin.
You should then click Search.
When given the option, select gstreamer0.10-
plugins-ugly and click Install. The plugin will
download and install automatically. When it’s
complete, streaming WMV movies should play.
If you don’t see this option, you can manually
install all the plugins that you’ll need. To do
this, click on the Software Centre from the
Applications menu. Search for Gstreamer and
Plugins add support for
then install each of the Gstreamer plugins that various video formats, such
appears in the results list. as QuickTime

EXTRA HELP
One of the best things about Firefox is that Statusbar, for example, displays your current
people can extend its capabilities by writing downloads in a handy status bar rather than
plugins for it. These are known as addons. using the entire download manager.
The good news is that addons are often When you’ve found an addon you like, just
operating-system independent, so you can click the green ‘Add to Firefox’ button. Then,
use the same ones in Windows and Linux. when prompted, click Install. If there’s no green
To see what’s available, go to www.getfirefox. ‘Add to Firefox’ button for an addon you like
com and click on Add-ons. Here you’ll find the the sound of, it’s probably because there isn’t
database of addons you can browse through and a Linux version. You should search the addon
search. They all perform useful jobs; Download database to see if there’s something similar.

Don’t bank on it Why ActiveX websites won’t work


Microsoft’s ActiveX is a proprietary web Explorer can be installed using the Windows
technology for developing web applications. Emulator, WINE, but it’s complicated and you
It used to be very popular, but many websites also need to copy some Windows DLL files to
now refuse to use it because it’s not secure. get ActiveX working.
What’s more, Internet Explorer is the only Because there’s no ActiveX plugin for
browser that supports it. Firefox, you can’t use ActiveX websites in
However, some websites, such as Egg Linux without a lot of hassle. If you need to do
Money Manager, still use the technology. This so, you can either search Google for help on
is a problem if you’re running Linux, as you getting Internet Explorer installed in Linux, or
can’t use Internet Explorer. It’s not a problem use a Windows PC for those times when you
that’s easy to overcome, either. Internet need to access that website.

THE COMPLETE LINUX MANUAL 95


CHAPTER 5

Configuring email
The Evolution email client lets you stay in touch with your
family and friends. Here we explain how to set it up

fter web surfing, the second most provided by your internet service provider, but

A popular online activity is sending


and receiving email. Ubuntu comes
equipped with a range of email
clients, as well as some impressive anti-spam
you’ll also be able to get them from your current
email application’s settings. You’ll need to know
the address of your ISP’s mail servers, such as
pop3.yourisp.co.uk. For incoming email, this is
measures. Here we take the lid off Linux email, usually a POP3 server, but some email accounts,
and show you how easy it is to set up. including Google Mail, use an IMAP server (see
If you use Windows, you’ll be familiar with the ‘Mail order’ box on page 99). Make sure
the basic built-in client (Outlook Express or you get the type of server you’re using right.
Windows Mail, depending on the version of You’ll also need to find out if your email servers
Windows you have), but how do you go about require any encryption (TLS or SSL are the
getting your email in Linux? common types).
The good news is that it’s just as simple Outgoing mail always uses an SMTP server
to use, and you get a better email client than such as smtp.yourisp.co.uk. Finally, you’ll need
Windows’ built-in program. One of the email to know the username and password of your
applications in Ubuntu is Evolution. On the email account.
taskbar at the top of the desktop, you’ll see an
envelope icon. When you click on this for the EVOLUTION NOT REVOLUTION
first time, Evolution will start by running its The first page of Evolution’s Setup Assistant is
Setup Assistant Wizard to guide you through the the welcome page. Click Forward to continue.
basic configuration process. The next screen can be used to restore
To complete this, you’ll need a few items of Evolution’s settings and email from a backup.
information, so it pays to make sure you have For now, we’ll assume that you’re creating an
this to hand before you begin. These can be account from scratch, so click Forward.
You’ll be asked for your full name and email
address. You can also specify an alternative
The first step when
configuring Evolution involves reply-to email address, so that when someone
entering your details replies to one of your emails, it will be sent
here. Most people should leave this and the
Organisation entry blank. Click Forward and
you’ll be prompted to configure how you receive
email. Select POP or IMAP, depending on
your ISP. Enter the name of the incoming mail
server and your username. Select ‘Remember
password’ to have Evolution store your password;
if you don’t do this, you’ll have to enter your
password every time you download mail. The
next screen asks how often you want to check for
new emails. This is a matter of personal choice,

96 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

server requires authentication (a username and


password) to send mail, tick the ‘Server requires
authentication’ box. Most ISPs won’t demand
that you use a secure connection to the mail
servers, but check first.
If your provider doesn’t use encryption, set
‘Use Secure Connection’ to ‘No encryption’;
if you need encryption, select the type of
encryption from the drop-down menu. Enter your
username. If you put a tick in the ‘Remember
password’ box, Evolution will log into your ISP
If your ISP’s SMTP needs mail account automatically when there’s a
a username and password to
send mail, tick the ‘Server
message to send.
requires authentication’ box Clicking Forward again allows you to give
the account a descriptive name. Click Forward
again and enter your time zone. Finally, click
but the default of every 10 minutes is a good Forward one last time and then Apply to finish
one, so leave this setting alone and put a tick in the configuration process. Evolution is now ready
the ‘Check for new messages every’ box. for you to send and receive email, and to further
Click Forward to configure how you want customise your account.
to send email. Outgoing mail is handled by To test Evolution, click the envelope icon on
Simple Mail Transfer Protocol, or SMTP. Enter the taskbar. Hit Compose to create a new mail
the name of your ISP’s SMTP server in the message, and address it to a webmail account.
server configuration box. If your provider’s Enter a message, then press Send. Then go

The main Evolution


Preferences window is split
into several categories

THE COMPLETE LINUX MANUAL 97


CHAPTER 5

You can store so much data


about a contact that Evolution
can become a useful resource

to the webmail account. The message should Then click the Mail Preferences category. The
have arrived. Reply, then check for new mail in General tab lets you set the general look and feel
Evolution using the Send/Receive button. This of messages. To save disk space, you can tick
sends any mail left in your outbox and requests the box marked ‘Empty wastebasket folders on
any unread mail from your ISP’s mail server. The exit’. Just don’t select this option if you’re likely
reply should download. to need to recover any emails that you delete.
Once you’ve configured your email, you can Next, click the HTML messages tab. This
add a new account or change your existing controls how you view HTML content. The
settings by selecting Preferences from the default setting doesn’t load images automatically
Settings menu. If you select the account you’ve and it’s a good choice. If you select to load
just set up and press Edit, a second window images from the internet, a spammer can
will appear, displaying the data you entered authenticate that your email address is live. A
in a set of tabs. If you move to a new ISP, or if useful trick to stop spammers is to change the
your provider starts using a different connection HTML Mode to ‘Only ever show PLAIN’. This will
method (an encrypted link, for example), you can show you the full address of links in emails, so
change your server details here. Click OK. it’s harder to get caught out by a phishing email.
Click on the Automatic Contacts tab and
ADVANCED CONFIGURATION Evolution will automatically create a contact
The left-hand pane of the configuration in the address book when you reply to a
window has several categories. If you click message. This tells Evolution that future
Autocompletion, you’ll be able to say whether incoming messages from that contact aren’t
you want Evolution to auto-complete any email spam, so they won’t be junked by mistake.
addresses you begin entering. If you have a The Composer Preferences category in the
number of address books, you can select those left-hand pane lets you define how you write
to which this feature applies. new emails and replies. Here, you can specify

98 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

whether emails will be sent as HTML, whether


Evolution will insert emoticon icons where you
enter the relevant text, and if you’d like your
recipients’ email clients to respond by sending a
receipt when messages are read.
With the default reply style of Quoted, the
original message is quoted when replying to an
email. Most people simply type their reply at the
top of the quoted part, but if you have long email The SpamAssassin
conversations, they’re easier to read when laid application can be found in
Ubuntu’s Software Centre,
out from top to bottom. Ticking ‘Start typing at so installing it is a simple
the bottom on replying’ will place the cursor at point-and-click procedure
the end of the message rather than the start.
You can also personalise your messages with
a signature. Click the Signatures tab and press box, double-click the SpamAssassin entry
Add. Enter a name for the signature and the text. and click Install. Enter your password when
To finish, press Save and Close. prompted, and SpamAssassin will download and
Back on the main interface, you can manage install on your computer.
your email contacts by pressing Contacts at the You now need to enable SpamAssassin
bottom of the screen. This opens the address support in Evolution. Click on Preferences
book. Double-click the upper pane to open a from the Edit menu, choose the Junk tab of
form for inputting the details of the new contact. Mail Preferences and select SpamAssassin
This has three tabs for contact, personal and as the Default junk plugin. You should see a
mailing information, so Evolution can be used message saying that SpamAssassin is available.
for far more than just storing email addresses. Beneath this, if you tick ‘Include remote tests’
To get back to your inbox, simply press the Mail SpamAssassin checks online to see if a message
button at the left of the lower screen. has come from a known spam source.

BLOCKING SPAM
Stopping spam is easy using SpamAssassin, Mail order Email servers explained
which is an intelligent and free utility for
scanning your email. If you’re downloading email Your ISP or email provider may give you a
from Google Mail or another webmail service, choice of POP3 (sometimes called POP) or
you don’t need spam filtering as your messages IMAP servers, so which should you pick?
will already have been filtered. POP3 is the most common and easiest to
Before you can use SpamAssassin, you need use. Your email client connects to the server
to install it. Select the Ubuntu Software Centre and downloads the email. Typically, it deletes
from the Launcher. Type ‘spam’ into the search the mail from the server when it’s finished,
leaving the only copy of your email on your
PC. There’s no more interaction between
Once Evolution is
configured and ready to your mail client and server.
send and receive emails, With an IMAP server, mail is stored on
it will look like this
the server and accessed from the client. Any
email you read on your PC is marked as read
on the server, and vice versa. So if you’re
away and use webmail to read your email,
when you get home, your client will show
that your email has been read.
IMAP’s the best choice if you have a lot
of email storage space on a server, such as
with Google Mail’s current 7GB limit.

THE COMPLETE LINUX MANUAL 99


CHAPTER 5

Using VoIP
Real-time communication with your friends is easy with Ubuntu.
Here we show you how to configure Skype for Linux

kype may be best known as a voice- which will display a dialog box that shows you

S over IP (VoIP) application, but it


also has some excellent text-based
chat facilities. To keep in touch with
non-Skype chat buddies, Ubuntu offers many
more information on Skype. Click the Install
Package button to start installing the application
and enter your password when prompted.
Skype will now install automatically to your
other chat clients that are compatible with the computer. You’ll first see the licence agreement.
protocols used by a wide range of chat services, Click Accept to continue and the Skype interface
including Microsoft’s MSN and Yahoo! Chat. will appear. If you have a Skype username,
Before you can use Skype, you’ll need to enter it and your password, and click Sign In.
download and install it. Open Firefox and go to Otherwise, you’ll have to sign up for an account;
www.skype.com, click on Download and then click the ‘Don’t have a Skype Name yet?’ link.
the Linux link on the right-hand side. Click the
Download button and then select Ubuntu 8.10+, SKYPE’S THE LIMIT
remembering to select the right version for your Fill out the onscreen wizard to create a new
operating system (64- or 32-bit). Skype account, making sure you create a
Once the download has completed, double- memorable Skype name so it’s easy for your
click the install file in the Firefox Downloads friends to find you. When you’re done, click the
Create a memorable Skype
Window. This will start the Package Installer, username so it’s easier for
Sign Up button. If your Skype name has already
your friends to find you been taken, you’ll need to type in another one.
Once your account has been created, you can
log on to Skype. The first thing to do is test that
Skype is working properly. In the main window,
you should see Skype Test Call. Click the green
phone icon and a call will be made. You’ll hear
a woman asking you to leave a message. Leave
one and hang on until your message is played
back. You can use this to make sure that your
microphone and speakers work.
If you don’t hear anything during this call, or
if the call window says there’s a problem with
sound or your microphone, click on ‘Configure
your devices and Skype’s behaviour’. This opens
a configuration window.
Click on the Sound Devices option in the left-
hand pane. The reason you have no sound may
be that all the options are set to ‘default device’.
Click the Sound In, Sound Out and Ringing
options, and select a sound device. You can
press the ‘Make a test sound’ and ‘Make a test

100 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

credits), you’ll be able to make calls to landlines.


Click the Call Phones or Send SMS button at
the bottom of the main Skype window. Select
the country you’re calling from the drop-down
list, type in the phone number and press the
green telephone icon to make the call. You can
right-click a contact and select ‘Remove from
contacts’ to delete it from your friends list,
and select Block if you want to stop someone
contacting you.
You can also use Skype for text-only chatting.
Press the blue speech bubble next to the
contact’s name and a chat window opens. Type
in a title for the chat topic and press Enter. The
cursor moves to the input box at the bottom of
the interface. Enter a line of text and press Enter
to start a conversation.
To change your status, click the green and
The default sound device
may be the underlying cause white tick logo next to your name. If you don’t
call’ buttons to test your modified configuration. of failed test calls want to be disturbed, you can select Invisible or
If you want to change your details to make it Offline. The ‘Skype Me’ setting invites people on
easier for people to contact you, click on your your contacts list to call you for a chat.
name in the main Skype window and then click If you get bombarded with strangers calling
the Edit Profile button. Add any extra information or sending you messages, Skype can block
that you want to divulge. incoming connections from anyone you don’t
When you’re done, you can start to add know. Click on the Skype button at the bottom
friends. This is done by clicking on the small of the main Skype window, and select Options.
green icon at the bottom of the main Skype user Click on Privacy and choose ‘only people I have
interface. This opens up the Add Contact dialog. allowed’ for ‘Allow calls from…’ and ‘Allow chats
Enter as much information as possible about from…’. Click Apply and Close to apply the
the person you want to add. As a minimum, settings. You can also use the Options dialog box
you’ll need to know their name, but adding to change the way that Skype behaves and to
Stop people you don’t
the country, email address or Skype name will know from contacting you by
manage people that you’ve blocked.
narrow the search. Press the Search button, and using the privacy options
Skype will respond with a list of people. Click on
the one you want and press Add Contact.
A new window will open, with a short
message that will be sent to the contact. Edit
this and press OK. Once you’ve been approved
by your contact, they’ll appear in the main Skype
window. When they’re online, a green tick will
appear next to their name.

IT’S GOOD TO TALK


To call a contact, select their name from the
main Skype window and click the green phone
icon. You’ll be able to have a conversation with
the other person when they answer. Click the
video camera icon to add video to the call if
you’ve got a webcam.
Alternatively, if you have SkypeOut credits
(log into your account at www.skype.com to buy

THE COMPLETE LINUX MANUAL 101


CHAPTER 5

Enhance your
web browsing
Google’s Chrome is one of the best internet browsers available, and
the open-source version, Chromium, can be installed on Ubuntu

buntu is an excellent internet- change here, the browser is pretty much

U connected operating system, with


plenty of features built in. Installing
Google’s Chrome web browser can
enhance your online experience even more,
identical to the familiar Windows version. Here
we’ll show you how to get started and make the
most of all the same features you’d expect on
your Windows desktop.
however, and installing and using it on your As with most other software packages,
Linux computer is simple. Chromium can be installed from the Ubuntu
Although Google Chrome is a Windows Software Centre in the Launcher. Start it and
web browser, it’s based on the Chromium type Chromium into the search bar. Select it
open-source project. As a result, Chromium is and click the Install button. It will automatically
available for Linux. Although there’s a name download and install on your computer. When

Chromium can be
installed through the
Ubuntu Software Centre

102 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

You’ll need to install the


Adobe Flash plug-in to view
web pages that contain
Flash technology

Make Chromium your


default web browser

you’ve installed it, you can launch Chromium flashplayer. You should see an animation on
from the Ubuntu search menu. The browser the screen, which shows that Flash is working.
will launch and will be immediately familiar A further way of checking is to go to www.
if you’ve used the Windows version before. youtube.com and watch a video.
You’ll be prompted to choose whether you want You might also want to add a shortcut for
Chromium to be the default browser; if you do, Chromium to the Launcher so you can access it
click ‘Set as default’. quickly in future. Start the application from the
One of Chromium’s best features is its Ubuntu search menu, right-click on the icon that
ability to synchronise bookmarks, extensions, appears and select Keep in Launcher. You can
preferences and more between different You can synchronise follow these instructions to remove Firefox from
data between Chromium
computers and the cloud. All you need is a and Chrome on multiple
the Launcher if you don’t intend to use it again.
Google account such as an ‘@gmail’ email computers
address. If you don’t have one, you can get one
for free from www.google.com/accounts.
Once you have an account, click on
the spanner icon in Chromium and select
Preferences. Click the Personal Stuff tab and
select Set Up Sync. Type your Google account
details into the next screen and click Sign In.
Unless you want to synchronise only certain
items, select ‘Keep everything synced’ and click
OK. If you have other copies of Chromium or
Chrome synchronised on other computers, all
your bookmarks will appear.
If you haven’t set up your copy of Chrome in
Windows to synchronise with the cloud, follow
the instructions above, but click on the Spanner
icon and select Options, rather than Preferences.

FLASH OF INSPIRATION
If you have a fresh install of Chromium, you
may find that the Adobe Flash plug-in doesn’t
work. To get it working, you first need to install
Flash. Shut down all open copies of Chromium,
bring up the Ubuntu Software Centre and type in
Flash. Select the Adobe Flash plug-in and click
Install. Type in your user password and click
Authenticate, then the software will download
and install automatically. Then start Chromium
again and go to www.adobe.com/products/

THE COMPLETE LINUX MANUAL 103


CHAPTER 5

Social networking
Ubuntu integrates seamlessly with your social-networking and
instant-messaging accounts, helping you stay up to date

eeping up with your friends via

K social networking and instant


messaging (IM) is easy with
Ubuntu’s built-in support. Here we’ll
show you how to configure it.

BROADCAST NEWS
One of the most impressive things about
Ubuntu is the way in which it integrates with
online accounts, giving you status updates for
services such as Twitter, Facebook and more.
You need to authorise your
Getting these working is easy using the built-in social-networking accounts
Broadcast Accounts via the Gwibber application. before you can access them
We’ll show you how to get started with Twitter,
although these instructions are equally valid for
other services. so your account appears in the left-hand panel.
Click on your username at the top of the Repeat these steps to add your other accounts.
screen (the Me Menu) and select Broadcast Once you’re done, you’ll need to configure
Accounts from the menu. Select the service how your broadcast accounts work. The best
you want, such as Twitter, from the drop-down way to do this is to start Gwibber from the
menu. You’ll need to click the Authorize button, Ubuntu search menu. This lets you view all
then enter your username and password before the updates from the social-networking sites
clicking Allow. When done, click the Add button to which you subscribe. Each message has the
logo of the related service next to it, although
you can use the panel on the left to view
Broadcast Accounts lets
you log in to your existing messages from a single service. A bar at the
social-networking sites bottom lets you send status updates to all your
services at once, although you can use the icons
to select specific services to use.
To set your preferences, just click Edit,
Preferences. The notifications options determine
which messages pop up on your screen; it’s
probably distracting to have every message pop
up, so select ‘Mentions and replies only’. The
default refresh update time is 15 minutes; you
may want to reduce this to keep more up to date
with what’s going on, particularly with Twitter,
which has constant live updates coming through.
Click Close when you’re done.

104 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

Select how often you want


messages to appear and when
you want to be notified

Gwibber allows you to view


all your social-networking
accounts in one place
Internet menu. This brings up a standard
instant-messaging application with a list of
INTERACTION STATIONS your friends and their current statuses. Simply
There are several ways to interact with your double-click on a name to start a chat.
broadcast accounts. First, you can use Gwibber. As with Broadcast Accounts, it’s the
The icons down the left-hand side let you access integration into Ubuntu that’s really interesting.
messages, replies, photos and private messages. From the Me Menu, you can select your online
If you’re not sure what an icon does, hover your status without having to open Empathy. New
mouse cursor over it and a help message will chat sessions are highlighted in a pop-up
appear to tell you what it’s for. window on the desktop, but the Mail Notification
The integration into Ubuntu is the most icon will also turn green. Click on the menu to
interesting part of this. All received broadcast see the current active chat sessions, then click
messages appear in the Mail Notification area It’s simple to add new one to open a chat window. You can also click
chat accounts to Empathy,
at the top right of the screen. Just click on this and you can use all the most
the Chat icon to launch Empathy.
to view a drop-down menu. Broadcast messages popular services
will be listed at the bottom of this. Click any
message to view it in Gwibber. You can click the
Broadcast link to launch Gwibber directly.
You can also click the Me Menu to access a
quick menu in order to update your accounts
using the Broadcast Message box.

A LITTLE MORE CONVERSATION


Ubuntu now integrates instant messaging into
the Me Menu via the Empathy Instant Messaging
client. To add a new account, click on the Me
Menu and select Chat accounts. Select from
the drop-down menu the type of account you
want to add (all the most popular are supported,
including Google Talk, MSN and AIM), then type
in your username and password and click Log In.
Once you’ve created your account, you
can launch Empathy from the Applications,

THE COMPLETE LINUX MANUAL 105


CHAPTER 5

Firewalls and
internet security
Linux may be more secure than Windows, but it’s not completely
immune to attack. Here we show you to protect your system

inux is widely considered to be more without introducing any significant drain on

L secure than Microsoft Windows.


This is partly because of its open-
source nature, which allows anyone
to spot and report programming errors and
resources or network performance.
A number of commercial firewalls include
a vast range of features. However, at their
most basic, firewalls simply need to decide
vulnerabilities in the operating system and its whether to allow or ‘drop’ packets based on a
applications instantly. set of rules. Configuring a firewall is therefore
It’s not immune from attack, though. Over the a matter of writing these rules to tell it which
next few pages we’ll show you how to boost your types of network traffic to let through, and
computer’s security by configuring Linux’s built- which to block.
in firewall and installing anti-virus software.
Hackers are entirely motivated by money, and
Firestarter’s main interface
they’ll use any trick they can to get information The Lock Firewall button is for
that they can either sell or use to make cash. use in emergencies only

While Linux has been relatively immune to


attacks, as its install base was too small, its
increasing popularity means that hackers now
have the OS in their sights.
As such, you need to boost the security of
your computer. For starters, every computer
on the internet needs a firewall to protect
it from unwanted intrusions by hackers, for
example. Increasingly, Linux also needs anti-
virus protection. Security companies are now
waking up to the threat posed to Linux operating
systems by malware, and have begun supplying
basic Linux versions of most of their products.

THE FIREWALL
The purpose of a firewall is to inspect every
data packet attempting to enter or leave the
computer, and decide whether or not to allow
it on its way or to block it. Firewalls are very
closely connected to the operating system itself
and have to be capable of running at top speed

106 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

Linux traditionally comes with a firewall called


iptables that requires system administrators to
set it up using extensive configuration files. For
the rest of us, however, there’s a far friendlier
firewall called Firestarter. Like most firewalls
commonly used on Microsoft Windows, this is
an entirely graphical application that makes
configuration very simple.

INSTALLING FIRESTARTER
Firestarter is a free application. To install it,
first start the Ubuntu Software Centre. Type
‘firestarter’ in the search box and press Return.
The Firestarter application should appear in the
list below the search box. Click the Install button
to begin the installation process.
You may be asked for your password in a
subsequent pop-up window. If this happens,
enter it, click OK and Ubuntu will download and
install the latest version of Firestarter. Once
this process is complete, click Close. Firestarter
You may need to add
should now be installed and ready to protect specific rules to allow HTTP
your computer. ACTIVE CONNECTIONS and HTTPS traffic through the
firewall for web browsing
There are two important buttons on the
CONFIGURING THE FIREWALL Firestarter control panel. The first is Lock
To open Firestarter’s user interface, first of all Firewall. When you hit this, Ubuntu’s firewall
find it in the Ubuntu search menu. The first immediately blocks all incoming and outgoing
time you run it, after entering your password traffic and the status icon changes to a padlock.
to confirm you want to make changes to the It’s the button you should click if you think
system, you’ll see a configuration wizard. something suspicious is happening. Clicking this
Click Forward to continue. button for a second time unlocks the firewall and
The next screen on the wizard allows you it continues allowing traffic to pass through it as
to assign the firewall to a specific network usual – subject to its security rules, of course,
connection. This should default to Eth0 if you which we’ll come to in a moment.
have a single wired connection, which most The second important button on the control
people do, so leave it as it is unless you a have panel is Stop Firewall. When you press this,
a particular reason to do otherwise. If you’re the status changes to Disabled. This isn’t a
using a wireless network card, it will either be recommended setting to use other than briefly
set as the default option or be available from when you believe there’s a problem with the
the pull-down list. firewall blocking legitimate traffic.
Your internet gateway usually assigns all Another useful part to the control panel is
PCs on your network an IP address when they Active Connections. Click the arrow button
boot up. Unless you’ve chosen to disable this next to this and the display extends to show
and assign IP addresses manually, tick the box the connections you have to the outside world.
marked ‘IP address is assigned via DHCP’ Open tabs in Firefox, run Skype or an instant
before clicking the Forward button again. messenger application, and all your external
There’s no need to enable connection sharing connections will be listed here.
on your Ubuntu machine, so you can safely
press Forward again and finally click Save. DIFFERENT MODES
The main Firestarter control panel will now pop Firestarter works in two modes. The first is
up. The firewall status pane should show it as called Permissive and is the default setting.
being active. This allows all traffic to enter and leave the

THE COMPLETE LINUX MANUAL 107


CHAPTER 5

computer except for the ports the user tells it


to block. The second mode is called Restrictive,
which blocks all traffic except for the dataflow
present on the ports you explicitly allow.
For the best security, Firestarter should run
in this second mode so that it blocks all traffic
except the stuff you explicitly allow. It blocks
only outgoing traffic, not incoming traffic, but
this is enough to stop hackers compromising
your security as it prevents your computer from
replying to any malicious packets.
To put Firestarter into Restrictive mode,
first click the Policies tab just under the Lock
Firewall button. Now click the Editing pull-down
menu and select Outbound traffic policy. This
causes two radio buttons to be displayed directly
underneath the menu. Select the second,
marked Restrictive by default, whitelist traffic.
Press the Apply Policy button at the top of the
BitDefender’s interface
window and open a web browser. looks pretty simple, but it’s a
After a few seconds of trying to connect, the fully functional virus scanner been created, press Apply Policy. Try surfing
browser will return an error message because again and everything should work smoothly.
Firestarter is blocking all outgoing traffic. You If you normally send and receive email from
now need to allow HTTP and HTTPS traffic Ubuntu and you find that it now doesn’t work,
through the firewall so you can browse the web. you’ll need to add rules to the list for SMTP and
In the lower pane of the Policies tab, and with POP3. You’ll also have to add a rule for Samba
Outbound traffic policy selected, right-click on if you mount Windows shares. If you need to
the window’s bottom pane and select Add Rule. add a rule for a port that’s not named on the
This produces a small pop-up window. Select list, simply enter its number in the input box. To
HTTP from its pull-down menu. Under the option find out the port number for a particular type of
‘When the source is’, choose Anyone. Click the traffic, visit http://tinyurl.com/portnumbers.
Add button to add your new rule to the list and it
will automatically be activated. ANTI-VIRUS SOFTWARE
Do the same for HTTPS (the secure version Because of its increased popularity, Linux is
of the HTTP protocol used when buying things beginning to need virus protection. We’re going
Firestarter’s configuration
online). When both HTTP and HTTPS rules have wizard makes it easy to alter
to show you how to download and install the
the relevant settings popular BitDefender Anti-Virus package. This
offers manual scanning, but with some nifty
options. The installation process requires you
to use the command line, but by following our
instructions, it’ll still be a simple process.
First, you need to obtain a free personal use
licence from http://tinyurl.com/ydun6v. Click
on Request Free License, enter your name,
email address and country, click the tick box to
confirm you’re a private user and hit Send. Your
licence key will be emailed to you.
Next, go to http://tinyurl.com/dymsjb and
click the i586.deb.run package if you have a
32-bit machine. Otherwise, click the amd64.deb.
run package. This opens the download manager.
Select Save file and finally click OK.

108 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

Once downloaded, click on run the Terminal


application from the Ubuntu search menu.
This opens a terminal window. In it, enter the
following command:

cd /Desktop

Now enter the following (noting the capital B of


‘Bit’), but instead of clicking Return, press the
tab key. This will fill in the long filename for the
downloaded BitDefender package:

sudo sh Bit

Hit Return and you’ll be asked for your


password. Enter it and the BitDefender licence
agreement appears. Hit the space bar to scroll
through it a page at a time. Once at the bottom,
you’ll be asked to enter the word ‘Accept’. Do so
and BitDefender installs itself. The installation
To scan a file or folder for
process will also ask if you want a GUI installed. viruses and malware, simply
Enter the upper-case letter Y and press Return. open it and let BitDefender ensures that the anti-virus engine remains active
do its stuff
Once installation is complete, using after you’ve closed its control panel. This makes
BitDefencer is very simple. Open the application subsequent scans faster, but increases memory
from the Ubuntu search menu. Press Set New and processor usage. Allied to this setting is
Key and enter the licence key emailed to you. ‘Pre-load anti-virus engines on startup’. This
Now press the Update button to download the loads various malware detection modules and
latest virus definitions. To scan a directory keeps them loaded between scans rather than
structure for malware, press the Scanner button, loading them for each one.
select the directory and finally click Open. You can either exit or simply hide the
BitDefender control panel when not in use
CONFIGURING BITDEFENDER with the two buttons at the bottom right of the
Hit the Settings button and you’ll see various screen. When hidden, the red BitDefender logo
basic, but useful, options. Of these, the General appears on the right of the desktop’s menu bar.
Settings pane is the most useful. The option to A small but useful set of Click this and the interface opens again.
configuration options allows
keep the application running in the background you to use BitDefender’s Drop
If you opt for ‘Hide main window on startup’,
Zone for quick scans the BitDefender icon will appear on the desktop’s
menu bar. This is useful if you use the ‘Enable
file drop zone’ option.
With this option activated, you’ll see a large
BitDefender icon on the desktop. Drag and drop
the file or directory you want scanning on to this
and it provides a convenient method of carrying
out scans. Nothing’s actually moved; it’s merely
a way of telling BitDefender what to scan.
If you enable ‘Scan on drop’, then when you
drag and drop a file or directory on to the Drop
Zone icon, it’ll instantly be scanned. Otherwise,
the Drop Zone accepts files for scanning and
displays a numeric tally as you add more. If you
want to, you can right-click on its icon and select
‘Start scanning’ to scan the lot in one go.

THE COMPLETE LINUX MANUAL 109


CHAPTER 5

Storing files online


Online storage is an efficient and secure way to back up your files.
It’s also incredibly easy using the free Dropbox service

eing able to store files securely

B online has become very popular. As


well as providing a safe location for
backups that can’t be damaged in
your home or physically stolen, online storage
is also incredibly convenient, allowing you to
You have to install
access your files from anywhere. Dropbox manually, but
Dropbox is a free online service for Linux. it’s a simple procedure
The software lets you synchronise files with
multiple computers over the internet. When you
save a file on one computer it gets automatically This will launch the Package Installer. Click
updated on all the others. Dropbox also has 2GB Install Package and Dropbox will be installed on
of free online storage (up to 100GB of storage your computer. Once it’s finished, click the Close
can be paid for), which you can use for standard button and shut down the Package Manager.
online storage. It also has a dedicated Linux Start Dropbox from the Ubuntu search menu,
client for it. Here, we’ll show you how to use it. and you’ll see a dialog box warning you that you
need to install a proprietary daemon. Click OK
INSTALLATION and this will be downloaded automatically from
To install Dropbox, download the installation the internet to your computer. It should take only
package from www.getdropbox.com. Click on the a few minutes.
Download button, making sure that you select
the right version of Ubuntu and the type (32- GETTING UP AND RUNNING
bit or 64-bit). When the file has downloaded, Restart your computer when the installation has
double-click it in Firefox’s Downloads window. completed. Next time your computer starts you’ll
notice a new icon in the top-right of the screen
for Dropbox. If you click it, a window will appear
Dropbox lets you
synchronise files asking if you have a Dropbox account. Select ‘I
between multiple PCs don’t have a Dropbox account’ and click Next.
Fill out all the required details. You’ll be asked
which type of Dropbox account you want (2GB,

Dropbox has to install


some proprietary software
in order to work properly

110 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

or new files being created, are mirrored on all


computers connected to the same account.
As the Dropbox folder appears as a normal
folder, too, you can use it as the destination for
backups. This will automatically write your files
to Dropbox’s secure servers.

WEB ACCESS
You don’t have to access Dropbox through a
special folder stored on your computer, as you
can also log on to your account using a web
You can create a free browser. This lets you see all the files and folders
Dropbox account and use
the service with 2GB of free
you have stored online and lets you manipulate
online disk space them, too. You can delete files and folders,
create folders and upload new files.
One feature that the website gives you over
25GB or 50GB). Select 2GB for now, as you can the desktop client is that it lets you create a
always upgrade at a later date if you really like shared folder that you can invite other people
the service and run out of storage space. to use. Changes to that folder and its files are
After you’ve created your account, you’ll be replicated for everyone with access to it, making
told a bit more about how Dropbox works. You’ll it a great way to collaborate on projects.
also be asked if you want to select where your You can also share files and photos with
Dropbox folder will be stored. There’s no need people that don’t have Dropbox accounts using
to change this, as the default location of your the special Photos and Public folders. Anything
Home folder is fine, so click Finish. Your Dropbox dropped into the Public folder can be shared
folder will be opened automatically. with the outside world with read-only access.
You simply right-click the file or folder you want
USING DROPBOX to share and select Dropbox, Copy Public Link,
Your Dropbox folder is stored in your Home and then email this to your friend.
folder and called Dropbox. To upload files to it, A similar thing works for photos. Just create a
simply drag and drop them into this folder. When folder inside the Photos folder and add pictures
they have a green tick next to them, it means to it. Right-click the folder you want to share and
they’ve been successfully uploaded. select Dropbox, Get Public Gallery Link. Send
When you download the Dropbox client to this link to your friends, and they can view your
another computer (Linux, Windows or Mac) and high-resolution photos.
log on with the same account details, the online
files are synchronised with that computer. Any
changes, such as a file or folder being deleted

Files and folders with green


ticks next to them have been
uploaded to your web space

You can also access your


Dropbox account through
the service’s website

THE COMPLETE LINUX MANUAL 111


CHAPTER 5

Uploading files with FTP


If you have your own website, you may need to upload files to it via
FTP. Linux has built-in support for FTP, but using FileZilla is easier

he File Transfer Protocol (FTP) is

T used by the vast majority of web-


hosting providers to let you upload
and download files to and from your
website. The graphical FileZilla FTP client – the
same software as available for Windows – is the
best way to use FTP.

INSTALLING FILEZILLA
FileZilla can be downloaded from the internet,
but it’s actually easier to install it directly from
the command line. Start a terminal window from
the Ubuntu search menu, and type:

sudo aptitude install filezilla

Press Enter. Type in your username and press


FileZilla can be launched
Enter again. When prompted, type Y (note this like any other application
is upper case) and Enter then, when prompted, site’. There’ll also be a blank window called
Y and Enter again. This will cause the latest ‘Remote site’. When you connect to your web-
version of FileZilla to be downloaded from the hosting service, the Remote site window will be
internet and installed on your computer. Once populated with its files; you can then drag and
the installation has completed, you can close the drop between the two.
terminal window. FileZilla can now be accessed
through the Ubuntu search menu. ADDING SITES
Click the Site Manager icon (the first icon in the
USING FILEZILLA toolbar) to bring up a new window. This lets you
FileZilla is an incredibly easy application to specify logon details for all the FTP sites you
use. When you start it for the first time, you’ll use, so that you can access them quickly without
be presented with a list of files stored on having to enter your details every time.
your computer’s hard disk, listed under ‘Local To add a new site, click the New Site button
and enter a memorable name for the site to
which you want to connect. Type in the Host
FileZilla can be installed
quickly and efficiently from name (the address of the site, such as ftp.
the internet by using a mywebsite.com). Leave the Port option blank,
terminal window
unless otherwise told by your web host. Change
the Logontype to Normal and type in your
username and password. Click OK to save the
settings or Connect to connect straight away.

112 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

FileZilla can remember


all the FTP sites to which
you connect

FileZilla is easy to use and


lets you transfer files between
your PC and your web host
in the same way that you
manage local files

To connect to a site in future, simply click on do. You can choose the Skip the file, Overwrite
the Site Manager icon, select the site to which (there are lots of options for choosing when to
you want to connect and click Connect. If you’re overwrite, such as if the file you’re trying to copy
having trouble connecting and you’re sure you’ve is newer than the one you’re trying to overwrite)
entered the connection details correctly, try and Rename. You can also choose whether
selecting your site and clicking on the Transfer to apply the same option every time, only for
settings tab. Change the Transfer mode from uploads or only for the current set of files you’re
Default to Active and try again; if you still don’t transferring (‘current queue only’).
have any luck, try selecting Passive instead. Finally, FileZilla will automatically check for
Sometimes FTP sites will work with only one of updates, downloading the latest version to your
these options selected. computer and installing it. It checks every time
You can just drag and you start the application, so you’ll quickly be
TRANSFERRING FILES drop files between your
local computer and the
informed if there’s a new version available.
Once you’re successfully connected to a remote remote FTP site
website, you can easily transfer files between
the two. The Remote site window will now be
populated with folders on your FTP site. Double-
click on a folder to view the files it contains.
When you’ve found the files or folders you want,
you can navigate to a specific folder on your
home computer using the list under Local site.
You can then simply drag and drop files or
folders between the Local and Remote sites
(or vice versa). When you do this, a bar at the
bottom of the main FileZilla window will show
you how the transfer is progressing.
You can also drag and drop files directly from
Ubuntu’s normal File Browser into the Remote
site (and vice versa) to start a transfer. This is
often quicker and easier than using FileZilla to
navigate through your local hard disk.

ADVANCED FEATURES
Don’t worry about accidentally overwriting a new
file with an old copy, as FileZilla will check for
this. If a duplicate file is detected, you’ll see a
warning dialog box asking you what you want to

THE COMPLETE LINUX MANUAL 113


CHAPTER 5

Backing up with
Ubuntu One
If you want a quick way to back up your documents automatically,
the built-in Ubuntu One application can help

ith the data we store on our PCs built-in Linux backup tool as these are quicker

W becoming increasingly valuable,


making sure that it’s backed up is
essential. One of the best and most
reliable approaches is to use an online backup
to restore, but online backup will give you that
extra peace of mind.
We’ll show you how to get started with a free
account, which gives you 2GB of storage space.
service, where data is stored securely online. Higher-capacity accounts are also available if
The good news for Linux users is that Ubuntu you need more space, and it’s easy to upgrade
has such a tool built in: Ubuntu One. an existing account.
Online backup is a great way of making sure
that important files are protected. By storing GETTING STARTED
data on a remote server, your files will be safe You’ll first need to create an Ubuntu One
even if your house burns down or your computer login. To do this, click on Ubuntu One from
is stolen. The latest version of Ubuntu comes the Launcher. The first time that you run
with Ubuntu One, which does this job for you. the application, you’ll be taken to a screen
Before you can use the
It’s still worth making local backups using the online backup tool, you’ll
asking you to create an Ubuntu Single-Sign
need an Ubuntu One account On (SSO) account. If you’ve already got one of
these, click the ‘Already have an account’ link;
otherwise, click Join now, fill out the form and
click Forward. An email containing a verification
code will be sent to the address you type in.
Copy this out from the email and paste it into
the dialog box on your computer, then click OK.
You’ll then be prompted to enter your keyring
password, which you should have already set up.
A message telling you that your account is ready
will be displayed onscreen.
Once you’ve created your account, you’ll be
taken to the Ubuntu One application. The first
tab tells you what kind of account you have and
lets you upgrade the storage space. This can
be bought in blocks of 20GB, which will set
you back $2.99 (around £1.85) a month or $30
(around £18.50) per year.
Click on the Services tab to see what will
be synchronised with your online storage

114 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

‘Copy book content locally for offline operation’


and ‘Autocomplete with this address book’. Click
OK and your settings will be changed.

BACKING UP FILES
One of the main benefits of Ubuntu One
is its ability to back up files automatically
and synchronise changes between multiple
computers. It sets up default folders, although
it’s good to check the settings manually. Note
that you can’t back up a single file using the
Nautilus File Manager; it has to be entire folders.
Open the file browser by clicking on Home
from the Launcher. Here, you’ll see that there’s
a new folder called Ubuntu One. This folder is
automatically backed up and any file you copy
into it will be synchronised with your online
storage. This folder is also used for some special
features, which we’ll cover later.
However, you can also synchronise other
You need to copy your
contacts to your Ubuntu One folders. Open up your Documents folder and
space. By default, Ubuntu One is set to address book you’ll see a bar across the top. There should
synchronise Firefox bookmarks, Broadcast be a tick in the ‘Synchronise this folder’ box,
messages, contacts and files. showing that the folder and all its contents
To get Firefox synchronisation working, you’ll are backed up. You can remove the tick to
need to install the Extension. To do this, shut stop the folder from being synchronised. To
down Firefox and click the Install button. A synchronise other folders, browse to them and
dialog box will appear; click Install and enter click the tickbox. All subfolders are automatically
your system password and the Extension will synchronised and can’t be turned on and off
then install. When you start Firefox, you’ll see individually. Files have a green tick next to them
the Add-ons dialog box with the Bindwood when they’re backed up online.
Extension highlighted. This backs up your
settings automatically. You can shut down this
Use the Preferences dialog
window and Firefox will automatically back up box to set exactly what you
any existing and future bookmarks; it will also want to back up

remove any from the online storage that you


delete from the software.

MAKING CONTACTS
When Ubuntu One is set up, it creates an
address book in Evolution. However, it’s not filled
automatically. To do this, start Evolution and
click Contacts. Click ‘Personal’ under ‘On This
Computer’ and select ‘Copy All Contacts To’.
Select Ubuntu One in the next dialog box and
click OK. Your contacts will be copied across.
To make sure that all future changes are
replicated, you need to tell Evolution to use your
Ubuntu One address book as the primary source.
To do this, click Ubuntu One in Contacts and
select Address Book Properties from the Actions
menu. Select ‘Mark as the default address book’,

THE COMPLETE LINUX MANUAL 115


CHAPTER 5

Make sure that your


Ubuntu One address book
is the default

You can select


‘Synchronise this folder’
if you want to back up a
folder automatically

To make a file private, click


on the Stop publishing link GIVE ACCESS TO FRIENDS
You can also share entire folders with friends.
Again, the folders that you want to share have to
be inside folders that are set to be synchronised
with Ubuntu One. Select the folder that you
want, right-click it and select Ubuntu One,
Share. Your Evolution contacts will appear in a
box – all you have to do is click the contact you
want and click Share. You can select multiple
contacts by holding down Ctrl and left-clicking.
You can also remove the tick from the Allow
Modification box if you want these people to
have read-only access.
The people with whom you share folders will
need an Ubuntu One account and you have to
At this point, you may be happy with your make sure your contact card for them has the
configuration. If you turn on another Linux same email address they use for Ubuntu One.
computer and log in to the same Ubuntu One Once you’ve shared a folder, it will appear in
account, all the files stored online will be sent your friends’ Ubuntu One, Shared with Me folder.
to that computer. Changes made on the second
computer to any of the files will be replicated WEB ACCESS
online and to all other computers. Unfortunately, the desktop client won’t let you
As well as providing synchronisation and stop sharing a folder. To do this, you’ll need to
backup facilities, Ubuntu One also has some
clever sharing features.
You can not only share
files with friends remotely,
SHARE A FILE but also allow them to
modify your files
It’s easy to give your friends access to a file.
Navigate to a folder that you’re synchronising
online (you can’t use this option in a ‘normal’
folder), right-click a file and select Ubuntu One,
Publish; the file is then made available online.
Just get the unique URL, right-click the file and
select, Ubuntu One, Copy Web Link. You can
then paste this link into an email or IM client.
To stop sharing a file, right-click it and select
Ubuntu One, Stop Publishing.

116 THE COMPLETE LINUX MANUAL


INTERNET ON LINUX

The Ubuntu One website


lets you manage sharing
settings, so that friends can
access your files and folders

log on to the web client at http://one.ubuntu. If you’ve shared a folder with another
com. Once you’ve logged on, click the Files user, you’ll see a line at the bottom of the
tab to view all the files and folders that you’re page that starts ‘Shared with’. You can click
synchronising online. the ‘Stop sharing’ link to remove sharing
You can browse through the folder structure permission individually.
and click a file to download it. You can also click You can manage your contacts in a similar
New Folder to create a new directory and click way by clicking on Contacts. To synchronise
Upload file to send a file. It’s a clunky way of your mobile phone contacts, you’ll need to
managing files, but it’s a good option if you’re upgrade to an Ubuntu One Mobile account,
on a computer without the Ubuntu One client. which is quite expensive at $3.99 (around £2.50)
You can also publish individual files online. a month or $40 (around £25) per year.
Click the More link next to a file, then Publish This account also lets you stream music
file. You’ll be able to view the unique URL for the you’ve bought from the Ubuntu One music store
file, which you can copy and paste to send to a using Banshee. All music purchased here is
friend. If a file’s already published, click the Stop stored in the cloud and doesn’t count towards
publishing link to make it private again. your overall storage use.

THE COMPLETE LINUX MANUAL 117


CHAPTER 6

118 THE COMPLETE LINUX MANUAL


System health
Just as with a PC running Windows, it’s important to make backups
on Linux so you don’t lose any important files. Here we’ll show you
how to back up individual files regularly so you know your work is
always safe, and make a complete image of your computer so that
you can restore it in the event of a serious problem.

Choosing a backup destination 120


Making backups 122
Making an image of your system 126

THE COMPLETE LINUX MANUAL 119


CHAPTER 6

Choosing a backup
destination
There are lots of places you can store your important files and
folders. Here we take a look at the most popular options

aking a backup of your data is the There are lots of different ways to make

M only way to make sure it’s safe. If


you copy all the files on your PC to
an external storage area, it doesn’t
matter if your computer is stolen or breaks
backups and plenty of options when it comes to
storing them, too. Here we’ll look at the some
of the most practical solutions for storing your
precious files so you can be sure your data is
down, as your data can be restored to a new PC. safe should the worst happen.

ONLINE
Online storage is rapidly becoming more popular the amount of internet traffic they create and
as broadband speeds increase. Systems such as the speed at which they work. All broadband
Dropbox (see page 110 for details on how to use connections have slower upload speeds than
this service) work by providing you with storage download speeds, and the fastest upload speed
space that you can use over the internet for a you can get is around 1Mbit/s (122KB/s). To put
monthly charge. The main benefit of a system this into context, if your documents, pictures
such as this is that you don’t have to buy any and videos folders amount to 30GB of data, this
physical storage devices. would take you almost three days at maximum
This means that your backups can’t be stolen speed to save all your data online. As most
along with your computer, and can’t be burnt broadband upload speeds are slower than this,
down with your house. The you’re probably looking at a lot longer.
companies providing these To get the most out of online storage, you
services make sure that your need to choose the files you want to back up
data is backed up again, so carefully so as to save on bandwidth. Office files
it’s the most secure method of are typically the smallest in size, and therefore
backup that you can make. are the quickest to upload.
As online storage can be Finally, be aware of how much data you’ve
accessed from anywhere with backed up; if you have a problem and have to
an internet connection, it’s restore it all, it could take a few days. You could
a good solution for people also download so much data that you break your
with laptops, as you can ISP’s fair-usage policy and incur extra charges.
back up your data while on
the move, combating laptop
theft, loss or malfunction. PRO Backups safe from local disasters
CON Slow; can breach your fair-usage policy
The biggest problem
BEST FOR Important files or mobile backups
with these services is in

120 THE COMPLETE LINUX MANUAL


SYSTEM HEALTH

CD AND DVD
Almost every modern PC includes an optical back and change them again. The
drive that can write files to disc, and using it to files can be copied to disc and
make backups may seem a good idea. Media is stored. This is called archiving, and
cheap (CDs cost less than 15p each and 8.5GB it’s different to backing up.
dual-layer DVDs cost around 60p) and capacities If you’re serious about your digital
are high. Before you start making backups to CD photos, take two copies of each set and
or DVD, though, consider what kind of data you’ll keep one at home and store one with a friend
be backing up, how often you’ll do it and how or who lives at a different address. This way, if
frequently the files will change. the worst should happen and your PC is stolen,
You can only write to a CD or DVD once, you’ll still have a copy of your pictures.
unless you buy pricier rewriteable discs. This
means that making a copy of your documents
folder will require a new disc each time. PRO Cheap and easy
These discs can still be useful, though. Once CON Hard to update backups
BEST FOR Archiving files such as photos
you’ve edited your photos, it’s unlikely you’ll go

NETWORK STORAGE
If you have more than one computer, a network- out of the way, such as in the loft. This makes
attached storage (NAS) device can store your them harder for criminals to steal.
backups. A combination of an external Look for a device that contains multiple hard
disk and a network port, a NAS device disks and supports RAID 1 (mirroring) or RAID
can be accessed from any network- 5 (parity). These will protect your data against a
connected PC in your home. The whole single disk failing in the NAS, so you always have
family can share files and store backups some protection against mechanical failure.
centrally. You can even access some
NAS devices over the internet.
Prices are reasonable, with 1TB PRO Lots of people can back up at once
devices currently available for around CON Can be hard to configure; relatively slow
BEST FOR Homes with multiple computers
£110. NAS devices can also be placed

EXTERNAL HARD DISK


An external hard disk is easy to connect to a PC disk can be as fast as an internal
and, because it’s external, you can quickly plug it hard disk. You can convert an
into another computer. As they live outside your internal SATA port to eSATA using a
PC’s case, they’re immune to problems such as blanking plate costing around £3.
a faulty power supply, which may damage your The main benefit of using a hard
internal disks. External hard disks are also great disk for backup is that data can
value, with 1TB of storage costing under £50. be rewritten, so you can leave the
External disks usually connect via USB or drive plugged in and make regular
eSATA. USB is the most common. You simply backups to it. The danger is that they
plug your disk into a spare USB port on your are attractive to thieves and offer no
computer, and it will be automatically detected. protection if your house burns down.
USB is pretty quick, too, beating both CD and That said, for regular and convenient
DVD drives when it comes to speed. home backups, they’re a great choice.
For quicker transfers, an eSATA drive is your
best bet. Provided that your computer has an
eSATA port, you can get the fastest transfer rates PRO Simple to connect
CON Works on only one computer at a time
available. The eSATA system is essentially SATA
BEST FOR Backups on a single PC
with a slightly different connector, so an eSATA

THE COMPLETE LINUX MANUAL 121


CHAPTER 6

Making backups
Keeping your files safe is incredibly important no matter which
operating system you use. Fortunately, backing up in Linux is easy

ile backups are an incredibly These back up only the files that have been

F important way of protecting your


data. You should make them
regularly to make sure you don’t
lose any important files in the event of a disaster.
modified since the last time that you made a
backup, and so require a lot less disk space. To
perform a full restoration of your data from an
incremental backup, however, you’ll also need
Fortunately, setting up a file backup strategy in a copy of a full backup. Incremental backups
Ubuntu is incredibly easy. should be made more regularly; we suggest
Before you start, there are some things to doing this at least once a day.
consider. First, a backup is only as good as the
information that you give it; if you don’t tell your TREAT YOUR MEDIA WITH CARE
computer to back up a file, it won’t. For that From the previous two pages, you’ll have worked
reason, it’s worth making sure your computer out which type of backup media you’re going
is well organised and that you keep your data to use. Regardless of the choice, it’s important
in neatly ordered folders and not spread out all that you protect your backup media and treat it
over the hard disk. carefully; dropping your backup disk isn’t only
Ubuntu, like Windows, sets up predefined expensive, but may cause you to lose all your
folders for each user, including ones for data. For really important data you should even
documents, music, pictures, videos and consider making two backups and storing one
downloads. We think it’s worth keeping your set away from your house, such as with a friend.
documents in these folders, so that you know Ubuntu has a backup utility called Simple
exactly where they’re located. This makes Ubuntu has default folders Backup, which is incredibly easy to use and
for all your data; it’s worth
setting up your backup regime easier and using them to make backing
configure. Here we’ll show you how to use it.
ensures that you won’t accidentally overlook up easier
any documents and lose data in the event that
your computer suffers a catastrophic failure.

BACKUP TYPES
There are two types of file backup that you can
make: full and incremental. A full backup, as
its name implies, backs up all your files
regardless of when they were last modified.
You should make at least one full backup a
week, so that you’ve got a copy of every file
that you need.
The downside with full backups is that they
take up a lot of disk space. If you ran only full
backups you could end up backing up exactly
the same files time after time. For this reason,
there are incremental backups.

122 THE COMPLETE LINUX MANUAL


SYSTEM HEALTH

1 2

To install Simple Backup, click on Ubuntu settings’ instead. You can also choose to use
1 Software Centre from the Launcher and compression to save disk space.
type sbackup into the search bar. If you want to write your files to external
The Simple Backup Suite for desktop use media, such as a CD or DVD, you can use the
(core functionaliy) should appear. Select it ‘Split backup archeves into several chunks’
and click Install. Hitting the Install button will option to create a set of files the right size.
download and install both the backup and
restore applications. After choosing your initial settings, click
4 the Include tab. This lists the files and
Enter your password when prompted. folders that will be backed up. The default
2 Installation should be a fairly quick settings are pretty good and include all the
process and will take only a couple of minutes, default document folders. Click Add Directory
depending on the speed of your computer and to add a new folder to be backed up if you store
internet connection. Once the software has important files elsewhere.
been installed, click Close. Simple Backup is Be careful when using the Add File option,
now available to use. as this lets you manually specify a single file
that should be backed up, not the contents of
You can run Simple Backup’s configuration the folder that it’s in.
3 from the Administration menu under
System. When it starts, you’ll see the first Click on the Exclude tab to leave out any
screen, which has a default backup profile that 5 files you don’t want to back up. Here you
does a good job. If you want to backup your data can add specific folders that don’t contain any
more regularly, change the ‘Do a full backup useful data, such as the predefined /var/cache/
at least once every xx days’ settingm backup folder. The File types option lets you select files

3 4

THE COMPLETE LINUX MANUAL 123


CHAPTER 6

5 6

7 8

you don’t want to back up. By default, MP3 Click the Schedule tab to decide when
files are listed here. If you want to back up 7 your backups should take place. The
your music, make sure that you select this default option is to back up once a day. You can
option and click Remove. Repeat this process change this to hourly, weekly, monthly or even
for any other file types that you do want to set a custom schedule. Daily is a good choice,
back up. Alternatively, you can add file types though, although hourly could be useful if you
that you don’t want to back up by clicking the work on lots of very important documents. If you
Add button. This lets you specify files by change the option from Simply to Custom, you
typing in their extensions. get to specify at what time the backup runs, but
Finally, click Max size to see the maximum it’s hard to understand, as you have to specify
individual file size that will be backed up. The the schedule using symantics that the Cron
default 10MB limit should be fine, but if you scheduler understands.
want to back up everything, including large
video files, increase this number to the size of Click on the Purging tab to work out when
the largest files you want to back up. 8 to delete old backups in order to save disk
space. You can either force Simple Backup to
Click the Destination tab to tell Simple delete all your old backups after a set amount of
6 Backup where you’d like the backups to be time – say, 30 days – or leave it on Logarithmic.
placed. By default, it’s configured to back them This keeps more of the newest backups and
up to your hard disk. Click ‘Use custom local leaves fewer old backups around. It’s the best
backup directory’ and then click the drop-down option for most people.
menu to select an alternative hard disk.
Alternatively, you can select ‘Use a remote Once you’ve made your changes, click
directory (SSH or FTP)’ and upload your files 9 Save to apply the settings. Your computer
over the internet. Note that you can’t use will automatically be protected according to
online web-hosting space for this; you’ll need the schedule that you set. However, it’s best
a dedicated FTP server. to run a backup now to make sure that you’ve

124 THE COMPLETE LINUX MANUAL


SYSTEM HEALTH

backed up all your documents in case your Once you’ve selected the backup location,
computer suffers from a disaster now. 11 you can select the backup you want from
Click the Backup Now! Button. You’ll see a the Available backups list. This will list backups
message saying that your backup is being run in by date, so you can find the most recent one
the background. You should also hear your hard quickly or a backup from a specific date if you
disk as it’s accessed to back up files. Click Close need a particular version of a file.
on the dialog box and Close on Simple Backup. Select the backup you want and you’ll see
Depending on how many files you have, the a list of Files and Folders to restore if you click
backup process can take a few minutes to a few Restoration Management. These are the folders
hours to complete. that you manually specified in your backup
regime. You can expand these folders in order to
If your PC suffers a disaster, you’ll need find a specific file.
10 to restore your files. If it’s a complete Each top-level folder, and all the files and
system failure, you may need to reinstall Simple folders it contains, can be restored individually.
Backup following the instructions in Step 1. To Just select it and click Restore. Alternatively,
restore your data you’ll need to use a different select the individual file or sub-folder that you
application, which is installed automatically. Run want to restore and click Restore.
Simple Backup Restore from the Ubuntu menu.
Enter your password and click OK. By default the Restoring an old file will overwrite any
restore program is set to look for backups in the 12 existing files with the same name. If you
default location; as we changed this, you’ll need want to compare an old file to a new one, or
to click Use custom. Click the Folder icon and restore an older version of an existing file, select
navigate to where you backed up your files and it and click Restore As. You can now call the file
click Open. Click Apply. anything and select the restoration folder.

9 10

11 12

THE COMPLETE LINUX MANUAL 125


CHAPTER 6

Making an image
of your system
A system image is the most complete backup you can perform, as it
makes a copy of your operating system, applications and files

ow you’ve got Ubuntu working the that you’re constantly making a backup. If your

N way you want it and downloaded


all the drivers and extra software
you need, you know just how much
hassle it is to get a computer up and running
PC fails in some way, you can just restore your
computer back to the last good image; a bit like
a super System Restore.
Imaging programs also include standard file
from scratch. Imagine the pain you’d feel if your backup options, so you can take fewer images,
PC decided to fall over tomorrow, taking your which use a lot of disk space, but still protect
hard disk with it. More likely, as time goes on, is all your data.
that you’ll suffer from a problem. All those extra
applications and hardware you’ve installed and HARD DISK
uninstalled can cause problems or just make Ideally, you should store images on an external
your system bloated. Reinstalling from scratch hard disk so that you don’t lose them if your
doesn’t sound like a huge amount of fun. main hard disk should fail (these images are
This is where using a disk-imaging program too big to store on other media such as DVDs).
can save you a world of trouble. These This also means you can restore the image to
applications take a complete copy of your hard your hard disk (or to a new one in the case of a
If your PC completely fails,
disk, including the operating system, your a system image can help you major problem), getting up and running again in
applications, all your settings and every file on recover quickly short period of time. You could also back up to a
your hard disk. It’s the most complete backup secondary partition on your primary hard disk.
that you can make of your PC.
CLONEZILLA
NO MORE REINSTALLING While Windows users are spoiled for choice
When restored, the image will take your when it comes to disk-imaging software that
computer back to the day that the image was runs in the OS, it’s not as simple in Linux.
made. The advantages of this are obvious: With Ubuntu there are no applications that
instead of having to reinstall Ubuntu when it’s run from the desktop. Instead, you’ll need to
no longer working the way you want it, you can download the free CloneZilla utility and burn
just flash the image back and return to the days it to a spare CD or DVD. This disc can be used
when you first installed it, complete with all your both to back up and restore an image.
settings and applications. So, instead of hours As you can’t clone from inside the operating
of work, with a disk-imaging application it takes system, you’ll want to run these kinds of backups
only a fraction of the time. less often. You should therefore run them before
The best thing is that you’re not just limited you make major system changes or install new
to taking one image. With the right software, you hardware, and combine image cloning with file
can also schedule images to occur regularly, so backup for the best protection.

126 THE COMPLETE LINUX MANUAL


SYSTEM HEALTH

CloneZilla is an excellent free application To make an image of your computer, you’ll


1 for taking an image of your computer. It 3 need to restart it and boot from the disc
runs from its own CD, so you need to download that you’ve just created. This is because the
the necessary image first. software needs to make sure there are no locked
Visit http://clonezilla.org to download the files in order to make a complete copy of your
latest version of the software. Click the Download hard disk and all its contents.
link and select iso/zip under Alternative Before you restart your computer, make sure
(Ubuntu-based). Select the .iso file download you’ve saved all your work and select Restart
and wait for the download window to appear. from the menu at the top-right of the screen.
Click Save File. Depending on the speed of When your computer restarts, make sure the
your internet connection, the 117MB file should BIOS is set up to boot from the optical drive
download in around 15 minutes. first or your normal operating system will start
first. When your BIOS is configured properly,
Once the file has downloaded, right-click CloneZilla will boot from its disc automatically;
2 on it in Firefox’s Downloads window and you won’t need to press any keys.
select Open Containing folder. Right-click on the
file and select Open with Brasero. Put a blank When the CloneZilla boot menu appears
CD or DVD into your computer’s optical drive 4 you’ll see a choice of startup options,
and click Burn. A CD is all you need to use, as depending on the graphics mode that you want
CloneZilla is a small application. The file should to run the software in. The first choice should
take only a few minutes to write to disc. When work for most people, but if the screen appears
it’s completed, click Close. corrupted on your computer, restart and choose

3 4

THE COMPLETE LINUX MANUAL 127


CHAPTER 6

5 6

7 8

an option that runs at a lower resolution. Don’t You’ll be a given an option of the type
worry if the resolutions sound low, as CloneZilla 6 of session that you want to run. Device-
uses simple menus that are easy to see at to-image lets you back up to an image file;
any resolution, and there’s no fancy graphical Device-to-device lets you copy one hard disk to
interface. When you’re ready, select the first another, and is useful if you’re upgrading your
option and press Enter. disk. Select Use local device. You’ll then see a
message telling you that if you want to use a
CloneZilla will now load a version of Linux, USB drive you should insert it now and wait five
5 which it runs from and uses both to back seconds before continuing so that CloneZilla can
up and restore your computer. This process of detect it. When you’re ready, press Enter.
loading the operating system will be quick. You’ll get a list of hard disks in your system
When the operating system has finished and need to select one to store the information
loading, you’ll see a simple graphical menu about system images. The first hard disk (HDA1
system that you can use to back up your hard or SDA1) will be the hard disk with the operating
disk. On the first menu that appears, select system on it and the one that you want to back
English as the language, then choose not to up; HDB1 or SDB2 is the second hard disk,
adjust the keymap (this is for non-standard and most likely the one that you want to back
keyboards). When the next menu pops up, up to. Select this. On the next screen select
choose to start CloneZilla. Top_directory_in_the_local_device and hit Enter.
Press Enter again.

9 7
On the next screen, you can select the
mode in which you want to run CloneZilla.
Beginner will suit most people and will give
you the options that you need. Select this and
press Enter.
On the next screen you need to select what
you want to do. Savedisk will take a copy of
your entire boot disk, including the operating
system and all of its files. Select this option
and press Enter.

128 THE COMPLETE LINUX MANUAL


SYSTEM HEALTH

10 11

12

You’ll now need to give your image operating system as normal. Remember to
8 a name. It makes sense to give it a make regular image-based backups.
descriptive name and a date, so that when you
come to restore an image you know exactly RESTORING AN IMAGE
when it was made and what it does. For If your PC suffers a problem, you’ll need to
example, 2010-01-23-fresh-install will help you 11 know how to restore an image. Fortunately,
identify what that particular image does. The this is an easy process using CloneZilla, too.
date part should be filled in automatically, so It uses the same disc that you used to create
just give the image a descriptive name following the image, so make sure that you keep this
this and press Enter. somewhere safe. Put the disc into your computer
and make sure that the BIOS is set to boot from
You’ll now need to choose which disk you it. Then, follow Steps 2 through 7, but don’t
9 want to make an image of. This should be select the Savedisk option.
easy, as there will probably be only one hard
disk listed now, as the backup hard disk isn’t Select the Restoredisk option and you’ll
listed on this screen. If not, you’ll most likely 12 be presented with a list of available disk
want to back up SDA or HDA, as this is the first images. This is why it’s important to call the
hard disk in your computer and the boot hard images something constructive, otherwise it
disk. Select this and press Enter. could be hard to tell which image to restore.
Look at the date of the images you have. If
Press Enter when you’re prompted and you’ve suffered a problem recently because
10 CloneZilla will check your hard disks to of new hardware or software, select the image
make sure that everything’s in order. It will then that’s closest in date to the last time your
ask if you’re sure that you want to continue. computer worked properly.
Type ‘y’ and then Enter and the software will When you’re ready, press Enter. Select HDA
begin the imaging process. Depending on how or SDA as the target disk, and press Enter to
big your hard disks are and how much data you confirm. Type ‘y’ and Enter both times that
have, the process can take anything from a few you’re asked if you want to continue. The image
minutes up to a few hours. will be restored to your computer, and when you
When it’s completed, reboot your computer, reboot you’ll have everything back to how it was
take out the CloneZilla disc and start your when the image was created.

THE COMPLETE LINUX MANUAL 129


CHAPTER 7

130 THE COMPLETE LINUX MANUAL


Network storage
Linux isn’t just a desktop operating system; it also comes in versions
that do a specific job. FreeNAS is one excellent example, as this
operating system will turn your computer into a fully functional
network attached storage (NAS) device that will enable you to
share your files and documents all over your house. In this chapter,
we’ll show you how to install and configure FreeNAS.

Making your own NAS 132


Configuring FreeNAS 136

THE COMPLETE LINUX MANUAL 131


CHAPTER 7

Making your own NAS


If you have an old PC sitting around doing nothing, you could turn it
into network storage using the powerful FreeNAS system

n old PC can easily go to waste, but for Intel processors and one for AMD 64-bit

A with FreeNAS you can make good


use of it and turn it into a powerful
network-attached storage (NAS)
device. Best thing of all is that FreeNAS, as its
processors. Make sure you select the right
version, and download the ISO file to your PC.
This file is an image of a CD that needs to be
written to a blank disc (see page 46 for details
name suggests, is completely free. on burning a disc). For Windows PCs, use the
Unlike many commercially available NAS free CDBurnerXP (http://cdburnerxp.se).
devices, FreeNAS has a wealth of features and,
as you’re using a PC, the ability to support a lot GIVEN THE BOOT
of hard disks. Here we’ll show you how to install Once the files are on a CD, you can boot from
it and share files, while on pages 136 to 139 we’ll the disc on the computer that you’ll use for
be covering advanced configuration options. FreeNAS. Before you do, though, there are some
To install FreeNAS on an old PC, you’ll need configuration options you need to think about.
a computer with at least one hard disk in it First, for the maximum flexibility you should
and an optical drive. The best installation of install FreeNAS on a USB flash disk, leaving
FreeNAS uses a USB flash drive. You’ll need your hard disks completely free for data storage.
a drive with at least 64MB of disk space; For this to work, you need to set your BIOS to
you can buy 1GB models for around £3 if boot from USB devices.
you don’t have one. To do this, turn on your FreeNAS PC, plug
To start, download the ISO CD image of in your USB flash drive and enter the BIOS
the operating system from www.freenas.org. (normally you have to press Delete, F10 or F12,
You need to download the LiveCD version. You need to enter the BIOS but look out for a message telling you which key
and set your computer to
There are two versions for download: one boot from a USB disk for the
to press). Typically the USB boot options are
optimal FreeNAS installation under Advanced BIOS Features. There may be an
option to boot from USB drives, you may have
to select a USB flash drive from the Boot Device
menu or the option may be called Boot Other
Devices. In our BIOS the USB drive was detected
as a hard disk and we had to select it as the first
device in the Hard Disk Boot Priority menu.
If your PC can’t boot from USB flash drives,
you can install FreeNAS to one of your hard
disks, but this makes configuration harder later
on and prevents you from using this hard disk
in a RAID array.
Alternatively, you can connect the flash
drive to a USB port and boot the PC from the
FreeNAS Live CD. Your settings will be saved
automatically to the flash drive, so there’s no

132 THE COMPLETE LINUX MANUAL


NET WORK STORAGE

1 2

3 4

installation at all. However, this makes it trickier Enter to install FreeNAS to your computer’s
to upgrade to the latest version of FreeNAS. hard disk. Select option 1 and press Enter.
While you’re in the BIOS, make sure you FreeNAS will confirm the partitions that it will
disable the option to halt on keyboard errors, create and warn you that your entire USB flash
as your FreeNAS PC won’t need a monitor or disk will be wiped.
keyboard connected to it when it’s ready. Press Enter to continue. Select your optical
The other configuration option to consider is drive from the list and press Enter. Finally,
whether you want to use RAID or not. FreeNAS select the flash drive to which you want to
lets you use all common types of RAID (see install the OS (it will have a name that starts
http://tinyurl.com/raidlevels for details). You’ll ‘da’) and press Enter again.
need at least two hard disks to use RAID. The
benefits are increased speed and reliability, and
you can add extra hard disks to your PC later to 5
increase storage. The alternative is to use each
disk separately; this is your only choice if you
have one hard disk. We’ll show you how to use
both methods in our step-by-step instructions.

CONNECTING YOUR PC
You’re now ready to install the operating system
on your computer. Before you start, however,
make sure you remove all USB flash drives
or you’ll get an error (if you’re planning to
start FreeNAS from a CD each time, start your
computer and go to Step 3).

Boot from the disc you created. When the


1 Console setup menu appears, insert your
USB drive into a spare port, type 9 and then

THE COMPLETE LINUX MANUAL 133


CHAPTER 7

Otherwise, select No. In this case you’ll have to


6 select an IP address to use manually.
The easiest way to find a safe address is to
follow your router’s instructions to access the
web-management page from your main PC
and view the DHCP server settings. The page
you’ll see will contain a start address, such as
192.168.1.1, and either an end address, such as
192.168.1.50, or a number that says how many
addresses it hands out, such as 50. In this
example, 50 IP addresses would give us a range
between 192.168.1.1 and 192.168.1.50.
All you have to do is pick an IP address
outside this range. To be on the safe side, we
recommend picking an address that’s 10 higher
than the last DHCP address. So, keep the first
7 three numbers the same and add 10 to the
last number – in our example, that would be
192.168.1.60 – and write down this address, as
you’ll need it later.
Enter the address into FreeNAS and press
Enter. You’ll be prompted for the subnet mask
that your network uses. You’ll most likely have a
network that uses 255.255.255.0, so type 24 and
press Enter. On the next two screens you’ll need
to enter a Gateway and a DNS address. Both are
your router’s IP address. Type this in both dialog
boxes and press Enter. Finally, say No to IPv6
and press Enter. You’ll then get a confirmation
that the IP address has been configured.

FreeNAS is now running, so you can


4 switch to its web-based interface for
FreeNAS will install itself to the flash drive, further configuration. In a web browser on
2 which should take only a few seconds. another computer, type the IP address of your
When it’s finished, you’ll get a message telling FreeNAS server into the address bar. The default
you that you can remove the optical disc and username is ‘admin’ with the password ‘freenas’.
restart your computer. Follow these instructions The first job is to change the password. Click
and make sure your computer is set to boot on the System menu and select General. Click on
from USB devices. the Password tab, type in the old password and
then your new password twice. Click Save and
When your computer restarts, you’ll see a you’ll be prompted to log into the management
3 similar Console setup menu to the one in page again with your new password.
Step 1. Type 1 and then Enter to pick the network
interface you want to use. Pick the one with (up) Next, it’s time to set up file-sharing. Click
in brackets and press Enter. Go to Finish, exit the 5 on Management in the Disks menu and
configuration and press Enter, then Enter again. then click the big plus sign. Select a hard disk
Next, set the IP address that you want your from the drop-down Disk menu (hard disks
FreeNAS computer to use by typing 2 and then start with ‘ad’) and type in a description. We
Enter. You’ll be asked if you want to use DHCP. recommend leaving the other settings alone,
If your router has an option to fix the IP address except for S.M.A.R.T., which is used to monitor
it gives to a specific PC (many do), select Yes. your disk’s health. Put a tick in this box and

134 THE COMPLETE LINUX MANUAL


NET WORK STORAGE

click Add. Repeat this step for each hard disk in


your system, and then click Apply Changes on 8
the Disks, Management screen.

Your hard disks need to be formatted in


6 order to be used. To do this, select Format
from the Disks menu. If you’re going to use each
disk individually, leave the File system option on
its default value of UFS, type in a Volume label
and click Format disk. Repeat this procedure for
all your disks and go to Step 8.
If you want to use RAID, select Software
RAID from the File system menu and click
Format disk. Repeat this for all your hard disks
and go to Step 7.

To create a RAID array, select Software


7 RAID from the Disks menu. Select the type
of RAID array you want to create from the tabs
and click the plus icon. Type in the RAID name
(no spaces are allowed), select the hard disks
you want to use in the Provider menu, select will have one mount point each and a RAID array
Initialize, click Add, then Apply Changes. has one mount point) and click OK. Click Apply
You have to format your new RAID array, so Changes. Repeat for all mount points.
select Format from the Disks menu. Choose your
RAID array from the drop-down Disk menu, type On a Windows PC, get a Run command
in a Volume label and click Format disk. 9 up (Windows+R) and type \\<ip address
of your FreeNAS server> to access shared files.
Now you need to share your disk. Click on Right-click a folder and select Map network drive
8 Disks and then Mount Point. Select a hard to create a network drive that you can access
disk or RAID array from the drop-down Disk just like a normal hard disk.
menu. Type in a Share name and Description, In Ubuntu, select Connect to Server from the
then click Add. Click Apply Changes and your Places menu. Select Windows Share from the
share is ready to be used. menu and type the IP address of your FreeNAS
In order for computers to be able to access computer. To save the connection, select Add
the share, you need to enable the file-sharing bookmark and give it a name. Click Connect
service. Click on CIFS/SMB from the Services to access shared files. You Bookmark is now
menu and put a tick in the Enable box. You available in the Bookmark menu under Places.
shouldn’t need to change many of the settings,
but there are some you can: NetBIOS name
is the name that will appear when computers 9
browse the network, Workgroup is the Windows
workgroup in which your server will appear,
and Large read/write should be enabled if your
computers run Linux, Windows 2000 or later.
When you’re ready, click Save and Restart.
Finally, you need to select which files you
want to share. Click on the Shares tab. Type in
the name you want the share to be known by
and a comment, and then click the button next
to Path. Select the mount point that you created
at the start of this Step (individual hard disks

THE COMPLETE LINUX MANUAL 135


CHAPTER 7

Configuring FreeNAS
FreeNAS’s advanced features let you add security, share files
over the internet and share media with other computers

n the previous four pages we showed

O you how to install FreeNAS and turn


an old computer into a network-
attached storage device. However,
we only scratched the surface of what FreeNAS
can do. Here we’ll take you through some of its
more advanced features so that you can use
the application to its full potential. We’ll cover
how to configure security, as well as advanced
types of file-sharing such as creating your own
media and FTP server that you can access from
anywhere on the internet.
The first place to start is security. Your
default installation of FreeNAS doesn’t have
any usernames or passwords, so anyone could
access the computer. While this is fine on a
local network, if you’re going to use more
advanced features that are accessible over the
internet, such as the FTP server, you’ll need to
know how to set up users and groups.
At the time of writing, the current version
of FreeNAS doesn’t let you choose which
Adding users to your
users have access to each particular service. FreeNAS computer can
This means that anyone with a username and help increase security restore your configuration, use the same
password can access every feature and every menu, but click the Browse button, select
share. For home use this shouldn’t make any the configuration file you backed up and then
difference, unless you’re really keen to restrict click Restore configuration.
access for members of your family. It’s also worth checking that you have the
most up-to-date version of FreeNAS. Go to
BACK UP YOUR CONFIGURATION www.freenas.org and click on the Download link.
If your system develops a problem and you From the list of files, download the latest .iso file
have to reinstall FreeNAS, you’ll need to (i386 for 32-bit and amd64 for 64-bit versions),
restore it quickly. If you don’t back up your which you’ll need to burn to CD. In FreeNAS’s
configuration, you risk losing every file stored web-management page, select Firmware from
in your RAID array. the System menu. Select Enable firmware
To do this, log on to FreeNAS’s web-based upload, click Browse, select the .img file you
management and click Backup/Restore from downloaded and click Upgrade firmware. This
the System menu. Click Download configuration will upload the file automatically and upgrade
and save the file to your PC. If you need to your computer, restarting it when completed.

136 THE COMPLETE LINUX MANUAL


NET WORK STORAGE

ADDING A USER to FreeNAS’s web-management page. You’ll see


To add a new user, go to FreeNAS’s web-based an Explorer-style file browser that you can use to
management page and log on. Click on the view every file and folder. To create a new folder
Access tab and select Users and Groups. Click to share, you need to know where to put it.
the blue Plus button and you’ll be prompted Unlike Windows, which has different drive
to add a user by typing in a username and letters for each hard disk, FreeNAS is based on
password. It’s best to type in the same names Linux. On pages 132-135, we explained that for
and passwords that are used to log into your each hard disk or RAID array you have to create
PC, as this way you’ll automatically be able to a mount point, and it’s the mount point that
access network shares from Windows PCs you need to access. These are stored in the
(Linux users will have to authenticate). ‘mnt’ folder, so click on this. Here you’ll see
You can also assign users to groups. At the a list of folders with the same names as the
moment, all users have access to every service; mount points that you created, each one
however, when this is updated in a later version referring to a hard disk or RAID array. Click
of FreeNAS, it will make security easier to deal on one to access it. Select Directory from the
with as you’ll be able to allow or deny a whole drop-down menu, type in a name and click
group of users access to a service. For now, Create to make a Folder.
though, we’ve put all our users in the ‘admin’ The new folder will have the wrong
group. When you’ve created one user, click permissions and won’t allow users to write
Add, then Apply changes. Click the blue Plus files to it. To change this, click on the link under
button to add another user. the Perm’s column next to the folder you’ve
created (it will look something like drwxrwxr-x).
TURNING ON SECURITY Put a tick in the ‘w’ box under the Public
Now you have users, it’s time to use them. heading and click Change.
Select CIFS/SMB from the Services menu. To use your new folder to create a share,
To turn on security, select Local User from click on CIFS/SMB from the Services menu of
the Authentication menu and then click Save the main web interface window, and click on
and Restart. When you see the message, “The the Shares tab. Click the blue plus icon, type
changes have been applied successfully”, a name for your new share (we’ve chosen the
all your network shares are secure and only name of one of our users) and a description.
authorised users can access them. Click the button next to Path and navigate to the
Now when you access the share it will be ‘mnt’ folder. Click the mount point name where
protected. In Linux, you’ll have to type in a you created your new folder, then click your
username and password. If you created a new folder. Click OK, then click Add followed by
username and password that matches your Apply changes. Your new share will then show
current Windows user, you’ll be able to access up when you access your FreeNAS computer
the shares; if you didn’t, you’ll be prompted to The built-in file browser through Windows or Linux file-sharing. It may be
lets you manage your
type in a valid username and password. files and folders from the
prudent to stop sharing the main share, which
management console
SMARTER SHARES
On the previous four pages we showed you how
to share an entire mount point (hard disk or
RAID array), but this isn’t always the best use of
disk space. It often makes more sense to share
only a particular folder. For example, you could
give each user their own share to use. A similar
argument goes for other services here.
To share a folder, you first need to create
one. FreeNAS has a built-in file browser that
lets you do this. Click on Advanced and select
File Manager, then log on with the same
username and password that you use to log on

THE COMPLETE LINUX MANUAL 137


CHAPTER 7

bit of an overhead on your server, so turn it off


if performance becomes an issue. When you’re
done, click Save and Restart.
To test that it’s working, open your web
browser and type ftp://<ip address of your
FreeNAS computer>. When prompted, type in
a valid username and password, and you’ll be
able to browse all the files on your PC. This
access is very basic, so for more control you’re
better off with a dedicated FTP client such as
FileZilla (see page 112).

INTERNET ACCESS
The next step is to give access to the computer
over the internet. The first problem to overcome
is that your home has an external IP address
that’s shared by all the computers on your
network. This IP address can change, making
it impossible to access your home network.
Fortunately, with Dynamic DNS you can create
a simple URL that’s updated regularly so that it
always points to your home.
The only point to make is that if your router
doesn’t support DynDNS.org (the best free
Dynamic DNS service), FreeNAS does, so you
don’t need to download any other software.
Just select Dynamic DNS from the Services
You can access your
FreeNAS server over the menu, click Enable and type in your
gives users access to an entire drive, by clicking internet using FTP DynDNS.org account details.
the red minus icon next to a share’s name. With Dynamic DNS up and running, you
need to configure your router so that it knows
SETTING UP FTP to send incoming FTP requests to your FreeNAS
The problem with network shares is that they’re computer. This is fairly straightforward and
not easy to share over the internet. Fortunately, involves configuring port forwarding (called
FTP provides a way for all users to access their virtual servers on some routers). You need to
files from anywhere. Be warned, though, that
FreeNAS’s FTP settings are quite basic and
To access your FreeNAS
give users access to the ‘mnt’ folder and, PC over the internet you’ll
therefore, access to every hard disk and RAID need to use port forwarding

array you have installed.


To turn on FTP, select FTP from the Service
menu (don’t select TFTP, as this is a very basic
form of FTP). Put a tick in the Enable box and a
tick in the box marked ‘Only allow authenticated
users. Anonymous logins are prohibited.’ This
will let only authenticated users access FreeNAS.
You can leave the other settings as they are,
although you may want to turn on Resume,
which lets users continue downloading a file
if it’s interrupted, and SSL/TLS, which allows
users to make secure connections to your
server. However, this latter option will place a

138 THE COMPLETE LINUX MANUAL


NET WORK STORAGE

Click the button next to Database directory and


choose a folder in which to create the media
directory. This can be stored anywhere, but for
convenience we put ours in a directory called
Media, which we used to store our media files.
Click Add, which is next to Content, and add the
directory that houses your media. You can add
multiple directories by repeating this step.
If you have a media streamer with limited
format support, you can use transcoding to
turn one file format into another. Put a tick in
the Transcoding box, and FreeNAS will convert
files into a compatible format. However, this
operation is processor-intensive, so turn it off
if your PC’s performance suffers. If you do turn
on this feature, select a Temporary Directory in
which to store the transcoded files.
Finally, select Enable web user interface, click
Save and then restart. Your server will now be
working. You can click on the URL link to view a
You can stream music from
FreeNAS to iTunes easily web page with the status of your server.
configure a new rule that forwards all incoming To turn on iTunes sharing, select iTunes/
traffic on Port 21 to the IP address of your DAAP from the Services menu and follow these
FreeNAS computer. Your router’s manual will tell instructions. The only difference is that you need
you how to do this, and www.portforward.com to set a password for the administrator’s web
has lots of information about it as well. page, and click the Zeroconf/Bonjour link at
Once that’s done, you can access your the bottom of the page to make sure these two
FreeNAS computer from over the internet. network services are selected and turned on,
Your FreeNAS computer
In a web browser, you type ftp://<name of can share media files using
otherwise iTunes won’t detect your NAS.
the DynDNS.org URL you created>, such as its built-in UPnP server
ftp://computershopper.homeftp.net. You can
also use your DynDNS.org URL in a dedicated
FTP client, such as FileZilla.

ITUNES AND UPnP


If you want to share your media files, FreeNAS
makes this easy. It has support for iTunes
sharing, which lets you share music files with
computers running iTunes and some media
streamers, and UPnP, which lets you share
music with a wide range of media streamers.
Both services work in the same way, so we’ll
just explain how to use UPnP.
First, you need a folder in which to store all
your media. This can be an existing folder in a
share or you can create one specifically using
the instructions above. In either case, make sure
that you have network access to this folder so
that you can copy new files to it, by creating a
new share if necessary.
To turn on the UPnP server, select UPnP
from the Services menu and select Enable.

THE COMPLETE LINUX MANUAL 139


CHAPTER 8

140 THE COMPLETE LINUX MANUAL


Troubleshooting
Although we’ve thoroughly checked the advice in this book and
made the steps as easy to follow as possible, you may occasionally
run into problems. Perhaps your computer is crashing or a piece of
hardware isn’t working as it should. Don’t worry: we’re here to help.
Over the next few pages we’ll guide you towards finding the best
solutions to any problems.

Troubleshooting 142
How to use your free Ubuntu 11.04 disc 144

THE COMPLETE LINUX MANUAL 141


CHAPTER 8

Troubleshooting
When things go wrong, Linux can seem impossible to fix, but it isn’t.
Here we’ll help you find the answers to any problems you may have

lthough Linux is a lot easier to use

A than it used to be, when you run


into problems it can seem just as
confusing as ever. Don’t panic,
though – getting your PC working again isn’t
as hard as you might think.

FIND OUT WHAT HAPPENED


The first step to fixing a problem is knowing
what went wrong and why. It could be that
Ubuntu fails to load one day through no fault of
Make a complete system
your own, but it’s more likely that installing a image of your computer so
new piece of hardware or software caused the that you can restore it quickly your computer won’t turn on or there’s nothing
after a problem
issue. Remember any changes you’ve made, onscreen, there’s probably something wrong with
so you’ll be able to find the help you need and your hardware, rather than Linux.
avoid making the same change in the future. If you’ve just installed some hardware,
remove the new bit of kit and see if that makes a
IS IT A HARDWARE PROBLEM? difference. If you’ve upgraded your PC recently,
A problem with your computer could easily be make sure that the memory, expansion card and
What appears to be a Linux
an issue with hardware as well as software. If problem may actually be a
processor are all fitted correctly.
hardware problem
HAVE A BACKUP READY
If your computer has completely broken and you
can’t even start Linux, don’t worry about trying
to fix it. Instead, reach for a system backup (see
page 126). A complete system image enables
you to restore your computer back to a working
point before the trouble started. It’s the easiest
and best method of fixing a problem, and
highlights why you should make a backup before
making any major system changes.

FOLLOW ONSCREEN INSTRUCTIONS


Linux can be frustrating as it often doesn’t
provide a graphical way of fixing a problem.
However, you’ll often see an onscreen message
telling you the command that you need to type.
Look out for any helpful messages and then try
typing them into a Terminal window (or directly

142 THE COMPLETE LINUX MANUAL


TROUBLESHOOTING

onscreen if Ubuntu won’t even load the graphical


interface). If the command won’t run, try using
‘sudo’ in front of it. This will run the command
with higher-level privileges. You’ll be prompted
to type in your password when using sudo.

KNOW THE DETAILS


Ubuntu has lots of different versions that
aren’t compatible with each other. In fact, the
Look out for onscreen
differences between ‘point’ releases, such as messages that tell you how
9.04 and 9.10, can sometimes be so great that to fix your problem
software and hardware that work on one won’t
work on the other. For this reason, make sure
you know exactly which version you’re running. SEARCH GOOGLE
You also need to know the exact product The official forums and documentation don’t
name or software version you’re having problems have the answers to everything, so searching
with. All this information together will make sure Google can be your last resort. Remember, you
you get the right help; following advice for the need to provide the exact details that you’re
wrong version of Linux often won’t work. looking for in the search in order to get the best
results (see ‘Know the details’, above).
READ THE DOCUMENTATION You’ll probably find many forums that contain
There’s official documentation for each version information related to your problem. Read
of Ubuntu on the operating system’s website through a few to find the best answers; we find
(https://help.ubuntu.com). Make sure you click that comments from other users can really help
the right link for your version of the OS (11.04 if track down the best answer.
you installed from the free CD with this book).
In the documentation you’ll find detailed step- DON’T PANIC
by-step instructions on how to perform tasks, as Many troubleshooting solutions require you to
well as explanations. Make this your first stop edit a file or use strange-sounding commands.
when you’re trying to troubleshoot a problem. Don’t worry about these. If you’re interested
you can look up what they do, otherwise find a
VISIT THE OFFICIAL FORUMS solution where people have verified it’s correct
Forum threads are a
One of the best things about Linux is that and follow the advice. sure-fire way to ask for
the users form a community. Many of these and find help
members are so passionate about the OS that
they’ll do anything to help someone that’s
struggling. At http://ubuntuforums.org you’ll find
the official forums dedicated to helping people
that are having problems with Ubuntu.
Before you post a question, search the forums
to see if there’s an existing answer to your
problem, remembering to follow the advice in
‘Know the details’ above. Finally, don’t worry
about the occasional person who posts a rude
or unhelpful remark to one of your questions;
other users will soon appear and hopefully give
you the help you need.
Do read the Forum FAQ and Code of Conduct
first so that you don’t post messages in the
wrong place or use the wrong type of language.
These documents are helpful guides on how to
ask for help in the right way.

THE COMPLETE LINUX MANUAL 143


MIS
CHAPTER 8 If your USING DISC
b ?
missing untu 11.04 dis
, please c is
newsag as k your
ent.

How to use your free


Ubuntu 11.04 disc
To make things as easy as possible, we’ve included a free CD of
Ubuntu 11.04 with this book. Here’s how to use it

INSERT DISC
1 Your free disc is an Ubuntu 11.04 installation CD that out, or install Ubuntu on your hard disk by following the guide
contains no other software. You can boot your computer on page 12. First, you need to turn on your computer and
directly from it and choose one of two options: either run a insert the CD into your optical drive. If it doesn’t boot from
test version of Ubuntu without installing it so you can try it the disc, go to step 2; otherwise skip straight to step 3.

SET YOUR COMPUTER TO BOOT INSTALL LINUX


2 FROM DISC 3 Your computer will now automatically boot from the CD.
To use the disc, your computer needs to be set up so that On the first menu, select English as your language and you’ll
its optical drive is the first boot device. To do this, you need see the Ubuntu menu. From here, you can select ‘Try Ubuntu
to press the key to enter the BIOS when your computer first without any changes to your computer’ to run the OS from
powers on. This is likely to be the Delete, F2 or F12 key, but the CD. This lets you
look out for a message onscreen. give Linux a try without
In the BIOS, find Boot options, which is likely to be listed making any changes to
under Advanced your computer.
Options. Select the When you’re ready
1st Boot Device to put the OS on your
as CDROM. When PC permanently, reboot
that’s done, save and follow the full
the changes and installation instructions
exit the BIOS. on page 12.

LINUX: THE COMPLETE MANUAL


EDITORIAL MANAGEMENT MAGBOOK LICENSING/SYNDICATION The paper used within
Editor MagBooks Manager The ‘MagBook’ brand is To license this product, please this MagBook is produced
Jim Martin Dharmesh Mistry a trademark of Dennis contact Hannah Heagney on from sustainable fibre,
Publishing Director Publishing Ltd, 30 Cleveland +44 20 7907 6134, email manufactured by mills with
Contributors John Garewal St, London W1T 4JD. hannah_heagney@dennis. a valid chain of custody.
David Ludlow, Jon Thompson
Operations Director Company registered in co.uk. For syndication queries,
Design and layout Robin Ryan Printed by BGP, Bicester, Oxon
England. please contact Anj Dosaj-Halai
Anand Parmar Managing Director of on +44 20 7907 6132, email
Advertising Please note: As Ubuntu is
Production All material © Dennis [email protected] constantly being updated, you
Julian Lloyd-Evans
Steve Haines Publishing Ltd, licensed by may notice slight differences
Newstrade Director LIABILITY
David Barker Felden 2011, and may not between the screenshots in
COVER ILLUSTRATION be reproduced in whole or The publishers cannot be held
[email protected] Chief Operating Officer this book and what you see on
part without the consent responsible for the accuracy
Brett Reynolds your screen. However, any
PHOTOGRAPHY of the publishers. of information in this MagBook
Group Finance Director changes will be minor and
Danny Bird, Jan Cihak, or any consequence arising
Ian Leggett shouldn’t affect the
Pat Hall, Timo Hebditch, ISBN 1-907779-19-1 from it. Dennis Publishing
Chief Executive step-by-step guides.
Andrew Ridge James Tye takes no responsibility for
Digital Production Manager Chairman thecompanies advertising
Nicky Baker Felix Dennis in this MagBook.

You might also like