You are on page 1of 164




Welcome to

Ubuntu Book
Many people who want to make the move from their Windows systems to a Linux
distribution choose Ubuntu as their first step. The reasons for this are clear, as it provides
a clean, attractive GUI with Unity, and usability by the bucket-load. It is the perfect
environment in which to begin learning about the command line and creating a more
customisable workspace, while still benefitting from the positives that you were used
to in Windows and other desktop systems. In this book, our aim is to guide you from
where you are now – whether that’s about to download Ubuntu, or looking for ways
to supercharge your experience – to becoming a confident Ubuntu power user. You’ll
discover the best features of Ubuntu’s default software, and the best FOSS apps for you
to download from the Software Centre. We’ll even suggest some re-spins of Ubuntu to
try, should you want to go beyond the basic Unity interface.

Ubuntu Imagine Publishing Ltd

Richmond House
33 Richmond Hill
Dorset BH2 6EZ
 +44 (0) 1202 586200
Twitter: @Books_Imagine

Publishing Director
Aaron Asadi

Head of Design
Ross Andrews

Production Editor
Alex Hoskins

Senior Art Editor

Greg Whitaker

Perry Wardell-Wicks

Printed by
William Gibbons, 26 Planetary Road, Willenhall, West Midlands, WV13 3XT

Distributed in the UK, Eire & the Rest of the World by

Marketforce, 5 Churchill Place, Canary Wharf, London, E14 5HU
Tel 0203 787 9060

Distributed in Australia by
Gordon & Gotch Australia Pty Ltd, 26 Rodborough Road, Frenchs Forest, NSW, 2086 Australia
Tel: +61 2 9972 8800 Web:

The publisher cannot accept responsibility for any unsolicited material lost or damaged in the
post. All text and layout is the copyright of Imagine Publishing Ltd. Nothing in this bookazine may
be reproduced in whole or part without the written permission of the publisher. All copyrights are
recognised and used specifically for the purpose of criticism and review. Although the bookazine has
endeavoured to ensure all information is correct at time of print, prices and availability may change.
This bookazine is fully independent and not affiliated in any way with the companies mentioned herein.

The Ubuntu Book First Edition © 2016 Imagine Publishing Ltd

ISBN 978 1785 462 849

Part of the

bookazine series
Ubuntu Book

Contents 08 Get 16 What’s

started your
with Ubuntu
Get to know this
l avour?
Discover diferent
popular Linux distro desktop environments

Ubuntu essentials 48 GNOME Terminal & XTerm

Explore the basics and beneits
62 Connect with
Online Accounts
Enjoy convenient integration
50 Secure iles with Déjà Dup
24 Navigate Ubuntu’s desktop Create a copy of your valuable data 63 Use System Monitor
Find your way around View and manage your resources
52 Use Startup Disk Creator
26 Dual boot with Ubuntu Make a bootable USB
Run Ubuntu alongside Windows

28 Customising the desktop

54 Check the Time & Date
View the calendar and make changes
Ubuntu apps
Change settings to your preferences
55 Unleash Archive Manager 66 Explore the Ubuntu
30 Discover System Settings Understand this handy accessory
Personalise your system details Software Centre
56 Using Disk Usage Analyzer Your one-stop shop for new apps
32 Tweak Security Settings Find out where your disk space went
Ensure you are protected
70 Browse with Firefox
57 Manage Startup Explore the Internet
34 Find your way around Dash Applications 72 Manage emails
This handy search bar is your gateway Automatically start your apps
with Thunderbird
36 Understand the ile system 58 Monitor Software All your email accounts covered
Learn about ile system organisation
& Updates 74 Communicate with Empathy
Keep your system up to date
38 Accessibility in Ubuntu Set up and use this instant messenger
Make Ubuntu easier to use
59 Work with Universal Access 76 Explore LibreOffice Writer
Make Ubuntu more friendly
40 Sharing iles in Ubuntu Discover the features of the FOSS
Transfer your documents with ease word processor
60 Conigure Network
42 Manage drives with Disks connections 78 Unlock LibreOffice Calc tricks
Use hard drives and removable media Set up a new connection Use the spreadsheets like a pro

44 Commanding Ubuntu 61 Tweak the Power settings 80 Edit formulas in Math

Get to grips with the command line Make your laptop run longer Learn about this LibreOice extra

6 The Ubuntu Book

82 Present with Impress 104 Touch up photos 130 BitTorrent with Transmission
Get to know the FOSS presenting tool with GIMP Upload and download data
Enhance your photos like a
84 20 LibreOffice tips & tricks professional 132 Visualise data with Chart.js
Make your working day even Draw gorgeous graphs of all kinds
more productive 108 Discover PulseAudio
We reveal its mind-blowing features 136 Command-line efficiency
88 Text editing with Gedit Take the terminal further
Understand its features and uses

90 Create discs with Brasero

Supercharge 142 Develop with Python
Learn about this popular coding language
Create CDs and DVDs fast
Beyond Ubuntu
Create 114 Best free software
Enhance your Ubuntu experience
150 Mint 17.3 ‘Rosa’ Cinnamon
with Ubuntu 124 Partition with GParted Is this variant better than Ubuntu?
Use the GUI to handle partitioning
152 Elementary Freya
94 Work with LibreOffice draw Discover this Mac-like, consistent distro
Create cool vector graphics 126 Remote control
workstations with 154 Netrunner 17 ‘Horizon’
96 View images with Shotwell Remmina A plasma desktop with striking aesthetics
Make viewing images seamless Manage a remote server from your
desk with Remmina 156 LXLE 14.04.3
98 Manage images A Lubuntu respin, great for old hardware
with Shotwell 128 Switch languages
Keep tabs on large numbers of image iles with FCITX 158 Deepin Linux 2014.3
Master this extra feature An elegant HTML5 desktop
100 View movies with Videos
View videos with Ubuntu’s default app

102 Listen to songs

with RhythmBox
Use this background music app

The Ubuntu Book 7

Get started with Ubuntu

Get started
with Ubuntu
Because of its free, open source and user-friendly nature, Ubuntu has
gained a lot of momentum in recent times. No wonder so many software
developers are using it for their projects

buntu is a free, user-friendly Linux-based server use. These are just some of the features that Ubuntu is easy to use – It’s easy to pick up and use, even
operating system that has found its place in make Ubuntu the best operating system to go for in the if you come from a Windows background. Users don’t
every corner of the world. The best thing about developer community… need to do anything extra when booting Ubuntu for the
Ubuntu is that it is absolutely free, including its future Ubuntu is everywhere – Almost all computer first time.
updates. Another thing that makes Ubuntu so popular manufacturers are shipping models based on Ubuntu Ubuntu is pretty stable – For most users, Ubuntu just
is that it is extremely light on PC hardware, so you can – this is one of the main reasons why you can use works. This is because the OS is being tweaked and
install it on computers that are three to four years old, Ubuntu everywhere. fixed all the time. Since all the latest packages are not
yet it still runs very smoothly. Ubuntu is the most widely Ubuntu is well supported – There are few other Linux integrated during the development cycle, it also helps in
used Linux operating system – both for desktops and distros that provide the same kind of long-term support providing better stability.
in the cloud. Consider Ubuntu as a complete desktop as Ubuntu. Considering the amount of money and effort Looking at the above features, it’s no surprise that
operating system that is freely available – with both involved in developing software, it becomes even more Ubuntu is so popular. We will go into more detail during
community and professional support. It can be noted important to provide long-term support when it comes the rest of this feature, and will cover various aspects
here that Ubuntu is suitable for both desktop and to open source projects. that will be of great help to new Ubuntu users.

8 The Ubuntu Book

Get started with Ubuntu

Getting started with Dual boot

the trial version If you want to use

Linux, but still want
Windows installed
on your computer,
You can try out Ubuntu the best option
for you is to install
without even installing it Ubuntu in a dual-boot
configuration. Just
The system requirements required vary among Ubuntu place the Ubuntu
installer on a USB
products. For the Ubuntu desktop release 14.04, a PC
drive, CD or DVD. Once
with at least 768MB of RAM and 5GB of disk space is you have done this,
highly recommended. For less powerful computers, it’s restart your computer
best to use one of the other Ubuntu distributions. and select the Install
Ubuntu can be booted from a USB drive or CD and Ubuntu option instead
of the Try Ubuntu
used without even installing it. Let’s take a look at the option. Go through
the different ways of downloading and using the trial the install process
version of Ubuntu… and select the option
to install Ubuntu
alongside Windows.
Live booting and virtual machines You’ll be able to select
the operating system
One of the easiest ways to get started with Ubuntu is you want to use
whenever you start
by creating a live USB drive, CD or DVD. After placing
Ubuntu onto it, you can insert your USB stick or disc
“Ubuntu can be booted from a your computer. Head
to p.24 for more.
into any computer and restart it. The computer should
then boot from the removable medium you provided
USB drive or disc and used without
and you’ll be able to use Ubuntu without making any even installing it”
changes to the computer’s hard drive.
You may be wondering how to create a live Ubuntu Above You can install
USB drive or disc. For this, you can download the latest Ubuntu or just try it out
Ubuntu disk image from Ubuntu’s website. Use the Left If successful, you
Unetbootin tool to put Ubuntu on your USB flash drive or will be presented with the
burn the downloaded ISO image to a disc. All you need to standard Ubuntu desktop
do now is to restart your computer from the removable
medium you provided and select the Try Ubuntu option.
Like any other operating system, Ubuntu can also
be run in a virtual machine on your computer. In this
way, you’ll be able to try Linux without even restarting
your computer, although you should note that virtual
machines are slower than running the operating
system on your computer itself. To create a Ubuntu
virtual machine, first you need to download and install
VirtualBox. Create a new virtual machine with it, select
the Ubuntu operating system, and provide the ISO
file you downloaded from Ubuntu’s website when
prompted. The installation process is self-explanatory
and you can go through it in the virtual machine as if you
were installing Ubuntu on a real computer.

Boot Ubuntu from a disc or USB stick

As mentioned earlier, as a newcomer to Ubuntu, you will you’ll see a welcome screen that prompts you to choose
be able to try it without even installing it. This can be your language and gives an option to either install Ubuntu
done either an Ubuntu DVD in the drive or a USB stick with or try it from the USB stick.
Ubuntu on it in a USB port.
Irrespective of whether you are using the DVD or USB

1 If using a DVD, put the Ubuntu DVD into the drive and
restart the computer. You will see a welcome screen
3 stick method, the next step is to select your preferred
language and then click on ‘Try Ubuntu’. Your live desktop
which prompts you to choose your language and gives an will then appear (as shown in the picture above).
option to install Ubuntu or try it from the DVD.
As a final step, when you are ready to install Ubuntu,

2 If you want to use a USB drive, note that the latest

computers can start up from a USB stick. Here also,
4 you just need to double-click on the icon on your
desktop: ’Install Ubuntu 14.04 LTS’.

The Ubuntu Book 9

Get started with Ubuntu

Adopting the
full version of
New versions are released
every six months and are
supported for 18 months
As noted previously, Ubuntu is a very popular Linux
distribution with many years of maturity under its belt
and a huge user base. After becoming comfortable
with the initial few aspects of Ubuntu, now it is time
for you to take a deeper look at Ubuntu’s full version.
Before you start with Ubuntu, you need to obtain a copy
of the Ubuntu installation image. In addition, you will
have to ensure that your system meets the minimum
requirements. The most common method of obtaining
Ubuntu is to download the Ubuntu DVD image directly
from the official site: For
downloading and installing it, you just need to select
whether you require the 32-bit or 64-bit version and then
click ‘Start download’.
It is important to understand here the two versions “If you have an older computer or you do not
that Ubuntu is available in: 32-bit and 64-bit. They differ
from each other in the way the computer processes
know the type of the processor it uses, it is
information. So if your computer has a 64-bit processor,
you will need to install the 64-bit version; if you have
advisable to install the 32-bit version”
an older computer or you do not know the type of the
processor in your computer, it is advisable to install retained when possible and system-wide settings will
the 32-bit version.
Although 5GB of free space on your hard drive is
Options for be cleared.
The ‘Erase disk and install Ubuntu’ option can be
required for installing Ubuntu, the recommendation is
to have 15GB or more. This will mean you’ll have enough
installation used if you want to erase your entire disk. As expected,
this will delete any existing operating system that is
space to install extra applications, as well as to store You can install Ubuntu installed on that disk and install Ubuntu in its place.
your own documents, music etc. When you choose the ‘Something else’ option, you
You can note here that if you have an Internet alongside another OS or will be able to configure the partitions as you need
connection, then the installer will ask you if you want before installing Ubuntu.
to ‘Download updates while installing’. It is highly
replace it It can be noted here that in order to reduce the
recommended to perform this step. time required for installation, Ubuntu will continue
The Ubuntu installer will automatically detect any the installation process in the background while the
existing operating system installed on your machine, user configures some important user details like
and present installation options suitable for your username, password, keyboard settings, the default
system. Please note that the options listed below time zone and so on.
entirely depend on your specific system and may not
all be available:

• Install alongside other operating systems

Internet connection
•Upgrade Ubuntu … to 14.04 It is important to have an Internet connection during
• Erase … and install Ubuntu the Ubuntu installation process. If you are not
connected to the Internet, the installer will ask you to
• Something else
choose a wireless network, if available. You can follow
these steps in such a scenario…
Out of the above four options, the most preferred 1. Select ‘Connect to this network’ and then you need
is ‘Upgrade Ubuntu … to 14.04’. This is because to choose your network from the list.
2. In the ‘Password’ field, enter your router’s WEP or
this option will allow you to keep all your precious
WPA key.
documents, music, pictures and any other personal 3. Then click ‘Connect’ to continue.
files on the computer. Installed software will be

10 The Ubuntu Book

Get started with Ubuntu

User account details and beyond

Ubuntu needs to know some information about you so that pretty straightforward, and is considered as an important
it can set up the primary user account on your computer. step before you proceed further.
As expected, when configured, your name will appear on
the login screen as well as the user menu. You may notice that Ubuntu is a little different compared
to some other operating systems. The most important
On this screen you will need to provide the following thing to understand is the Ubuntu packaging system.
information to Ubuntu… Typically it includes:
• Your name
• What you want to call your computer /usr
• Your desired username /var
• Your desired password /bin
After the installation has finished and your computer /lib
is restarted, you will be greeted with the login screen
of Ubuntu. The login screen will present you with your The other thing to note here is cron job management.
username and you will need to enter the password that The jobs that are the under the purview of the system
you provided previously to get past it. Click to enter your administrator can be found in the /etc directory. Therefore,
username and password; you may then press Enter to if you have a root cron job for daily, weekly or monthly runs,
access the Ubuntu desktop. make sure to place them under
Once we have our Ubuntu desktop ready, we may be These jobs can be invoked from /etc/crontab. bunch of useful applications, and will automate the
interested in viewing the hidden files. This can be easily installation process on a newly installed machine to obtain
done by clicking View Options>Show Hidden Files. There is a tool called ‘Ubuntu After Install’ available, which a near perfect desktop. This tool saves a lot of your time
After successfully installing Ubuntu, you may want to can be used to install some of the best and essential and effort, and installs all latest versions of software on
encrypt your home folder. It takes very little time and is software after installing the Ubuntu desktop. It has a your Ubuntu system.

“The menu bar

incorporates the most
common functions
used in Ubuntu. Each
installation of Ubuntu
may contain slightly
different types and
quantities of icons”

Left You can choose to

employ the terminal

Navigate Ubuntu
Decode the menu bar, Launcher, Dash, home directory and more
After taking a look at the initial aspects of Ubuntu, features provided by a desktop environment are related
now it’s time to delve deeper into the operating to the look and feel of the system and how easily a user
system. To start with, you may notice many similarities can navigate the desktop.
between Ubuntu and other operating systems – Let us take a quick look at the menu bar in Ubuntu.
mainly because of the fact that they are all based on The menu bar incorporates the most common functions
the concept of a GUI (graphical user interface). It is used in Ubuntu. Each installation of Ubuntu may contain
definitely a good idea to understand the applications slightly different types and quantities of icons based
and menus in Ubuntu so that we will be comfortable on a number of factors, including the type of hardware.
with using its GUI. Any GUI-based operating system Some programs add an icon to the indicator area
makes use of a desktop environment. The main automatically during installation.

The Ubuntu Book 11

Get started with Ubuntu

You should note that every application features its

own menu system wherein different actions can be
executed within it (such as File, Edit, View and so on).
Appropriately, the menu system for an application is
known as the application menu.
Another thing that we need to understand in
Ubuntu is the ‘Launcher’: the vertical bar of icons
available on the left side of the desktop. With the help
of this Launcher, one can easily access the various
applications, mounted devices and trash. Note that any
application that is running will have its icon placed in the
Launcher bar.

In Ubuntu, we commonly come across something To explore the Dash, you need to click on the topmost
called ‘Dash’. If you have used Windows in the past, icon on the Launcher. Now you will be able to see a
you can consider Dash as something similar to the window with a search bar on the top as well as the
Windows Start menu. The Dash will help you to find the recently accessed applications, files and downloads.
applications and files on your machine.

“You can consider Dash

as something similar
to the Windows Start
menu: it helps you to
Above To run any application from the Launcher, you just need
to click on the application’s icon
find applications and
files on your machine”
As mentioned above, Dash is a very powerful tool that
can be used to search for files and applications on your
computer. In order to find files or folders, you simply
need to type a portion of the file or folder name: as you
type, the results will appear in the Dash.
As expected, a standard Ubuntu installation comes
with many applications. And users can additionally
download thousands of applications from the Ubuntu
Software Centre. The Applications lens on the Dash will
automatically categorise installed applications under
‘Recently Used’, ‘Installed’ or ‘More Suggestions’.
You can also enter the name of an application (or a
part of it) into the search bar in the Dash, and the names
of applications matching your search criteria will appear.
Even if you don’t remember the name of the application
at all, type a keyword that is relevant to that application
and the Dash will be able to find it. Another thing that we
need to understand here is that in addition to searching
your local machine for files and applications, Dash can
help in searching various online resources.
Now let’s take a look at how to browse the files on
your machine. In addition to using Dash to search for
files, one can also access them directly from their

12 The Ubuntu Book

Get started with Ubuntu

directory. The home directory is used to store all of your Once you are done with working on your machine, you Securing Ubuntu
personal files (instead of system-related files). can select the option to log out, suspend, restart or shut
Sometimes, you may need to make use of the down through the Session Indicator. Ubuntu is considered as secure primarily due to the
following reasons…
‘Files’ file manager window. Whenever you select the
• Many viruses designed to primarily target Windows-
Files shortcut in the Launcher, Ubuntu will open this Alhough Ubuntu provides a nice GUI, to fully utilise the based systems do not affect Ubuntu system.
file manager. power of the OS you’ll need to understand the ‘terminal’. • Security patches for open source software like
Any operating system has two types of user interface: Ubuntu are often released quickly.
• Open source software like Ubuntu allows security
flaws to be easily detected.
GUI: This is the desktop, windows, menus and toolbars • The basic security concepts such as file permissions,
that you click to get things done. passwords and user accounts are also available with
Command-line interface (CLI): The terminal is Ubuntu’s Ubuntu. Understanding these concepts will help you
CLI. It can be considered as a method of controlling in securing your computer.
some aspects of Ubuntu using only commands that you
type on the keyboard.
Even though users are able to perform most day-
to-day activities without ever opening a terminal, it is
considered as a very powerful tool and is therefore well
worth investigating. With it, you will be able to perform
many useful tasks.

As you can see from the above screenshot, this window Troubleshooting tasks: If you face any difficulties while
comes with the following features: using Ubuntu, then you may need to use the terminal.
If you need to perform operations on multiple files at the
menu bar: It is located at the top of the screen. With this same time, then the terminal is the preferred method.
menu bar, one will be able to browse and System administration and software development
remove bookmarks, open a new window, skills can be significantly improved by having a good
connect to a server, quit etc. understanding of the CLI.
title bar: This indicates the name of the currently A terminal can be opening either by hitting Alt+Ctrl+T
selected directory. simultaneously or by right-clicking the desktop and then
toolbar: This displays your location in the file system, a selecting Terminal from the menu.
search button etc. Please note that all the commands in the terminal
Sometimes, you may need to customise your Ubuntu follow the same approach: you can type the command,
desktop. Most customisation can be achieved via the possibly followed by some parameters, and then press
Session Indicator and then selecting System Settings to Enter to perform the specified action. In most cases, Another concept that users need to know about
open the System Settings application window. some type of output will be displayed to confirm the is mounting and unmounting removable devices.
action was completed successfully, although this can Mounting a device means associating a directory name
depend on the command being executed. with the device, and this in turn allows you to navigate
Ubuntu offers various text editors which are installed to the directory to access the device’s files. When you’ve
by default. The most commonly used command-line finished using a device, you can safely unmount it.
editor is vim. The table below gives quick information Unmounting a device disassociates the device from its
about some of the important files in Ubuntu. directory, allowing you to eject it.

“Mounting a device means associating a directory

name with the device, and this in turn allows you
to navigate to the directory to access the device’s
files directly”
File A quick description
/etc/issue Gives info about Ubuntu version that you
Ubuntu file system structure are currently running
Ubuntu uses the Linux file system and it is based
on a series of folders in the root directory. These
/etc/apt/sources.list Contains the available sources for
folders contain important system files that cannot be software installation
modified unless you are running as the root user or use
the sudo command. With this restriction, computer lsb_release -a Prints out the Ubuntu version you
viruses will not be able to change the core system
files, and normal users will not be able to accidently
are running
change anything that is critical.
/usr/share/tomcat Installation directory for Tomcat

The Ubuntu Book 13

Get started with Ubuntu

What next? It’s all too easy to accidentally delete a file – we’ve all
done it. If this happens, the good news is that you should
still be able to recover the file from Ubuntu’s Trash folder.
Troubleshooting and software The Trash can be considered as a special folder where
Ubuntu stores deleted files before they are permanently
management in Ubuntu removed from your computer. Follow these steps in
order to recover a file…
Sometimes when you are using Ubuntu, things
may not work out as expected. The good thing is Open Trash folder
that the problems encountered while working with
Ubuntu can be easily fixed. The best practice for any If you need to restore an item, select it in the Trash. Click
troubleshooting with Ubuntu is to complete all the steps ‘Restore selected items’ and this will move the selected
and document the changes you have made, so that you deleted items back to their original locations.
Issues with the hardware
will be able to track and undo changes (if necessary),
and also to pass the details about your work to other In some scenarios, Ubuntu may have difficulties running
users in the community. Let us take a quick look at some on certain computers. The good thing is that the Ubuntu
of the most common problems that users may face community has plenty of documentation that may help
with Ubuntu. you to overcome many such problems. The complete
hardware troubleshooting guide is available on Ubuntu’s
support wiki at
Forgot your password? Let’s take a closer look at how software management
In Ubuntu, if you forget your password, you can reset it can be achieved in Ubuntu. Ubuntu uses a set of
by using ‘Recovery mode’. To start the Recovery mode, software utlities called a package management
you need to shut down your computer and then start system or package manager. Consider a package
again. As the computer starts up, press the Shift key and manager as a collection of tools that will make the
then select the Recovery mode option using the arrow life of a user much easier when it comes to installing,
keys on your keyboard. Once booted, instead of a normal upgrading, deleting and configuring software. A package
login screen, you will see a Recovery Menu. Select root management system has a database of all software,
using the arrow keys and press Enter. You will now be at called the repository, and this repository provides a lot of
a terminal prompt: How to clean Ubuntu? information about the software – including the version,
the vendor’s name and the dependencies that are there
root@ubuntu:~# Unused packages and temporary files will be for the software to properly get installed. By default,
In order to reset your password, you can enter: accumulated in Ubuntu’s software packaging system Ubuntu provides two different ways by which one can
# passwd username and over a time, this can grow quite large. Cleaning browse the repositories for searching, installing and
…replacing ‘username’ with your own username. After up allows a user to reclaim space on their computer. removing software.
this, Ubuntu will prompt you for a new password. Type We have two options – clean and autoclean – for this
it, press the Enter key, then retype your password and purpose. In order to obtain the clean utility (activated 1. Ubuntu Software Centre
press Enter again when you are done. using the clean command), open a terminal and enter: 2. Command-line apt-get

$ sudo apt-get clean With the help of the Ubuntu Software Centre, one can
“Problems encountered One can also use the autoremove option here to remove search, install and remove applications easily and

while working with unused packages: conveniently. It is considered as the most common
application management system used by both novice
Ubuntu are easily fixed” $ sudo apt-get autoremove and expert Ubuntu users. Since in Ubuntu, software is
delivered in the form of packages, it becomes a one-
click process when we install the software by using the
Ubuntu Software Centre. You can consider the Software
Centre as a kind of app store that gives you instant
access to thousands of applications.

14 The Ubuntu Book

Get started with Ubuntu

Trusting third-party software

As discussed, by default we will add applications
via the Ubuntu Software Centre that downloads the
required software from the Ubuntu repository. But in
some cases, we may need to add software from other
repositories. Using only recognised sources, such as a
project’s site or various community repositories is more
secure than downloading applications from an arbitrary
source. When using a third-party source, you will need
to consider its trustworthiness, and be 100 per cent
sure about what you’re installing on your computer.

Get involved with Ubuntu

The Ubuntu community provides users with a lot of
opportunities to get involved. Doing so will also help
you to enhance your skills. Some of the ways for you to
contribute are:

• Providing technical support to end users

• Fixing bugs in the existing software
• Contributing to community documentation
• Writing new software

As can be seen from the screenshot on the previous 7. Manage payment information and transaction The middle section of this specific window allows you
page, the Ubuntu Software Centre window has four history with a single Ubuntu account to customise the updates. You can customise the
sections – a list of categories on the left, a banner on frequency for the updates; it also provides options for
the top, a ‘What’s new’ panel, and a ‘Recommended For In addition, Ubuntu allows the user to decide how installing the updates.
You’ panel. Note that clicking on a category will take you they want to manage their package updates. This can You should now be comfortable using Ubuntu.
to a list of related applications. If you are looking for a be achieved through the Updates tab in the ‘Software As a next step, you can enhance your knowledge by
specific application, you may already know its specific and Updates’ window. understanding various other Linux distributions (such as
name or you may just have a general category in mind. With this, you will be able to specify what kinds of Kubuntu, Lubuntu and Xubuntu). Another thing you may
To help you find the right application, you can browse the updates you are interested in installing on your machine. want to take a closer look at is Ubuntu Server Edition.
Software Centre catalogue by clicking on the category The available options are: We can consider Ubuntu Server Edition as an operating
reflecting the type of software you seek. system that has been optimised to perform multi-user
Another handy feature of Software Centre is that 1. Important security updates (trusty-security) tasks. Some of these tasks may include file sharing,
it keeps track of past software management in the 2. Recommended updates (trusty-updates) website hosting etc. More official documentation about
History section. This is very useful if you wish to 3. Pre-released updates (trusty-proposed) Ubuntu is available at and we advise
reinstall an application previously removed and do 4. Unsupported updates (trusty-backports) you to peruse it at your leisure.
not remember the application’s name. The Software
Centre also helps in recommending the software based
on the software already installed on your system.
Although the Software Centre provides a large library of
applications from which to choose, only those packages
available within the official Ubuntu repositories are
listed. Sometimes, you may be interested in a specific
application that is not available in these repositories. In
this scenario, we may have to use alternative methods
for accessing and installing software in Ubuntu, such
as downloading an installation file manually from the
internet or adding extra repositories.

In summary, with Ubuntu Software Centre, one will be

able to perform the following activities:
1. Search for, download, install and remove software in
a single window
2. Keep track of your software installation, update and
removal history
3. Test-drive software without installation or purchase
4. Read and write user reviews
5. Receive software recommendations based on your
search and installation history
6. Filter software searches by providers, like Ubuntu,
Canonical Partners, and For Purchase

The Ubuntu Book 15

Ubuntu flavours

What’s your
Ubuntu flavour?
Canonical recognises Ubuntu flavours - custom Ubuntu versions shipped
with different desktop environments, or designed for specific usage
Ubuntu is a Linux distribution that ships with the Unity
desktop. However, there are other desktops, such as
KDE, GNOME, MATE, XFCE and others with their own
established communities. Technically, changing a
desktop is about installing another set of packages, that
are all part of standard Ubuntu online repositories. This
way you can install all of them and choose what desktop
you want to use at the login greeter. Ubuntu works fine
with multiple desktops, but could always use a polish
in terms of its user experience due to minor details, like
icons from one desktop appearing in a system tray of
another, or a mixed set of default applications.
A custom Ubuntu remix with a desktop other
than Unit, or with specific usage focus is called the
‘Ubuntu Flavour’. Everyone can build his or her own
clone of Ubuntu with custom settings, tweaks,
added extra applications and so on, but here we
are going to review so-called ‘official’ Ubuntu
flavours. The difference between a custom-
made Ubuntu delivery with an official flavour
is that the latter has been recognised by the
Tech Board of main Ubuntu team and thus
is officially supported by Canonical. The
official support means that Canonical
provides its Launchpad infrastructure for
building and testing a flavour’s images,
Ubuntu team members monitor bugs
in the public bug tracker of a flavour,
and also a community manager from
a flavour’s party aligns his or her plans
with the official Ubuntu release schedule.
Recognised Ubuntu flavours are often
released a few days after the main Ubuntu
release announcements and share Ubuntu
fixes and improvements once they are not
desktop-specific. There are no significant
differences between Ubuntu and its
flavours in terms of hardware and software
compatibility, and almost any application
for Linux works with any of Ubuntu
flavours once it is reported to work with
the flagship Ubuntu distribution.

16 The Ubuntu Book

Ubuntu flavours

An Ubuntu flavour with the KDE
Plasma desktop, Kubuntu is reported
to offer the best KDE experience, and
even has the letter ‘k’ in its name!
Kubuntu has been the second most popular version of Ubuntu ever since it
emerged in 2005, when KDE developers talked loud about the undisputed
superiority of their beloved desktop environment and often added the ‘k’
letter to an application name to make it clear to users that it was a KDE-
centric one. Modern Kubuntu features the Plasma5 desktop, the version that
superseded the previous version called KDE Software Compilation 4.x. Kubuntu
is about KDE, and KDE is about customising the UI. The KDE offers the same
desktop paradigm as the ‘older’ Windows versions (without the controversial
Metro interface), with a taskbar along the bottom and the ‘K’ menu on the left for
starting programmes. In KDE you can change hundreds of settings, customise the
toolbar, add plasmoids (desktop widgets), redefine any aspect of the look and feel and
have your desktop behave the way you want it to. To accommodate this, KDE does eat
up more system resources and sometimes can slow your system down (especially on
low-end machines). The KDE Plasma desktop is often considered as a heavyweight
“The KDE Plasma desktop is a
shell due to various processes that run in the background (like the file indexer for heavyweight shell due to processes
instant searches) and sophisticated desktop effects. Besides the fact that you can
configure KDE to run faster by disabling extra features, the desktop is improving
that run in the background”
over time. Kubuntu with Plasma 5 runs very smooth and fluid, it has a much better
compositing engine that removes flickering when you watch videos, and doesn’t load
your system with heavy background tasks if it detects that you are running productivity
applications. Default applications choice does not differ much between Ubuntu and
Kubuntu, except for the fact that Thunderbird mail was replaced with KMail.

Above Windows Aero and OS X

Aqua are gone, but KDE Plasma is
here to stay!

The Ubuntu Book 17

A lightweight Ubuntu-based Linux distribution
with the LXDE desktop that provides faster
performance and better energy saving
The world of Linux is so big, that there has been no lack of lightweight Linux
distributions. Still Lubuntu managed to become the most popular lightweight distro
within the last few years. The secret is in the logical and balanced approach of the
great LXDE desktop complemented with a stable and widely recognised Ubuntu
basement. LXDE was started in 2006 as a set of lightweight GTK-based accessories
made to accompany PCManFM, a quick and robust file manager. Since then, LXDE
included but was not limited to home grown desktop modules with speaking names
(LXInput, LXLauncher, LXPanel...) as well as third-party components: Openbox
Edubuntu offers a custom applications set for
as a window manager, SDDM for login greeter, Leafpad for text editor and a few educational purposes and is designed to be
others. Following a trend to roll out a desktop-specific application store in every
other Ubuntu flavour, Lubuntu team has integrated the Lubuntu Software Center used in schools and universities
into its distribution. It lets users install or remove extra applications and looks like it
is a happy blend of Ubuntu Software Center (with its ratings and screenshots) and Edubuntu ships with Unity – the same shell you might have seen in the flagship
Synaptic (with its detailed packages control). Ubuntu distribution. However, it is almost impossible to mix this flavour with its
parent due to massive customisation. Edubuntu has clearly been tailored for school
classes. First, Edubuntu sticks to the LTS Ubuntu releases for its basis, that’s why
From LXDE to LXQT major Edubuntu versions see the light once in two years, with smaller updates
inbetween. For that reason, the newest version in the time of writing is 14.04.2 LTS,
LXDE developers had been unhappy with GTK 3 development some time ago, and not 15.10 as for many other Ubuntu flavours.
decided to move interface controls from GTK to Qt. Qt is the industry-standard Second, Edubuntu’s installation image is quite large and needs a DVD or USB
graphical toolkit that delivers very comfortable cross-platform development. stick for preparing an installation media. When you launch the installation wizard,
Currently the future of LXDE with Qt happens under the new name LXQT. It is you will notice the Edubuntu-specific additions to it. You can add the GNOME
under active development and while many people already use LXQT for testing and Fallback session here or install LTSP (Linux Terminal Server Project) to make
reporting bugs, it is not ready for everyday use yet. The modern LXQT has absorbed students’ machines boot via network from the tutor’s server machine. Edubuntu
contribution from Razor-Qt – another minimalistic desktop, with which LXQT was installer also lets you select package templates for required target audience
merged in 2013. LXQt already looks sleek and still works very fast. Lubuntu offers a (preschool) and course level (primary, secondary, tertiary).
way to test LXQT with just three commands: When the system is up and running, you can guess that it is Edubuntu by the
modified Ubuntu logo with raised hand and by the custom (and rich) set of pre-
sudo add-apt-repository -y ppa:lubuntu-dev/lubuntu-daily installed applications. These include Blinken memory game, Calibre books
sudo apt-get update manager, Fritzing emulator for building electronic circuits, Chemtool for scheming
sudo apt-get install lxqt-metapackage lxqt-panel openbox chemical formulas and much more. It includes educational software from KDE
project and standalone learning applications, with high-grade scientific solutions.

18 The Ubuntu Book

Ubuntu GNOME
Though Unity incorporates lots of GNOME
applications, some people want enjoy a pure
GNOME Shell experience. Ubuntu GNOME is
the best solution for that
Years ago there was no GNOME 3 (also known as GNOME Shell), and Ubuntu
featured the now-classic GNOME 2.x desktop. Since then GNOME 3 has evolved
into an original environment where mobile and desktop interface combine in grace.
The team at the main Ubuntu distribution is focused on polishing Unity desktop
features, while very few devs actually care that Ubuntu still ships with very outdated
GNOME accessories. Sooner or later, a GNOME 3 based flavour must have been
made. The first Ubuntu GNOME release took place during 2012 and was warmly Mythbuntu is an Ubuntu version tailored
welcomed by GNOME fans, who preferred pure GNOME 3 desktop to Unity.
GNOME 3 has a trendy look, slightly larger UI controls (some of them are designed
to deliver a smooth MythTV experience
to be triggered by finger on touchscreens) and the original desktop layout. The top
bar is fixed, with the Activities button on the left, while a clock with calendar and The idea behind Mythbuntu is to bridge the gap between inexperienced users
notifications are at the centre, and applications indicators on the right. Similar to that still want to turn their PC into a media center, and Ubuntu geeks. Mythbuntu
Unity, there is a vertical launcher panel along the left edge of the screen, but GNOME makes installing and setting up the MythTV system a little easier – at least users
3 hides it by default (press the Super key to reveal it). don’t have to hunt down individual packages and stick to command line to enter
GNOME takes a different approach in offering settings to a user. There is the built- commands. So, Mythbuntu is a comfortable and ready-to-configure delivery
in System Settings, which is fine but quite basic once you want to customise system of MythTV in Linux. MythTV offers the interface and the underlying routines
look and feel. A more powerful settings altering tool is called ‘GNOME-tweak-tool’, for setting up a digital video recorder, or maybe a digital home multimedia/
and it is available in Ubuntu GNOME standard repositories. GNOME Tweak Tool can entertaining system. In short, it is an open source alternative to things like
be combined with Unity Tweak Tool: even though we don’t have the Unity desktop Windows Media Center.
here, the two tweakers complement each other and will prove useful.

Client and Server

MythTV has a client-server architecture, so there is a foreground user-friendly
part (client) with a fullscreen interface, remote control support, and a background
“GNOME 3 has a trendy look, with part (server) that runs the underlying routines, like converting media, interacting

slightly larger UI controls, and the with TV tuners, etc. The server side is very powerful: it supports ATSC, QAM, DMB-
T/H and DVB sources – virtually all major formats for high-definition television.
original desktop layout” Mythbuntu lets you create custom setups with client and server running on the
same machine, or a ‘frontend-only’ installation in case you already have a MythTV
backend running somewhere else.

The Ubuntu Book 19

Xubuntu is an Ubuntu version with the
XFCE desktop, which is focused on
performance and useability. XFCE is lighter
than Unity, but not as light as LXDE
Xubuntu is fast, low on resources and offers a clean, uncluttered desktop. Does
that sound familiar to you? It might remind you of what we said about Lubuntu.
Xubuntu and Lubuntu share their target audiences by offering Ubuntu flavours
with similar features. Both systems are good for old or low-end computers, but
it seems like Xubuntu doesn’t slim down desktop features like Lubuntu does and
generally is feature-rich rather than minimalistic.
Ubuntu MATE
Xubuntu offers a clean XFCE desktop with the main launcher panel at the
top of the screen. There are now 5 presets of the panel and the backup and
MATE is the reincarnation of the classic
restoration tool for the panel. Browse the XFCE main menu to explore the
wonderful world of different default applications. Thunar is the default file
GNOME 2 desktop, that used to be very
manager, Orage offers a calendar, and Mousepad is a text editor. In fact, XFCE has popular before GNOME 3 (GNOME Shell) took
a wide list of custom-made accessories and utilities (including a CD burner!), the
original Xfwm window manager, own frontend to Gstreamer media framework over. Ubuntu MATE brings it to the fore
(Parole), and of course its own System Settings clone with original modules.
While certain Ubuntu flavours are targeted at low-end machines, or specific
area of usage, Ubuntu MATE is a mainstream distribution. It doesn’t compete
Reasons to go with X with the main Ubuntu and its Unity desktop, but attracts the part of the audience
that simply doesn’t like Unity. It doesn’t mean that Unity is bad, but Ubuntu used
A lot of people can be left undecided with what desktop environment to go to offer a GNOME 2.x desktop before version 11.04 and a lot of people got used to
with: XFCE or LXDE. Both are attractive and fine and have little footprint both it. GNOME 2.x was appreciated for its clean and logical desktop layout and robust
in RAM and occupied hard drive space. Remember that the underlying system performance. This version was left unmaintained since GNOME 3 took over, and
remains the same, and you can install both desktops at one time using standard it was forked for a new project called MATE. MATE looks exactly the same as the
Ubuntu repositories. However, LXDE has been switching to Qt lately, and is not old GNOME 2.x, but brings modern improvements to user experience, such as full
considered stable enough, while XFCE is older and generally very stable. Also, support for modern GTK 3 toolkit, correct usage of application indicators in the
since LXDE is transforming to LXQT, there is the inevitable mix of GTK and Qt system tray, fixed integration with Pulseaudio mixer, Bluetooth applet and more.
based apps, whereas XFCE remains to be purely GTK based.

Different naming
“Xubuntu and Lubuntu offer Ubuntu The desktop is named after the South American plant ‘yerba mate’. To avoid collision
between modern GNOME 3 default applications and forked old-timers, MATE
flavours with similar features” developers renamed everything. Gedit is now Pluma, Nautilus is Caja, Evince is Atril
and so on. Thanks to this, MATE can coexist with GNOME 3 on the same machine.

20 The Ubuntu Book

Ubuntu Kylin
Ubuntu Kylin is the official Chinese version of
Ubuntu, developed by joint forces of Canonical
and the Ministry of Industry and Information
Technology of the People’s Republic of China
This is an exquisite Ubuntu flavour, which is really unlike the others. Naturally, it
is intended for use in China, by Chinese people in other countries and by students
of the Chinese language, culture and traditions. The Chinese government used to
invest heavily into Kylin, a FreeBSD-based system that was designed to become
a ‘national OS’ in China. But later on, in 2013, the Chinese government agreed with
Canonical to develop a customised Ubuntu version specifically for Chinese market,
so the history of Ubuntu Kylin began. The new operating system was named after the
mythical beast “Qi Lin”, a hybrid of a dragon head and tiger body which represents
good omens, protection, prosperity, success, and longevity. The Ubuntu Kylin release
schedule is aligned with the main Ubuntu Linux, and both systems are mutually
compatible in terms of supported software. The difference is in default applications
and, of course, localisation that goes far beyond simple change of UI language.
“The operating system was named
Ubuntu with a Chinese flair after the mythical beast ‘Qi Lin’, a
Installing Ubuntu Kylin is possible for non-Chinese users if they memorise the order hybrid of a dragon and tiger”
of the buttons in the original Ubuntu. You can change the UI language to English later
on. Ubuntu Kylin has tested the FCitx input module well, which supports Wubi, pen,
Cangjie, breeze, spelling and more. The very lovely Kylin theme is also a bonus.
Left How the Ubuntu Kylin
interface looks

The Ubuntu Book 21

24 Navigate Ubuntu’s desktop 55 Unleash Archive Manager
Find your way around Understand this handy accessory

26 Dual boot with Ubuntu 56 Using Disk Usage Analyzer 60 Conigure Network
Run Ubuntu alongside Windows Find out where your disk space went connections
Set up a new connection
28 Customising the desktop 57 Manage Startup
Change settings to your preferences Applications 61 Tweak the Power settings
Automatically start your apps Make your laptop run longer
30 Discover System Settings
Personalise your system details 58 Monitor Software 62 Connect with
32 Tweak Security Settings & Updates Online Accounts
Keep your system up to date Enjoy convenient integration
Ensure you are protected

34 Find your way around Dash 59 Work with Universal Access 63 Use System Monitor
Make Ubuntu more friendly View and manage your resources
This handy search bar is your gateway

36 Understand the ile system 32 56

Learn about ile system organisation

38 Accessibility in Ubuntu
Make Ubuntu easier to use

40 Sharing iles in Ubuntu

Transfer your documents with ease

42 Manage drives with Disks 50

Use hard drives and removable media

44 Commanding Ubuntu
Get to grips with the command line

48 GNOME Terminal & XTerm

Explore the basics and beneits

50 Secure iles with Déjà Dup

Create a copy of your valuable data

52 Use Startup Disk Creator

Make a bootable USB

54 Check the Time & Date

View the calendar and make changes

22 The Ubuntu Book


The Ubuntu Book 23

Ubuntu essentials

Navigating the basic The dash

Unity’s start menu is keyboard driven
and opening it in this way can save
time. Savvy users will open it using the

Ubuntu desktop
Windows key on their keyboard. You
can get a real productivity boost by
following it up with a few characters
describing the app you are looking for:
for example, entering Thun after tapping

Get to know where to the Windows key virtually ensures that

the Thunderbird icon appears right in
the middle of the application list
find everything you
need on the intuitive
and attractive Ubuntu
desktop screen
When Ubuntu first introduced its Unity desktop,
some users threatened to move back to Windows
Vista. However, as time went by, the desktop
became more and more reliable: as of 12.04LTS,
there is no real reason to dislike Unity.
Unity initially started out as a research product
trying to create a GUI that was better suited to
netbooks: their extremely wide displays did not work
particularly well with traditional desktop managers
that had been intended for workstations utilising the
standard 4:3 displays.
This explains two important changes to the
interface: first of all, the “launcher” was moved to the
side of the screen in order to preserve the valuable
vertical real estate. Secondarily, the menu bars of the
various different applications were grouped together
into one top bar that is always dedicated to the
currently enabled application. This is one of the main
differences you will find from Windows and other
distros in terms of usability, but it is one that you will
become accustomed to over time.
While getting up to speed with Unity might take
users a bit of time, rest assured that the productivity
increases that you will eventually see are more than
worth it. Take a look at the annotations to find the
hotspots you’ll need most quickly.

“The menu bars of

the various different The quick launcher
applications were All of the running applications
are shown below the dash
grouped together into symbol. The arrows located
on the left side of the icon
one top bar that is always let you know the number of
windows that are currently
dedicated to the currently Trash
open. On dual-screen
workstations, an “empty”
enabled application on Just where you’d expect to
find it, the trash can is always
arrow here indicates that the
window is not located on the
the screen” visible at the bottom of the
quick launch bar
display that is showing this
particular version of the bar

24 The Ubuntu Book

Navigating the basic Ubuntu desktop

The keyboard cheatsheet Wallpaper

Unity comes with a set of helpful As with practically any
keyboard shortcuts that increase other distro or OS, your
productivity and get things done faster. wallpaper is a canvas
Press and hold on the Windows key to for you to put your own
make the desktop environment display a stamp on. The default
list of shortcuts for you in the middle of Ubuntu offering isn’t too
the screen that is currently active shabby, though
The quick
Right-click on the
symbol of a running
application to open
a short menu.
Selecting “Lock to
launcher” from the
available options
ensures that the
symbol will always
remain in the bar for
quick access to that
specific application,
even if it is not
currently running

The indicator menu

Ubuntu will display symbols
alerting you about any events and/
or important system state changes
that are taking place or need your
attention. Click on any of these
icons when they appear to reveal
a short menu providing you with
further options about the situation
at hand

Active workspace The menu bar

Front and centre, it’s the Move your mouse
window you’re working on. cursor up to the very
To switch to another without top of the screen to
closing the current window, enable the menu
just click on or search for the display. This is a
app you want to open next. It really helpful tool
can be minimised if you hover for accessibility
at the top of the window, when as less dexterity is
the classic three buttons required to complete
will appear: close, minimise it. Simply flick the
and maximise. Be aware that cursor to the top of
clicking the close option will the screen and let
mean you need to start the Unity take care of
program again any overshoot

The Ubuntu Book 25

Ubuntu essentials

Dual boot with Ubuntu

Get Ubuntu running alongside your existing Windows installation
Most users who want to try Ubuntu NTFS partitions from Linux is considered stable enough the master boot record (MBR) of the hard drive on
already have desktop PCs or laptops with and if you didn’t have any problems with your C drive in older systems, or GRUB2-EFI into the dedicated FAT32
the Windows OS. Ubuntu can be installed Windows (such as severe fragmentation), Ubuntu will partition on modern systems with Windows 8 or 10 and
alongside Windows and both systems will coexist just resize it correctly. The installer will create the mandatory a GPT-formatted drive. The Ubuntu installer supports
fine, without interfering with each other. root partition (/) in the free disk area and sometimes the Secure Boot feature of many modern Windows PCs
Ubuntu’s installation wizard has an advanced disk also create separate partitions for user data (/home) and installs the GRUB2-EFI bootloader correctly. After
partition stage, where you can either trust the installer and swap space. After the installer copies Ubuntu rebooting, you’ll see the GRUB2/GRUB2-EFI interface,
to automatically shrink the Windows partition and let files to the root partition, it’ll perform post-installation where you can choose Ubuntu or Windows. You can
Ubuntu use the freed space, or do it manually. Shrinking arrangements and install the GRUB2 bootloader into access Windows files from Ubuntu, but not vice versa.

Discover bootloader menu Find out how to use the GRUB2 bootloader
Meet the GNU GRUB The default entry
GRUB in Ubuntu looks nearly If you do nothing, GRUB will load the default
identical on systems with a BIOS menu entry, which is the first one in the list.
or UEFI setup. The version of the It always points to the latest installed kernel
program is displayed on the top version with default parameters

Boot Windows Reveal the power of GRUB

Select the last entry to boot You can instantly change boot settings by
Windows. GRUB will redirect you to pressing the E key, editing an entry and then
the Microsoft standard bootloader pressing F10. This is a one-time solution: GRUB
that sits on the Windows partition will discard such custom settings after reboot

26 The Ubuntu Book

Dual boot with Ubuntu

Dare to go for
manual setup
Ubuntu’s installation program has been polished in
recent years and now looks very smooth. Soon after
completing basic steps (like language selection), a user
faces the first real obstacle during the ‘Installation
type’ step. You can see that Ubuntu has automatically
detected our Windows 7 copy and offered the simple
solution that does not require any extra user input. If
so, you let the installer automatically guess what OS
you already have and how to keep it intact. It’s safe,
and you’ll be able to define how much space you want
to allocate for Ubuntu in the next step.
Note the second option with the red Warning label
– we are going to install Ubuntu and keep Windows
working, so do not choose this. The last option is a
path to a more expert-like drive allocation program.
Dual-booting in UEFI mode introduces more routines
for the Ubuntu installer. If you’re unsure what to
choose, go with auto mode. If your system uses a BIOS
interface, you can repartition your drive manually.

Define the space for Ubuntu Create Ubuntu partitions

Make sure you give it enough disk space Options for partitioning your hard drive
The automatic partitioning option and make it smaller by some Many older articles concerning the another aspect to consider. If you go
in the Ubuntu installer is definitely number of gigabytes. Make sure installation of Linux strongly advise with a single root partition, that
more comfortable for non-tech- that you don’t have excessive hard users to create a swap partition means all your personal files and
savvy users, but it does have disk fragmentation in Windows, with a size twice that of the RAM settings will be kept together with
certain limitations, such as the otherwise you may turn your NTFS volume (for instance, 2GB if you the rest of the system on a single
inability to add an extra Home volume in Ubuntu installer unusable. have 1GB of RAM). However, modern partition (/), just like if you only had
partition or define the swap space Try to guess how much space you’ll computers generally have larger the C: drive in Windows for storing
manually. Let’s use the fully fledged need in the unallocated area after amounts of RAM and therefore everything. Sometimes it is more
partitioning method by choosing shrinking. For instance, 10GB looks this rule is not that important any sensible to create another partition
the ‘Something else’ option in the like the bare minimum – go with at more. That being said, you could and mount it as /home – this
previous step, or by clicking the least twice as much as that for the go without the swap partition means that your files and settings
‘Advanced partitioning tool’ link Ubuntu root partition. Think ahead altogether unless you feel that you will not get lost, even if you decide
in the ‘simple’ mode. First, you’ll to cover aspects like swapping and a really need it. The separate partition to reinstall or remove Ubuntu in
need to resize the NTFS volume separate partition for /home. for your home folder in Ubuntu is the future.

Select target drive

for the bootloader
This option only requires your attention if it’s the
case that you have more than one hard drive inside
or attached to your computer. Otherwise, if you had
previously installed custom operating systems onto
your Windows desktop PC or laptop, you might find it
useful to get to grips with this option as well. First of
all, in order to boot correctly, Ubuntu needs a properly
installed GRUB bootloader.
You can install it on a hard drive (eg /dev/sda) or on
a drive partition (eg /dev/sda3). If you have a relatively
modern UEFI/Secure Boot setup, then Ubuntu will
act differently: it will install GRUB2-EFI on /dev/sda1,
which is a FAT32 partition, and mount it as /boot/efi.
Furthermore, a special loader entry in your computer’s
UEFI internals will be made by the means of the
‘efibbotmgr’ utility. Don’t worry though, Ubuntu does all
of this automatically.

The Ubuntu Book 27

Ubuntu essentials

Customising the desktop

Change desktop settings and add a personal touch to Ubuntu’s exterior

Tweak desktop settings Use related sections in Ubuntu’s System Settings app
Unity Tweak Tool Change Specific settings Window manager Default wallpaper
It’s not included right out of Unity is made up of various different There are ways in which you You can set the default
the box, but it is instantly elements, including the main taskbar can change the behaviour Ubuntu wallpaper to a photo
available in the standard which is along the right side of the of window manager in Unity. (or maybe a drawing) of your
Ubuntu online repository. Get screen, the main menu with a search Shadows, translucency, choice in the Appearance
it with $ sudo apt-get install feature (Dash), the top panel and the animations, hot corners, section of the standard
unity-tweak-tool task switcher snapping, focusing rules etc System Settings

Appearance settings System settings A Register Editor for Ubuntu Change the theme
Here you can change GTK Unity Tweak Tool offers Use the command $ sudo apt-get This defines how various
style, window decoration advanced system settings, eg install dconf-editor to install a twin UI controls look, and this
theme and fonts separately, enabling desktop icons, extra panel settings manager. It behaves includes buttons, scroll
change mouse cursor look security measures, control similarly to the Register Editor in bars, menu background,
and move window buttons to over scroll bars as well as Windows OS and lets you adjust many window decorations and
another edge of a window mouse behaviour hidden settings lots of other details

The default desktop environment in essential features, such as appearance and behaviour require some extra features that are not part of the out-
Ubuntu is called Unity. It provides users of the desktop, to be customised to the user’s liking. of-the-box Ubuntu. For that reason, there are different
with a consistent and easy-to-use graphical This is done with the Look and Feel settings, ways to work around it in the form of commands ($
interface for doing common everyday tasks. The default localisation, input options as well as privacy-related gsettings) and even stand-alone tweakers (eg Unity-
settings in Unity are quite simple, they are based on settings. Some of the above don’t affect Ubuntu tweak-tool). Such extras let you change advanced
studies that were conducted with the exact goal being behaviour – such as various aesthetic settings (theme, settings like fonts, window control placement, desktop
to find out what exactly people find comfortable and icons), but some do . effects and more. Next you can find out how you
intuitive and other useful details. However, with so many It is worth mentioning that sometimes people need can change the most common settings and resolve
people with so many different tastes, Unity allows all more precise control over their Ubuntu installation and frequently met issues.

28 The Ubuntu Book

Customising the desktop

Tutorial Give a personal touch to your Ubuntu desktop

01 Adjust the Launcher (taskbar)

The taskbar panel or the Launcher works
just fine, but sometimes you need to get rid of some
of the default icons there and add your favourite
apps instead. To remove an icon, right-click on it and
select the ‘Unlock from Launcher’ option. To add an
application to the taskbar you first need to find it
in the Dash and then drag it onto the desired place
of the taskbar. You can also drag and rearrange the
existing icons on the taskbar. Use the Appearance
>Look section in System Settings to change the
taskbar icon size. If you make it smaller, more icons
will fit there, which is helpful for small displays. Also,
check the Behaviour tab for auto-hiding option,
enabling multiple workspaces and more.

02 Change privacy settings

Ubuntu includes certain mechanisms for
gathering users’ data and collecting statistics – of
course, this is meant entirely for the sake of better
usability in future Ubuntu releases. Some find this
behaviour controversial, so let’s adjust it a little.
In System Settings>Security and Privacy go to the
Files & Applications tab and uncheck or maybe
turn completely off files and applications usage
statistics. On the Search tab you can actually turn
the online search results in Unity Dash on or off. If
you don’t like shopping suggestions while looking
for a local app on your computer, simply turn it off.

“With so many people

with so many different
tastes, Unity allows all 04 Use hot corners
The Unity desktop lets you assign an action to any corner of the screen, plus to any of its sides. In order
to do this, we need to access advanced window manager settings. Launch Unity Tweak Tool and go to Window
essential features, such Manager>Hotcorners. There are eight areas (four corners and four sides) with a drop-down menus next to each,

as appearance and letting you choose what action will be performed once you move your mouse to the respective area. You can
set a corner or a side to toggle the desktop (for example, minimise all windows or bring them back on), spread
behaviour of the desktop, windows or show workspaces. All changes are applied instantly, you can check it by driving your mouse to a
corner or a side that has been set up.
to be customised”
05 Rule the indicators
The ‘System Tray’ area in Unity traditionally

03 Change look and feel

Changing the interface theme can
dramatically change the working experience and
resides the far-right corner of the top bar. Some
indicators there can be configured individually (like
date and time), but you cannot have better control of
make it more pleasant. It is perfectly safe: you don’t them without dealing with Dconf-editor. This twin-
change how your desktop works, you change how it panel app has a categories list on the left and the
looks. By default Ubuntu ships with three themes: contents on the right allows you adjust many aspects
Ambiance (the default one), Radiance (light colours) of Unity indicators. Go to com>canonical>indicator
and High Contrast (for visually challenged). You can and explore what parameters each one has. You
add more by installing new themes via command line can turn indicator presence on the top bar on and
(adding a PPA with a theme and installing its package off by toggling the ‘visibility’ parameter and change
for example), or download themes manually from site indicators’ display format by playing with ‘show-*’
like Ubuntu looks for themes in the parameters. This way you can keep your system
system-wide /usr/share/themes directory and in tray area clean and tidy, or maybe add some extra
~/.themes inside your home. information there.

The Ubuntu Book 29

Ubuntu essentials

Discover System Settings

Discover system details, manage user accounts and configure hardware
The System Settings application houses no exception), system settings could be changed via settings for Backup, System Details, Landscape
various settings and acts the same way editing configuration files in the /etc directory, or by Service, Software Sources, Time & Date, Universal
as the Control Panel in Windows. You can issuing certain commands while being in root. While Access and User Accounts. Some of the above are
launch System Settings from the farthest indicator in these work in Ubuntu, it requires advanced skills and applicable for enterprise Ubuntu users (such as the
the top bar, or even from the command line ($ unity- sometimes involves putting your Linux installation at paid subscription for technical support, which is called
control-center). Of course, the set of system-related risk. The System Settings shell in Ubuntu contains a Landscape), while other settings are covered in detail
settings here isn’t the only place where you can change limited number of neatly designed items that help you in separate chapters (Backup, Time & Date, etc). This
such settings, but it is the most convenient and safe manage essential system-related settings with ease overview focuses on Details and User Accounts as well
place to do it. Traditionally in Linux (and Ubuntu is and minimum skill. The System subsection contains as on certain hardware-related settings.

The important subsections Configure your Ubuntu installation

Navigation Search for a setting
When you open a subsection, it If you cannot find the required settings but
loads in the same window. In order you know its name, type it into the search
to get back to the main overview, use bar and see how System Settings filter the
the ‘All Settings’ button here results according to your input on the fly

Personal settings Hardware settings System-related settings

Most settings here are user- You might set up extra peripherals, Backups, system details, updates
specific. You can also change input devices, change power and software sources, accessibility
look and feel settings here, adjust settings, or even manage colour options, time and date and more, can
privacy, manage online accounts etc profiles for printers and displays be managed within this category

30 The Ubuntu Book

Discover System Settings

Explore system details

and change some defaults
Sometimes you need to know what version of Ubuntu
you have. Is it 32 or 64 bit, how much memory there
is in your PC and so on. In order to not get lost, there
is a dedicated subsection in System Settings called
Details. The main screen in Details shows a summary
of the most important specs of your system, including
CPU name and clock, graphics driver, hard disk volume
and more. You can also update your system with the
Install Updates button on the right. There are other
useful tabs in Details – see the list on the left side of
the screen. Go to Default Applications to change your
default web browser, email client, music player or
image viewer. Similarly, on the Removable Media tab
you can define what Ubuntu should do when an optical
disc (CD/DVD/BD) is inserted. Again, all changes are
then applied immediately.

Manage Ubuntu users Tune up power settings

Add guest logins or other users Optimise your power consumption
If your PC is mainly used as a private Accounts subsection. By default, you These settings mostly affect laptop there is no need for this. Another
or personal computer then perhaps can only see the list and the settings, users, but they can help optimise power-related tunable is screen
you are the only user in the system. but can’t change anything. To add desktop power consumption as brightness. Either follow the link on
Here’s what you do you need to do if or remove users you must click the well. In the Hardware category, go to the Power tab or open the Brightness
you want to create another user for ‘Unlock’ button and enter the root Power and use the first drop-down & Lock subsection directly. Here
testing purposes, or for guest logins. password. After that you’ll be able menu to set the inactivity period, you can set a period of inactivity for
If there is actually already more than to click the tiny ‘+’ and ‘-‘ buttons after which your computer will turning the display off automatically,
one person that accesses the PC (in a displayed at the lower left corner of automatically suspend. The second as well as lock it and define whether
public place for example), you’ll need the screen, watch an activity log of option below lets you disable the the user should be required to
the correct number of login accounts. other users (the History button) and battery indicator for example. When provide a previously set password to
These are managed in the User toggle their automatic login. your laptop always runs from AC, unlock the computer.

Set up a printer
Ubuntu automatically detects and configures local
printers in case it has a driver for them. Most consumer
printers are supported without any problems in Linux
nowadays, so if you open the Printers subsection, you
should see the icon for a configured printer. You can
change (edit) the printer’s preferences, change its driver,
or you can create several instances of the same printer
with different settings.
Press the ‘Add’ button and follow the easy-to-use
wizard to set up a local or remote printer – Ubuntu
detects network printers automatically. In case you
need more control or you want to resolve a printing
issue, use this tip: $ sudo service cups restart. This is
the command for restarting the system-wide printing
service in Ubuntu. To enjoy the feature-rich CUPS admin
interface instead, then try going to http://localhost:631
in your web browser.
Note that all changes to printer settings require the
root password of your Ubuntu system.

“Follow the easy-to-use

wizard to set up a printer”
The Ubuntu Book 31
Ubuntu essentials

Tweak the Security Settings

Make sure your Ubuntu setup provides proper privacy protection
Find the security settings Check out the Security & Privacy tools on offer
Protect your PC Related settings Usage activities record What about online
If your PC suspends or The first link takes you to the User Here is the global switch that search results?
turns off the display after Accounts subsection, where you can triggers file and application A rather controversial feature,
a period of inactivity, you change your password; the second usage logging. You can turn it which is why Canonical decided
can set Ubuntu to require link is for Power settings, where you off with just one mouse click, to put in the Off mode in 16.04.
a password in order to can change the time period before or alternatively decide to make You can always change the
resume using the PC you system suspends more precise adjustments trigger’s position here

Choose what to include Exclude specific directories Diagnostic reporting

There are default places inside your and apps Canonical needs your feedback
home directory for Music, Pictures, Use the ‘+’ and ‘-’ buttons to select specific in order to make Ubuntu better.
Downloads etc. You can decide what directories or applications that Ubuntu If something goes wrong (eg a
items you want to include in Ubuntu will not log or trace. You can even create program crashes), Ubuntu will
logging. Aside from directories, there sophisticated combinations of apps send details of the problem in a
are also chat logs and office documents report to its headquarters

Privacy is a cornerstone of secure commands as an administrator. For regular desktop may vary. You may not want others to see what you have
computing, meaning that your data should activities there is the System Settings>Security & been using recently, or maybe online search results in
be protected from loss or leakage, your Privacy subsection, where you can change most of the Dash (Unity’s main menu) distracts you, or you simply
computer should prevent unauthorised access and security-related settings. The majority of them refer to don’t want Canonical to know you better. There is
that you should be aware of what personal data is password protection, keeping logs and history for files another security setting in Ubuntu outside its System
sent from your system to remote servers. Ubuntu and applications, online search results in Ubuntu Dash Settings shell. When you launch Firefox for the first
provides a good balance between usability and security, and diagnostics information that Canonical would like time it politely asks you to choose what data you’d like to
for example you cannot log in to Unity desktop directly; to have in order to fix bugs and collect users’ statistics. share. By default Firefox sends crash and help reports to
instead you can actually use the ‘sudo’ prefix to run The reasons as to why you may want to change anything Mozilla, but still it’s you who decides and approves it.

32 The Ubuntu Book

Tweak the Security Settings

Tutorial Resolve typical security-related issues in Ubuntu

01 Generate a stronger password

There is no sense in setting your Ubuntu
password as something simple such as 12345678
or P@ssw0rd. It is sensible to invent a combination
of symbols that is unique, complex, long enough and
most importantly something that you are sure you
will not forget. A good password contains lower and
uppercase letters, special characters and digits.
Thankfully, Ubuntu can help you deal better with
stronger passwords via the APG utility. Install it with
$ sudo apt-get install apg and run simply with $ apg.
APG which will prompt you to enter a random word
of your choosing, and then converts your suggestion
into a stronger combination of characters, but still
something readable and not too hard to remember by
heart – like WoudElIc6 (Woud-El-Ic-SIX).

02 Enable automatic security updates

Let’s go a little further and make Ubuntu
receive important security updates without any
interaction with a user. This feature is very useful
because not all updates are installed without your
awareness, but only security-related ones that fix 03 Enable uncomplicated firewall
Firewall is an effective tool for blocking
“A good password
vulnerabilities, critical bugs, memory leakage and
so on. To enable this feature, first start by installing
network intrusions from the outer world and limiting
suspicious network activity in both directions by
contains lower and
the package along with the required scripts: blocking certain network packets in IPv4 and IPv6 uppercase letters, special
protocols. Linux has the ‘iptables’ tool for doing this
$ sudo apt-get install unattended-upgrades. job, but it is not very intuitive for newcomers. Luckily, characters and digits.
Next, enable updates with the following command:
Ubuntu has a nice front end to iptables called UFW
– the Ubuntu FireWall in its standard repositories.
Thankfully, Ubuntu can
$ sudo dpkg-reconfigure -priority-low
Install it with: help you”

All you have to do is to add unattended upgrades

$ sudo apt-get install ufw gufw

You can control it either from command line ($ sudo

04 Configure ‘sudo’
The ‘sudo’ is a command that you can put
before another command in order to make it run
command to your Cron list on a daily/weekly/ ufw --help), or within a graphical interface (search with root priviliges. You can use sudo anytime and
monthly basis. Find more details at for ‘firewall’ in Dash or simply launch $ gufw). for any command but practically you only need to
do so if you haven’t got enough permissions with
your regular user account – for managing printers,
or in case you need to write a file into a directory
outside your home for example. Ubuntu comes
with sudo enabled by default, which lets you run
any command, but requires entering your current
password (not the root password, root is disabled
in Ubuntu by default). You can change the sudo
settings by issuing the $ sudo visudo command,
which will open the /etc/sudoers file in the Nano
editor. You can discover the magic of sudo with $
man sudo, but there are also instant solutions you
can use by changing the following line:

username ALL=(ALL) ALL

to the one below:


to stop sudo asking for a password.

The Ubuntu Book 33

Ubuntu essentials

Find your way around Dash

Learn essential tips and tricks to use Dash like a pro
It is very common for people switching system. Dash allows you to search for applications, files, Dash segregates the search results as a series of
from a Windows platform to a Linux system music and videos, and shows you items that you have scopes (or lenses). These are used to provide views to
to look for the ever-popular Start menu. recently used. Dash also helps you to launch application your files, folders, applications and data. There are a
Generally, the Start menu serves as the starting point and file shortcuts. few basic scopes installed by default with an option to
of your interaction with the computer, and once you get To start Dash, simply click on the Ubuntu logo on the disable them. Switching off a scope means you won’t
used to it, it feels like the most natural way to work on top-left portion of the menu bar. You can also press the see any results from that scope in your search results.
the computer. Thankfully, Unity – the standard desktop super key on your keyboard (marked with the Windows With so many configurable features, it is evident that
environment for Ubuntu systems – offers Dash. Think logo) to launch it. To exit Dash, all you need to do is click Dash is more than a search box for finding files, but
of Dash as the equivalent Start menu of your Ubuntu the ‘esc’ button. rather it provides a view of the whole operating system.

Navigate the Dash display Get familiar with the display and filter options
Text area Reference Categories
This is the space where This is the Dash result section You can select the
you type your queries into that displays references categories from
Dash. As you type in the related to the search query. which you’d like
text, you will see the space You can see the definition, to view results
below being populated with images and more related to by choosing the
results dynamically the search query here categories here

This section
displays results
related to the
applications scope.
You’ll see all the
applications that
match the search
query here

This section
Scopes allows you
Weather More suggestions Dash by default shows to select the
Dash automatically detects the scopes This is the section that results from all the sources from
that may be relevant to the search displays results from online available scopes. You where Dash will
query. Since there is a place called shopping websites and other can limit the results look for results
Dash, it automatically displays the sources that are relevant to to specific scopes by when you enter
weather forecast for that location the search query selecting them here a search query

34 The Ubuntu Book

Find your way around Dash

Dash scopes and lenses

Dash serves as the universal window for finding
content, but as there are several types of content on
the computer, the results are segregated into smaller
scopes or lenses. Dash has a series of scopes that
logically separate the results and provide views to
your files, folders, applications and data. The following
scopes are installed by default: Home, Applications,
Files, Videos, Music, Photos and Online (social media).
Once you launch Dash, you’ll see a search bar on the
top. This is common to all scopes. Simply start typing
and a list of results will appear below. Note that this is
the home lens. The home lens is the default and will
appear unless you explicitly select another lens. You
can explicitly select a lens by clicking one of the options
on the bottom bar (when Dash is active). Other lenses
will only show the items from the corresponding scope
that is relevant to your search query. For example, if you
type text as a search query, home lens will show the
results from all over the computer, but if you change it
to an application lens, you’ll see the text editor as the
first result.

Dash Keyboard shortcuts Filtering Dash responses

Learn keyboard shortcuts to master Dash Restrict search results using filters
There are several shortcuts you can lens, simply press the super key The top-right corner of each lens (such as graphics), games, internet
use to speed up your interaction and the letter A at the same time. has the filter option. You can click on applications and so on. The filters
with it. For example, press the super Similarly for the music lens, press the filter results link to expand the also enable you to narrow down the
key and hold it for a while; a list of the super key and M at the same options. Note that the options are search between applications that are
numbers will appear against the time. For videos, press the super contextual – that is to say that there already installed and applications
launcher. You can open any of the key and V. are options under different lenses. that appear in the software centre.
applications by simply pressing Super key+C takes you to photo In the Home tab the filter option lets Similarly, if you are in the Files lens,
the associated number on the lens and Super key+F opens the you choose which categories are you will be able to filter the results
keyboard. While you hold the super file lens. If you would rather switch shown and the online sources from by type, size and the last edited
key, you will see a window with between lenses on the fly, you can where results can be pulled. time. Music lens filters by genre and
several shortcuts listed. use Ctrl+Tab to switch between The filters for the Applications tab decade. Photo lens filters based on
To go straight to the applications lenses once you are inside Dash. include the ability to filter by type the date that the photo was taken.

Managing lenses in Dash

Though Dash offers a lot of flexibility in showing search
results, you may wish to remove some of the results
listed, or add some that are either hidden by default, or
simply don’t exist. There is a small application available
in the Ubuntu Software Center to help you to do this.
Let’s install it first. Open Dash. Change the scope to
Applications and search for the main menu. In the
results that appear, click on the link to the Ubuntu
Software Center. Click Install on the top-right corner of
the page to install the software. Now, open the main
menu application using the launcher or Dash.
You can now enable, disable and even permanently
delete items or whole categories from here. Check
out the categories in the left-hand column. You can
uncheck items or categories to hide them, and check
to make them searchable again. This will not install
or uninstall any software, but just stop results from
showing in the Dash search results. This way, you can
be sure of not breaking anything important.

The Ubuntu Book 35

Ubuntu essentials

Understanding the file system

Learn about the file system organisation in Ubuntu
Understand file listing Learn the meaning of each column in the file listing output
First column File listing command Special files
The first character indicates ‘ls’ lists all the files in the current Wherever you issue the ‘ls’ command in
whether it is a directory directory and the ‘-la’ extension shows Linux, you’ll see these two files listed on
or a file. The other nine the files in long format, along with all the the top. However, these aren’t visible if you
characters indicate the hidden files. When executed from the inspect the same directory via the GUI. The
permissions for file owners, root directory, it shows all the directories single dot indicates the current directory;
groups and everybody else in the top-level hierarchy double dot, the parent directory

File names
This is where all the
directory/file names
are listed. You can
see all the top-
level Linux default
directories here

Fifth column
This column shows the size in Sixth column
Second column Third & fourth column bytes. You may modify this by This shows the
This column indicates The third column shows the using the ‘-h’ option together timestamp of
the number of links owner of the file, and the with ‘-l’; this will have the output last modification
or directories inside fourth column indicates the in kB, MB and GB for a better of the directory
the directory groups that the file belongs to understanding of the size

One of the most complex things about Ubuntu (like all Unix-like systems) organises files in is listed, each separated by a ‘/’ sign. A relative path
any Linux-based computer is probably a hierarchical tree, where relationships are thought of name is one that doesn’t start with ‘/’; in that case, the
its file system. There are so many files and in terms of child and parent. Directories can contain directory tree is traversed starting from a given point,
folders that serve so many different purposes. To other directories as well as regular files. Any element of which changes depending on context, called the current
a newcomer just getting started with Linux, all this the tree can be referenced by a path name – absolute directory. The fact that all files and directories have
appears like a huge maze. This calls for a basic, yet clear or relative. An absolute path name starts with the a common root means that, even if several different
understanding of how files and folders are organised in character ‘/’ (identifying the root directory, which storage devices are present on the system, they are all
Linux, and specifically Ubuntu. This is exactly what we contains all other directories and files), then every child seen as directories somewhere in the tree, once they
are going to do in this guide. Let’s start with the basics. directory that must be traversed to reach the element are mounted to the desired place.

36 The Ubuntu Book

Understanding the file system

Tutorial Learn about folders and their organisation

03 Various directories under /

Let us now see the various important directories present under the root
directory and get an idea of which ones serve what purpose.

/bin is a place for most commonly used terminal commands, such

as ls, mount, rm etc.

/boot contains files needed to start up the system, including the Linux kernel, a
RAM disk image and bootloader configuration files.

/dev contains all device files, which are not regular files but instead refer to
various hardware devices on the system, including hard drives.

/etc contains system-global configuration files, which affect the system’s

behaviour for all users.

/home this is the place for users’ home directories.

01 File system hierarchy standard

The Ubuntu file system is based on the Filesystem Hierarchy Standard
(FHS). The latter defines the main directories and their contents in Linux operating
/lib contains very important dynamic libraries and kernel modules.

/media is intended as a mount point for external devices, such as hard drives or
systems. For the most part, it is a formalisation and extension of the traditional removable media (CDs, DVDs etc).
BSD file system hierarchy. The Linux Foundation – a non-profit organisation
consisting of major software and hardware vendors, such as HP, Red Hat, IBM /mnt is also a place for mount points, but dedicated specifically to ‘temporarily
and Dell – maintains the FHS. At the time of writing, the current FHS version is 3.0, mounted’ devices such as network file systems.
released on 3 June 2015.
/opt can be used to store additional software for your system which is not
handled by the package manager.

/proc is a virtual file system that provides a mechanism for the kernel to send
information to processes.

/root is the superuser’s home directory; it’s not in /home/ to allow for booting the
system even if /home/ is not available.

/run is a temporary file system available early in the boot process where
ephemeral run-time data is stored. Files under this directory are removed or
truncated at the beginning of the boot process.

/sbin contains important administrative commands that should generally only

be employed by the superuser.

/srv can contain data directories of services such as HTTP (/srv/www/) or FTP.

02 The root directory

Unix abstracts the nature of tree hierarchy entirely, and the root directory
is the base of all the folders in the Ubuntu hierarchy. Indicated by the ‘/’ sign,
/sys is a virtual file system that can be accessed to set or obtain information
about the kernel’s view of the system.

the root directory contains all the other folders. Though the root directory is /tmp is a place for temporary files used by applications.
conventionally referred to as ‘/’, the directory entry itself has no name – its
name is the empty part before the initial directory separator character (/). All /usr contains the majority of user utilities and applications, and partly
file system entries, including mounted file systems, are ‘branches’ of this root. replicates the root directory structure, containing for instance, among others,
It is because of this layout that all the absolute paths in Unix systems start with /usr/bin/ and /usr/lib.
‘/’. Even if there are several physical or virtual storage devices attached to your
computer, all the folders will be shown under the root directory. /var is dedicated to variable data, such as logs, databases, websites and
Note that this is not to be confused with the /root directory that serves as the temporary spool (email etc) files that persist from one boot to the next. A notable
home directory for the root users. directory it contains is /var/log, where system log files are kept.

The Ubuntu Book 37

Ubuntu essentials

Accessibility in Ubuntu
Learn to use the accessibility tools and options available in Ubuntu
Usability was a prime concern when Ubuntu provides several accessibility options for can be enabled and disabled using the Alt+Super+S
developing Ubuntu. Developers worked people with different needs. For visually challenged keyboard shortcut.
hard to ensure that Ubuntu is as easy as users, Ubuntu offers Orca. Using various combinations For mobility impairments, Ubuntu offers options for
possible for people of all ages languages and physical of speech synthesis and Braille, Orca helps to provide modifying the behaviour of the mouse and keyboard.
abilities to use. This was not easy; it included providing access to applications and toolkits that support the The modifier keys (Shift, Ctrl and Alt) can be made sticky
an accessible platform with high-quality assistive assistive technology service provider interface (AT-SPI), so that when they are pressed once, they remain active
tools, and making other applications work with these for example the GNOME desktop and Unity. The Orca until the next key is pressed. There are several other
tools; a feat only an open-source software approach screen reader can be enabled at any time when logged accessibility options that users can adopt to make their
could achieve. in to a desktop session on any Ubuntu installation. Orca interactions with Ubuntu seamless.

Accessibility settings Understand various accessibility tools and their settings

Dasher settings Accessibility settings On-screen keyboard
Dasher opens up as a separate All the settings under the Ubuntu offers an
application. Once you type in the text, accessibility options are easy-to-use, resizable
you can save it as a file using buttons available under Settings> on-screen keyboard. Just
on this panel. There are other text- Universal Access. Here you’ll flip on this switch and the
editing buttons, such as cut, copy, see tabs with settings related to keyboard will appear on
paste and so on available here as well different impairments your desktop

Text entry
This is the area
where you can use
the mouse pointer
to enter text into
a file. As you point
in a direction, the
page zooms in,
and once you click,
the character gets
typed in
Sticky keys
This switch lets you
enable the sticky
key configuration, so
that one key press
on the Shift, Ctrl
or Alt key remains
active until the next
key press

Enable by keyboard Bounce keys Slow keys

If you want to use keyboard Enable this switch to This switch lets you enable the
shortcuts to manage make the computer slow key configuration. This
accessibility options, you ignore fast repeated key inserts a delay between when
simply need totoggle this presses. Again, you can a key is pressed and when it is
switch to ‘on’. This will choose the acceptance accepted. You can also choose the
make the process easier delay using the slider delay time using the slider below

38 The Ubuntu Book

Accessibility in Ubuntu

Orca screen reader

The Orca screen reader can be enabled at any time
when you are logged in to any Ubuntu installation.
Once enabled, Orca screen reader will be loaded every
subsequent time you log in to your session. Orca is a
function that can be enabled and disabled using the
Alt+Super+S keyboard shortcut. Note, however, that
you can also enable Orca using the same shortcut key
at the login screen. The super key is also known as the
Windows key.
It is also possible to enable Orca at install time, which
means that it will be able to guide you and help you
independently install Ubuntu onto your system. When
you boot the live CD, you should hear a bongo drum
sound. At this point, you can just go ahead and enable
Orca. Once again, the keyboard shortcut Alt+Super+S is
used to enable Orca.
Orca should start speaking, and from this point you
can select your language, and either boot into a live
Ubuntu desktop by selecting the ‘Try Ubuntu’ push
button, or you can elect to install Ubuntu by selecting
the ‘Install Ubuntu’ push button.

“The Orca screen reader can be enabled Dasher

at any time when logged in” Enter text without using the keyboard
Dasher provides an intuitive way In order to make the interface
to enter text without using the efficient, Dasher uses the predictions
computer keyboard. With Dasher, of a language model to determine
Keyboard modifiers you point where you want to go, how much of the world is devoted to
Learn to use keyboard options for accessibility and the display zooms in wherever each piece of text. Probable pieces of
you point. The area into which you text are given more space, so they are
There are several keyboard options, reaction rate and repeat rate of are zooming is painted with letters, quick and easy to select. Improbable
such as sticky keys, slow keys keys, whereas Mouse Keys allow so that any point you zoom in on pieces of text (for example, text with
and bounce keys that can change the numeric keypad to be used to corresponds to a piece of text. The spelling mistakes) are given less
the key-press behaviour and help control the mouse cursor. more you zoom in, the longer the space, so they are harder to write.
people with special needs to better Ubuntu also includes the on- piece of text you have written. You Dasher is not installed by default
use the keyboard. screen keyboard, a lightweight choose what you write by choosing on Ubuntu; you can install it via the
The modifier keys (Shift, Ctrl text-entry application, which is where to zoom. Ubuntu Software Centre.
and Alt) can be made sticky so extensible through macros, scripts
that when they are pressed once and custom layouts. To enable these
they remain active until the next options, all you have to do is go to the
key is pressed, making it possible Settings page and click on ‘Universal
to write uppercase characters or Access’. Then go to the ‘Typing’ tab.
use keyboard shortcuts while only You will see the settings to enable
pressing one key at a time. Slow the on-screen keyboard, sticky keys,
Keys and Bounce Keys control the slow keys and more on this page.

For users who cannot click with a hardware button, there is a utility
named Mousetweaks that enables them to perform the various clicks by software.
Mousetweaks offers several features to users: system-wide software click, usually
called dwelling, and system-wide simulated right click through a click and hold of the
left button (of course, for left-handed mouse users, the terms left and right have to
be inverted). Provide an area on the panel to temporarily lock the pointer (provided
by a panel applet). It uses image processing to translate the user’s head movements
into mouse events (movements and clicks), which allow users to interact with the
different desktop managers and applications. Mousetweaks is installed by default in
Ubuntu 15.10, and can be easily launched via the terminal. Just type ‘mousetweaks’ in
the terminal.

The Ubuntu Book 39

Ubuntu essentials

Sharing files in Ubuntu

Learn to create file servers to share data from your Ubuntu system

Sharing files with Samba GUI Learn to share files with Samba GUI
Menu bar Samba share
This section has the directory
basic settings to add Share name Once you click on ‘Add file
files to share and You can set the to share’, you’ll get a pop-
set preferences like name for the up. In the Directory section,
server group and view directory selected just browse and select the
all Samba users above in this section directory you’d like to share

Here you have
quick links to
settings, add file
and help options

Set the
for the shared
directory here

Save or
Shared files Permissions cancel changes
Here you can see the list If you’d like the directory Click OK to save the changes to
of all the files available you are sharing to be the Samba configuration file and
under Samba sharing writable/visible, just tick the start sharing. If you hit Cancel,
corresponding checkboxes the changes are discarded

The default Ubuntu file manager Nautilus Samba is freely available, unlike other SMB/CIFS act as a domain controller in a Windows network
offers an easy-to-use interface to help implementations, and so is widely used on various (authenticating users, and so on) and even help using a
you share files across systems. Behind the systems. You can facilitate the file sharing between Windows domain controller to authenticate the users of
scenes, however, Samba is running the show. Ubuntu and Windows computers by configuring Samba a Linux/Unix machine. However we will focus only on the
Samba is a software suite for seamless file and print as a file server on one of the systems. file sharing aspect of Samba in this feature.
services. It implements the Server Message Block Samba can do several other things including acting Samba is not installed by default in Ubuntu 15.10 and
(SMB)/Common Internet File System (CIFS) protocol for as a server for SMB clients: you can share printers, so to start file sharing you’ll have to install Samba. We’ll
Unix systems, supporting file and printer sharing across including PDF pseudo-printers so all the computers see the installation process and the steps to set up file
Windows, OS X and other Unix systems. in your network may write PDF files. Samba can also sharing in next sections.

40 The Ubuntu Book

Sharing files in Ubuntu

Tutorial Learn to set up a Samba client and server

something that better matches your environment. Then,

to share a directory, create a new section at the bottom
of the file, or uncomment one of the examples:

comment = Ubuntu File Server Share
path = /srv/samba/share
browsable = yes
guest ok = yes
read only = no
create mask = 0755

Let’s look at the meaning of each section…

comment: a short description of the share. You can
adjust it to fit your needs.

01 Samba server configuration

To share a directory, you must have
permission to access the directory. For
02 Samba clients
Ubuntu and Gnome make it easy to access
files from a Samba server share. To start with, go to
path: the path to the directory to share. This example
uses /srv/samba/sharename because, according to
the Filesystem Hierarchy Standard (FHS), /srv is where
demonstration purposes, let’s take a folder from the the files explorer and locate the Browse Network link site-specific data should be served. Technically, Samba
user’s home directory, such as Documents. on the left vertical menu bar. Open this link and you will shares can be placed anywhere on the file system as
Go to your home directory. Right-click on the see a Windows network icon. Double-click to open it. long as the permissions are correct, but adhering to
Documents directory and in the pop-up menu, The next window shows all the domains/workgroups standards is recommended.
select Local Network Share. Then check the ‘Share found on your network. Inside each domain/workgroup
this folder’ checkbox. If Samba is not installed, you will see all the computers on the domain/ browsable: enables Windows clients to browse the
you will get a pop-up menu: ‘Sharing service is not workgroup with sharing enabled. Double-click on a shared directory using Windows Explorer.
installed’. Select ‘Install additional software’ and computer icon to access its shares and files.
then click Install. If you get an error message that the guest ok: allows clients to connect to the share without
samba .deb could not be found, open a terminal and
update apt-get like this: 03 Samba configuration file
We have learnt about sharing files via the
GUI, but directly editing the configuration file gives
supplying a password.

read only: determines if the share is read only or if write

$ sudo apt-get update you several more options and flexibility to implement privileges are granted. Write privileges are allowed only
things exactly how you want to. So, let us now learn when the value is no, as is seen in this example. If the
Try again and Ubuntu will download and install how to enable sharing via the configuration file. value is yes, then access to the share is read only.
Samba. Let’s try sharing the folder again. Right- The main Samba configuration file is located in
click on the Documents directory and in the pop-up /etc/samba/smb.conf. The default configuration file create mask: determines the permissions new files will
menu, select Local Network Share. Next, check the has a significant amount of comments in order to have when created.
‘Share this folder’ checkbox. And then click the Share document various configuration directives. First, edit
button. That’s it; the directory should now be shared the following key/value pairs in the [global] section Now Samba is configured, the directory needs to be
and accessible from Samba clients. You can also of the config file. created and permissions changed. In a terminal, enter:
install Samba GUI for Ubuntu. Just type: $ sudo mkdir -p /srv/samba/share
Workgroup = EXAMPLE $ sudo chown nobody:nogroup /srv/samba/share/
$ sudo apt-get install system-config-samba Security = user
Finally, restart Samba to enable the new configuration:
…or search for Samba in the Ubuntu Software Centre Note that the ‘security’ parameter is further down in
and install it from there. Once installed, just search the [global] section, and is commented by default. $ sudo restart smbd
Dash for system-config-samba. Also, change the ‘workgroup’ value from EXAMPLE to $ sudo restart nmbd

The Ubuntu Book 41

Ubuntu essentials

Manage drives with Disks

Manage hard drives, SSDs and removable media with Ubuntu’s Disks tool

Manage your drives Disks offers a very neat layout with lots of powerful features
See what is connected Linux filesystem More details
Disks shows you all connected Here you can see the drive name as well These helpful five lines
drives that it can support (and that as its size. The bold label shows you the show you the selected
is almost everything). The Devices total capacity of the currently selected drive’s model, size in bytes,
bar lets you select multiple drives drive, while the next line shows the name partitioning type (MBR or
and apply some actions to multiple of the drive, which you can address in GPT), serial number and
drives at a time console commands assessment information

The ‘gear’
button hides
lots of extra
options for
creating and
disk images,
tool, drive
dialog and if
Separate controls for each partition self-tests
Partition details Volumes count and drive structure
This tiny button only works for the currently Once you select a partition, you can Here you can find out how your drive
selected partition. It actually lets you see its name, size, available free space, is partitioned, whether there are any
unmount or deactivate a partition and filesystem type and mountpoint. Click extended volumes or a swap partition. The
provide a set of options for formatting, the link to open the partition contents in size of the rectangles corresponds to the
removing and benchmarking Ubuntu’s file manager size of the respective partitions

Ubuntu has a marvellous tool for managing your hard drive, how many partitions it has, its serial ‘Volumes’ label in Disks. You can do many advanced
both local and removable drives, number, health status (SMART) and some other details. things with a few mouse clicks, such as benchmark
repartitioning them as well as doing backup Users often launch Disks in Ubuntu when they need to your drive, put it in a standby mode, create or delete
images and restoring from them. The application has do some manipulations with the hard drives, SSDs or partitions and much more.
a concise name Disks and it copies the very successful removable mass storage with the USB interface. Disks Another tool in Disks is its ability to create images
design and approach of the Disk Utility in OS X. is very helpful thanks to its illustrative visualisation of from drives (*.img) and to restore such images into
It is quite a straightforward tool with device list on the a drive’s volumes. If you are not aware about Primary other drives. This feature lets you clone all data, logical
left and the currently selected device’s details on the or Extended partitions, you will instantly catch the structure and a bootloader to, say, a newly acquired
right. With Disks you can find out the model and size of idea after looking at the graphical scheme under the hard drive that you wish to use as a replacement drive.

42 The Ubuntu Book

Manage drives with Disks

Tutorial Perform basic diagnostic and management tasks with your drives

01 Format a USB portable drive

Sometimes new hard drives arrive with
no partitions at all and Disks will show them as a
02 Benchmark your drive
Conducting performance tests is fun but
challenging, especially for non tech-savvy users.
03 Adjust drive standby settings
Drive settings can be sensitive to both
desktop and laptop computers. Putting a drive into
monotonous rectangle labelled as ‘Unknown’. You The Disks application in Ubuntu has a built-in tool standby mode not only helps save some watts but
may now choose what you want to do: if you go with that means you can benchmark your drive for also reduces heating, and even makes the system
an upper ‘gear’ button and format the whole disk, read and write speed at any time. First you need to quieter. Regardless of the default behaviour of your
you will only create a partition table, not volumes. unmount either all volumes (for the whole drive), drive in Ubuntu, you can explicitly set it to go to sleep
There is the legacy MBR (Master Boot Record) type, or a volume you’d like to test. For that reason, you after a certain amount of time. Click on the ‘gear’
and the modern GPT (GUID Partition Table). The cannot benchmark the root partition of your current icon and go to Drive Settings, where you can move
first one is compatible with everything, the other is Ubuntu system, but there are no other limitations for the ‘Apply Standby Timeout Settings’ switcher to
required by new PCs with UEFI boot and also by large the rest. Click on the ‘gear’ tab and select the ‘Start the ‘on’ position. Now you drag the slider and set the
disks (>2TB). Next, you may want to create the actual Benchmark’ option and then ‘Start Benchmarking’. preferred timeout value, after which the drive will go
volume by clicking on a volume-specific ‘gear’ button You’ll get a graph with the red curve for average on to standby. Similarly, you can decide whether you
below and again choosing the Format option. If you write rate, blue curve for read rate and green spots want to enable or disable write caching – just go to
plan to access your disk from Windows, use the NTFS for access time. It can help you detect a dying drive the ‘Write Cache’ tab and choose the desired mode.
filesystem. Otherwise, for Linux-only usage, the best before it is too late, and also to compare real-world When caching is enabled, your drive works faster but
option would be to go with Ext4. specs of the newly bought drive with its whitepaper. may get corrupt your files in case of power outage.

04 Create an image and restore from it

A hard drive image is a very handy thing
compared to plain file backups. It stores all drive
structure, bootloader records and all other drive
details, letting you replicate your setup onto another
physical drive. Again, in case of an ageing drive, which
you feel can break at any time, there’s no better way
to save it other than create an image. Depending on
what ‘gear’ button you use, you can either create
an image of the whole drive, or just the current
partition. When you choose the ‘Create Disk Image’
option, Disks will prompt you to choose a destination
directory for the image file. Note that it must be
saved on another physical drive. Later on you’ll be
able to restore the drive form the image file using the
‘Restore Disk Image’ option.

The Ubuntu Book 43

Ubuntu essentials

Commanding Ubuntu: get to grips

with the Linux command line
Sometimes well-chosen words will save you jumping through GUI hoops
– we set you on the path to the right commands

ave you been avoiding the inscrutable blinking at a dumb terminal, known as a console, connected Don’t be scared of that blinking cursor – usually
cursor of the command line, convinced to a distant, and very large, computer. Nowadays, the $ sign, known as the ‘dollar prompt’. It’s waiting to
it’s a relic of the past, of no use on today’s computers can be the size of a credit card – like the do whatever you tell it. You just need to know the right
computers? The command line may be an older Raspberry Pi – but the old-fashioned terminal is words: read on and you’ll soon tell that terminal who’s
interface, but the reason it’s survived is the power to remembered in the form of the terminal program that boss. Here’s an easy one for you to try first, though: type
tell the computer, in a few apposite commands, exactly gives you a command-line interface to Ubuntu. evince into the terminal - we’ll put the instructions you
what you want. For example, a single command can Depending on which flavour of Ubuntu you are need to type into bold, so you can see commands more
copy all of the MP3 and MP4 files in a directory to a running, the terminal may have a different name, clearly; always press Enter afterwards, to let Ubuntu
backup disk or a machine elsewhere on the network – or but type ‘term’ into the app search of Unity Shell, or know it’s now got to do something.
anywhere else on the internet. your menu, and you will bring up at least one choice Provided you didn’t mistype, you’ll have just opened
Many people’s first encounter with a computer – of terminal. Open this and you’ll see a fairly empty- Ubuntu’s PDF reader, without using a GUI menu or
perhaps at university in the 1970s or 1980s – was seated looking window. shortcut item.

44 The Ubuntu Book

Commanding Ubuntu

Left The mv command is

Files, folders, used to move files from

one location to another

and familiar
Time to get the command
line working for you, on
your files and folders
To look inside your Documents folder, open a
terminal and type in ls Documents. Left The grep command
enables you to search for
Don’t forget to press Enter! You’ll see a listing of all
terms inside files
of the files in Documents. Type ls and you’ll see a
listing of the files in your home directory – that’s
because when you open a terminal, it places you in
that directory. You can change by using the change
directory command – cd – like this: cd Documents.
Now ls alone will show you your files.
The cd - command will take you back, because
the ‘-’ is a shortcut to tell cd to go back to where
you were before. You could also type cd ~, as ~ is
short for your home folder – /home/jo/ or whatever.
pwd will remind you where you are now.
Configuration files – the ones called dotfiles,
because their names are prefixed by a dot – are
normally hidden from listing. In most file managers
you can toggle them into view with Ctrl+H (on a few,
it’s Ctrl+.). At the terminal, it’s ls -a.
The . and .. are shortcuts to ‘this directory’ and Left Most commands
‘parent directory’, or the one above – hide them have manuals, accessed
with the man command
by using -A in place of -a. Those letters after the
hyphen are called command-line switches: try
ls -l, for long listing. We’ll tell you about some of
that cryptic-looking info it displays later.
Moving and copying files uses mv and cp – we’ll
see cp in use overleaf, but for now type:
cd ~
touch random.txt
mv random.txt newname.txt
mv newname.txt Documents/
ls Documents

Tab complete
If you think that’s a lot of typing, try hitting the
Tab key after a couple of letters of each word.
Where there’s only a single possible completion, Look inside
the word will be automatically filled in. Two tab You don’t need to open an application to look inside a file. Sometimes you just want to see the first or last few lines
clicks brings up suggestions where there are The file command will let you see what sort of file it is. cat of a file – head and tail are the commands you need, each
multiple possibilities. sends the contents of the file scrolling by, or more gives defaulting to ten lines. tail -n 30 /var/log/syslog
them to you a page at a time. less does the same thing, shows you the last 30 things registered by that log file.
If you want to know more about a command, they
with more controls, and leaves you stuck if you don’t know Real power comes with grep, to search for a term inside
(almost) all have manuals – or man pages. man ls to press Q to quit. Q will also exit man pages; for other a file. Try grep ls ~/.bash_history to pull out all the
will tell you all about options for ls; man man will tell apps, Ctrl+C is a good bet for quitting. instances of ls that you have used so far.
you about the manual command itself.

The Ubuntu Book 45

Ubuntu essentials

inactive (said to be commented out) – remove the #

to get one to work next time you log in or open a new
terminal session.
You can use the arrows to navigate to the text you
want to edit; delete and type in new text as required.
Nothing too strange so far, until you’ve finished: note
those two lines at the bottom of letters preceded by
a ^ (caret). These are the keyboard commands – the ^
represents the Ctrl key – type ^O (hold down the Ctrl key
and hit O), and your work will be saved; hit ^X and you’ll
exit Nano.
You can set a temporary alias directly, which will last
until you close the terminal:
alias myplace=’ls -lAhF /home/richard/’

Permissions, please
Ubuntu files are protected from alterations by other
users on a shared machine. All files and folders belong
to a user – it doesn’t have to be a person, it could be
a piece of software, like a web server – and a group;
permissions on each file relate to whether a user, group
or anyone else can read, write or execute the file; this
is abbreviated as rwx permissions. For directories,
execute permission is just permission to open. Execute
a file means run it as a program – so a JPG picture file
doesn’t have permission to run, nor does a spreadsheet
file, meaning the embedding inside one of malicious
code is much harder to accomplish for virus writers.
From whichever directory you are currently in, create
an empty file – touch testfile will do the trick – then
ls -l. The long listing shows you permissions (see the
annotated screenshot on the right), and you can see
the default permissions of a newly created file. Enter
mkdir  testfolder and you can see the permissions
of a newly created directory. Remove the file with
rm  testfile – you’ll need the recursive switch to
remove a directory: rm -r testfolder.

No attachment?
While the protection offered by permissions is very
useful, they are also there to trip up the unwary. For
example, using sudo, you may have copied files from
another user’s home folder. Unless you change the
ownership (see the annotated screenshot), you may be
left scratching your head when you try to attach the files
Above Nano isn’t the friendliest text editor, but it’s included to an email, and they just won’t stick – because you don’t
in Ubuntu and most other Linux distros by default Using Nano even have permission to read the files!
Looking inside a file is all very well, but often we need to
quickly change something inside it. We’re going to use
Nano, a command-line text editor. There are many more
powerful editors – and many a little friendlier, too – but
Nano is included in Ubuntu, and many other flavours of
“Ubuntu files are
Linux, so it’s handy to know the basics. protected from
We’ll edit the ~/.bashrc file, a collection of
customisations for the shell environment; don’t worry alterations by other users
that much of it won’t yet make sense. To offset the risk of
damage to your command environment, back up the file
on a shared machine.
first: cp .bashrc .bashrc.bak – then nano .bashrc.
Find the section with the alias commands near the
All files and folders
end. Note that the ones with a # in front of them are belong to a user”
46 The Ubuntu Book
Commanding Ubuntu

Who owns what? Permission to change

Octal code
The rwx – read
Long listing / write / execute
Running ls -l lets you see permissions – are
who owns a file or folder, given respective
and who has permission values of 4, 2 and
to read, write and run 1. To give a file read
software. Three groups + write + execute
of rwx in the listing apply, permissions, 4, 2
respectively, to the named and 1 are added to
user, the named group, and give 7. For just read
everyone else left and execute, 4 + 1
= 5. Applying the
former to user and
group, and the latter
to ‘other’, chmod 755

Give me the file

If you’ve copied a
file into your folder
using sudo, you may
have left it with root
ownership. Change
the ownership with Run with it
chown jo myfile.txt A file becomes a program when it
– for example – and can be run. You write or download
the group with chown a shell script, say, and
:audio myfile.mp3. try to run it - ./ – and
Fill both sides of nothing happens. You need to give
the ‘:’ to change it executable positions: to save the
user and group octal adding, you can just chmod
ownership together u+x You can also call it
with sh

Give me more software

Despite every flavour of Ubuntu having a graphical program this is done by prefixing the command with sudo. On
to install software onto the system, you’ll usually see some other systems you would log in as root user: you
projects supplying the command-line way of getting their can temporarily do this on Ubuntu by running sudo -s or
software. The reason for this is that the command-line sudo bash, but we don’t recommend it, as it’s easy to get
instructions are direct and unambiguous. Let’s try it out, into the habit of running with root permissions, and to
and you’ll see what we mean. accidentally cause some damage.
Ubuntu, as you may have read elsewhere within these Update Ubuntu’s knowledge of the latest available
pages, is based upon Debian, one of the earliest GNU/ packages with sudo apt-get update.
Linux distributions, dating back to 1992. It’s an open You can look under /etc/apt/ to see the source files
collaborative project between over a thousand developers where Ubuntu remembers which repositories to look in:
across the world co-operating over the Internet, which you can edit these manually to add more, and to change
has contributed to its longevity. So too has the Debian version for upgrading (proceed with care!), but the simplest
package management system, and the command-line way to add a new repository is with apt-add-repository:
program to manage fetching and installing the packages: sudo apt-add-repository ppa:jon-hedgerows/get-iplayer.
Apt – the Advanced Package Tool – keeps track of all of After which you’ll need to run sudo apt-get update again,
the software in Ubuntu’s repositories, and takes care of before installing from the repository: sudo apt-get install
any dependencies on other packages when you install. It’s get-iplayer. The get-iplayer script is a command-line trouble, Ubuntu tells you that updates are available, and
what the Ubuntu Software Centre uses behind the curtain piece of software for timeshifting BBC radio (and TV) regularly asks permission to get them). Run apt-cache
of that graphical interface. programmes; apt-get upgrade will install all of the security search terminal to find alternative terminal programs, and
Every step that involves installing software on your updates and bugfixes that have been made recently – this apt-cache show eterm to examine one of them. Now you
system needs root, or superuser, permissions: on Ubuntu is something you should run regularly (but to save you the know the basics, explore a little more.

The Ubuntu Book 47

Ubuntu essentials

Use GNOME Terminal & Xterm

Explore the basics and benefits of the terminal emulators in Ubuntu
Save yourself time Working with terminal emulators is easier than you think

Try a fail-safe solution

Xterm is relatively old, however, it
delivers a pure Bash experience without
any bells and whistles. Xterm comes
in every OS that uses (all Linux
distros do)

Edit your Non-distracting

terminal profile scrollbars
Change the title, GNOME Terminal drew
cursor shape, scrolling ugly, thick scrollbars in
options and command the past. Sometime later,
behaviour, as well as Canonical applied its
colours, fonts, some overlay bars, and removed
historic legacy stuff the 1-pixel outline around
(like Backspace and the terminal frame
Delete-key behaviour)
and more

The icon says it all Enjoy the convenience of

You will never confuse Xterm with GNOME Terminal
any other terminal emulator thanks GNOME Terminal fits well into the Ubuntu
to that distinctive icon, boasting design with its recognisable Ubuntu Mono
support for 256 colours on that font and deep-purple background. However,
expressive cathode-tube display you can change these and other settings
with several mouse clicks

It may seem surprising, but Ubuntu ships let you configure this small application according Xterm is entirely different; it is a tiny, old-school
with two terminal emulators. One is to your needs and tastes. Choose Edit>Profile thing that hasn’t changed much since 1984, and was
GNOME Terminal, a widely used program Preferences to edit the current ‘Default’ profile for initially developed before the X Window System saw
and probably the only known terminal application the sake of different behaviour or a custom look and the light. Xterm uses the same Bash shell as GNOME
for many Ubuntu users. GNOME Terminal is one of feel. GNOME Terminal makes interaction comfortable Terminal does, so the commands behave in exactly the
many GTK-based apps that Unity desktop shares with between graphical applications and the Bash shell same way in both terminals. Xterm turns out to be very
GNOME Shell – many tools and accessories are the thanks to the support of drag and drop for text strings, helpful in case of an emergency; if your main desktop
same in Unity and GNOME. GNOME terminal looks copy and paste with both keystrokes and context fails to load and you just need to get to graphical mode,
clean and minimalist, but it has enough settings that menus, and mouse scrolling in terminal mode. use something like $ xinit xterm. It never breaks!

48 The Ubuntu Book

Use GNOME Terminal & Xterm

Tutorial Start working in command-line mode

01 Change Bash to something else

Every Linux distribution uses Bash (Bourne-
again shell) in text mode and graphical mode within
itself, go to the General tab and uncheck the ‘Use the
system fixed width font’. After that, you’ll be able to
select another Mono font.
a terminal emulator, including Xterm and GNOME
Terminal. Bash has a very rich set of supported
commands, but the most useful feature comes from its
popularity; all Linux users use their terminals with the
03 Learn some helpful shortcuts
Knowing tricks for GNOME Terminal in
Ubuntu can save time and increase productivity. We
same syntax. However, there are other shells – such as start with the simplest: launch the application using
a highly customisable ZSH with an even wider feature the Ctrl+Alt+T sequence anywhere in Unity. When
set, or CSH with a built-in scripting language – that browsing your files in Nautilus, it is useful to open a
have similarities with the C language. To change the terminal window for the current directory. Nautilus
default shell from Bash to something else in GNOME can do it once you right-click on an empty space
Terminal, go to Edit>Profile Preferences, switch to the within a view area and select Open in Terminal, but jokes that bring in some fun and help you to feel more
Title and Command tab, enable the ‘Run a custom this feature is not enabled by default in Ubuntu. Fix it comfortable in the terminal. Start with $ sudo apt-get
command instead of my shell’ option and put the name with this command: install moo to bring up a jolly cow, find another Easter
of your desired shell in the Custom Command field. $ sudo apt-get install nautilus-open-terminal egg with $ aptitiude moo and then $ aptitude --v moo
then restart the file manager. and add an extra ‘v’ three more times to see a snake

02 Change fonts, colours and background

Let’s make the GNOME Terminal look a
little more personal by changing text font, colour
When you need to copy or paste text, use Ctrl+Ins
and Shift+Ins respectively, instead of right-clicking
menus. To clear the input, you can either cancel a
that has eaten an elephant. The $ sl shows a steam
locomotive and finally the $ fortune | cowsay shows a
cow that tells your fortune. However, to finish up, let’s
and background. Go to Edit>Profile Preferences command with Ctrl+C, or clear what has been written do something massive and change our boring GNOME
and switch to the Colors tab. Uncheck the ‘Use with Alt+R. Terminal to a Hollywood Technodrama showcase,
colors from my system theme’ option and choose mimicking an FBI command centre:
any combination of colours for text, text in bold and
background. There is a list of good presets in the
‘Built-in schemes’ drop-down menu; it can save
04 Have some fun
Working in the terminal goes long into the
history of Linux and UNIX, so it’s no wonder we have
sudo apt-add-repository ppa:hollywood/ppa
sudo apt-get update
you from an agony of choosing. To change the font a decent number of discovered Easter eggs and sudo apt-get install Hollywood

The Ubuntu Book 49

Ubuntu essentials

Secure files with Déjà Dup

Create an extra copy of your valuable data and keep it updated
Secure your data quickly Déjà Dup is an intuitive app for managing backed up files

Check destination Decide to go more secured

Déjà Dup stores backed up files in When a backup process starts,
the form of archived files that can the wizard prompts you to set a
be handled with the Duplicity utility. password. You may choose to protect
You can’t extract the files with a your backup copy with it, or opt to go
regular unarchiver without any passwords

Proceed with Set up scheduling

important Here you can select
routines the frequency of
regular automatic
Choose where you want
backups. Depending
to store a backup copy
on your workflow,
and optionally define
choose daily or weekly
what directories you
backups and also set
want to ignore and not
the time for keeping
include in the backup
older backup copies

Overview your backup Choose manual or auto mode

The starting screen in Déjà Dup shows By default, Déjà Dup doesn’t enable
when the last backup copy was made and automatic backups right away, but you
when the nearest next backup will take can trigger this switch and if you set the
place. There’s also a link that triggers the rest of the routine correctly, you’ll get
automatic backups switch unattended backups

Having a backup copy of your photos, backup copy that you have prepared beforehand and perform backups periodically and even keep new and
documents, music and video files is a kept updating regularly. There’s no excuse not to do that, older backups at the same time. The interface of Déjà
high priority to keep them safe, even since Ubuntu includes a great tool for automatic and Dup has a category tree on the left and a main part
though some novice users opt to skip it. Imagine that hassle-free backups called Déjà Dup – also known by to the right, with a clear arrangement of easy-to-use
something has gone wrong with your hard drive and the simpler name, Backups. controls. The default setup assumes you might want
it can no longer boot up. The bad news is that while Using Déjà Dup is simple as it can be: you choose to back up your ~/home directory with an exception for
you can buy a new hard drive, you may well lose your what you want to back up and where, optionally tell what Trash and ~/Downloads, so you may leave it intact and
data on the old one, which is often more precious than directories it should skip and then put the task into the go ahead with this safe assumption, or opt to customise
any hardware. So here comes the finest hour for your automatic queue of the Ubuntu scheduler, which can the list of included and ignored directories to your liking.

50 The Ubuntu Book

Secure files with Déjà Dup

Tutorial Set up your backup the right way with Déjà Dup

01 Choose what you need to backup

Common things that people often need to
back up are photos, videos, office documents and
03 Make a test restore
Nobody knows when things will go wrong, but
to protect yourself from that sinking feeling when you
application settings. While this is true for home discover that your backups are broken, go for a test
computers, let us also complement this with targets restore at the very beginning. It’s a good idea to set up
that are more relevant to production servers and a small backup task and run it. After that, go to the
corporate usage in general, such as databases, Overview section and press the Restore button. Déjà
dumps, and collected data files and so on. To be Dup will guide you with a simple wizard, where you’ll be
on the safe side, you should evaluate the size of able to choose the location of a backup and then select
the proposed backup beforehand and make sure it a date, from which a copy will be derived. Go ahead
fits the target storage. You’ll definitely need extra with a real-world backup if everything restores fine.
space if you do incremental backups, or decide to $ duplicity restore --no-encryption “file:///
include directories like ~/Downloads that usually get
populated with lots of large files. 04 Access a backup copy outside
Déjà Dup
Déjà Dup has a known limitation: it is an ‘all or nothing’
path/to/ snapshot” “/where/to/extract”
The Duplicity syntax also can extract individual
backed up items (see $ duplicity --help).

02 Choose a destination
If you store a backup copy on the same
drive with the original files, it can only save you from
tool, meaning that you will not be able to extract only
some of your backed up files and directories. Instead,
each time, you are forced to copy or download the 05 Back up to the cloud
The simplest way is to use your Dropbox,
accidental deletion, which is not the only threat to entire backup snapshot. To solve this issue, use the MEGASync or other cloud-synced directory as the
your data. It is highly recommended to save backups ‘Restore missing files’ item in the Nautilus context backup location. This way, your data will be uploaded
to another physical drive or disk and so protect menu. This option works for directories that have to the cloud once Déjà Dup finishes its job. However,
yourself from main hard drive failure. For frequent been included in the backup and lets you restore let’s do direct online backups, such as to the Amazon
incremental backups, external hard drives are known individual files. Also, Déjà Dup is a front-end to the S3 cloud. To make it happen, you only need a proper
to work better compared with flash drives – the Duplicity utility, and this lets you extract your backup account at Amazon and a few extra packages:
latter have a limited lifetime and don’t like too many snapshot without launching Déjà Dup at all. It can be $ sudo apt-get install python-boto python-
overwrites. You can also use a remote destination via useful for scripting, or maybe when you access your cloudfiles
SSH, WebDAV or Windows shared folder – choose the backup location remotely via SSH. The syntax for After that, the list of available storage locations will be
right place in the Storage Location menu. extracting is as follows: complemented by Amazon S3 and Rackspace cloud.

The Ubuntu Book 51

Ubuntu essentials

Use Startup Disk Creator

Create a bootable USB with Ubuntu or virtually any other Linux
Get a live Ubuntu system Use a regular USB flash drive or any mass-storage device

Select the source Operating system version Mind the size

Here is the list of source disc Sometimes it’s not clear exactly which The last column here indicates the size of
images (.iso) and CD/DVD discs version of a system is inside an ISO, or the source media. It shows the exact weight
found on your system. Startup what is on that unlabelled optical disc. of the ISO file, but defaults to the total
Disk Creator automatically The column entitled OS Version extracts capacity of CDs and DVDs no matter how
updates the list necessary details many megabytes are actually there

Select the
disk to use
Startup Disk Creator
displays available
target USB drives here.
When you plug it in, the Choose an
application detects it image file
automatically and adds If you want your ISO
it to the list image to appear in
the list, click the
Other button and
select the image
file. By the way, it
also supports disk
images (.img)

Storage persistence Copy the files Capacity and free space

A very useful feature that allows Check everything one more time and You can find the total size of the media
saving all your data persistently. This press the Make Startup Disk button. as well as the amount of free space on it.
way you can turn your live Ubuntu The application will show a progress This feature is designed for USB sticks
thumb drive into a fully featured dialog and copy the files onto the target that are formatted to FAT16 or FAT32 file
portable working system USB medium systems and may contain user data

The first question that would most likely such optical discs are already out of trend, with USB Startup Disk Creator focuses on turning CD/DVD
emerge here is ‘what on Earth would you thumb drives now being the sanest media. You can use discs or downloaded ISO files of installable Ubuntu-
need a startup disk for?’ Historically, Linux USB sticks hundreds of times with strong reliability. compatible Linux distributions to bootable USB media,
distributions were distributed as CD discs, from which In Linux you can transfer an installable ISO file to that is it helps you move from legacy media to more
you were supposed to install them. Later on, the age of a USB drive by the ‘dd’ command. It’s quite easy, but contemporary and efficient USB disks.
recordable CD/DVD discs came in and, together with the whole procedure isn’t very conclusive for regular Startup Disk Creator also has the ability to use a
broadband Internet access, this led Linux enthusiasts users, so that’s why Ubuntu offers the handy and newly created USB disk as a working environment
to download ISO images of their favourite Linux convenient Startup Disk Creator utility. Its features in live mode, consequently saving all your data
distributions and burn them to blank discs. However, slightly intersect with those found in Disks, but persistently on a disk.

52 The Ubuntu Book

Use Startup Disk Creator

Tutorial Create a bootable USB stick with Startup Disk Creator

01 Select the proper source

Startup Disk Creator is designed to work
with Ubuntu and a bunch of other systems that
for a source image. Although, it is recommended
to use a clean flash drive or at least format it to
avoid issues resulting from a heavy use of that flash
were derived from it. For instance, here is a short drive (for instance, a flash drive might suffer from
and incomplete list: Kubuntu, Linux Mint, Xubuntu, a fragmentation).
Lubuntu, Ultimate-Edition, elementaryOS,
Peppermint One, Peppermint Ice, Deepin and
Zorin OS. Other flavours of Linux, especially those
non-Debian based, might not work with Startup
03 Create a persistence file
Drag the respective slider and define how
much persistent storage you need for your files and
Disk Creator. Anyhow, if you have a free target USB settings. Startup Disk Creator will create a persistent
medium, testing other Linux OSs and sharing the storage file of an appropriate size and merge it with
results will be welcome. If you have an Ubuntu- the root file system in the live system. Changes in
compatible system on CD or DVD, it will be a good the /home directory, downloads and other files
idea to transfer it to USB and benefit from higher boot added or removed from within the live system will be
speed, better compatibility and persistent storage. preserved after reboot. The same works for system-
wide components, for example you can install extra Startup Disk Creator adds the Ubuntu bootloader

02 Prepare the target

The most common target device is a flash
drive, also known as a USB stick or thumb drive,
software or remove something unnecessary and keep
it after shutting down or rebooting the live OS. This
makes your live USB stick a fully fledged portable OS.
to the FAT32 volume of your USB medium, so that it
can boot Ubuntu. The experience doesn’t vary much
between an OS written with Startup Disk Creator
external USB hard drive, an SD card or any other At the same time, the device will still be readable and and with a classic live mode achieved with the ‘dd’
memory card connected through a USB card reader. accessible from Windows or other non-Linux OSs. command. The only visible difference is that you can
Virtually everything that can be connected as a USB have persistent storage, even though it is limited with
mass-storage device in Linux will work fine, including
odd things like your smartphone’s internal storage.
Startup Disk Creator doesn’t wipe any data from
04 Go for a test drive
When you are done with setting things up,
and the file copying dialog finishes successfully,
4GB – this is a maximum file size in FAT32.
You can write some files or folders on your USB
medium in Windows (or elsewhere), then boot from it
FAT32 volumes once there is enough space there reboot and select your USB medium as a boot device. and find your files safe and intact.

The Ubuntu Book 53

Ubuntu essentials

Check the Time & Date

View the calendar, change time display settings and more
Ubuntu takes time and date from the ways depending on your system-wide locale. Locale week and full date, followed by the calendar grid. Below
firmware settings of your computer and, is a regional setting which affects the displayed time the calendar is the name of your current time zone and
if necessary, automatically adjusts it format, but it should not be confused with the interface the current time. It may look excessive, but at least it
with respect to time zone and locale set when you language – you can have any combination of both. keeps things clear. Also, if you change time and date
install Ubuntu. The time format may be 24-hour or 12- If you click on the time, a panel rolls out with more settings to display more than one time zone, you will
hour with AM/PM indication, or look different in other details. It starts with a label containing the day of the easily be able to see what the time is where.

When you click on the time, the calendar appears with the current date highlighted.
The first row has a slightly different colour in the background and indicates the three-
letter names of the days of the week. The calendar lets you see the month with one
easy glance and you can highlight any date simply by clicking on it. It is also helpful
when it comes to rewinding to an earlier date or browsing future months and years.
Note the small arrows that band the month and year headings – click on the left arrow
to go back and the right to move forward; the calendar will be updated instantly.

“The calendar lets you see the month

with one easy glance and you can
highlight any date simply by clicking
on it”

The Clock tab

There are many useful checkboxes that affect the time display format. The most
obvious option, ‘Show a clock in the menu bar’ does what it says, so you can remove
the time indicator from the Ubuntu panel entirely. The rest of the settings are divided
in two groups: what you’d like to see in the clock and in the clock’s menu. There are no
limitations on what exact combination of checkboxes you can use. You can add weekday,
date and month or seconds directly to the system top bar and choose the clock format.
For the clock menu, there is the Monthly calendar switch, which turns calendar display
on and off, and also a few other useful checkboxes for showing time in auto-detected
locations and adding extra locations by hand. Plus, if you happen to use the Evolution
mail application with its built-in calendar feature, you’ll be able to display calendar
events right in the clock menu we’re currently in – note the ‘Coming events from the
Evolution Calendar’ checkbox, which is currently greyed out.
Time zone settings
The last line is a shortcut to the Time & Date section of Ubuntu’s System settings.
This is the place where you can change your location and choose whether you want to
set time and date manually or trust the internet service that delivers it automatically.
Usually, the latter option is preferable, because it proves that the time your Ubuntu
desktop shows is accurate, and it also helps travelling users to keep up with local
time in different locations. Sometimes, however, there is a need to enter the time and
date manually – for example, when your computer’s system time is wrong and you are
not connected to the internet. The map, which occupies the most of the tab’s area, is
responsive to mouse clicks: you can click on the location you are currently at and see
the name of the corresponding time zone.
The Time & Date window has two tabs: one for adjusting time and date, and another
for changing clock settings.

54 The Ubuntu Book

Unleash the Archive Manager

Unleash the Archive Manager

Make use of this small accessory that sits inside your Ubuntu system
Archive Manager is a small tool for opening downloaded archives or combine many files into one, desktop, where the archive manager is called File Roller.
compressed files and creating your own the easiest way to do it is to use Archive Manager. You can check it out by launching the $ file-roller
archives. Years ago, when people had small The standard Ubuntu Archive Manager follows the command in the terminal in Ubuntu. When launched
hard drives, Archive Manager was king of the hill. It’s still general naming policy and therefore doesn’t have any separately, the File Roller interface looks quite empty,
an important part of the standard desktop experience, special name (together with Disks, Backups and so because it is designed to show an archive’s content in
simply because every other time we need to unpack on). However, Ubuntu had taken it from the GNOME the largest area of its window.

Create an archive
The reason why you may need to create an archive can vary. Firstly, an archived file
is always smaller than the original one, so the simplest goal is to save some disk
space. This doesn’t help much with photos and videos, because they are already
compressed and so adding them to an archive doesn’t save much space. However,
office documents or uncompressed media files (DOC, XLS, WAV, TIFF and so on) show
a splendid compression ratio, up to 90-95%. Secondly, archiving merges many files
into one archive, which is very convenient. For instance, copying a thousand of small
files can take a long time (it drives most file systems crazy), but when compressed into
an archive, you will wait for just a couple of seconds. To transfer files with symlinks and
UNIX-specific attributes (like permissions and extra flags) to a FAT32 or NTFS volume,
you should also archive such files first.
Compress any file or directory using the Compress item in the right-click menu of an
item, or use the respective feature inside File Roller.

“Copying a thousand small files can

take a long while (and it drives most file
systems crazy), but when compressed
into an archive, you will wait just a
couple of seconds”
Make use of extra features
File Roller has some extra features and boasts fine integration with the Ubuntu file
manager, Nautilus. This means that you can extract any supported archive simply
Open or view an archive by right-clicking it and selecting Extract Here from the menu. You can also drag-
Opening an archive is simple: just double-click it or use the ‘Open with Archive and-drop files and directories from Nautilus to the File Roller window in order to
Manager’ item in the right-click menu of an archive. If its icon looks like a box, it add them to an archive. The application will prompt you for an archive name and
means that most probably such an archive will be supported. File Roller supports offer advanced options that include password protection (ZIP and CBZ only). You
ZIP, RAR, GZIP, BZIP. 7Z, JAR, XZ and many other formats, for both opening and can protect just the files and directories, so it will be possible to view the list of files
compressing, and also AR and ISO formats in read-only mode. You can also go the inside an archive, but in order to open or extract anything from such archive, one
other way around: open the empty File Roller window and use its Open button to must provide a proper password. You can also protect the list of the archive’s files
browse and select an archive. and directories, or split an archive into parts of fixed size.
There is a difference between opening and viewing an archive. While it is clear
what the first one means, the second lets you look through the entire list of files
and see the whole archive’s content in a single view. For instance, if there are many
subdirectories in your archive, you may want to select View>View All Files and see
everything as a single list. File Roller adds the extra Location column to help you see
which file is where.

“When we need to unpack archives or

combine many files into one, the easiest
way to do it is to use Archive Manager”
The Ubuntu Book 55
Ubuntu essentials

Use the Disk Usage Analyzer

Find out where your free disk space went with a specialised accessory
Files and directories tend to grow and meaning that your hard drive gets cluttered with lots of corresponds to a size of the respective subdirectory.
occupy a large amount of disk space. These files, draining your free space. This is a beautiful graphical representation with instant
days even a couple of terabytes will run low Disk Usage Analyzer, also known as Baobab, is a usefulness, letting you know what on your drive is using
once you decide to keep your movie collection there. tool that comes within a standard Ubuntu desktop. the most space. Sometimes it can be as simple as an
Sometimes you don’t pay enough attention to how It analyses any directory you throw at it and shows overfilled temporary directory, or a giant log file, or just
much you are actually downloading, copying or storing, a colourful ring chart, where the size of each slice your media library that grew too fast.

Get instant results Dive into statistics

Launch Disk Usage Analyzer by searching for this name or ‘Baobab’ in Ubuntu Dash. There are no limitations with which directory you want to analyse. Disk Usage Analyzer
After it launches, you will be presented with a list of devices and locations. lets you open any directory, be it a local or remote one. Click the small ‘gear’ icon in the
If a drive is mounted, it will be included in the statistics of your root partition. For top-right corner to open the desired location. If it is a remote one, please use the ‘Scan
example, if you mount a 4TB drive within a relatively small root partition (say, 20GB), Remote Folder’ option and provide the correct address, for example Samba share
the resulting ring chart will show your system directories within a hair-thin slice. For addresses start with smb://.
that reason, you will need to unmount any external media if you want to analyse what When you see the resulting ring chart, hover your mouse over a slice to see the
Ubuntu itself consists of. details. Click a slice to dive in and set it as a top directory. The chart will adjust
To get a structure of your home directory simply click its icon and wait while until automatically and you will see more details about what content inputs to overall
Disk Usage Analyzer completes its job – this can take some time depending on how directory weight. The left part of the screen compliments the chart with a tree view,
many files there are. with extra columns for usage percentage, size and number of items.

Switch between graphical views

This ring chart isn’t the only way you can get a graphical representation of data. In the you need to estimate the relative sizes of different units. A treemap may be hard to
lower right-hand corner of the application you’ll notice two buttons that let you switch understand when you first look at it, but it does help when you know how it’s built. Disk
between ring chart and treemap modes. Treemap is an alternative method of data Usage Analyzer first draws the largest rectangle for your top-level drive or directory
visualisation with a strong focus on the size of units. and then recursively subdivides it into smaller rectangles according to the size of the
The main difference between a ring chart and a treemap is that the latter shows all content inside. Larger rectangles display their names instantly, others will give more
units together along with subdirectories and large files. This actually works better when information once hovered with a mouse.

56 The Ubuntu Book

Manage Startup Applications

Manage Startup Applications

Make your favourite applications start automatically in Ubuntu
Think about what you usually do once you such applications to load automatically once you log in. desktop, initially your desktop will be clean with most
start up your desktop. What are your habits? There is a special graphical tool for doing this, with the of the screen occupied by a wallpaper, with the main
Many people have the same routines every self-describing name Startup Applications Properties. launcher panel on the left with the application indicators
time they sit back in front of their computers, opening Like many other small utilities in Unity, this one was in the top bar at its far-right corner. You can actually
a web browser, a personal productivity programme, or also borrowed from GNOME and retained its original launch from a terminal by issuing the gnome-session-
instant messenger for example. In Ubuntu you can set name. When you load up your shiny new Ubuntu Unity properties command.

Add your own applications

To add an application to the list of startup apps, click the ‘Add’ button and fill in the
offered fields. Only one field is obligatory – a command name – and if you leave the
Name field blank, it will be filled automatically with a copy of the Command field. This
stage is where many people fail to provide the exact command for their app, so make
sure you do so. If you don’t, when you click the ‘Browse’ button, the file will want us to
provide it with a path to an application’s executable. To solve it, simply search for the
desired application in Dash, then drag its icon to the desktop. You will then have to go
to its properties and see what is at the Basic tab. By doing this, you can find out the
startup command for any application that has a shortcut in Dash. Then you will be
able to alter the resulting list of auto-started apps by disabling or removing certain
entries. For test purposes, it is better to remove a check mark instead of deleting the
whole entry.

“This stage is where many people fail to

provide the exact command for their
app, so make sure you do so”
Unlock hidden features
Even though there is no way for you to rearrange entries or define the order in which
they load when you start up your computer, you can make other changes with
minimum effort.
Say you want to load an application that requires immediate Internet access, but
your connection doesn’t load immediately after your computer turns on and Unity
Explore the default entries starts. You can fix it by setting the application to sleep for a while initially by adding
Even after a clean Ubuntu installation, the system’s autostart list already contains a command like ‘sleep 20;’ (for twenty seconds) before the actual command. For
some items. The GPG Password Agent is a binding between GNOME Keyring and example ‘$ sleep 20; application_executable’.
GnuPG agent. The first one stores your passwords and provides keys, only letting you There are also many small scripts and utilities that start automatically together
authorise when it is really necessary, while the second is an encryption mechanism with the Unity desktop, but don’t show up in Startup Applications Preferences. You
used for signing various things, including Ubuntu repositories and packages. SSH can bring back the hidden entries by issuing the following command:
Key Agent binds passwords from the ‘sshd’ daemon with GNOME Keyring. When you
access remote machines via SSH, this tool can remember authorisation password $ sudo sed -i “s/NoDisplay=true/NoDisplay=false/g” /etc/xdg/
and store it in the user keyring. The Indicator Application enables Unity to display autostart/*.desktop
system tray icons of various third-party programs and integrates them nicely into your
desktop. It seems that you don’t really need to disable anything of the above; it will not Some entries are specific for use in cases that you don’t necessarily feel up to so
improve your Ubuntu performance noticeably, but may cause errors later on. they can be safely disabled.

“This tool can remember authorisation

password and store it in the user keyring.
The Indicator Application enables Unity
to display system tray icons of third-party
programs and integrates them nicely
into your desktop”
The Ubuntu Book 57
Ubuntu essentials

Monitor Software & Updates

Add more application sources and keep your system up to date
Ubuntu comes with a set of pre-installed rich repositories that actually includes the best of them. can turn standard Ubuntu software source on and off,
applications and accessories, enough for Software & Updates is a standalone application, manage third-party source and authenticate them with
basic computing tasks and activities, such which lets you customise the standard set of software signing keys.
as writing emails, browsing the web, or daily tasks sources, configure updates and manage additional With Nvidia or AMD graphics, you can install a
and office routines. Even though there are thousands drivers. A software source is a general term that proprietary driver, but it cannot be included in Ubuntu
of other application titles available for Linux, Ubuntu has includes both online repositories and local media. You right away due to license restrictions.

Set up updates
Ubuntu periodically checks for its updates online and if it finds a newer version for
at least one package, a special notification pops up. In the Software & Updates
application, you can choose what updates the system looks for and how frequently
checks should be carried out. To do this, go to the Updates tab and review the list of
ticked boxes. By default, Ubuntu looks for security updates, recommended updates
for regular packages and also for backported software that is not supported by
Canonical, but contributes to the Ubuntu experience.
The next four drop down menus control the updates frequency and behaviour.
For instance, here you can program Software & Updates to download and install all
or particular updates automatically, without disturbing the user. This can be helpful
for unattended Ubuntu installation with a stable Internet connection. The last drop
down menu lets you choose whether Ubuntu should notify about any new version of
the OS itself or about long-term support version (LTS) only. If don’t like to hop to newer
versions too often, stick to LTS releases.

Add or remove software sources

Standard Ubuntu repositories can be managed on the Ubuntu Software tab in
Software & Updates. It lists the Main repository, for which Canonical (the Ubuntu
maker) provides official support; the Universe repository, which is maintained by
Ubuntu community; the Multiverse repository with proprietary software; and the
Restricted one with closed-source device drivers. If you somehow need to develop
software in Ubuntu yourself, you can enable the Source repository. Below are
Install additional drivers
A common case when Ubuntu users turn to the Additional Drivers tab in Software
other helpful controls for selecting the nearest mirror (this can boost a package’s
& Updates is graphics drivers. Computers with Nvidia and AMD video chips are
download speed) and the optional switch for Ubuntu CD/DVD with standard delivery
supported in Ubuntu out of the box, but the system utilises open source drivers
of packages.
(‘nouveau’ and ‘radeon’ respectively), that still lag behind a proprietary driver for 3D
The Other software tab lets you add third-party repositories and by default lists
performance and gaming. To replace an open source driver with a proprietary one, go
entries within the Canonical Partners repository and the extra Independent repository
to the Additional Drivers tab and wait for a while before Ubuntu discovers if there is
for even more software. Press the ‘Add’ button to add a new repository, ‘Edit’ to change
a proprietary driver for your hardware. It will not necessarily be a video card: dozens
details and ‘Remove’ to delete a repository. There are many additional repositories on
of drivers for wireless networks and various firmware bits that improve system
the Internet, but always approach with caution.
performance cannot be shipped directly because of their licenses.
Once you decide to go with one or several non-free drivers, simply select them

“Press the ‘Add’ button to add a new and press the Apply Changes button. Ubuntu will download all required files in the
background and install drivers automatically. You will then need to logout and log back
repository, ‘Edit’ to change details and in, or better, restart the system.

‘Remove’ to delete a repository. There “Once you decide to go with one or

are many additional repositories on the several non-free drivers, simply select
Internet, but approach with caution” them and press Apply Changes”
58 The Ubuntu Book
Work with Universal Access

Work with Universal Access

Configure accessibility settings to make Ubuntu more friendly
Ubuntu is a friendly place for everyone, Universal Access consists of a large number of theme and the Large Text switcher, both of which help
including people with reduced capabilities settings divided into four individual categories: seeing, visually impaired people see more on their screens.
or disabilities. If you need to use special hearing, typing and pointing, and clicking. Each category There is also a screen reader, which pronounces window
settings for a more comfortable user experience has switches that improve usability and make the most titles and messages, an on-screen keyboard, advanced
in Ubuntu, there is a dedicated subsection called out of Ubuntu. Ubuntu ships with a high-contrast icon sound notifications more, covered below.
Universal Access inside System Settings. If you want
too, you can also launch it separately by searching its
name in the Dash or by using the $ unity-control-center
“Each category has a number of switches that
universal-access command in the terminal. improve usability in different ways”
Type the way you need to
The Typing tab in Universal Access houses a list of options that help input data using
a keyboard for those who are unable to type normally and need assistance. The most
noticeable option here is the on-screen keyboard switch that enables text input using
mouse clicks. The on-screen keyboard will appear after you re-log in to a session. It
looks like a desktop widget that flows at the top of any windows. There are various
keyboard tweaks that can ease input in some cases, such as sticky keys (treats a
sequence of modifier keys as a key combination), slow keys (puts a delay between when
a key is pressed and when it is accepted) and bounce keys (ignores double pressing a
key in a short period). This can be complemented with extra audible notifications, such
as beeping when certain keys are pressed.
The on-screen keyboard in Ubuntu can also be used for an extra security if you feel
like the use of a physical keyboard can compromise your privacy.

“The Typing tab in Universal Access

houses a list of options that help input
data using a keyboard for those who
are unable to type normally”
Adopting Orca screen reader
The default screen reader in Ubuntu is called Orca. It can be enabled in the Seeing Using the keyboard as a cursor
tab of Universal Access, or it can also be launched from command line ($ orca). If moving a mouse in a regular manner is uncomfortable, you can control the mouse
Orca pronounces titles and text corresponding to the controls in use. To access cursor from a keyboard using the arrows. This accessibility feature can be enabled by
Orca preferences after enabling it for the first time, press ‘Ins + Space’ on a desktop going to the Pointing and Clicking tab and putting the Mouse Clicks switcher on. There
keyboard or ‘Caps lock + Space’ on a laptop. A new window will open, and Orca will are also two ways to trigger a mouse click without clicking its buttons. The first tweak
announce “Screen reader preferences. General page tab.” You can now configure Orca is to simulate secondary click in double-clicking by holding the left mouse button down
to your liking, change voice type and speed, redefine key bindings, turn Braille support for some time. Second, you can simulate a click by hovering a mouse cursor over an
on or off and change lots of other tunables. Orca also lets you customise its verbosity item and waiting longer. For either, there are helpful sliders that let us adjust a delay.
and define the categories of text that will be spoken. It also has a built-in help system Regular mouse settings in the Mouse & Touchpad subsection also contribute to a more
in audible mode. Press ‘Ins + H’ or ‘Capslock + H’ to hear instructions and references to flexible mouse performance. There you can lower the double-click delay, change cursor
other important key bindings. speed and switch buttons arrangement if you need a mouse for left-handed people.

The Ubuntu Book 59

Ubuntu essentials

Configure Network Connections

Setting up a network connection in Ubuntu is easy
Those who only need to plug their Ethernet often need assistance in connecting to the Internet or a network indicator on the top bar and a standalone
cable into their computer’s network changing their network parameters. During the last graphical utility called Network. You can search for it
port in order to have an instant access to decade, almost every Linux distribution has relied on in Dash, open it as a subsection in System Settings or
the Internet can skip this section (perhaps those NetworkManager – a stable, feature-rich and intuitive launch from command line ($ unity-control-center
running Ubuntu inside a virtual environment can network handler for Linux. The Unity desktop in Ubuntu network). Both wired and wireless network connections
do that too). The majority of Linux newbies, however, has a tight integration with NetworkManager by offering can be added and modified or even removed here.

View connection settings

When you are online, you still may want to use NetworkManager to find out certain
details about your current connection. The quickest way to find out such details will
be to click on the network indicator on the Unity top bar and go to the Connection
Information item. You will see a separate window with lots of details about your
connection, including general settings (your network car MAC address, declared
speed, interface name), and IP connection details for both IPv4 and IPv6 (if it is relevant
for you). The main window of the Network application also displays network settings
and includes a briefer list with Hardware Address (MAC), IP Address, Default Route
and the list of DNS servers. If you cannot run NetworkManager in graphical mode for
some reason, use the ‘$ ifconfig’ command to view settings and ‘$ nmcli’ to manage
connections. For instance, let us bring up a known Wi-Fi connection from within a
broken Ubuntu system that cannot boot into any desktop:

$ nmcli dev wifi con “Network_Name” password “your_password”

Connect to a wireless or wired network

If you want to use a wireless connection and if you have a Wi-Fi network card or
chip, things are quite easy: notice the ‘radar’ sign at the far-right position on Unity
top bar and click it to see a list of available networks. Select your network and once
you provide the correct authentication password, you are mostly done. With wired
network connection, for which you are given an IP address, network mask and a
gateway address, you’ll need to enter the Network configuration dialogue and add your
connection manually. To do so, first check that the global switch for wired networks
is in the On mode and then press the ‘Options’ button in the lower-right corner of the
window. This will bring up the connection editor, in which the most common place to
go is the IPv4 Settings tab. In the Method drop-down menu, select Manual and then
provide your connection details in fields below.
Set up a network proxy
Sitting behind a proxy adds a little complexity. Usually you have to declare your proxy
settings several times: separately for a web browser, in the Bash environment, for
“The majority of Linux newbies often Apt package manager, for Wget downloader and so on. Ubuntu makes things a little
easier. Click the ‘Network Proxy’ item in the list on the left and choose what kind of
need assistance in connecting to the proxy setup works for you. If you have been given a URL, select the Automatic method
Internet or changing their network and provide that URL in the field below. Proxy with personal authentication usually
requires manual setup. Select the Manual method and provide at least the HTTP
parameters. During the last decade, proxy, using the following syntax:

almost every Linux distribution has username:password@server-name.domain

relied on NetworkManager” Provide a proper port and finally hit the Apply system wide button to finish with setup.

60 The Ubuntu Book

Tweak the Power settings

Tweak the Power settings

Make your laptop run longer and let Ubuntu reduce your monthly bills
Ubuntu is an intelligent operating system power settings in Ubuntu work well for an average user, search for ‘power’ in Dash or run the $ unity-control-
that supports modern power saving but no one knows exactly what your usage scenario is, center command. The Power application is a tiny one,
technologies. For example, it will downclock so you might want to tweak the settings according to it has only two settings: one for selecting a period of
your processor when it is inactive, dim your screen your personal needs and tastes. inactivity, after which your PC will be suspended (put
when you are away and put your laptop or desktop PC You can access Power settings in Ubuntu either from into sleep mode). The other setting triggers the battery
into sleep mode after a given period of time. The default System Settings or as a standalone application – just indicator display on the top bar in Unity.

Suspend your system differently

System suspension is a great way to save power and enjoy an almost instant computer
boot (which would be a resume from suspend). Suspension puts everything into RAM
and essentially powers down your PC, but keeps it at minimum power, which is just
enough to keep data in RAM and not lose it. By default, Ubuntu doesn’t suspend in case
of system inactivity, no matter how long it is. You can change it by selecting anything
other than Don’t Suspend in Power settings. Alternatively, you can put your computer
to sleep manually, by issuing the ‘$ sudo pm-suspend’ command. Using a command
line, you can either suspend or hibernate your system. The difference between the
two is that hibernation means saving all data from RAM to the hard disk and complete
power off, whereas suspension is a reverse action that draws only the small amount of
power required to keep RAM alive.

Save even more power

There are various other tweaks and hints that can save even more power and make
your laptop battery last longer. Ubuntu used to have various all-in-one solutions
that combined plenty of standalone tweaks. Not anymore. Currently the most viable
solution is TLP. It automatically adjusts the CPU clock, hard drive time outs and
supports power saving modes for your wireless network chip, Bluetooth, audio and
other built-in subsystems. TLP is not (yet) included in Ubuntu by default, so you will
Make sure the screen is always on when need to install it, but first add the project’s repository, as follows:
watching movies $ sudo add-apt-repository ppa:linrunner/tlp
The display is one of the most hungry power consumers, and that can be a crucial issue $ sudo apt-get update
for those who use Ubuntu on laptops. You can set Ubuntu to dim the screen or turn it $ sudo apt-get install tlp tlp-rdw
off completely after a given period of inactivity. Both settings are available in System
Settings>Brightness & Lock. However, this also means that when you decide to watch TLP automatically switches between AC and battery mode when you plug or unplug
a movie and sit back, you’ll need to move your mouse every once in a while in order to the power cable and also makes your system run at a cooler temperature.
disturb the system and get the brightness back on. However, there is a way to fix this Additionally, you can find out what software components draw extra power by
with a special indicator called Caffeine. Install it with a following series of commands: installing the Powertop diagnostic tool ($ sudo apt-get install powertop). It collects
the various pieces of information from a system and tells you what can be optimised.
$ sudo add-apt-repository ppa:caffeine-developers/ppa
$ sudo apt-get update
$ sudo apt-get install caffeine

Caffeine offers a panel indicator and a command; both designed to inhibit desktop
idleness after you decide to do so. Click the ‘coffee cup’ icon on the top bar or use
something like ‘$ caffeinate vlc’ (or any other player) to enjoy your movies.

“The default power settings in Ubuntu

generally work well for an average user
but you may well want to tweak the
settings according to your personal
needs and tastes”
The Ubuntu Book 61
Ubuntu essentials

Connect with Online Accounts

Enjoy a more convenient integration with online services in Ubuntu
Online social services are already a part applications. It also makes using local applications outgoing server addresses, ports, security settings
of everyday life for an average user. Most easier because it is much more convenient to provide and the authentication method. Now all you have to
of us use these services for connecting your username and password on a classic login web do is to provide your username and password for your
with friends and relatives, for sharing photos, videos page than to have the hassle of local application email service in Ubuntu’s Online Accounts – once you
and other files. Almost every online service requires settings. A good example is the Evolution email client. log in there Evolution will already be configured and
authentication, which is commonly about registering Years ago people had to remember incoming and automatically display your inbox.
an account and using it later for accessing the personal
part of a service. Ubuntu simplifies the general
experience with online services by eliminating the
“Most of us use these services for connecting with
need to sign into one account several times in different friends and relatives, for sharing photos and videos”
Set up instant messaging
Ubuntu offers Empathy as a default application for instant messaging. Open Online
Accounts either by searching for it in Dash or as a subsection in System Settings. You
can even go from the command line ($ unity-control-center credentials).
The list of online services, for which Ubuntu offers desktop integration, has grown
recently so you may want to filter the list by applications. In the Show accounts that
integrate with drop-down menu select Empathy. You can click the desired service
for which you already have an account and provide credentials in a built-in browser
window, right there in Online Accounts. You can even add more than one account of
the same service, or add accounts from various different services to one application.
Online Accounts lets you enable, disable and change options of added entries at any
time. After you are done, you can launch Empathy and start chatting immediately.

“You can click the desired service for

which you already have an account and
provide credentials in a built-in browser”
Connect to your Google account
Online Accounts offers the most comprehensive integration with Google services. If
you have a Google account (using Gmail for example), you can benefit from a very wide
list of desktop applications that Ubuntu can integrate with. It includes Evolution Data Upload photos to a cloud-based account
Server, Shotwell photo manager, Google Drive and Picasa lenses for Unity Dash and Ubuntu ships with Shotwell, a manager, viewer and even a simple editor for your
Empathy instant messaging. photos. Not only can you sort and tag images, but also import them from external
Once you log in to your Google account it will prompt you to allow it access to sources and export to a cloud account – the latter requires integration with Online
manage your emails, calendar, photos and videos, contacts, view your data and so Accounts. Shotwell can publish your photos to Facebook, Flickr, Picasa Web Albums
on. You have to grant this access in order to proceed. After that your list of connected and Piwigo CMS. You can configure one of these, all, or any combination of services by
services will be populated with everything that Ubuntu supports for Google and you adding respective entries in Online Accounts.
can start using your favourite applications and enjoy them working without your As with Google, in most cases you have to pass an authentication routine and grant
Google account without any extra movements. Your search results can now include access to your data. After that you can launch Shotwell and select one or several
files found on your Google Drive and Picasa web albums. You can also start using photos you’d like to publish. Notice the toolbar along the bottom of the window and
Gmail directly from your Evolution client and do much more. press the Publish button there. Select a cloud service from the drop-down list and
choose publishing options. Shotwell can create new albums in an account or commit
to existing ones. It also supports tags and photo metadata in its publishing module.

“Not only can you sort and tag images,

but import them from external sources
and export to a cloud. Shotwell can
publish your photos to Facebook, Flickr,
Picasa Web Albums and Piwigo CMS”
62 The Ubuntu Book
Use System Monitor

Use System Monitor

View and manage system resources using the System Monitor app
System Monitor is a tool for managing Launch the application with a specific tab showing the ‘$ gnome-system-monitor -f’ command line.
running processes and monitoring system by using command line parameters ‘-p’ for processes, System Monitor is used to tackle system sluggishness.
resources. It is one of many accessories ‘-r’ for resources and ‘-f’ for file systems. Launching You could also use the CPU load graph to find out if
borrowed from the Gnome desktop. You can run from with the File Systems tab shown can be done with hardware-accelerated video output really works.
Dash or from command line ($ gnome-system-monitor).
The application looks and works similarly to its
analogues in Windows and OS X, and contains three
“The application looks and works similarly to its
logical tabs: Processes, Resources and File systems. analogues in Windows and OS X”
Control resources usage
The Resources tab offers effective graphs that get updated in real time and look like
a mission control board. The first graph shows CPU History in live mode (there is no
delay in data update by default), showing CPU cores in different colours. When you
launch a heavyweight application you’ll notice peaks on that graph. You can also figure
out whether an application can use several CPU cores at once, or if pushes all of the
load on one core.
The middle graph is for Memory and Swap Usage. On modern systems, swapping to
a file or to a separate Swap partition is rarely used in everyday tasks, simply because
there is already sufficient RAM. However, processing large files (like retouching a giant
poster in GIMP) may require swapping, which only takes place when your system is
running low on available RAM.
The final graph, Network History, shows the network speeds for both downloading
and uploading. This graph can be particularly helpful for network troubleshooting and
low Internet speed diagnostics. Both memory and network graphs help you monitor
your system performance.

Manage system processes

Each application in Linux creates at least one process. Some processes refer
to graphical applications, others run in the background and provide service
functionality. With the help of System Monitor you can view the list of all processes,
know their names, find out which process belongs to which users, detect processes
that devour too much CPU cycles or draw high levels of RAM, associate processes
with their low-level IDs and manage processes’ priority. Normally you’ll see a list of
processes sorted by name. Note that you can click the name of a column to sort
processes by it. It is very helpful to sort them by CPU percentage or memory usage.
If a process belongs to you (or if you have the permissions), you can kill it or lower its
priority. Select the process you want to get rid of and press the End Process button in
the lower right corner of the window. Right-click the process and select the Change
Priority menu alter its priority.
Find out details about file systems
The File Systems tab displays a table of all file systems that are currently mounted in
“Some processes refer to graphical Ubuntu. You can find out the device name, file system type, mount point, total capacity
applications, others run in the and available disk space.
Of course, you can find out a similar set of information in Ubuntu’s disk utility (Disks,
background and provide service p.40), but System Monitor offers a more comfortable view, which lets you quickly
analyse how much space is left on your device and sort them by various criteria. The
functionality. With the help of System Used column doubles the information about free disk space, but shows it in the form

Monitor you can view the list of all of a percentage bar. When the bar fills up to approximately 90 per cent or more, it
means that you are running low on free disk space, which can be troublesome for
processes, learn names and find out certain workflow scenarios. Ubuntu cannot work properly if the root partition (/) gets
100 per cent full. You can also check for free disk space in terminal by using the ‘$ df’
which process belongs to which users” command (disk free), although it doesn’t let you sort or reorder any of the lines.

The Ubuntu Book 63

66 Explore the Ubuntu
Software Centre
Your one-stop shop for new apps

70 Browse with Firefox

“Ubuntu comes ready-loaded with a
Explore the Internet host of useful apps for you to enjoy
72 Manage emails
with Thunderbird
and add to”
All your email accounts covered

74 Communicate with 70 72
Set up and use this instant messenger

76 Explore LibreOffice Writer

Discover the features of the FOSS
word processor

78 Unlock LibreOffice
Calc tricks
Use spreadsheets like a pro

80 Edit formulas in Math

Learn about this LibreOice extra

82 Present with Impress

Get to know the FOSS presenting tool

84 20 LibreOffice tips & tricks

Make your working day even
more productive

88 Text editing with Gedit

Understand its features and uses

90 Create discs with Brasero

Create CDs and DVDs fast

64 The Ubuntu Book


The Ubuntu Book 65

Ubuntu apps

Explore the Ubuntu

Software Centre
The flavours of Ubuntu are the set of packages installed on the system.
The Software Centre is the one-stop shop for installing, purchasing and
removing software in Ubuntu
Ubuntu Software Centre, aka USC, is a software is installed with the click of a few buttons. rated software and many more. For instance, if you’re
package management portal – that is, The search for specific software ends here as USC has looking for a text editor, you can type the keyword in
a consolidated platform where you can name/description-based search functionality, with the search bar, which shows the different text editors
search for, install or purchase software, and even multiple options to choose from. The rating and users’ present in USC in a list view. You can just select any one
remove apps from the list of installed software. review helps you to find the best software. USC also of them and click the Install button to start using it.
Initially released on 29 October 2009, Ubuntu Software provides Ubuntu application developers a prominent
Centre is developed in Python and contains more than way to offer their software to potential users.
53,000 apps. The latest version of Ubuntu comes with some
Previously, Ubuntu programmes were downloaded preconfigured tools and software like the LibreOffice
from the repository as tar files, unzipped and then suite, Mozilla Firefox, text editors, Software Centre
installed, by manually running the commands in the etc, which are displayed vertically in the left sidebar.
console. Even the previous versions of Ubuntu had To get started, search for the shopping bag icon in the
many graphical utilities for adding/removing software, display and click it to launch Ubuntu Software Centre.
which ultimately led to redundancy and fragmented Upon the launch of USC, the home screen appears,
development effort. To ease this cumbersome process, which contains different categories of software,
USC came with a worthwhile approach where all the recommended software, newly added software, top

66 The Ubuntu Book

Explore the Ubuntu Software Centre

Getting started
Ubuntu Software Centre is easy to use with a self-explanatory user interface. Open it
on your Ubuntu machine and start installing the software you need
On the top of the home screen you will find the section
navigation commands: All Software and Installed. The
Back and Forward button – displayed as less than (<) and
greater than (>) signs – help in navigating the different pages.
USC keeps the visited pages in memory so that by clicking
the Back button once, you’ll reach the page you just left.
The Back command is unavailable whenever no previous
screens exist in the history, and the Forward command
whenever no later screens exist in the history. The All
Software section presents all the programmes available, be
they already installed on the computer or not.
In the Installed section you will find the list of programmes
that are installed on your Ubuntu machine, with the date of
installation specified. When a software item is selected – be
it from any screen or category or subcategory screen – if the
item is not currently installed in your system, you will see an
Install button. Clicking the latter will install the software on
your machine. If the software is already installed, a Remove
button is available; clicking it will uninstall the software.
On the home screen itself, you will find the section
‘Recommended For You’. In order to make use of the
recommendation facility, you have to register yourself in
Ubuntu by providing the details in the form with a valid email
ID. You will receive the verification code at the email address
provided, which you need to give in order to activate your
account. Once that’s done, you get a success message and
Ubuntu starts recommending useful software to you, which
“Ubuntu will start
you can select and install on your machine with ease. recommending useful
“To make use of the software to you, which
recommendation facility, you can then select and
you have to register install on to your machine
yourself in Ubuntu” with ease”

Top Rated Navigation

In terms of display, if the category is set to ‘Show Programmes are categorised based on their functionality, performance,
non-applications by default’, then results are ease of use, time of launch and user ratings, which are all displayed in the
displayed in a list view; otherwise tile view is
used, and non-application items are hidden
home screen of Ubuntu Software Centre
by default. The top rated applications are also The USC segregates software into different categories environments), web development and so on. The version
displayed on the home screen using tile view such as accessories, developer tools, books and control subcategory has many flavours of versioning
in descending order of DR (dampened rating), magazines, games, education, office and many more. software, prominent ones being Git-Cola, qgit and
regardless of whether they are installed or not. Upon clicking the Accessories tab, for instance, a list ggit. The IDEs tab has Netbeans, Ninja, Spyder and
Applications with seven five-star ratings and of accessories is displayed, including Speed Crunch Eclipse, which can be installed and used for software
one four-star will be displayed before other (precision calculator), 7zip (compression/uncompression development. There are also other subcategories named
applications having two five-star ratings. 12 tool), PuTTY (SSH/Telnet client) and Shutter (screenshot after software languages – like Java, Python and Perl –
items are displayed in the home screen under utility). The software listed in the Accessories tab is by that contain the different versions and tools related to
the Top Rated tab; once the More button is default sorted by rating; the other sorting criteria are the specific language.
clicked, you land on a page where 60 items are name and release date.
displayed in decreasing order of DR using the Moving on to the Developer Tools page, you will find
many open source tools which are subcategorised
“Many open source tools
list view.
into version control, IDEs (integrated development are subcategorised”
The Ubuntu Book 67
Ubuntu apps

Updates and To check out your installed applications, removals and

updates, click on the various History tabs to view items in
past downloads reverse chronological order

On the home screen of USC you will find the History top right can search for applications which are already
tab; when clicked, this shows the ‘All Changes’ page installed or have been removed from the system. One Stop Shop for Ubuntu
by default. Under the navigation bar are tabs for All Whenever the Back ports channel contains a version As well as offering a vast selection of free
Changes, Installations, Updates and Removals. of any application which is newer than the one installed, software to download, the Ubuntu Software
The entries are grouped in branches and labelled by an Updates item appears in the last navigation bar. The Centre provides the option to purchase and
the day in reverse chronological order; (newest on top). Updates section displays the number of application install commercial software. The Software
Clicking anywhere on a branch (or pressing the space- updates available, along with an Update All button. Centre contains a list of programmes which
bar when it is selected) should expand it if it is collapsed, The list contains the icon, title, the newer version of the are provided by Ubuntu itself, along with
and collapse it if it is expanded. The branch on which the application and an Update button at the far right end. software offered by Canonical’s partners (those
recent activity has occurred is opened by default in the When an item is selected, pressing the Enter key programmes which abide by the software rules
USC history screen. The items displayed in the History should activate its Update button; when an update is of Ubuntu). The number of programmes available
tab contain the icon of the software, name, plus the date installed or waiting to be installed, its Update button in the Software Centre continues to grow rapidly,
and time of installation. Upon clicking the Installation should be inactive. so there’s a lot of choice.
tab, you will find all the installed applications grouped
by their installation dates. The Updates tab, on the other “The Software Centre In simple terms, the Ubuntu Software Centre
is the equivalent of the Google Play Store (or
hand, lists all the updated applications along with their
update dates.
contains a list of Apple App Store) for Ubuntu, where you can
find thousands of programmes, tools and
Finally, the Removal tab displays the list of
applications which have been uninstalled from the
programmes provided by applications which can be installed with just a

system. In the History tab, the search bar present on the Ubuntu itself” few clicks.

68 The Ubuntu Book

Explore the Ubuntu Software Centre

Installing programs
In this example, we show how to install two programs in the Developer Tools section
of the Software Centre
Now we’ve covered navigation and layout, let’s move on to
installation. In this example, we’ll install OpenJDK Java 7 and the
Eclipse IDE. Select the Developer Tools category from the home
screen of USC. This will take you to the Developer Tools page,
which is further subcategorised. Click on Java (cup of coffee
icon), which takes you to the page where Java-related items are
displayed in a list view. Now select the item Open JDK Java 7
Runtime and on the right side you will find the Install button; click
it to install the packages. You’ll then be prompted to enter your
administrator password; type the correct password and hit Enter
to start the installation.
During installation, you will find the progress icon graphically
displaying the status of the installation. Once it’s complete, you
will be redirected to the success page, which also contains the
Remove button in order to uninstall the programme.
Click the Back button to search for the IDEs section; now click
the IDEs icon to see the list of IDEs present in USC. Type ‘Eclipse’
in the search bar to search for the Eclipse IDE. Select the Eclipse
IDE (blue ball icon) and then click the Install button; enter the
administrator password to start installation. Once Eclipse is
successfully installed, open it by double-clicking. Create a project
named ‘Hello’, with a Java filename of, in the test
package. Now run this program to get an output in the console.
This confirms that both Java and Eclipse are up and running.

“There are many programmes

to install, such as chat apps,
file sharing and more”

Advanced software suggestions

We look at some of the advanced tools available in the Ubuntu Software Centre
and see how they can help you in your activities
Switching from Developer Tools to Internet in the
category section of USC, you will find many programmes
to install, such as chat applications, file sharing tools,
email clients and web browsers. By clicking the File
Sharing tab, you will see many tools, FileZilla being the
highest rated one. FileZilla uses FTP, SFTP and FTPS
mechanisms to share and upload files to different
systems. Just click on the Install button and start
sharing your files within different systems.
In order to use your Ubuntu computer for office work
and view different formats of files, you will find the Kile
application under the Office category. The source editor
is a multi-document editor designed for .tex and .bib
files. Menus, wizards and auto-completion are provided
to assist with tag insertion and code generation.

The Ubuntu Book 69

Ubuntu apps

Browse the Internet with Firefox

Explore the hidden features of Mozilla Firefox

Discover Firefox Learn various Firefox settings to speed up your browsing

Address and search bar Add and view Icon bar
Enter the website address, that is the bookmarks This bar holds icons for
URL, here to browse the Internet. The You can add a bookmark other services like Pockets
address bar is smart, as it automatically with the star icon and (to save reading lists),
suggests websites based on your history view all the saved Downloads, Home and
and bookmarks. You can enter search bookmarks by clicking Chat. The last icon opens
queries in the search bar on the next icon up the Settings menu

This area holds
all the major
options that
Firefox has
to offer. You
can open new
windows, print,
view history,
edit settings
and more
You can edit
website URLs
Zoom or text that
Sync Customise Click on the ‘-’ sign to you enter in
This is where you You can configure the button zoom out or the ‘+’ sign websites using
can log in to enable positions, themes and to zoom in to the web this buttons
syncing of your overall look and feel of your page. The middle area
browsing data across Firefox installation using the here shows the current
all your devices Customize option here zoom percentage

Internet browsing is one of the most Ubuntu ships with Mozilla Firefox as the default page, go to Menu>Preferences>Home page and enter
common activities taken up by computer browser. You’ll find the browser icon on the left bar on the URL you would like to set as the Home page. You can
users. People use the Internet for almost the Ubuntu Home page. Let us learn a few basic things also drag and drop an open tab on to the Home icon on
everything, from online shopping and reading to gaming about Firefox. the right icon bar. This will automatically set the Home
and more. Almost all Internet access is via an Internet Once you launch Firefox, you will see the Google page. To bookmark a web page, click on the star icon of
browser, and a significant amount of time spent on a search page as the Home page. Note that the default the right icon bar while the page is open. The address
computer is often on a browser. So, as an Internet user, search engine is Google, but you are able to change bar automatically shows a list of pages from your
it is very important that you understand your Internet’s it to other search engines, such as Yahoo!, Bing or browsing history and bookmarks when you start typing
interface, that is the web browser, extremely well. DuckDuckGo, for example. To change the default Home in the address bar.

70 The Ubuntu Book

Browse the Internet with Firefox

Tutorial Learn important aspects of web browsing with Firefox

01 Search website from the address bar

There are steps that you will repeat several
times a day without realising how much time they
02 Sync information across devices
People now use multiple devices to access
the Internet. Firefox helps to make sure all your
03 Protect your privacy while browsing
As you browse the web, Firefox remembers
lots of information, for example the sites you’ve
take, for example, searching specific websites. bookmarks, links and other things are synced visited and your passwords. There may be times,
Instead of going to the search engine, finding the across devices seamlessly. Firefox does this with however, when you don’t want people with access
search box, entering the keyword and executing the a feature called Sync. It lets you share your data to your computer to see this information. Private
search, you can directly search the Internet using and preferences (such as your bookmarks, history, Browsing allows you to browse the Internet without
Firefox, while you are on any website. passwords, open tabs, Reading List and installed saving any information about which sites and pages
To set this up on your browser, visit the page on add-ons) across all your devices. you’ve visited. Private Browsing also includes Tracking
the target website that has the search field you Let us see how to set up and sync an account in Protection, which prevents companies from tracking
would normally use to search the site. Hold down Firefox. First, click on the menu button and click your browsing history across multiple sites. To open
the Ctrl key and click on the search field. Select ‘Add ‘Sign in to Sync’. The sign-in page will open in a new a private browsing session, click on the menu button
a Keyword’ for this search. The ‘Add Bookmark’ tab. Click the ‘Get Started’ button. Fill out the form and then click ‘New Private Window’. If you want to
dialog appears. Enter an appropriate name for the to create an account and click ‘Next’. Take note of the directly open a link in a new private window, hold
bookmark (for example: ‘Wikipedia search’). Create email address and password you used; you’ll need it down the Ctrl key while you click on this link and
a keyword (like ‘wikipedia’). Select the bookmark later to log in. Check your emails for the verification choose ‘Open Link in New Private Window’ from the
folder to contain the smart keyword. Click OK. To use link and click on it to confirm your email address. context menu.
the created smart bookmark, enter the keyword and You’re ready to go! Now you just need to log in to Sync
search string in the Location bar then press Return. on all your other devices and let it do the rest.
04 Install an app
Mozilla offers the browser platform to
developers as well. This paves the way for thousands
of interesting and useful apps in the Mozilla
marketplace. With a wide selection of games, music
and productivity apps, Firefox Marketplace has
something for everybody.
To install an app, open Firefox, click on the
‘Tools’ menu and select ‘Apps’. This will open up the
marketplace. Now, type a search query in the search
box to look for a specific app or choose a category
for the type of app you are looking for. You can also
choose the screen type from the drop-down menu to
see apps optimised for that screen size. Click on an
app to view its details. Finally, if you’re ready to install
an app, click the blue install button.

The Ubuntu Book 71

Ubuntu apps

Manage your emails with

Learn to manage all your email accounts using Thunderbird
Part of the Mozilla suite, Thunderbird is a Tabbed email lets you load messages in separate Thunderbird is installed by default on Ubuntu 15.10,
lightweight mail client. It supports different tabs so you can quickly jump between conversations. so just fire up Dash and search for it. Click on the icon
account protocols like POP, IMAP, Gmail etc. A quick filter toolbar helps you filter messages by in the results to launch Thunderbird. You can now add
It also has an integrated learning spam filter that offers tags, contacts, keywords etc. Other features include your email accounts to get started here. Note that
easy organisation of mails with tagging and virtual message archiving, customisable themes and Thunderbird, in association with some service providers,
folders. More features can be added by simply installing personas, smart folders, and even chat integration. You offers email servers as well. So, you can avail a new
extensions. If you’re an avid reader, Thunderbird acts can also add social media accounts, like Twitter and email ID right from the Thunderbird GUI. If you don’t want
as news and RSS client as well. So, you can get all your Facebook, directly to Thunderbird and chat with your a new email address, however, just select ‘Skip this and
information at a single point of contact. contacts with accounts on these platforms. use my existing email’.

Discover Thunderbird UI Explore Thunderbird UI elements to use them efficiently

Get messages Write Address book Search and filter
You can use this Click here This holds all You can search your
button to force sync to open your contact mailbox for specific
with the email servers the Mail details from keywords or filter the
and fetch all the new Compose different mailbox mails based on sender,
messages for all your dialog and accounts in a recipient, subject etc
email accounts write a mail single place from this section

Mail folder list

This section holds
all the mail folders
from all your Mails list
mailboxes. If you This is the
have enabled the section that
unified mailbox, shows a list of
you’ll see each all your mails in
mailbox as a child a chronological
inside the generic order. Just
mail folders click on the
column header
to sort the
mails based
on different
Chat Mail display criteria
All the social platform This section displays a
profiles such as detailed view of the mail
Facebook, Twitter etc (if selected in the pane
linked to Thunderbird) above. You’ll see the
are visible inside this reply, forward and delete
chat box buttons here

72 The Ubuntu Book

Manage your emails with Thunderbird

Use Thunderbird as your

mail client
Setting up a new account with Thunderbird is easy.
Just click on the ‘Email’ link on its launch page. You then
need to provide your username and password for your
email provider and your email address. Thunderbird
determines connection details (such as ports, server
names, security protocols etc) by looking up your email
provider and can usually provide the account details.
You need to configure your account manually if your
email provider is not listed in Thunderbird’s database,
or if you have a non-standard email configuration. To
configure an account manually, you need the following
details: incoming mail server and port (eg ‘pop.example.
com’ and port 110), outgoing mail server and port (eg
‘’ and port 25), and the security setting
for the connection with the server (eg ‘SSL/TLS’ and
whether or not to use secure authentication). Fill in these
details and you are good to go.

Social chat with Thunderbird Multiple mail accounts with unified folders
Configure Thunderbird to chat with your contacts on Learn to manage multiple accounts by
social media platforms combining folders
To add chat accounts to the Finish button. You will then be Unified folders is a folder pane view folders of the inbox, only its inbox
Thunderbird, click on the Chat taken to the website of the account which resembles a global inbox folder has been ‘moved’ away from
button next to the Email button you chose to authenticate access to account: it merges the contents the account. This does not change
on Thunderbird’s launch page. your account. Once authenticated, of all inbox folders (both POP, IMAP where and how messages are
After you click the link, you’ll see a you can view all your social and local folders) from all accounts. stored. Unified is just another way to
pop-up with supported services. conversations in a new tab. Another It also shows the inbox of each view your folders at a single point.
Facebook, Twitter, Google Talk, aspect of Thunderbird chat is that all account as a child folder of the To enable unified folders, go to
IRC and Yahoo are all supported. the chat conversations are included unified Inbox account. Any message View> Folders>Unified Folders and
Select the account to add and click in search. So, if you are looking for a in an inbox shows up in both the select it. Alternately, if you don’t
Next. On the next page, enter the keyword, just type it and the results root of the unified Inbox, plus the want to use the feature, use View>
username and then on the next you get will include results from past child folder of the unified Inbox. Folders>All Folders to select a more
page, select the alias. Finally, click chat conversations. Each account displays any child traditional display.

Extend Thunderbird
Thunderbird has an open, extensible design and
program architecture. This enables people to create
add-ons for it. Most of these are distributed via
the Mozilla add-ons site, but authors can do so any way
they choose. Let’s see how to install an add-on…
To start, go to Tools>Add-ons. Click on Get Add-ons.
Type the name or keywords of the add-on you want in
the search field and click the magnifier icon. Then select
the add-on from the list and click ‘Add to Thunderbird’.
Click on Install Now once the button is available. Note
that the add-ons from the official site (addons.mozilla.
org) are reviewed by Mozilla and are relatively safe to
install. Also, if the author is verified, the author name will
be displayed. Finally, restart Thunderbird to complete
your changes.
To remove an add-on, go to Tools>Add-ons and
select the add-on to be removed from the Extensions,
Themes or Plugins panel. Then click Disable to prevent it
from loading; you can also click Uninstall to completely
remove it.

The Ubuntu Book 73

Ubuntu apps

Communicate with Empathy

Learn to set up and use Empathy text messenger

The Empathy interface Understand how Empathy works and what you can change
Application settings Online accounts Other settings
Once you open Empathy, If you select Add Accounts You can see several other
these settings are available in the status bar, you’ll see settings like sounds,
automatically on the top status this open up. If you click calls, location, spell
bar. You can find various settings All Settings here, you’ll check, themes and so on
related to conversations, be taken to the System as different tabs under
contacts and so on here settings page Empathy> Preferences

Contacts list
This window
displays a list of
all the contacts
and their current
status. To chat with
anyone from this
list, right click on
the contact, and
select chat
You can find
these under
Under the
settings you
can set what
contacts will
be visible by
default and
also select the
chat settings

Account details
Accounts list Chat window Once you select an already
You’ll see a list of This is the actual chat window added account on the left
accounts added to the where you can converse with window, you’ll see all the related
system here. Click Add your contacts. Based on the options here. You can choose
account to add a new system capabilities, you can also to enable or disable related
online account here chat in audio and video mode services from here

Instant messaging, also abbreviated to IM, In this feature, we are going to explore Empathy. It is on the Empathy icon to launch the application. When
is a text-based means to communicate a messaging program that supports text, voice, video you launch it for the first time, you’ll be asked to link
instantly over the Internet and the local chat, and file transfers over many different protocols. your online accounts. Just link your accounts and you
network. While some IM applications need you to Empathy also lets you add accounts from different can then easily talk to all your contacts. Using Empathy,
create a new account, others provide IM facilities by services and use them to chat with your contacts. you can also group all the conversations in a single
using accounts from different service providers like Based on Telepathy for protocol support and a UI based window, have multiple windows for different kinds of
Google, Yahoo etc. IM applications can also be used to on Gossip, Empathy is the default chat client in current conversations, easily search through your previous
connect to chat rooms. For the uninitiated, chat rooms versions of GNOME, (and hence Ubuntu). To get started conversations, and share your desktop in just two clicks.
are online places where like-minded people meet to talk. with Empathy simply type Empathy in Dash. Then click Now let’s learn about Empathy in more detail.

74 The Ubuntu Book

Communicate with Empathy

Tutorial Get started with Empathy messenger

01 Add a new account

You can add instant messaging accounts
from several supported services. For some
The resulting contact is called a meta-contact: a
contact composed from different single contacts. To
link accounts press the tick button to select entries
name from the drop-down and then fill in the room
name and the server name. You should now be able
to chat with people in the room you joined. Note
account providers, these steps will also allow you you want to link. This will enable selection mode and that an IRC network may have many servers you
to register for a new account. To add an account, you can see a checkbox for each entry. Tick the can connect to. When you are connected to a server
click Empathy>Accounts and then press +. From checkboxes that correspond to a single person’s on a particular network, you can communicate
the ‘What kind of chat account do you have?’ contact entries. Finally, press Link. with all users on all other servers on that network.
drop-down list, select the type of account you You can also add and remove servers for this
wish to add. Enter the required information. For
most accounts, you will only need a login ID and a
password. Some accounts may require additional
03 Audio and video communication
Empathy supports audio and video
communication using the default GUI, however
network using the Add and Remove buttons.
When a server is selected, click the field
under Server or Port to edit it. Alternatively, use the
information though. Finally click Add to confirm and it is still dependent on the account you use to left and right arrow keys to focus the field, and press
save the account details. communicate. This is because only a certain set of the space bar to begin editing.
services support audio and video communication.

02 Manage contacts
After you have your accounts added to
Empathy, next step is to add your contacts and
Right now only Google, Jabber and SIP accounts
are supported. Considering you are using one of the
supported accounts, let us see how to initiate audio
manage them. To add contacts, click Chat>Add and video calls.
Contact. Then from the accounts drop-down list To initiate a call, right-click on the contact you
select the account you wish to use to connect to want to talk to and select Audio Call or Video Call. In
your contact. Note that your contact should be the next window that opens, you’ll see the connection
using the same service as the account you select. getting established. When the connection is
In the Identifier field, enter your contact’s login established, you will see the total conversation time
ID, username, screen name, or other appropriate at the bottom of the window. Once you are done, end
identifier for the service type. In the Alias field, type the conversation by clicking the hand up button.
your contact’s name as you would like it to appear in
your contact list. Finally, click Add to add the person
to your list of contacts.
If one or more of your contacts has multiple
04 IRC with Empathy
To use IRC with Empathy, make sure you have
at least one account added to Empathy already. You
accounts with different messaging services, you can then select Rooms>Join Rooms, which will open
can combine these accounts into a single contact. the IRC pop-up. You can simply select your account

The Ubuntu Book 75

Ubuntu apps

Explore LibreOffice Writer

Learn to use different features of LibreOffice Writer
LibreOffice Writer is the word processor spreadsheet is created using Calc, it can be inserted users who are unwilling or unable to receive ODT files.
component of LibreOffice. As well as into Writer easily. You can also work with drawings, Also, it can be exported to a PDF file with its bookmarks.
providing all the standard word-processing spreadsheets and so on directly from within Writer using The document can be protected using password at read
functions, there are many other advanced features a subset of the functions and tools from respective or write level for different groups of people. A Writer
such as built-in drawing tools, tracking changes during LibreOffice suite components. document can be multilingual, as Writer provides tools
revisions, and integrating databases. You can view a Writer document in several ways: – that make the use of different languages in a single
Writer is fully integrated into the LibreOffice suite, Print Layout, Web Layout and Full Screen – by selecting document easy. Spell-check dictionaries are built in
and this simplifies embedding or linking graphics, layouts in the View menu of the Writer workspace. The and help in applying localised versions of Autocorrect
spreadsheets and other objects. For example, if a document can be saved as a Microsoft Word file for replacement tables, thesaurus and hyphenation rules.

Discover Writer features Understand various Writer toolbars

Menu bar Text format toolbar Workspace
This is the area that This section holds all This section displays the
has various top-level the options to edit and document that you are
menu options. Note the format text in your working on. You can zoom in
View menu here; this is Writer document or out from this area using
used to enable various the status bar slider
toolbars in Writer

This shows various
toolbars as and
when you enable
them via the View
menu option. By
default it shows the
Standard toolbar,
which has options Sidebar
related to saving
The sidebar
files and other
is common
standard items
suite software.
It has four
main sections
– Properties,
Styles and
Gallery, and

Form design Status bar

Drawing toolbar The Writer status bar
toolbar This section lets provides information – like
This toolbar has the options to you draw and insert page number, word and
help you draw forms and format various objects in your character count for selected
them. You can see the Design Writer document text, page style, language etc
Mode On button here. – about the document

76 The Ubuntu Book

Explore LibreOffice Writer

Working with graphics

There are different ways to use graphics in Writer. You
can insert image files, such as photos, drawings and
scanned images. You can also insert diagrams created
using LibreOffice drawing tools, or charts created using
LibreOffice Chart facility. Writer supports raster file
formats such as GIF, JPG, PNG and BMP.
You can add graphics by inserting an image file
directly from a graphics program or a scanner, from a
file stored on your computer, or by copying and pasting
from a source being viewed on your computer. You can
modify the inserted picture using Picture toolbar.
Writer provides built-in drawing tools to create
graphics. If you want to create a basic diagram, you
can navigate to View>Toolbars>Drawing. For drawing
the simple diagram, you can use rectangles, circles,
lines, text and other predefined shapes, and group
several drawing objects to make sure they maintain
their relative position and proportion. To give you extra
control over the drawing, you can reposition the shapes
by sending them to the back or front.

Tracking changes Master document

Learn to track changes during revisions Learn to use master documents
Writer lets you track changes made save it as a separate document with If you have many files and you the name and location for the files,
in different versions of a document. a different name and use it as the want to group them into a single and in ‘separated by’ choose the
A simple way is to create a duplicate review copy. To record the changes, document, you can create a master outline level where the file should
of the file and make changes there. check Edit>Changes>Record. document (*.ODM). ODM files are be split into various different
Then click Edit>Compare Document. Protect the changes recording by used to group different ODT files. subdocuments.
However, this method can only be clicking Edit>Changes>Protect It unifies the formatting, table of To combine more files with a
used if just one person is working Records, specify the password and contents (TOC), bibliography, index, master document, open it up and
on the document. Another way is click OK. and other tables or lists. click Yes to update the links. Now, in
to use the Change Marks option. To merge the changes made, open Writer can split the the navigator, click and hold on the
Later on, you or others can accept the original document and click document automatically into a Insert icon, move the cursor down
or reject each change. To check the Edit>Changes>Merge Document master document and several to File and release the button there.
available versions of the document, and select and insert updated copy. subdocuments. To perform this Select the file you’d like to be linked
navigate to File> Versions. If you After merging, accept or reject the function, click File>Send>Create and use Move Up or Move Down
want to update the current version, changes that have been made. Master Document. Then specify icons to position it as you require.

Database integration
Writer can be used for creating forms. This is done via
two toolbars: Form Design and Form Control. If you
want to create a form for getting someone’s details,
click the Design Mode On button to activate the tools in
the Form Design toolbar. Insert controls like Name as a
text box, gender as an options button, Country as a list
of options, and Hobbies as checkboxes. Now beautify
the form as you want.
Forms are generally used as a front-end for the
database. LibreOffice can access numerous data
sources like ODBC, MySQL, Oracle JDBC, spreadsheets
and text files. To create a database with LibreOffice
Base, navigate to File>New>Database to start the
Database Wizard and select ‘Create a new database’.
On the next page, select Yes, register the database and
‘Open the database for editing’; this makes it available
for other LibreOffice components.

The Ubuntu Book 77

Ubuntu apps

Unlock LibreOffice Calc features

Learn how to use LibreOffice Calc like a pro
Understanding Calc options Find out various menu options in Calc layout

Standard toolbar Menu bar Formatting toolbar

This toolbar holds icons The menu bar has basic options related The formatting toolbar primarily
to manage file-handling to the handling of the software. For has options to manage
and formatting options. example, File contains commands that formatting, as the name
These toolbars are highly apply to the entire document, such as suggests. You can manage fonts,
configurable; you can easily Open, Save, Wizards, Export as PDF, font size and other related things
add or remove icons here Print, Digital Signatures and so on using the options here

This toolbar has
the options to
view and add
various formulae
to spreadsheets

This menu lets
you access the
most-used aspects
of Calc UI, like
functions and more

Column headers
Row headers Status bar This section holds
This section has row Calc status bar provides the column headers.
headers. A number information on the spreadsheet, Each column is
starting from 1 like cell information, as well as identified by a letter
identifies Rows quick and convenient ways to of the alphabet,
change some of its features starting with A

One of the most commonly used elements – text, numbers, formulas and so on – that Alternatively, you can enter data, then use Calc to
components in an office-related software make up the data to display and manipulate. Each plot the data by changing some of it and observing the
suite is the spreadsheet. People from spreadsheet can have several sheets, and each sheet results without having to retype the entire spreadsheet
all fields use spreadsheets to manage data, so it’s can have several individual cells. In Calc, each sheet can or sheet.
important to understand how Calc can help you. have a maximum of 1,048,576 rows (65,536 rows in Calc There are some other very neat features too. You can
Spreadsheets consist of a number of individual 3.2 and earlier) and a maximum of 1024 columns. create formulas to perform complex calculations on
sheets, each sheet containing cells arranged in rows Calc is the spreadsheet component of LibreOffice. data. You can use database functions to arrange, store
and columns. The row number and column letter So, as with Microsoft Excel, you can enter data, then and filter data. There is a wide range of 2D and 3D charts
identify a particular cell. Cells hold the individual manipulate it to produce certain results. available that can be used to plot the data and more.

78 The Ubuntu Book

Unlock LibreOffice Calc features

Tutorial Learn to use various Calc features

01 Add formulas
The formula bar is located at the top of
the sheet in the Calc workspace. It is permanently
02 Manage your sheets
Calc allows you to have more than one sheet
in a spreadsheet. Sheet tabs at the bottom of the
docked in this position, however it can be hidden via grid of cells in a spreadsheet indicate the number of
settings. If the formula bar is not visible to you, simply sheets in your spreadsheet. Clicking on a tab enables
head to ‘View’ on the menu bar and select ‘Formula access to each individual sheet and displays that
Bar’. The formula bar contains the function wizard sheet. An active sheet is indicated with a white tab
that can be used to search and add a function to the (default Calc setup). You can also select multiple
spreadsheet. To start the function wizard, click on sheets by holding down the Ctrl key while you click
the f(x) icon located on the function bar. This opens a on the sheet tabs. To change the default name for
dialog from which you can search through a list of all a sheet (Sheet1, Sheet2 and so on), right-click on a Insert>Chart from the menu bar. This will insert a
the available functions. sheet tab and select ‘Rename Sheet’ from the context sample chart on the worksheet, open the Formatting
This can be very useful because it shows the menu. A dialog opens, in which you can type a new toolbar, and the Chart Wizard.
function formatting, a brief description about the name for the sheet. Click OK when finished to close The Chart Wizard has three main parts: a list of
function and the result that the function would return the dialog. To change the colour of a sheet tab, right- steps involved in setting up the chart, a list of chart
if executed on the currently selected cell. click on the tab and select ‘Tab Color’ from the context types, and options for each chart type. Calc offers
You will also see the summation icon and (=) icon menu to open the Tab Color dialog. Select your colour a choice of 10 basic chart types, with a few options
next to the function wizard icon. Clicking on the and click OK when finished to close the dialog. for each type of chart. The options vary according to
sum icon totals the numbers in the cells above the the type of chart you pick. The first tier of choice is
selected cell and then places the total in the selected
cell. If there are no numbers above the selected cell,
then the cells to the left are totalled. Clicking on
03 Plot charts
Calc lets you plot data graphically in a chart,
based on the values from specific cell ranges. To
for 2D charts. Only those types that are suitable for
3D (Column, Bar, Pie and Area) give you an option to
select a 3D look. On the ‘Choose a chart type’ page,
the Function icon inserts an equals (=) sign into the create a chart, highlight the data to be included. The select a type by clicking its icon. The preview updates
selected cell and the Input line, allowing a formula to selection doesn’t need to be in a single block. You every time you select a different chart, and provides a
be entered. can choose individual cells or groups of cells. Choose good idea of what the finished chart will look like.

The Ubuntu Book 79

Ubuntu apps

Edit formulas in LibreOffice Math

Learn to use LibreOffice Math, the equation editor
Understanding Math’s elements Discover the various options at your disposal
Set Operations Menu bar
& Functions The menu bar has various basic options
In the Elements window the related to handling the software. For
set of pre-defined formulas, example, File contains commands that
including set operations apply to the entire file; such as Open,
and functions, are defined Save, Wizards, Export as PDF, Print, Digital
in these two options Signatures and so on

of a set of
such as limits,
sum, integral,
etc. Attributes Others &
consists of
symbols that Examples
are used with Others consists
a variable in a of symbols like
formula, such infinity, partial,
as line below, nebula, arrows,
circumflex, dotted lines,
and vector etc. Examples
arrow, etc has a set of
equations which
are pre-defined
in Math

Preview window
Brackets and Formats Equation editor The equation appears here
Brackets consists of different brackets Equations are written during and after input
used in a formula. It also has brackets here or in the Elements
used in matrices. Formats has a set of window using markup
pre-defined ways in which a formula
can be written

We often struggle to insert a chemical Writer, Calc, Impress or Draw document. To insert the the formula in English. All the mathematical formulae
formula or complicated mathematical equation in these LibreOffice components, select are supported by Math and a set of pre-defined
equation in a document. Even if you write Insert>Object>Formula. Note that the equations can symbols, formulae and a few equations are available.
it, it’s not neat. LibreOffice Math is used for writing only be used for symbolic representation. Want to reuse the pre-defined equation? Just drag-
mathematical and chemical equations. The equations To enter a formula in Math, you can use the Elements drop the formula from Examples in the Elements
and formulas created in it can be accessed in a perfectly window, which has categories of formula and symbols window. Similarly, other formulas, symbols and
formatted way through documents, spreadsheets, that can be used. Another way to insert any formula is equations can be reused from there. Math can also
presentations and drawings. You can create equations by right clicking on the equation editor, or directly type display chemical formulas. With markup, molecular
as a stand-alone document or insert it in a LibreOffice markup in the equation editor. Markup is how you read formulas, ions and isotopes can be displayed neatly.

80 The Ubuntu Book

Edit formulas in LibreOffice Math

Tutorial Create formulas using LibreOffice Math

01 Create formula layout

The equation editor uses a markup language
which is similar to how it is read in English. The order of
02 Formulas in Writer
Formulas can be inserted in LibreOffice
Writer by choosing Insert>Object>Formula from the
operation is not known to Math automatically so if you menu bar. They are inserted as OLE objects, and are
want to write a function, use brackets to let it know the anchored as characters embedded in the continuous
order of operation. If brace is required in the formula, text. They can be changed to a floating formula if
use commands lbrace and rbrace in the markup. required. In Calc, Draw and Impress they are added as
There are a few other characters which are used for floating OLE objects.
controlling markup and cannot be entered directly as Equations created in LibreOffice Writer using
normal characters. The characters concerned are: %, the Equation editor can be numbered and cross-
&, |, _, ^ and “. Either use corresponding markup or use referenced across LibreOffice programs. To insert
quotes to identify them in an equation. a cross-reference, choose Insert, followed by
To display matrices, Math provides scalable Cross-reference from the Menu bar and in the
brackets which grow in size as the size of a matrix Cross-references tab select Text as Type. Select
increases. You can use command left/right to make the equation number under Selection label and its
scalable brackets. reference under Insert reference to, then click insert. markup language can be written as U lsub 92 lsup
Math helps users in identifying impaired brackets At this point, a stand-alone Math document is saved 238 and U lsub 92 lsup 235. To display charge in the
also. It places an inverted question mark by the as an ODF file, with the single formula. For formulas ion, write empty braces after + or -. Alternatively,
corresponding bracket which disappears when all that you use often, you can create a library and insert + and – symbols can be enclosed in the quotes.
the brackets are matched. Math also identifies few it in as an OLE object in Writer for easy access. For example, sulphate ion is written as SO_4^{2-{}}
in-built functions. If you want it to identify more or SO_4^{2”-”}, ammonium ion can be written as
functions, add markup func before it.
03 Write Chemical Formulas
Although Math was designed to be used
for mathematical formulas, it can also be used to
NH_4^{{}+{}} or NH_4^{“+”}.
Apart from different chemical formulas, chemical
equations can also be displayed using Math. To
“Math can also be write chemical formulas neatly. Since the chemical display chemical equations, Math provides arrows.

used to write chemical formulas are non-italic you need to de-select the
italic attribute first. Now if you want to write chemical
But for reversible chemical formulas, it does not have
any suitable arrows. You can customise the catalogue
formulas. Complex formula for Sulphuric acid, write the markup for
it: H_2 SO_4 or molecular formula for ethanol can
to add custom fonts which have arrows. Alternatively,
special character for the arrows can be inserted. It is
molecular formulas can be written as C_2 H_5 OH. For displaying isotopes
with left subscript and left superscript use lsub and
certainly interesting to play with chemical equations
and display them neatly using LibreOffice Math and
be easily displayed” lsup respectively. For example, Uranium isotopes in the rest of the LibreOffice package.

The Ubuntu Book 81

Ubuntu apps

Present with LibreOffice Impress

Make impressive presentations with this slideshow tool

Discover LibreOffice Impress Include multiple presentation elements

Menu bar Standard toolbar Sidebar
This is the default This section holds The sidebar has seven sections. To
menu bar. It is options to create new expand a section you want to use, click
identical across presentations, and save on its icon, or on the small triangle
almost all LibreOffice and print files, as well at the top of the icons, and select a
suite software and as other basic section from the drop-down list. Only
offers similar options formatting features one section at a time can be open

Slides pane
The slides pane
contains thumbnail
pictures of the
slides in your
presentation in
the order in which
they will be shown, This is the
unless you change place where
the slideshow the slides
order. Clicking a are displayed
slide in this pane while you work
selects it and on them. You
places it straight in will see the
the workspace slides currently
selected in the
slides pane
right here

Status bar
Layout selection Drawing toolbar The Status bar, located at the bottom
These tabs indicate various layouts This section is similar to the of the Impress window, contains
available in Impress. Currently there drawing toolbar in LibreOffice information that you may find useful
are five types of layouts present. To Draw. With this toolbar, you can when working on a presentation,
move to a different layout, simply draw free-form shapes or insert like slide number, zoom level, cursor
click the tab predefined shapes to the slides position and so on

Impress is the presentation program contain. Slides containing text use styles to determine pane, workspace and sidebar. Several toolbars can be
included in LibreOffice. You can create the appearance of that text. Creating drawings is similar displayed or hidden when creating a presentation.
slides that contain elements including text, to the Draw program included in LibreOffice (p.94). Impress has five layouts for the workspace that can
bulleted and numbered lists, tables, charts and a range When you start Impress, the Presentation Wizard be used in different scenarios. They are: normal view,
of graphic objects such as clipart, drawings and photos. is shown. Otherwise, the main Impress window is outline view, notes view, handout view and slide sorter
Impress also includes a spelling checker, thesaurus, displayed. You can turn the Presentation Wizard on and view. Each workspace view displays a different set of
text styles and background styles. off in Tools>Options>LibreOffice Impress>General>New toolbars when selected. You can customise toolbar sets
To use Impress for more than simple slideshows document by selecting the ‘Start with wizard’ option. by going to View>Toolbars on the menu bar, then check
requires knowledge of the elements that the slides The main Impress window has three parts: the Slides or uncheck the toolbar you want to add or remove.

82 The Ubuntu Book

Present with LibreOffice Impress

Tutorial Create your first slideshow with Impress

01 Launch the wizard

The first thing to do is decide on the purpose
of the presentation and set out a plan. Although
also duplicate a slide by selecting the specific slide
you want to duplicate from the Slides pane and then
clicking on ‘Insert’ on the menu bar and selecting
on the slide. To remove an unwanted element, click
the element to highlight it. The resizing handles show
it is selected. Then simply press the Delete key to
you can make changes as you go, you will save ‘Duplicate Slide’. remove it.
a lot of time by having an initial idea of who the When creating a presentation, the first slide is
audience will be, the structure, the content, and
how the presentation will be delivered. To start
creating a presentation, the easiest way is to use the
normally a title slide. You can use either a blank layout
or one of the title layouts as your title slide. But if you
want to have different layouts for different slides,
04 Add and format text
Many of the slides are likely to contain
some text. Text used in slides is held in text boxes.
presentation wizard. If you are launching Impress for click on the Properties icon at the side of the sidebar You can add two types of text boxes to a slide, first
the first time, the presentation wizard will open up to open the Layouts section and display the available by choosing a predefined layout from the Layouts
automatically. Otherwise you can launch wizard using layouts. The layouts included in LibreOffice range section of the sidebar. These text boxes are called
the settings described earlier. from a blank slide to a slide with six content boxes AutoLayout text boxes. A second option is to create a
After you have launched the wizard, choose the and a title. text box using the Text icon on the Standard toolbar or
type of presentation you would like to create: empty, the Text toolbar, or use the keyboard shortcut F2.
from a template or an existing presentation. We’ll
choose ‘Empty Presentation’ here. On the next page,
you’ll be asked to choose a design for the slides.
03 Modify slide elements
A slide contains elements that were included
in the slide master, as well as those elements
In the next step, select the slide transition effects. included in the selected slide layout. However, it is
Then in the step that follows that, enter details about unlikely that the predefined layouts will suit all your
the author of the slide and other company details. needs for the presentation. You may want to remove
Finally, step 5 will show you a brief picture of what the elements that are not required, or insert objects such
slideshow will look like. as text and graphics. Impress allows you to resize
and move the layout elements. It is also possible to

02 Add more slides

After the presentation wizard finishes, you
have a new slideshow with only one slide. Let us see
add elements without being limited to the size and
position of the layout boxes. To resize a contents box,
click on the outer frame so that the resizing handles
how to add new slides, select layouts and modify are displayed. To move it, place the mouse cursor on
slide elements. To insert a new slide, simply go to the frame so that the cursor changes shape. You can
‘Insert’ on the menu bar and select ‘Slide’. You can now click and drag the contents box to a new position

The Ubuntu Book 83

Ubuntu apps

20 LibreOffice tips & tricks

Make your working day more productive with these
indispensable tips for the LibreOffice suite
Using office software for very specific tasks, you
can end up sticking yourself in a rut with the way
you work. You do the same thing the same way every
single time, not considering any other methods that
might make it faster, better or more efficient. When
you write several letters or documents a day for work,
or maybe create spreadsheets with regularity, you
don’t really ever need to learn new techniques. We all
get stuck in our ways.
It’s sometimes difficult to comprehend just how
powerful LibreOffice can be, especially when you’re
treating it as you normally do and not making the
most of what it has to offer. On a day-to-day basis,
you may have no idea about macros, creating
indexes or doing a mail merge with Writer. Over the
next few pages, we are going to highlight some of the
Above Learn best ways you can improve your use of LibreOffice,
how to use the with a particular focus on the core Writer and Calc
LibreOffice apps more programs. You’ll optimise the way you work and start
productively making the most of this feature-full office software.


01 Bring up formatting
When formatting a piece, perhaps for
greater readability or to make sure it prints properly,
it can be a tricky to figure out exactly why certain
sections of text are acting the way they do. On the
toolbar is a symbol that looks like a backwards P –
click that to reveal live formatting symbols, such as
rogue paragraph breaks.

“If you’re working with

files for Microsoft Office,
you can change the 02 Better bullet points
Creating a list of bullet points is fairly easy; click the type with dots or numbers and go. You can change
the formatting of these bullet points to be different symbols or letters instead of numbers. You can, however, also
default file format” create nested lists by using the Tab key to create sub lists, and then press Shift+Tab to go back to the standard list.

84 The Ubuntu Book

20 LibreOffice tips & tricks

04 Quick

04 Quick maths
Even when you’re writing, you might need
to do a quick bit of maths. Instead of switching to
Google or a calculator app, you can use the formula
bar. Go to Insert, Object, Formula and write out
the calculation you want. Once you confirm it, the
outcome of the formula appears where your cursor
was placed.

“On a day-to-day basis,

you may have no idea
03 Paste unformatted text
Generally in Linux, you can use Ctrl+Shift+V to paste text and remove its formatting at the same time.
If you use this in Writer, or find Paste Special in the Edit menu, you then have several options of how to paste the
about macros or creating
text. One of these is unformatted, but it also allows for other methods, such as using LibreOffice formatting. indexes in LibreOffice”

07 Create a
system in Writer
Writer has a recovery
tool for when
unexpected shutdowns
happen, but that relies
on temporary files and
other related files that
aren’t always there
when you really need
them. Writer does have
a backup system that
it can make use of
though; enable ‘Always
create backup copy’ in

05 Quick navigation
Pressing F5 or going to the View menu will
allow you to use the Navigator function. You can
the Load/Save General
options to cover this.

use it in large documents to quickly move between

different headings, tables, graphics, bookmarks
and many more objects in the document. It’s not a
08 Change case
Got a sentence
or a word and it’s not
Full app
proper dock, so you can move it around to see what capitalised correctly? As luck would have
you want at any given time. Pasted some text it, if you're unsure of
everything that comes
and it’s all randomly
in LibreOffice as part

06 Set default document format

By default, Writer will save new files as ODTs,
the open document format. This works in most other
capitalised? You can
change the case of
specific sections of
of the suite, we cover
it extensively in our
guide to the best Linux
word processors, but if you’re regularly working with text without re-writing. software starting on
files that need to work on Microsoft Office, you can Simply select what page 114. There is more
to LibreOffice than
change the default file format to be .doc or .docx. Go you want to change,
just Writer and Calc,
to Tools, Options and find the General settings under right click and use the after all.
Load/Save to change the default. Change Case option.

The Ubuntu Book 85

Ubuntu apps

Calc Learn more!

There are many more
functions to learn that
can help you do more
with LibreOffice and
the first step is to have
a look through some
of the documentation
for the software,
or just have a quick

11 Change status bar preview

When you select some cells with a numerical
value inside, you get a handy prompt on the status
browse through all of
the options and the
available menus.
bar that tells you the value they add up to. That
might not be what you want all the time, though.
Click on that area of the status bar to bring up
a menu and change it to average, maximum or
minimum numbers in the selection.

12 AutoFilter rows
Filtering rows helps to organise data, but if you’re not
sure how exactly to go about doing that, Calc has an automatic
filtering tool you can use. Select a row, then go to Data>Filter>

09 AutoFormat tables
If you’ve created a table, you may need to give it
colours to make it more readable. You can do this manually,
Auto for it to create an automatic filtering system based on that row. You can also
modify it a bit once it’s in place.

however Calc has a built-in format option under Format>

AutoFormat. From here you can give a colour scheme to a table that you’ve
selected and even customise what is taken into account for formatting.
13 Grouped cells
Sometimes you don’t need to see specific chunks of data all the time, and
collapsing it like in a piece of code will add a bit more space to the viewable page.
Using the Outline function under Data>Group and Outline>AutoOutline, you can

10 Protect your spreadsheet

Shared spreadsheets are good for productivity, but the more complicated
they become, the more difficult it can be to track down an accidental change
create these collapsible groups, which use a thick outline to indicate themselves.

made by one of the users. You can protect the spreadsheet by using Tools> “Calc is very smart when it comes to
Protect Document>Sheet to give it a password so that only certain people can
make changes. replicating cells”
10 Protect your

86 The Ubuntu Book

20 LibreOffice tips & tricks

17 Presenter

14 Auto-increment or copy cells

If you’ve never stumbled across it, Calc is very
smart when it comes to replicating cells. If you write
down two or three numbers or even dates, selecting
one and dragging the black square down to copy will
automatically fill in the cells with numbers or dates
in the correct sequence. If you don’t want it to do
that, press and hold Control when copying the cell
for regular duplication.

17 Presenter mode
“Impress has a particularly
15 Change Enter key
It seems fairly natural for the Enter key
to move you down a row of cells and that’s what
When using Impress for presenting
slides, you will often be hooked up to a projector
or television that either mirrors or acts as an
neat feature where the
Calc does by default. However, you can actually extension to your laptop. Impress has a neat actual presentation
change the behaviour of the Enter key by going to
Tools>Options>LibreOffice Calc, then General to
feature where the actual presentation will be
shown on the big screen, while you can turn on a will be shown to the
have it move along a row instead. presenter console just for your laptop display that
shows you what’s coming up in your presentation,
audience on the big
along with notes. screen, while you can
turn on a presenter
18 Switch between languages in spell-
check on the fly
We’ll illustrate this with an example: perhaps you
console just for your
need to paste into a document a paragraph from
Napoleon that is written in French. The rest of the
laptop display that shows
document is in English, so the spell check flips you what’s coming up in
out at words from over the Channel. Highlight the
paragraph, click Tools>Languages and then select your presentation, along
a language for this section of the document, and
only this section.
with notes”
16 Freeze columns in place
If you have a lot of data, rows or columns
you can sometimes find yourself browsing the
19 Insert readable formulas
There is a completely separate application
for LibreOffice called Math that is not, in fact,
20 Using PDFs
PDFs can be edited in LibreOffice. Simply
import them using something like Writer and it will
spreadsheet not always able to remember or divine database software, but actually a way to draw up dump the PDF into the Draw application. You can
what cell is for what. By selecting a row or column mathematical equations that can then be inserted edit text, change pictures and even the general
you always want to be visible, go to Window then into other LibreOffice software. This is good if formatting of the PDF. Once it’s done, Draw allows
Freeze to keep it always on the top or on the left as you’re writing an academic paper with ridiculous you to export the working file as a PDF for everyone
you browse the spreadsheet. maths that needs to be readable. to use.

The Ubuntu Book 87

Ubuntu apps

Text editing with Gedit

Understand its features and learn about its many purposes
Discover Gedit Understanding the user interface

New file Save file Undo/redo buttons

This button lets you create After you are done with You can undo your
a new file in Gedit. As editing the file, click this actions in the file or
you click this, new tabs button to save your work. If choose to redo them
will be created with new it is a brand new file, you’ll using these buttons
files. You’ll be asked for a also be asked to enter the
location when saving files save location

Search file
The magnifying
glass icon lets
you search a
file, and the
next icon with
a pencil on top
lets you replace
the searched
term with an
alternative one

Edit buttons Status bar

Open file Print file You’ll find the edit options This bar shows
You can open existing This button lets you print (cut, copy and paste) here. the file details,
files from here. Just the file directly from the You can also use the common such as encoding,
click on the button and application. You’ll be keyboard shortcuts –Ctrl+X, current cursor
select the file(s) you prompted to add a printer if Ctrl+C and Ctrl+V – to position, tab width
want to open you haven’t already accomplish these actions etc, in real time

Text Editor (aka Gedit) is the default GUI notes and documents, or create source code using its so on. You can also open a file at a specific line number
text editor in the Ubuntu OS and the GNOME advanced features just like an integrated development by including +<line number> in the file path, like this:
desktop environment. It is UTF-8 compatible environment. Gedit is installed by default on Ubuntu gksudo gedit +21 /etc/apt/sources.list.
and supports most standard text editor functions as 15.10 and can be launched via Dash or an application Gedit offers several helpful options, under Edit>
well as many advanced features like multilingual spell- shortcut. If you prefer the command line, you can use Preferences, that you may want to review. For example,
checking, extensive support of syntax highlighting, the gedit command to directly interact with the tool. Gedit automatically creates a backup copy of files you
and a large number of official and third-party plug- To open a specific file with Gedit, type gedit edit. If you are running low on space, however, you can
ins. With multiple character sets, Text Editor can <filename> at the command prompt. To open multiple disable this: just go to Edit>Preferences>Editor tab and
play a versatile role - you can use it to prepare simple files, type gedit <filename1> <filename2> … and deselect ‘Create a backup copy’.

88 The Ubuntu Book

Text editing with Gedit

Tutorial Dive deeper into Gedit’s features

01 Handling files with Gedit

We’ve already seen how to open files in
Gedit via the command line. Let us now dive deeper
for in the search window. As you type, Gedit will
begin highlighting the portions of text that match
what you have entered. You can scroll through the
04 Plug-ins
Plug-ins greatly enhance the power of Gedit
and are accessed via Edit>Preferences>Plugins. More
to understand how to manage files in Gedit. To search results using the up/down arrow keys or by than a dozen plug-ins are pre-installed and can be
open a file or set of files in the Gedit GUI, click the pressing Ctrl+G. enabled/disabled within this section. Extra plug-ins
open button or press Ctrl+O; in the dialog, select You can also highlight a portion of text with are available via the Internet.
all the files you want to open and click Open. your mouse, and then press Ctrl+F. The text Here are just two of the plug-ins that can help you
Also, by default, Gedit provides easy access to you’ve highlighted will automatically appear in the with your day-to-day activities…
five of your most recently used files. To open one, search window. For more search options, click on Tag List – Displays common tags in a side pane and
click the downward-facing arrow to the right of the magnifying glass icon in the search window. allows for easy insertion into the file.
the open button. Gedit will display a list of the five You can select one or more of the following search External Tools – This allows the user to run external
most recently used files. Select the desired file and options: select Match Case to make the search case- commands on the file being edited from within Gedit
it will open in a new tab. You can also open files that sensitive; select Match Entire Word Only to search itself. Once this plug-in is enabled, the user can select
are located on other machines with Gedit. However, only complete words; select Wrap Around to search custom tools from the Tools menu. Note that this is
prior to opening a file on a server from within Gedit, text from top to bottom and cycle back again. not enabled by default.
you need to know some technical information about
the server. For example, you’ll need the IP address
or URL of the server, and may need to know what
kind of server it is (HTTP, FTP etc). Once you have the
03 Syntax highlighting
If you would like to use Gedit for text
editing, you have the option to highlight the lines of
necessary information, go to the open dialog and click code you write. Gedit uses the GtkSourceView for
the pencil icon to enter the IP address/URL of the syntax highlighting. It uses .lang files to define the
server. Select the file and click Open. If you have the highlighting schemes. The .lang file for a specific
required privileges, the file should open. programming language is located in the /usr/share/
gtksourceview-3.0/language-specs/ folder.

02 Handling text with Gedit

The Find tool can help you find specific
sequences of text within in your file. To open
You can enable code highlighting via the menu by
going to View>Highlight Mode, or via the lower status
bar. The status bar, enabled via the View menu,
the search window, click Menu Button>Find, or displays programming language options for
press Ctrl+F. This will move your cursor to the start of many types of sources, scripts, markup and
the search window. Type the text you wish to search scientific formats.

The Ubuntu Book 89

Ubuntu apps

Create discs with Brasero

Use Brasero to quickly create CDs and DVDs from your computer
Despite flash drives taking centre stage Ubuntu comes pre-installed with a great utility To open Braser, go to the Dash and search for
among media storage platforms, optical called Brasero in order to help you create CDs, DVDs ‘Brasero’. When it opens you will see the starting
drives offer some unique advantages and more with great ease. Note that this is the default wizard, where you can select the type of project you
too, such as lower cost. This makes optical storage CD/DVD-burning utility for Linux distributions running want to start, such as an audio project, video project,
devices the tool of choice when storing data that is the GNOME desktop. disc copy and so on. For example, to burn an ISO
read only or distributing to a bigger audience. For Brasero allows you to burn, copy and erase CD and image you can simply choose Burn Image. Once you
example, while it is financially difficult to give away DVD media. Some of the interesting features include have selected the project type, you’ll need to add the
a 100 flash drives to attendees at an event, you on-the-fly burning, multi-session support and quick files you want written to disc to the Brasero interface.
probably wouldn’t mind distributing 100 DVDs. conversion of music playlists in all formats. Next, simply click ‘Burn’ to write the files to disc.

Navigate the Brasero UI Master the various CD/DVD-burning options in Brasero

Audio project Recent projects Select a disc
You can click on this This is the where you will Once you have launched
link to create an audio be able to easily view all the Disc Checking utility,
project. An audio project your recent projects select the disc or .iso
lets you add music and image you’d like to check
other audio files to your for integrity using this
optical disc drop down menu

MD5 integrity check

Enable this option if you’d
like to check the integrity
using the MD5 algorithm.
Note that you should
have the checksum file
(of the disc) that you are
trying to check in order to
use this feature

Data project Video project Disc copy Burn image

This link lets you create You can click on this You can easily duplicate Selecting this
a data project. Under link to create a video a complete disc using option, you can
this project type you project. A video project this option. Once you write an existing
are able to add any lets you add all types have clicked this icon CD/DVD image
number of files to your of video files to your you’ll be asked to select directly to the
optical disc optical disc the disc to copy optical disc

90 The Ubuntu Book

Create discs with Brasero

Create ISO images with Brasero

With Brasero you can create an .iso image under any project type. You can choose
to use an audio project, a video project, a data project or anything else and write
the contents as an .iso file onto your hard disk. To get started, open Brasero, click
on the appropriate project type and then tap the plus sign in the top left-hand
corner. Select the files and folders that you want to include in your ISO image. To
select more than one, hold down Ctrl and select the desired items. Once complete,
click the ‘Add’ button. At this point you should make sure that there is no blank CD/
DVD inside your optical drive so Brasero won’t automatically burn those files to CD.
Next, click the ‘Burn’ button. Now Brasero will automatically create an ISO file. This
file is called brasero.iso by default, and will be saved inside your home directory.

“Make sure that there is no blank CD/

DVD inside your optical drive”
Disc copy with Brasero Disc integrity check
Duplicate a disc with the Brasero app Check disc integrity using Brasero
To burn a CD/DVD disc using is able to access your CD/DVD Brasero ships with a built-in disc an MD5 file in order to check the
Brasero, you will first need to make burner. From there you can then integrity checker tool, meaning disc. An MD5 (Message-Digest
sure that your computer has a click Copy to create a single copy that you can check whether a disc Algorithm 5) is a cryptographic
CD/DVD burner. If your computer from the source disc. is corrupt or not simply by running hash function that’s widely
does meet all the requirements, To make multiple copies of the tool. It’s much better than used for checking data integrity.
insert the CD/DVD with the data the disc, click the ‘Make Several finding out midway through using Note that if you choose this
you wish to rip, then go to Dash and Copies’ button. When prompted, the disc or image. So let’s learn option, you will have to select the
search for Brasero. When it opens, click to install a required package. how to use the disc integrity tool. corresponding MD5 file by clicking
select ‘Disc copy’. This function Brasero will begin copying the To launch the utility, start by on the folder icon, which is placed
will serve to duplicate the content disc. When the disc has finished selecting Tools>Check Integrity. In below. When everything is set and
from one disc to another. copying, it will prompt you to insert the window that opens next, select ready to go, tap ‘Check’ to begin
Brasero will open and a blank writable CD/DVD disc. the disc that you want to check the checking process. You’ll get
automatically recognise the Insert it and wait for it to finish from the drop down menu. Then a notification about the result as
content on the disc if Ubuntu writing the content to the disc. you can select the option to use soon as the process finishes.

Cover editing with Brasero

To launch the cover editor, open Tools>Cover Editor.
When you first see the cover editor dialog, you will not
be able to click on any of the text-formatting options.
You will need to select the cover you want to work on
first in order to use these options.
With the cover open, once you have chosen the
formatting you wish to use for the text, simply type
away. You can then scroll down in order to see
the side and back inlay for the jewel case. Click
the ‘Background properties’ toolbar icon if you want
to add a background for the current cover, or you can
right-click on the cover you wish to edit and select
Set Background Properties. Here you could choose
a coloured background or to select a background
image. Click the ‘Close’ button to apply the changes
and close the ‘Background Properties’ dialog. Then
you can go ahead and print using the ‘Print’ button,
which will be located in the top right-hand corner of
the dialog.

“Choose a coloured
background or to select a
background image”
The Ubuntu Book 91
Create with
94 Work with LibreOffice draw
Create cool vector graphics

96 View images with Shotwell

Make viewing images seamless

98 Manage images 94 96
with Shotwell
Keep tabs on large numbers of image iles

100 View movies with Videos

View videos with Ubuntu’s default app

102 Listen to songs

with RhythmBox
Use this background music app

104 Touch up photos

with GIMP
“Ubuntu is a great choice for
Enhance your photos like a professional
creatives, as it offers more
108 Discover PulseAudio
We reveal its mind-blowing features customisation of the workspace”
98 100


92 The Ubuntu Book


The Ubuntu Book 93

Create with Ubuntu

Work with LibreOffice Draw

Use LibreOffice Draw to create cool vector graphics
LibreOffice Draw is a vector graphics- Draw is fully integrated into the LibreOffice more functionality than the drawing tools that are
drawing program. It can also perform suite, which simplifies exchanging graphics with all generally available in most office productivity suites.
some operations on raster graphics (pixels). components of the suite. For example, if you create A few examples of the drawing functions are:
Using Draw, you can quickly create a wide variety of an image in Draw, reusing it in a Writer document is layer management, magnetic grid-point system,
graphical images. Vector graphics store and display as simple as copying and pasting the image. You can dimensions and measurement display, connectors
an image as an assembly of simple geometric also work with drawings directly from within Writer for making organisation charts, 3D functions that
elements, such as lines, circles, and polygons, rather or Impress using a subset of the functions and tools enable small three-dimensional drawings to be
than single pixels (points on the screen). As such, they from Draw. Even though LibreOffice wasn’t designed created (with texture and lighting effects), drawing
allow for easier storage and scaling of the image. to rival high-end graphics applications, it possesses and page-style integration, and Bézier curves.

Discover Draw’s features Understand the Draw toolbars

Drawing toolbar Standard toolbar Menu bar Sidebar
This toolbar contains all the necessary This shows various toolbars as This is the area that has The Sidebar is common among
functions for drawing various and when you enable them via the various top-level menu LibreOffice suite software. It has
geometric and freehand shapes and ‘View menu’ option. By default, options. Note the ‘View’ four main sections – Properties,
organising them on the page. It is the Standard toolbar is displayed, link here. This is used to Styles and Formatting, Gallery
docked vertically on the left-hand side which has options related to saving enable various toolbars and Navigator – to help you gain
of the Draw window by default files and the like in Draw access quickly

Properties sidebar
Opens sub-sections
for object properties
that you can change to
suit your requirements.
The sub-sections are
context based

Pages pane Workspace Status bar

The Pages pane gives an overview of Workspace is where you create your It includes several
the pages you create in your drawing. If drawings. This drawing area can Draw-specific
it is not visible, go to View on the Menu be surrounded with toolbars and fields like object
bar and select Page Pane. To make information areas. Note that the size, slide number,
changes to the page order, drag and maximum size of a drawing can be unsaved changes,
drop one or more pages 300cm by 300cm zoom level etc

94 The Ubuntu Book

Work with LibreOffice Draw

Drawing basic shapes

LibreOffice Draw provides a wide range of shapes
located in palettes that can be accessed via the
Drawing toolbar. To draw a straight line, for example,
start by clicking on the Line icon and placing the cursor
at the point at which you want to start the line. Then
simply drag the mouse while keeping the mouse button
pressed. Release the mouse button at the point at
which you want to end the line.
A selection handle will appear at each end of the
line, showing that this object is currently selected.
The selection handle at the starting point of the line is
slightly larger than the other selection handle. Press
the Ctrl key while drawing a line if you want to enable
the end of the line to snap to the nearest grid point.
To draw a rectangle, click on the Rectangle icon in
the Drawing toolbar or in the Insert Shapes sub-section
in Sidebar Properties. Drawing the rectangle with the
mouse cursor, it appears with its bottom right corner
attached to the cursor. To draw a square, click the
Rectangle icon and hold the Shift key while you draw.

Add text Connectors and Glue points

Learn how to add text in LibreOffice Draw Manage shapes with handle connectors and Glue points
To add text to your creations as other text properties – before Connectors are lines or arrows that when the object moves, the
in LibreOffice, you will need to you begin typing. whose ends snap to a glue point connector stays fixed.
activate the Text tool. Click the After activating the Text of an object. They are especially All Draw objects have Glue
Text icon for horizontal text or the command, click the location where useful in drawing organisation points, which are not normally
Vertical Text icon for vertical script. you want to position the text. A charts, flow diagrams and mind- displayed. These become visible
If the latter isn’t visible, check small text frame will appear, and maps. When objects are moved or when the Connectors icon is
that Asian has been selected can be moved like any other object. reordered, the connectors remain selected from the Drawing toolbar
in Tools>Options>Language A text frame is also dynamic attached to a Glue point. or the Insert Shapes sub-section in
Settings>Languages. and grows as you enter text. The Glue points are not the same Sidebar Properties. Most objects
You could display the Text information field in the status bar as the selection handles of an have four Glue points. You can add
Formatting toolbar (View>Toolbars) shows that you are editing text and object. The handles are for moving more and even customise them
or use the Character section in the provides details about the current or changing the shape of an using the Glue Points toolbar. To
Properties pane of the sidebar to cursor location using paragraph, object, whereas Glue points fix or open the Glue Points toolbar, head
select font type, font size – as well row and column numbers. glue a connector to an object so to View>Toolbars>Glue Points.

Editing objects
Once you have added and shaped the objects, you
may want to colour or format them. To do this you’ll
need to enable various toolbars.
The Text Formatting toolbar, the Sidebar
Properties section or a context menu can be used to
edit an object, or you can change attributes such as
colour or border width, the Line and Filling toolbar.
By default, Draw doesn’t show the Line and Filling
toolbar. To see it, go to View>Toolbars>Line and Filling
on the Menu bar to open the toolbar at the top of the
workspace. The most common object attributes can
be edited using this toolbar. You can also open the
Line dialog by clicking on the Line icon and the Area
dialog by clicking on the Area icon for access to more
formatting options.
You can also open the Text Formatting toolbar
by going to View>Toolbars>Text Formatting on the
Menu bar. Note that the tools on this toolbar will not
become active until text has been selected.

The Ubuntu Book 95

Create with Ubuntu

View images with Shotwell

Good image-viewing software makes the experience more comfortable
Shotwell is a Janus-headed application: it Performing an exact analysis of the image to find the best one and get rid of the rest, via one of
consists of a picture database and viewer. involves displaying it with a 1:1 zoom level. Shotwell various sieve methods.
This page looks at the viewer component; turn accomplishes this need via a special button, which Shotwell’s viewer component derives its
to page 98 for more on managing features. displays images without zoom. In this case, the image tremendous speed from being simple: its small file
Double-click any image in Nautilus in order to open can be panned via a drag-and-drop type of motion. size is accomplished by reducing unneeded editing
it in the viewer. By default, the image will be shown in a When you are working with multiple similar images operations. This, however, does not mean that the
fashion to fill the active area in the most efficient way: in Shotwell, press the Delete button in order to delete product can’t be used for editing: right-click an image,
increase or reduce the size of the window, and the the file that’s currently open for editing. This feature is and use the ‘Open with’ dialog to defer the image to
dimensions of your image will follow suit. especially helpful when you are analysing multiple files another editor.

Handle the viewer When viewing images, a batch of advanced features tame the flood
Local file switching Current file name Rotation controls
Click the next and previous Should you need to find Viewing images ‘the wrong way’ leads to
buttons to switch between files in the picture being shown headaches and nausea. Use the rotation
the folder containing the currently currently, take a look at toggles to turn the image round by
displayed image. This permits you the title bar. It always 90-degree steps. When closing Shotwell,
to take a look at an entire camera displays the file name the product will ask whether your changes
roll with minimal effort should be saved

Picture area Zoom to fit

This area is
Click this
dedicated to your
button in order
images. You can
to make the
click, drag and
image fill the
pan around to your
window in the
heart’s content
most efficient
Shotwell will
even attempt
to minimise
white space on
the borders at
all expense

Zoom-state indicator 1:1 zoom

Judging an image requires information Rating images is best accomplished Picture counter
about the amount of data contained. The without zooming artefacts. Press the This label informs you
zoom-state indicator informs you about 1:1 button to tell Shotwell to disable all about the number of
the currently active zoom level, putting the scaling. Each screen pixel gets mapped images in the currently
on-screen display into perspective to an image pixel directly in this mode selected folder

96 The Ubuntu Book

View images with Shotwell

Film strip view

Navigating through images blindly is not exactly
comfortable; making Shotwell render an overview
of all files contained in the currently selected folder
simplifies your life.
Enable the bottom bar by clicking View>Image
Gallery; it will populate itself automatically the
moment it is cast onto your screen. Sadly, the
width and height of the widget cannot currently be
controlled – you are limited to clicking one of the
images, which then shows up in the picture area.
Alternatively, pictures can also be right-clicked in
order to access a context menu offering advanced
features, such as printing.
Shotwell can also display additional information
on the currently opened image. This is accomplished
via a second slide-out bar, which can be opened via
View>Side pane. It displays a large list containing
all kinds of metadata – most of it is collected from
the EXIF header written by most digital cameras.
Furthermore, its width can be adjusted to suit your
taste – simply drag the border around to change the
size of the side pane.

Open the containing folder Change your wallpaper

Managing pictures is best done in Nautilus Give your workstation that personal touch
The window used to open Shotwell context menu provides an option for Changing your desktop wallpaper is lets you adjust the zoom mode
tends to end up closed in the heat moving a picture to the Trash of your an easy and sure-fire way to show and the colour that is used for
of the action. Fortunately, this system. Doing this via Shotwell is that your workstation is yours. padding out the space – simply play
problem can be solved by right- beneficial, as the file sequence does If you have a picture open in around with the settings until the
clicking the picture area to open not get affected – changing the file Shotwell’s viewer, simply right-click preview shown in the dialog looks
the context menu. Select ‘Show system while Shotwell is open can the image and select the option Set satisfactory to you.
containing folder’ and check out a ruin the image display sequence. as Wallpaper. Be aware that Shotwell does not
newly opened instance of Nautilus Furthermore, the copy menu Shotwell will then assign the contain a cropping module. If you
showing the file in question. item copies the image’s contents image immediately, but will also want to remove any parts of the
Be aware that a lot of useful into the clipboard; putting it into a present a flyout menu that provides image before displaying them, an
file operations can also be done LibreOffice document becomes as access to Ubuntu’s Desktop image editor, such as GIMP (covered
right from Shotwell. The right-click easy as pressing Ctrl+V. appearance panel. The ‘Look’ tab on page 104), is the better choice.

Print images effortlessly

Right-click the Picture area and select Print in the
context menu in order to kick off the printing process.
The General tab contains the well-known group of
options used in other Ubuntu applications – Page Setup
allows you to set all kinds of paper options.
Shotwell expands Ubuntu’s print dialog with an extra
tab called Image Settings. It provides a set of controls
enabling you to adjust the position of the image on the
page – if you don’t want to fill the entire page with the
picture, use the width and/or height controls to reduce
the girth of the image at hand.
Achieving perfect prints of your photographs is an art
of its own: colour calibration, paper choice and printer
settings are topics that could fill a bookazine of its own.
In general, try to find a combination of paper, ink and
settings that work best for you – getting colours 100 per
cent correct is important only if pictures are intended
for sale or competitions.

The Ubuntu Book 97

Create with Ubuntu

Manage images with Shotwell

Keep tabs on large quantities of photographs with ease
Organise your shots Store and retrieve your pictures in no time at all
Last Import view Camera list Events list Border indicator
Click this part of your image This part of the main list Images get catalogued Images can be selected for bulk
library to put focus on the provides an overview of according to the date processing. Shotwell displays selected
latest addition. This can be all external storage media when they were taken. pictures with a blue frame – using an
helpful if you want to see currently connected to your Click any of them overlay would affect the originality of
what items were added to the workstation. It is a prime in order to limit the the pictures at hand
collection last – especially destination for starting content shown in the
handy if you’re a ‘lazy tagger’ import operations picture area

SQLite powered
Shotwell stores its data
in a SQLite database.
This leads to significant
performance increases
over traditional flat file
storage – and might even
permit networking to be
added one day

Image display Zoom lever

Tag list Shotwell displays the contents The size of the image elements in the
What the Events list is to of the currently selected display area can be adjusted to your
events, the Tags list is to section on a grey background. needs. Simply drag the lever to the
tags: a really helpful tool for Double-click any of the pictures left or right in order to find the correct
singling down on interesting in order to open them for full- balance between information density
image material screen viewing and picture quality

Most users treat Shotwell as a simple is set up correctly, it will significantly reduce the time configuration of the product. If this is not the case,
image viewer: a picture is double-clicked needed to find specific images in your (ever-growing) enter Shotwell into the dash. Click ‘Shotwell Photo
in Nautilus and pops up in Shotwell. collection of files. If your digital camera is set up Manager’ in order to start the application, and click
Using the product as a simple picture viewer entails correctly, Shotwell will analyse the EXIF data in order the OK button when confronted with the ‘Welcome
losing out on a set of valuable helper features. Shotwell to find out date and other information automatically to Shotwell’ dialog. Its default settings can be
comes with a relatively sophisticated database – getting all photos from one event in one place is a accepted without further ado – be prepared to wait
based on SQL technology: pictures can be stored and matter of one click. a few minutes as the database gets populated with
retrieved with blazing speed. Various advanced options The tutorial on the adjacent side of the screen the images and screenshots found in your profile’s
let you tailor the display list to your needs: if Shotwell assumes that you already passed through the initial pictures folder.

98 The Ubuntu Book

Manage images with Shotwell

Tutorial Handling images with Shotwell

01 Import the images

After coming home from an event, start
Shotwell and insert the memory card of your
03 Name events and add tags
If Shotwell is left to its own devices, the
pictures will be grouped by the day they were taken.
mode, and right-click it. Next, select ‘Send to’. The
pop-up window allows you to select the format –
picking JPG ensures that Shotwell generates an
digital camera into an internal or external card Since dates, on their own, are not particularly industry-standard picture file. After clicking OK, the
reader. Shotwell will grasp the storage medium informative, assigning helpful names is sensible. program displays a dialog permitting you to select the
automatically, and display it as an item in the Right-click any of the date entries and select target; images can be sent via Bluetooth or email.
Cameras section of the tree. Wait while the progress Rename Event in order to make the default name
bar at the bottom is populated – the app must
read each of the images in order to obtain further
information about it. Next, click the ‘Import all’ button
editable. Enter a new name and press return to
commit your changes.
Tags provide a ‘second level’ of context, which is
05 Share in Bulk
Sending images out one by one is painstaking.
Fortunately, Shotwell can also convert groups of
at the bottom-right corner of the screen. Shotwell overlaid above the date information. Tagging images pictures in one go. Start out by selecting them in
will start to copy the images to your workstation’s is quite easy: select one or more, right-click the Overview mode (Shift/Ctrl+click), and proceed to
Pictures folder – this process can take quite a bit of group and proceed to choosing the ‘Add tags’ option selecting File>Export. Shotwell will start out by
time if the files involved are large. in the resulting context menu. Shotwell responds by displaying the format selection dialog from step four,
When done, a message titled Keep or Delete will displaying a pop-up where one or more tag strings which will be followed by a common dialog permitting
be displayed. It permits you to decide whether the can be entered. Once tags are added, they show up in you to select a storage destination.
images should stay on the memory card – picking yes the tree view automatically. Simply click a tag to show
is not an issue, as they will not be imported again. all images bearing it.

02 See what happened

When the import process is done, your hard
drive will lack quite a bit of free space. The tree view
04 Share RAW files
Be it fast-moving objects or the darkness of
the Albaycin in Grenada, when the imaging situation
on the left-hand side of the screen will show a group gets tough, shooting in RAW helps you to make the
of new folders that correlate with the dates of when most of your images. Sadly, the resulting files are not
the imported pictures were taken. well-suited for sharing; most people don’t have the
It’s important that you do not touch the sub folders necessary viewer on their machine.
in the Pictures directory of your profile. Shotwell Shotwell provides a RAW exporter which can be
creates an elaborate folder structure that simplifies used to transform most wide-spread camera files
correlation with the database – moving files around into their JPEG equivalents. Get started by double-
can have disastrous consequences. clicking the image in order to open it in full-screen

The Ubuntu Book 99

Create with Ubuntu

View movies with Videos

If a picture says a thousand words, a video contains an entire book
Watching movies has been a stock job players. Click Play or Pause as usual; drag the time Increase or decrease the size of the window in order
of PCs ever since Microsoft introduced bar along the screen to change the playback position. to make the video fit your desktop better.
Windows 3.1. Ubuntu comes with a pretty Adjusting video resolutions is a losing game: if When Videos is used in conjunction with physical
nice media player application which can handle both you record in high resolution, users will complain media, the product can display subtitles if they are
DVDs and normal movie files. about high resource consumption and large file embedded in the movie being played back. Another
Clicking a video in Nautilus opens the Videos size. Encoding in low resolution might remedy these nice feature involves the changing of the language:
client application. On most computers, playback is issues, but opens the door to choppy and grainy clips. if your DVD contains tracks in English and German,
hardware accelerated – by and large, the playback Ubuntu’s Videos application attempts to address a single right-click is enough to select the correct
controls themselves behave as in most other media this problem by providing a flexible scaling engine. playback language.

Get smart with viewing videos Discover the possibilities of Ubuntu’s Video
Play area Currently selected file Playlist overview
This part of the Videos application Keeping check over a large batch Should you ever feel the need to
acts as host for the currently-playing of videos isn’t always easy. The title batch up multiple videos after
content: if the form factor does not bar of the videos app always shows one another, use the playlist
match the video, black padding bars the file name of the multimedia dialog to satisfy all stacking and
are generated automatically document being played back arranging needs

Playback controls
The same as you will
see on most players.
Use these three
buttons to start and
stop the video currently Playlist controls
being played back
You can add and/or
remove files from the
playlist effortlessly
via the buttons at the
bottom of the playlist
overview window

Playback counter Seek bar Volume control

The seek bar doesn’t provide info about Move around your movie Even though content played back
how long a movie is. This is remedied effortlessly: simply drag the by the Videos app is subject to the
with a quick glance at the playback seek bar’s pulley until the system volume regulator, the need
counter, conveniently located in the interesting part of the clip is to adjust it directly can occur. Handle
bottom-right corner of the screen ready to play this by clicking the Speaker icon

100 The Ubuntu Book

View movies with Videos

Go to full-screen mode
Playback controls may be nice – but they really do mess up your cinema
experience and can even cause burn-in on LCD and plasma displays. If you
want to use Video as a small player while working on other stuff, removing the
controls from view makes Videos use your screen real estate more efficiently (see
screenshot below).
Right-click into the running video, and select the Show controls option. The
moment it is clicked, all playback controls vanish, leaving you with the video
playing in a window. Right-click its title bar and select “Always on Top” and move
the window to the border of your display – if your workstation were a fancy flat-
screen TV, this feature would go by the name of picture-in-picture.
Undoing this operation is not too difficult. Simply right-click into the video once
again, and select the Option Show controls. Be aware that a double click does not
restore the controls: it, instead, moves Videos into fullscreen mode.

“Accessing these videos is only possible

with an Internet connection”

Grab online video Generate cue cards automatically

Don’t be dependent on remote servers Transposing videos into a set of images is a handy trick
Some embedded videos are played Click it, and then select your Creating cue cards from videos The screenshot width toggle
back in the Videos app. By default, desired storage location along with (see screenshot above) can be allows you to select the width
accessing these videos is only the file name in the popup dialog. useful. As making screenshots of of the images: the height will
possible while your laptop or PC Finally, you can click OK in order to a video isn’t the most exciting job, be computed automatically in
has a working Internet connection start the copying process. This can why not just delegate the work to accordance to the format of the
– an uncomfortable state for take quite some time – video files the Videos app? movie. Number of screenshots lets
people with limited data or dodgy are large so patience is required. First off, get started by loading you select the interval for the time
connections. If you have concerns, Be aware that this option is not the video into the application. passed between the individual
check your data allowance before enabled for all movies. Copyright Next, continue by clicking Edit-> captures. A high-action video
you grab online video files. owners can place restrictions on Create Screenshot gallery. Videos with lots of different shots might
In some cases, right-clicking the feature: if it is greyed out, the will respond by presenting a more require more screenshots than,
on the movie will reveal an option file can not be saved to your disk complex version of the regular say, a time-lapse video. Finally,
in the menu called “Save a copy”. with the Videos application. common dialog. enter a file name and click save.

Adjust colour balance

Nothing is more annoying than a video with a colour
tint. While blaming the photographer is a nice “first-
ditch” measure, the display of your workstation is just
as likely a culprit.
The Videos app contains a set of preferences
which allow you to adjust the colour schemes of
your display. The relevant dialog can be opened by
selecting Edit>Preferences, and then switching into
the Display tab.
Brightness, Contrast, Saturation and Hue behave
exactly like you would expect them to: the developers
of the Video app rightfully took inspiration from
picture managers while working on this application.
Don’t feel bad about experimenting: if a movie is
playing while you shuffle the sliders around, the
content of the screen will reflect the newly selected
display settings automatically.
Should you “mess up” the settings, simply click the
Reset to defaults button – it will reset the four sliders
to their standard value. This is a sensible operation
after doing heavy shuffling – if one movie requires
correction, normally good-looking videos are likely to
look odd if subjected to the same regime.

The Ubuntu Book 101

Create with Ubuntu

Listen to songs with RhythmBox

Use your workstation to listen to music while you work
Play tunes with Ubuntu Use RhythmBox to play music unnoticed
Playback controls Shuffle and Repeat Track information
If it worked for Apple’s iPod, it also No matter how long your playlist Music takes centre stage in
works for RhythmBox. These three is, it eventually reaches its end. Rhytmbox. The two labels next to
buttons control the playback Enabling the loop mode makes the album cover swatch provide
of the currently-selected file: short work of this problem, as information about the currently-
this mini-controller is handy for RhythmBox simply starts off playing track along with the album
changing what’s playing quickly again from the beginning and the artist

dbus callout
Rhythmbox integrates itself into
the dbus event system of Ubuntu.
This means that the currently-
playing track gets displayed in
an annunciator display even if
Rhythmbox is not actually in the
foreground at that time

Volume toggle
Reducing Rhythmbox’s
volume independently
from the rest of the
system can be helpful.
Click the speaker symbol
and then peruse the
controls in the flyout to
your preferences

Media storage list Album cover preview Seek bar

The big table below the Even though music is an aural Ever feel like skipping
playback controls provides experience, adding some over boring interludes and
you with an overview of the visual spruce always is worth intros? Grab the seek bar
media currently scheduled for it. Double-click the small icon and drag it to the right – the
playback. Double-click an item to open a pop-up with a bigger playback position will be
to start playing it immediately version of the image adjusted automatically

High-quality headphones are a great help a combination of a media database, an online radio Advanced users can create custom playlists containing
for dealing with background noise – and player and a classic, low-resource-consumption media favourite hits: some obscure Falco tracks provide a sure-
thanks to multi-core CPUs, playing music in playback utility. fire way to distract yourself from your work!
the background is simple . Getting started with Rhythmbox is easy: click a media In addition to that, the program can also be used
Sadly, obtaining media files is but part of the file in Nautilus, and the player will appear on-screen. as a crossfade engine. This means that the annoying
challenge: once a few thousand MP3 files populate Minimise it to profit from background playback – the gaps between normal MP3 files get “bridged over” by
your storage, music management becomes a severe music keeps on running even if you close the application. superimposing the songs onto one another – it might
and annoying problem of its own. Ubuntu adresses Sadly, using RhythmBox in this fashion means not be able to imitate a DJ’s handywork, but definitely is
this problem via the RhythmBox media player. It is ignoring most of the interesting features of the product. better than nothing.

102 The Ubuntu Book

Listen to songs with RhythmBox

Tutorial Manage large amounts of media with RhythmBox

01 Import some files

This tutorial starts out with an unlikely event:
an Austrian friend provides you with a Gigabyte
worth of Falco tracks. Let us assume that the USB
stick containing the files has already been returned
– the music currently sits in a subfolder of a hard
disk on your machine. Start out by clicking File>Add
Music. Next, click the arrow next to the combobox
and choose Other to open a file selection dialog.
Then, proceed to navigating to the folder containing
the subfolders with the albums. Finally, click open to
close the common dialog.

02 Set importing options

Rhythmbox will proceed to scan the contents
of the folder: this process can take up to one second
per file, which means that patience is a virtue here.
When the analysis is done, the list below the
import controls will populate itself with further
information about the tracks found. Click the Import
button in order to add them to the media catalogue
of the Rhythmbox application.
03 Filter your tracks
Return to the main interface of RhythmBox
and click the Music tab: the imported tracks will
04 Search for tracks
Even though RhythmBox’s file list definitely
represents progress over Nautilus, scrolling across
Ticking the checkbox “Copy files that are outside present themselves in all their glory. If the metadata thousands of files is not everyone’s cup of tea.
the music library” instructs Rhythmbox to copy of the files was not perfect, a part of the files will The text field below the seek bar is intended to
the media files into the music folder of your profile. be booked in the “Unknown” category – most files accept query strings. Entering “Fal” would limit
This is recommended if your media resides on a should, however, be catalogued according to their the contents of the Artist, Album and Track fields
removable media which has to be returned to its artist. Double-click a song in the bottom table to to songs which matches Fal in any of its metadata
owner, but should be left disabled otherwise. start the play-back process. fields. Entering a longer string reduces the amount
of data shown – if you know the title of a song,
“When the analysis is done, the list below the import simply enter it to show all mixes and versions.
Alternatively, right-click an interesting song to
controls will populate itself with further information” open up a context menu. By default, it will offer
you three choices: Genre, Artist and Album can be
used as base for further queries. The results will, of
course, be shown in the file list.

05 Create a playlist
Favourite tracks should be collected in a
playlist. Create a new one by clicking the little plus
symbol at the bottom-left corner of the Rhythmbox
window. Then, click “New Playlist” and proceed to
entering the name of the new playlist. Finally, press
return – Rhythmbox will commit the entered text
into its memory.

06 Populate the playlist

An empty playlist is not worth much. Add
tracks to its content list by dragging and dropping:
select the file in the Music view, and pull it to the
playlist. Should your screen be too small to display
all playlists in memory, proceed to right-clicking the
desired file. The pop-up menu will contain an item
called Add to playlist, which comes with a handy
second list of all playlists known to Rhythmbox.
When done, select the playlist in the list on the
left-hand side of the screen. Click any of the tracks
in order to start playback – now just lean back and
enjoy the show!

The Ubuntu Book 103

Create with Ubuntu

Touch up photos using GIMP

Learn how to make professional photo enhancements with
open source software
Hobby photography has never been more popular, professionally styled touch-ups and enhancements to photos in
largely thanks to the availability of high fidelity order to either really bring out the tones and lighting, fix any red-
DSLR cameras and decent point-and-shoots, not to eye, control the colour temperature and more.
mention smartphones. Finally taking over from film cameras While Photoshop may be an extremely popular tool for photo
over the last five years, high quality digital photos are much editing, GIMP is definitely no slouch in that department. Having
easier to get off a camera than developing photos ever was. just about every feature you could get in Photoshop, with a few
With digital photos also comes digital photo manipulation even being a bit better, it’s most certainly enough for creating a
software, such as GIMP, which enables you to quickly perform great look with any of your photos.

Fix common photography issues Learn how to remove minor blemishes Smooth out and highlight skin using
such as red eye using in-built tools and unessential items such as necklaces to colour control and sharpness to make a
from GIMP improve overall picture quality photo more lifelike

“While Photoshop may be an extremely

popular tool for photo editing, FOSS
offering GIMP is definitely no slouch in
that department”
104 The Ubuntu Book
Touch up photos using GIMP

06 Control red-eye

07 Vary highlights and shadows

Photos will have a range of colours at
different levels, from the lighter highlights to
the darker shadows. You can see a histogram
and numbers for these settings by going to
Colors>Levels on a 255 point scale; 0 is the
darkest and 255 is the lightest.

01 Install GIMP
GIMP is included on many Linux distros by
default, so searching the Graphics category in the 04 Use the rule of thirds
The rule of thirds is used to position an image
menus is your first step to finding it. Otherwise, it can in such a way that certain aspects of a photo take
be installed in your software manager just by looking up a third of the composition. This helps to make
for GIMP. If all else fails, head to your photos look more dynamic and draws the eye to
to get the installation files. particular features. Play around to see what you want
to highlight.

02 Work with RAW photos

Some DSLRs will allow you to work straight
from the JPEGs, but others will also give you RAW 05 Remove red eyes
A common problem you may face with
files which can let you play around with the light levels improper flash is red-eye. Luckily GIMP has a tool just
and other fine camera aspects. GIMP can’t edit these, for that. Use the Rectangle tool to select one eye at a
so you may also need software such as UFRaw to time and then find the Red Eye tool in the enhanced
properly import them. sub-menu of Filters on the tool bar.

03 Crop the image

Not essential for every image, but if you 06 Control red-eye levels
Tweak the slider on the levels to remove as
08 Adjust the overall range
Here you can see that the histogram
doesn’t cover the entire graph. A quick fix, and one
weren’t shooting with a rule-of-thirds approach, you much red eye as possible without changing the whole that will instantly increase image quality, is to drag
can always see if the image would look a bit better with picture. You can refocus the selection to be larger or the shadow slider up until the beginning of the
one applied. Click on the rectangle select tool and set smaller to try and get a better result. It can sometimes histogram. In this case it made the photo slightly
the Guides to Rule of Thirds. help to do both eyes at once. darker but easier to pick out some detail.

The Ubuntu Book 105

Create with Ubuntu

09 Add Auto-

09 Add Auto-Levels
There is an Auto-Levels tool that will
automatically do any basic corrections on the photo
11 Correct skin blemishes
There’s a big debate going on right now over the
beauty industry’s use of airbrushing to make models
for you. For some people and photos, this may be all look perfect. We’re not really equipped to debate that
you need to do to enhance your photo. Sometimes in this bookazine, but we feel it’s fine to have a look at
though, you might want to do a little more level covering the odd skin blemish if you need to.
editing to ensure maximum quality.

14 Heal blemishes
Paint over the blemish as you normally would
any other colour using the paintbrush tool. You may
need to reset the initial point of copy at points to avoid
using the background or another part of the picture to
cover up the target area.

10 Alter the colour range

Back on the levels editor, find the channel
12 Use the healing tool
With skin blemishes like red patches, moles
and freckles, you can easily cover them using the
selector. Here you can find the individual RGB levels. Healing tool. This takes one area of a photo and uses
Editing these individually can create a slightly better it to create a natural gradient. It’s the plaster symbol
tone profile across the picture. You can also edit
the Blue or Red levels to make the image colder or
on the tools.
15 Clean up the photo
The Heal tool can do a lot more than just
warmer, or correct the white balance.
13 Set up the image
Grab the Healing tool and zoom in on the
remove a mole. In this example we’ve removed the
necklace from our model’s neck. On a larger scale it
“Use the Eraser tool to picture. Select a patch of skin next or very near
the blemish – change the brush size if need be,
can be used to clean up the background of a photo
a bit more naturally than cutting out or guessing
remove the red areas depending on the size of the photo and blemish. Hold
Ctrl before clicking. This selection will move with your
colour profiles. It’s not a perfect tool as it can only
estimate, but it’s still very smart and gets better all
from the skin” painting to vary the healing tool’s colours. the time.

106 The Ubuntu Book

Touch up photos using GIMP

17 Use the
Quick Mask

16 Enhance the details

The Unsharp Mask works very well on photos
with small details or where the makeup is key. Go
18 Do some preparation
Use the Eraser tool to remove the red areas
from the skin, avoiding the hair, eyes and mouth. After
about with the levels again but try and keep them
small. Go too far and you can make the skin slightly
resemble plastic.
to Filters>Enhance to select the tool, which will that’s done you can turn off the mask and it will create
automatically bring out some of the details in the
photo. Use small values and experiment; it only needs
to be subtle.
a selection of what you deleted, without the Joker-
esque look that occurred when the mask was on. 20 Beautiful photos
With a bit of practice and some creative
uses of these tools and some others, you can

17 Use the Quick Mask

So we’ve removed some basic blemishes, but
19 Grab Gaussian Blur
The final step to smooth out the skin is to
use the Selective Gaussian Blur in Filters>Blur. Play
really make any picture look much better than the
original, without overdoing it and giving the model a
completely different appearance.
you can also smooth out the skin a little using the
Quick Mask tool. Go to Select and then Toggle Quick
Mask to cover the image in a layer of red. Don’t panic,
we’ll be removing the red hue once we are done.

The Ubuntu Book 107

Create with Ubuntu

Discover the power of PulseAudio

We reveal new tricks and some mind-blowing PulseAudio
features already at your fingertips
Most of us are running recent versions of our favourite sound system with a sophisticated modular client-server solution,
Linux distributions, and that means that probably everyone which has many benefits for power users once you decide to dive
uses PulseAudio as a default sound server, often without deeper into the modern Linux sound setup.
making any conscious decision to do so. We just play music, watch In this tutorial we’ll cover features that go beyond playing with your
movies and enjoy online videos, but whatever we hear from speakers, sound applet in the system tray and reveal a number of practical
it is powered by PulseAudio – a versatile abstraction layer that applications that will be useful for common desktop activities. These
sits between the Linux kernel (which offers a driver for your sound include handling separate playback streams, redirecting sound
hardware) and desktop applications. PulseAudio was controversial over a network, improving sound quality and making use of various
some years ago, but it has come through seven major releases and is convenience tools that ease things a bit. All you’re going to need to
rock solid these days. PulseAudio superseded a much simpler ALSA provide is a command line and a few minutes of your spare time.

Right PulseAudio is
a lot more than just
a sound system with
volume control

“We reveal a number 01 Discover your sinks and sources

For any system with PulseAudio, each sound
The final parameter – source – is used for working
with the incoming sound stream, such as various
of practical applications device is identified by three main parameters: card, input devices (microphone, line-in, etc). So finally,
sink and source. Card refers to the hardware you PulseAudio creates a set of a card, a sink and a
that will be useful for use for sound playback and capturing, with all its source for each application that deals with sound,
common desktop physical inputs and outputs. A sink is an abstraction
layer used for sound output. Not only can it point to
giving us great flexibility.
PulseAudio tries to figure out which sink and
activities, including your speakers, headphones or line-out jack, it can
also mute sound by routing it to a null device (via
source should be set as the default ones, so in most
cases you should hear sound from your speakers
handling separate module-null-sink) or make it accessible for other and have your mic working correctly out of the box.

playback streams” applications by creating a pipe-like FIFO output (via

To see the current setup, just issue sudo pactl list
and examine its output.

108 The Ubuntu Book

Discover the power of PulseAudio

01 Discover your
sinks and sources

Left PulseAudio
should automatically
work out the sinks
and sources

02 Hop between speakers and phones

This is the common case for laptops,
where sound is played through loudspeakers but
once you plug in your 3.5mm jack, it is transferred
to headphones. Modern Linux systems do this
automatically, but if they fail (or you need custom
behaviour), you can control everything. In PulseAudio
it means that one sink can have several ports. To find
out the currently used one, look for something like:

‘Active Port: analog-output-speaker’

We also know the names of the other ports, so

now we can manually switch sound playback to
headphones, like this:

$ pactl set-sink-port ‘alsa_output.pci-

0000_00_1b.0.analog-stereo’ ‘analog-output’

The same is also true for sources; so when you cannot

record your voice in Skype, you should definitely
make sure that the corresponding source is using a
correct port for capturing sound.

03 Manage volume
PulseAudio uses a simple range from 0 to
65535 to manage sound volume, where 0 is muted
doing some overdrive

sound and 65535 is 100% loud volume. The trick is, And finally, let’s calm down:
however, that you can go beyond 100% and boost the
volume further, without using any third-party tools (like $ pactl set-sink-mute ‘1’ true
VLC player). Let’s see some examples for the default
sink #1: If you need to set different volumes for certain inputs Go beyond the basics
inside one sink, you may want to turn off the so-called PulseAudio introduces client-server design, which
$ pactl set-sink-volume ‘1’ 100 # very ‘flat volume’ setting, which limits maximum volume means that your sound setup can be spread across a
quiet, for a sink. This is a simple procedure to carry out: network. This is a lot more than just playing to a remote
100/65535 = 0,15% device – it includes other cool things like broadcasting,
radio streaming and alerting. You can set up PulseAudio
$ pactl set-sink-volume ‘1’ 65535 # 100% $ sudo echo “flat-volumes = no” >> /etc/ together with the Icecast server and play audio for those
$ pactl set-sink-volume ‘1’ 78642 # 120% - pulse/ that can connect to your stream.
we’re daemon.conf

The Ubuntu Book 109

Create with Ubuntu

Even more modules “In case your speakers are

The number of PulseAudio modules keeps growing
– and most of them are still waiting to be discovered
not perfect and you’d like
by the general public. Meanwhile, there are some
astounding modules that will boost your fantasy
to compensate, a global
setup. A couple of examples: module-suspend-on-idle
can save your laptop battery by powering down an
equaliser is marvellous.
idle sound card and module-position-event-sounds
positions event sounds between the Left and Right
PulseAudio-equalizer has
channels depending on the position of the widget
triggering them.
15 bands and 19 presets
for any music style”
04 Remove noise and echo
This is something not everyone is aware of:
PulseAudio is shipped with modules that can improve
05 Fix Skype issues
Skype is a proprietary app but is the
most widespread VoIP application for Linux. 06 Sound over network
If you have at least two Linux PCs in a home
the sound quality in certain cases, such is in VoIP Various issues take place when using Skype, most LAN, you can set up remote audio playback with the
conversations. The main module for that is called concerning sound quality. PulseAudio can help help of PulseAudio’s network capabilities. It can
module-echo-cancel and it does the perfect job of here. First, if you encounter echoing, try to launch be really useful when your high-end speakers are
removing echo, auto-levelling, controlling gain and the application with custom variables, like this: connected to, say, a Raspberry Pi in your living room
reducing ambient noise. To use it, add the following and you want to listen to some music that is stored on
line to /etc/pulse/ $ PULSE_PROP=“filter.want=echo-cancel” skype your laptop. In PulseAudio terms, your Pi would be a
server and your laptop would a client. Both machines
load-module module-echo-cancel Another concern can be static/crackling sounds. It should be running PulseAudio and be discoverable on
was an issue in older PulseAudio versions, but some the LAN. Now we’ll set up a tunnel from the client to
You can also specify one of the audio echo people running Skype on 64-bit Linux systems the server. On the server side, add the following into
cancellation (AEC) methods right there: still find it an issue. We’ll try two methods now /etc/pulse/
that address two causes of the problem. The first
load-module module-echo-cancel aec_ changes audio latency: load-module module-zeroconf-publish
method=webrtc # or load-module module-tunnel-sink-new
load-module module-echo-cancel aec_ $ PULSE_LATENCY_MSEC=30 skype server=
method=speex sink_name=Remote channels=2 rate=44100
The second one disables glitch-free playback,
Webrtc removes noise better than speex, though which may help for sound cards that do not return … where is your server’s IP address. On
the latter is more stable. There is a small limitation, accurate timing information. Add the following line the client side, install the paprefs utility (for Ubuntu
however: it only works when something is being to /etc/pulse/ it goes: sudo apt-get install paprefs), launch it and
played through a sink (apps that play back sound). enable the ‘Make discoverable PulseAudio network
By the way, it is possible to load modules instantly, load-module module-udev-detect tsched=0 sound device available locally’ option. Finally, restart
without altering global PulseAudio settings: the PulseAudio daemon on both your server and
… and restart the system. client (sudo pulseaudio -k && pulseaudio --start).
$ pactl load-module <module_name> Now you can choose your remote sound device from
Pavucontrol or other PulseAudio-compatible mixers.

07 Use a built-in equaliser

Many music and video players for Linux have
audio equalisers that can enhance sound or create a
desired ambient effect. However, these are custom
implementations that affect a given player but not
the system-wide audio output. In case your speakers
are not perfect and you’d like to compensate, a global
equaliser is marvellous. Well, we have one and it’s
called… PulseAudio-equalizer! It is included in almost

110 The Ubuntu Book

Discover the hidden power of PulseAudio

08 Make use
of roles

Left It’s possible

to lower the volume
of streams to raise
the volume of an
important stream

all Linux distros that have the core PulseAudio bits, and
all you have to do is to head to your software centre and
get this extra package installed. PulseAudio-equalizer
08 Make use of roles
This is a relatively new PulseAudio feature that
resembles the behaviour of modern smartphones
module with explicitly declared options and specific
attenuation to be used while ducking at -10dB:

has 15 bands and 19 presets for almost any music style – when you receive an incoming call, all other audio $ pactl load-module module-role-ducking
or conditions, such as the very useful Laptop preset. playback (if any) gets temporarily muted. In PulseAudio trigger_
The tool is otherwise very simple, with a few extra there is the module-role-ducking module which roles=phone ducking_roles=music,video
checkboxes and the Apply Settings button. PulseAudio- lowers the volume of less important streams when volume=-10dB
equalizer works for all audio that is played through the a more important stream appears, and raises the
current sink, including desktop notifications (if you use volume back up once the important stream has … and then make sure it’s working by triggering
them). Presets are stored as plain text files under the / finished (this is called ‘ducking’). The decision whether ducking with sample playback, like this:
usr/share/pulseaudio-equalizer/presets directory, so a stream has high or low priority is made based on
you can use existing files there as templates and create the stream role (the media.role property). By default, $ PULSE_PROP=‘media.role=phone’ mplayer -ao
your own presets seamlessly. “music” and “video” streams are ducked, and “phone” sample.mp3
streams trigger the ducking. Let’s now load the

09 Get things done with ease

Most of command line actions around
PulseAudio involve the pactl and pacmd commands,
both producing verbose outputs. This is when
Patricks comes out – it is a simple PHP-based utility
( that parses
the pactl list and pactl stat outputs and shortens
them to more readable variants. The syntax is also
very easy to understand:

$ patricks ls

… lists entities, while:

$ patricks ls sink 0 properties

… shows the properties of the currently used sink.

This command can even be shortened down to:

$ patricks ls si 0 pr

The Ubuntu Book 111

114 Best free software
Enhance your Ubuntu experience
124 Partition with GParted
Use the GUI to handle partitioning

126 Remote control workstations

with Remmina
Manage a remote server from your desk
with Remmina

128 Switch languages

with FCITX
Master this extra feature

130 BitTorrent with Transmission

Upload and download data

132 Visualise data with Chart.js

Draw gorgeous graphs of all kinds

136 Command-line efficiency “Once you’ve mastered the basics,

Take the terminal further

142 Develop with Python

there’s so much more that Ubuntu
Learn about this popular coding language can do”
142 124


112 The Ubuntu Book


The Ubuntu Book 113

Supercharge Ubuntu

Best free software All the software you need to use at home & work

114 The Ubuntu Book

Best free software

Programming Tools RadRails Ruby/Ruby on Rails

A standalone IDE or plugin to Eclipse, RadRails is a flexible IDE for working
Make apps and solve the mysteries of on Ruby projects. It’s great on its own if you work exclusively in Ruby, with
an integrated debugger and other helpful features, such as code assist
the universe with these amazing tools and structure hierarchy to make navigation easier. The Eclipse plugin concept is
great, as it enables you to use Ruby alongside other code in a familiar environment.

Top IDEs
Coding is a mainstay of Linux activity and no matter which language you’re writing in,
you’re going to need an integrated development environment that’s stocked with all of
the right tools and features. You’ll need plugins, intelligent formatting, debugging tools
and more. Basically, you need these IDEs…

IntelliJ Java/Javascript
Part of a network of IDEs, IntelliJ prides itself as being the most
intelligent Java IDE (whatever that means), and in our experience it is
pretty great. As well as standard smart code completion that gives you
suggestions and lets you know what arguments a function needs, it checks the
code quality and senses any problems. It’s good for web-based Java and creating
Eclipse C/C++ mobile applications.

A very popular and powerful IDE, Eclipse is perfect for coding in C and
its derivatives on Linux – frankly on any other operating system too. As
well as being cross-platform, it has a deep and varied plugin system
that will enable you to customise the way Eclipse works. It also adds extra
languages in case you really like the layout and want to try other tasks too. What
is more, it has powerful debugging and compiling tools as well.

Geany Web
Developing for the web is different to developing normal programs. For
starters, it’s not as easy to test changes locally. There are also a variety of
ways you might make a website and a selection of different programming
languages. However, many IDEs can help you code in these various web languages,
along with code mark-up and hierarchy interfaces to help navigate easily. Eclipse
is a good bet for this thanks to its plugin nature, but you can also try a light IDE like
Geany that should do it almost as well.

IDLE Python Installing Eclipse plugins

Eclipse has fantastic support for plugins, and a rich library of plugins you can access or
While this is the standard development environment for Python, it’s download and install manually. Go to Help>Install New Software and then Add. From here
also very good at it. Our favourite feature is the shell: a working python you can add a repository for the Eclipse plugin you want to install; this will allow the plugin
environment where you can try out bits of code to work out what does to stay up to date. Alternatively, you can use the Add function to install a plugin directly
from a ZIP file. Be aware though, you won’t get the same updates this way. You can head
and does not work, along with running the entire code without the need for to the Eclipse marketplace ( to find a great selection of all the
compiling. It hooks in well to any custom modules you might have made for a plugins you can use.
project, giving you the arguments for functions within.

The Ubuntu Book 115

Supercharge Ubuntu

Multimedia & art

Play games, paint, make music – the choice is yours and you have plenty of it
Even while working, you may need a way to keep
yourself focused – listen to some music, or take a
quick break and watch something. Some people’s
Krita Digital painting VLC Video
work might be more media-centric. For whatever While GIMP is excellent as an image VLC is ridiculously good. Video playback
reason, Linux has a wide range of free media apps to editor, and you can definitely use it for on any operating system has always had
help you relax or be creative digital colouring, Krita is where you its ups and downs, requiring you to scour
can do some really beautiful art. The layout and the Internet to find a way to play some obscure
workflow is better optimised for painting than video file. On Linux, this sometimes required
GIMP and also has better tablet support. Instead switching between media decoders, but VLC does
of doing flats, you can actually paint with a full away with all of that by having all the codecs built
colour palette that is easier to select from. In in. And we do mean all of the codecs – it will play
addition, there is a better selection of brush types anything you can throw at it. That’s before you get
and effects. to its full network streaming capability.

“VLC will play anything you can throw at it – and

that’s before you even get to its full network
Clementine Music streaming capability”
Our favourite music player and manager
is also definitely one of the best around.
Clementine, as well as being able to simply
play music, enables you to easily manage your entire
GIMP Image editing
media library, playlists and even some content Photoshop, shmotoshop. GIMP may not image editor in its own right, with its own workflow
from your online music streaming services. It has cost as much, but it can do just about and interface. It has a great dev team behind it and
more features than any other music player and it is anything Photoshop can. It isn’t exactly an active community, so it is easy to learn how to
the only one we like on Linux that can create smart fair to refer to it as a free Photoshop because it is an use GIMP or move over from Adobe’s offering.
playlists for you. And, of course, it plays every type of
music file you can think of. Here we have the main manipulation Here is your work space – you can
tools – your standard paintbrushes use the layer view for an overall look
and drawing tools, along with a variety at the composition, but you can also

Audacity of selection tools along with size,

perspective and placement tools
look at the alpha channels, recent
documents and action history

Audio editing
Audio editing may be a bit niche, but
Audacity is certainly one of the best
tools for the job, even beyond FOSS.
With powerful effects, track control and a great
workflow, it is easy and quick to edit or produce
whatever you’re working on, whether it’s music,
podcasts or sound effects. Our tip is to ensure you
know your way around your sound server on your
system for different microphone configurations.

Blender 3D modelling
A long-running and great piece of
software, Blender is your one-stop shop
on Linux for creating 3D models and 3D
animated films. The quality of the Blender-created
shorts over the past few years has been incredible, Many effects, such as the
demonstrating that you can do just about anything colour and filter effects, are Use all these tools to make photos just
with it if you try hard enough. The dev community kept in separate windows so that little bit better, with touch-ups,
you can modify the properties white balancing and maybe even an
includes a lot of people that use it professionally, adjustment layer or two to make them
and get a small preview of how
so it’s in very good hands and has been made with it will change the image really pop with colour
3D-modellers in mind.

116 The Ubuntu Book

Best free software

Shotwell Photo UFRaw RAW E-readers

manager editors Reading books on your computer can be very
convenient and a good ebook manager makes the
task much more hassle-free and relaxing. Calibre
GIMP can be used to edit photos, but what When shooting photos with a really good is definitely the best for the job on Linux, as it is
can you use to organise them? This is where camera, you’ll usually be able to get RAW compatible with every major ereader format, such as
Shotwell comes in, a photo management photo files out of the SD card. These aren’t EPUB. You can also use it to organise and read normal
document formats as well. It’s optimised to run on
app that can help you organise photos into albums compatible with GIMP and some other image viewing
small screens if you want it to, so if you fancy creating
on your system for easier navigation, upload them to software as they first need to be processed. UFRaw is a custom mini Linux e-reader, Calibre is the software
certain social media sites to make the post process a free piece of Linux software that lets you load a lot you’ll need!
easier, and it can also perform light batch operations of the major RAW files and start playing around with
on photos with basic editing techniques. If you like to the white balance and other aspects of the photo, so
take a lot of photos, this is probably for you. you can create a JPEG of the perfect version.

“This software is
optimised to run on small
screens if you want it to,
so if you fancy creating
a custom mini Linux
e-reader, Calibre is the
software you’ll need!”

KdenLive Video editing Inkscape Vector graphics

Editing videos in Linux is generally better for normal folk than it is on Making vector graphics is very different to digitally painting an image.
other operating systems, as the level of free software on Linux is higher Vector graphics are used to adjust art to any size without weird
than the likes of iMovie and Movie Maker. KdenLive is a prosumer-grade pixelation. Inkscape is the most popular one available on Linux as it
video editor with enough functions to be almost on par with Adobe Premiere. Not has a very powerful set of tools that can help you create vectored artwork for any
only will it let you arrange videos in a linear timeline, but it also has a wide array of application, including Bezier curvers, node editing, boolean operations on paths
effects, including green screen effects or chroma key. and many more.

“Editing videos in Linux is generally “This one is particularly popular as it has

better for normal folk than it is on other a very powerful set of tools that can
operating systems, as the level of free help you create vectored artwork for
software on Linux is higher” any application”
The Ubuntu Book 117
Supercharge Ubuntu

Gaming on linux
Not sure it’s a thing? Think again – here are some awesome free games

DOTA 2 Marvel Heroes

The sort-of sequel to a free mod for a game made by a different company, Dota We swear to you that Marvel Heroes is actually pretty good, despite what your
2 has a weird origin. Once you get past that though, you find an excellent MOBA initial assumptions might be. The game lets you be one of an ever-expanding line-
that makes it a great alternative to League of Legends. It has been fully embraced up of Marvel characters and heroes as you repeatedly left-click on bad guys to try
by the eSports community too, with regular high-stakes tournaments and and save the world. It takes its cues from the comic books and the current movies,
leagues to play in. If you’re not the highly competitive type though, you can still so you can use Mark Ruffalo’s Hulk if you really want to. Don’t get too hooked into
enjoy it casually. its freemium trappings though.

“It’s an excellent MOBA that makes it a “It lets you fly around in a starship
great alternative to League of Legends” shooting phasers”

Team Fortress 2 Star Trek Online

Part first-person shooter, part crazy economical experiment, Team Fortress 2 was We will spare you the Star Trek references to tell you that Star Trek Online is a great
Valve’s first free-to-play game and they made a ridiculous amount of money from MMO that lets you fly around in a starship shooting phasers, or beam down to other
it – and still do make it, thanks to the hats you can find in-game. You don’t need planets so you can… shoot more phasers. The core game is free these days, but
to pay a penny to have a good time though, as it has a variety of classes and game there are paid expansions for extra content that expands the Star Trek universe
modes that suit any player and excellent core gameplay mechanics to carry it while with new stories. Also, you can set your warp speed to two decimal places, which is
you shoot snipers or robots. completely pointless but also quaintly excellent.

118 The Ubuntu Book

Best free software

Office software Tex & latex

Set up the ultimate office system with TeX and LaTeX are programming languages used to create documents – think
of it like a very manual word processor. The benefit of this is that you can control
these powerful apps exactly how a document will look and they can be easily written as PDFs. Moreover,
you can customise config files and scripts so that you can do some initial setup and
then rely on your created classes to quickly style up text.
The successor to OpenOffice has long since established itself as the best Linux office
software around, with just about every feature you’d expect from something like
Microsoft’s pervasive product. Here’s a selection of the best applications included in
LibreOffice and what they can do

Writer Word processor

There’s a standard word processor in any office suite, however Writer
does a lot more than other text editors you can find in Linux. It has all
the formatting tools you’d expect, such as layout functions, advanced
macro and mail merge tools that you find in the professional software versions. It
does prefer to save files as .ODT, but you can change it by default to .DOC or .DOCX
to be compatible with Microsoft.

01 Consider TeX Studio

With better placement of images, mathematical formulas and more,

Calc Spreadsheets TeX and LaTeX are great for academics and professionals. We quite like to use
TeXStudio to create documents –it’s an “integrated writing environment” that
The equivalent of Microsoft Office Excel, Calc has all the advanced brings things like syntax highlighting , multiple cursors, bookmarking, image
features of Excel without you needing to relearn how to create drag-and-drop and more.
different formulas and codes. The workflow is similar and you can edit
the formatting for individual cells. You can even do Pivot Tables for large data
operations. Compatibility with Excel files is okay, but not great.

Impress Presentations
LibreOffice’s PowerPoint may not be the flagship app of the suite,
but it’s able to create and replicate the kind of presentation style
you’re used to, as well as being able to open and display pre-made
presentations from other software. It has limitations in the way it uses outside
media, relying on the codecs and streamers available to it, and as a result, this
can change as a file is moved between systems.

Math Formulas
Similar to the way TeX and LaTeX enable you to write and draw
mathematical formulas, the Math app allows you to create equations
to input into any of the main three pieces of LibreOffice software. As
02 Write your document
Writing documents in TeX requires you to understand the syntax of the
code, but it’s a very powerful thing once you are familiar with the documentation.
Writer has a free PDF converter, you can even use it instead of a LaTeX editor in You can bring up shortcuts to create mathematical formulas, and you can keep a
a few situations. It’s quite a minimal program though, focusing on easily writing running preview of what you have created so that you can go back and check for
formulas in a graphical manner. any errors.

Why not openoffice?

03 Save your document
As you’re writing your document, you can save it as a .TEX file to go
back and modify it, however once you’re finished you can output it as a PDF for
Here, we’re concentrating on and recommending LibreOffice as it really is the best presentation. Not many word processors allows you to do this properly, but TeX
office suite on Linux. You may be wondering why we haven’t mentioned OpenOffice; makes it easier and better-looking in PDF form.
well, OpenOffice underwent a lot of changes to the dev team a few years back, with
most of them leaving to create LibreOffice from the current state of OpenOffice.
Development has therefore stagnated somewhat since then, while LibreOffice has
gone through many updates and overhauls to keep it relevant. Because of this, it’s now
the better of the two and definitely much better than KDE’s Calligra Suite.
“LibreOffice has gone through many
updates to keep it relevant”
The Ubuntu Book 119
Supercharge Ubuntu

Project management apps

Help your work run smoother with these Linux project managers
GNOME Planner Vs ProjectLibre
The verdict
ProjectLibre is the
much more powerful
tool of the two
softwares we’re
comparing here,
giving you much
more control over
how you create a
workflow and how to
qualify it. Planner is
still very good, but it
A GNOME app that integrates well with other may be more useful Positioning itself as a full Microsoft Project
GNOME and GTK software, Planner is a simple for people doing replacement app, ProjectLibre is a fair amount more
personal projects
project manager that enables you to easily create than those looking for complex than Planner. As well as covering all of
plans and graphs for an entire project. It lets you create Gantt an office tool. Planner’s functions, you can also use both PERT or RBS charts,
charts, manage resources and more with its plain interface, a and perform both a cost-benefit analysis and an earned value
common feature of current GNOME apps. All its data is stored costing to really get a firm hold of a project and its resources.
in either XML files or a PostgreSQL database, and you can even Unfortunately, you won’t find ProjectLibre in every Linux
export the whole thing on HTML to move it somewhere else. repository, so you will have to look for it online on SourceForge
The software is also cross-platform compatible, in case you or via its official website, but it’s easy enough to install with
need to edit it away from a Linux machine. It’s well liked in the binaries available and the source code if you fancy doing some
community and it’s also one of our favourites. building from scratch.

Home & office Accounting

Manage your finances at either of your desks with these top finance apps
Gnucash Vs Grisbi
The verdict
Because of all it’s
extra features,
including the stock
options, GnuCash is
definitely the better
choice for those
who really need a
powerful accounting
software to look
after their business
finances and more.
Easy to use, powerful and flexible to your own Grisbi is still good, but Grisbi is a slightly different financial manager
GnuCash is still going
needs, GnuCash is great for personal finances and very strong after
to GnuCash, angled a little more at home users
business finances. As well as tracking your bank many years. rather than big business. It’s cross-platform like
accounts, income and expenses to help properly organise GnuCash and lets you properly track transactions between
your cash and savings, you can also keep an eye on stocks your accounts. It doesn’t have any stock information, but
so you have a better idea of your current assets. All cash it enables you to view and create reports, as well as set up
flow requires double-entry; debit and credit. There’s also a budgets to see how close you are to keeping with them. The
chequebook-style register along with a multitude of report reports function allows it to be used in a more small-business
types that you can generate in case you need to visualise the scenario and its slight simplicity over GnuCash might be
accounts or submit a report. useful to some.

120 The Ubuntu Book

Best free software

Web & privacy

Get the best software available for connecting to, downloading from
and for talking over the Internet
Heavyweight browsers
Most of you are using one of these – but which is really the best?

Firefox Vs Chromium
The verdict

9 | 8
Memory efficiency

8 | 6

Firefox is pretty much ubiquitous to Linux, if not in 10 | 8 The open source bedrock of the increasingly popular
its vanilla form then as a distro-rebranded spin like Google Chrome browser, Chromium is very similar
Debian’s Iceweasel and GNU’s IceCat, and is most to Chrome, but with a few notable differences.
famous for its incredible range of extensions. It holds to a 9 | 8 Essentially, Chrome is 99% Chromium with the addition of
fearsome pace of an update schedule, although these updates some proprietary elements, such as Flash (although its days
often introduce new user-visible features as well as backend Firefox’s extensibility are numbered). Chromium uses the open source media codecs
tweaks and fixes. Recently, for example, it saw the introduction is a massive plus – Vorbis, Opus, VP8 and VP9, Theora – and then Chrome adds
for the open source
of tab-based preferences; the integration of Pocket and a new browser and it’s the proprietary MP3, MP4, AAC and H.264 on top. Another
Reader View mode; and Firefox Share was integrated with better memory-wise difference from Chrome is that while Google pushes updates
Firefox Hello, so users can invite people to the Hello VoIP service than Chromium. Both out automatically, Chromium relies on the user or maintainer
through social networks. Firefox provides Extended Support these make it just to keep it fresh. There can be some variation with Chromium,
that bit better in our
Releases, free of large, disruptive feature introductions and estimations.
with some vendors adding proprietary codecs. You can find the
only receive major stability and security updates. latest pure build at

Pidgin 01 Plugin setup

First navigate over to /etc/apt/sources.list.d
xUbuntu_12.04, xUbuntu_14.04, xUbuntu_14.10 or
the newer xUbuntu_15.04.
Facebook and Google recently ended and then create the file ‘jgebloski.list’. Open it up in a
their support for the XMPP API, which
means that messaging clients such
as Pidgin can no longer officially connect to the
text editor and add the following line:

deb http://download.opensuse.
02 Repo key
To add the repository key, enter the following
commands into the terminal:
services. A new Google solution is in the works but org/repositories/home:/
there’s no word from Facebook yet. However, James jgeboski/<version> ./ wget
Gebloski provides a work-around plugin for Debian repositories/
and Ubuntu that will help you connect the Pidgin … replacing <version> with one of the following, home:/jgeboski/<version>/Release.key
client to your Facebook account. depending on your distro: Debian_8.0, Debian_7.0, sudo apt-key add Release.key
sudo rm. Release.key

“Firefox holds to a particularly fearsome pace of an 03 Non-XMPP account

Now you just need to run a sudo apt-get
update schedule, although these updates often update and then a sudo apt-get install purple-
facebook. Next, restart Pidgin. Add a new account
introduce new user-visible features as well as backend or modify your existing one, pick ‘Facebook’ for
the protocol – not ‘Facebook (XMPP)’ – enter your
tweaks and fixes” username and password. Leave Local Alias blank.

The Ubuntu Book 121

Supercharge Ubuntu

Desktop Email clients Privacy and security

Web clients are hugely popular, but Protecting your online activity and
desktop clients are very powerful your personal data is becoming more
important than ever
In the interests of security, we recommend using different alphanumeric
passwords for each online account (although having a base, perhaps
phrase-based, password and then creating memorable permutations for
your various accounts is another good move). Keeping track of them all can be a pain,
so for simplicity and security you can use KeePassX. Store all your sensitive data
inside an encrypted database, and keep it inside Dropbox or a secure server. You can
then access that database from other devices and use a single master password to
unlock everything you need from whichever device you’re using.

Thunderbird We mention Tails a lot when it comes to security and privacy software,
but with very good reason. It is without question the best distro out there
Despite concerns in recent months that the project is dead or dying, for giving you a fully-protected online experience that’s ready to go out of
Thunderbird is very much alive and kicking. The project didn’t see any the box, with the Tor network, Tor Browser and I2C set up for immediate use. The
major feature introductions for a while, although this is chiefly down system lives entirely in your RAM and wipes itself after use, leaving no trace on the
to the development work moving across to the community following the Mozilla hard drive you’re live-booting on top of, and isolates applications with AppArmour,
chair’s announcement that the company itself would no longer be developing can spoof your MAC address and automatically encrypts your communications.
Thunderbird – it has effectively gone the way of SeaMonkey. But it is still one of the
best and the most widely available desktop email clients, and new features such
as the Lightning Calendar add-on and OAuth2 support in Gmail were added as PGP mail Camouflage mode
recently as June. Send secure, encrypted Using Tails out and about,
and signed emails without and don’t want to draw
having to install any extra attention? You can launch it in
software, and keep your a Windows camouflage mode
communications private from that makes it look exactly like
anyone that may want to Microsoft’s OS, but still has
snoop on what you’re saying the same functions

KMail Tor network

If you use the KDE desktop, the most powerful, most configurable email Tails automatically
connects to
client available is already installed: KMail, which is heavily integrated Don’t leave the private Tor
with the Kontact application. KMail provides every standard feature a trace network, and
you can think of and then goes on to provide advanced features that blow the Day-to-day software When you shut down you can even see
competition out of the water – everything you can do with a plugin in Thunderbird Even though it’s hyper after a session of the map of how
is an option in KMail’s preferences. It has incredible search and filtering tools, great secure, you don’t have to Tails, the RAM will be you’re connected
conversation threading, robust and in-depth security settings, integration with sacrifice usability. Tails completely erased so and reset the
comes with all the best that no one can try any connection if you
other KDE apps like KWallet and external spam checkers like SpamAssassin, and software you could need advanced forensics on it want to
the entire software is also completely configurable to your own taste.

122 The Ubuntu Book

Best free software

Science software
Linux has incredible FOSS for doing proper science and engineering work
Stellarium Cain
Going out stargazing This is a piece of software useful for
is a lot of fun (just
ask All About Space),
performing stochastic and deterministic
and while you can simulations of chemical reactions. If that
see some great at all sounds interesting to you, then you may like to
things by pointing know it can also solve models using Gillespi’s direct
your telescope at
and first reaction method, Gibson and Bruck’s next
a random spot,
to make the most reaction method, Tau-leaping and a few more. It can
of it you need to import and export relevant data to make analysis
plan – Stellarium is easier for you, using XML and SBML formats for this.
perfect for that. All
you need to do is set
your position, give it
a time and you will be
given an annotated
SciDAVis view of what will
be in the night’s
sky. Note down the
If you’ve ever tried to create an orbital model of a
series of planets, moons and one star (such as in
Software for scientific data analysis and visualisation (the name is a co-ordinates (if your our own solar system), you’ll know that coding the
weird acronym), SciDAVis enables you to manually input or import data telescope is fancy mechanics can be a right pain. Luckily, there are
from a variety of sources in order to be analysed via the various statistical enough) and you’re plenty of programs out there like NASA’s GMAT
sure to have a great
methods built into the software, then plot 2D and 3D graphs, matrices and more night stargazing.
that can help you model orbits without the need
that are suitable for publication. It’s also cross-platform, so if you need to work on for doing it yourself. This can be useful for teaching
a variety of different machines, everything will work between them. yourself or others about how celestial bodies move.

View the circuit you’re building as a schematic,

or build one directly as a schematic to begin
with. You can even create a PCB view
A great piece
of software for
planning out or
sharing electronic circuits,
Fritzing lets you create custom
circuit paths not only using
standard components such as
LEDs and resistors, but also
with a selection of different
microcontrollers from across
Arduino’s range, as well as the
Raspberry Pi. It also has a neat
trick of turning the planned-out
images into standard electronic
component symbols to make
sharing the exact layout of
the circuit much easier. Even
further, you can use it to design
PCBs to then be printed and
used by yourself or others. It’s
really the best tool for anyone
doing electronic design to use
as it makes the whole process
that much easier. If you want
Choose from hundreds of different to get into circuit design, it also
You can arrange your components and components, microcontrollers and more. has an in-depth example and
microcontrollers as you would in a real circuit Change their settings, rotate them and
to get an idea of how you should make it tutorial section available to
customise them to your preferences
teach you how to use it.

The Ubuntu Book 123

Supercharge Ubuntu

Partition storage with GParted

Handling partition tables with a GUI is simpler than using fdisk
Navigating GParted An example partition to learn more about how GPartedworks
Commit button Visual overview Free space
This button activates itself once This diagram provides a visual Users rejoice whenever this
some changes have been made overview of the content of the grey symbol shows up. It
to the partition table. Click it to currently selected device. Each stands for unpartitioned
commit the new partition layout partition is shown as a little box space – it is disk space
to the disk – please be aware that whose width represents the which is currently not
this operation can not be undone relative size on the drive assigned to any usage!

File system
indicator Drive selector
Every operating system GParted works on a
has its own preferred per-device level. The
file system. This column combobox at the top-
informs you about the right corner of the form
file systems used in the allows you to select
individual partitions: FAT which device you want
is best for media which to work on – a sure-fire
will be used in different way to detect the correct
operating systems candidate is comparing
the size displayed

Partition name Space consumption Data table

Partitions can be provided These three columns provide a While a picture might say more than
with easy-to-read names. If detailed overview of the capacity a thousand words, putting loads of
your partitions are named, of the individual partitions. For information in one figure is not easy.
the name will be displayed supported file systems, GParted GParted bypasses this problem by
in the Label field even displays information about the providing a table containing further
amount of space currently being used information on all partitions on the device

Ubuntu’s focus on user-friendliness is the file system and their role in the currently running command-line tools: putting an inexperienced user in
illustrated by the fact that the GParted Ubuntu installation. front of fdisk is a sure-fire way to wreak havoc.
utility comes with every installation of the operating Partitions can be formatted, created, deleted Let us be absolutely clear about this: when it is used
system: start it by entering ‘GParted’ into the Dash. and in some cases even resized with simple, GUI- wrongly, GParted will cause severe data loss. If you are
Due to the utility’s sensitivity, prepare to be asked for driven commands. Wizards provide step-by-step unsure about anything, do not proceed and instead ask
your password during the initialisation process. assistance, ensuring that no invalid input is collected. a more knowledgeable person for help. Furthermore,
GParted provides a visual overview of the entire Furthermore, errors are mitigated as the partition table you should always have a backup of your important
storage media. The individual partitions are then is committed only upon your explicit command. This data and do not run GParted when a power outage
overlaid in the form of boxes with extra information on approach compares favourably to the method used by may occur.

124 The Ubuntu Book

Partition storage media with GParted

Tutorial Repartition a USB stick

01 Rescue your data

Even though some operations on the partition
table are non-destructive in theory, practical
experience tells us that things do go wrong, especially
when it’s not expected. Due to that, let’s start out by
creating a backup of our stick’s contents: open it in
Nautilus, select all the files and copy them to your
workstation’s hard disk to mitigate possible data loss.

02 Fire up GParted
Start GParted from the Dash, and authorise
it by entering your user password. Select the USB
stick with the device selector – if working with a
standard USB drive, the content will look similar to
the one shown in the picture to the right.

“Select the USB stick with

the device selector”

03 Delete the old partition

Manufacturers of USB sticks tend to allocate
the entire storage space of the device to one large
partition. This is useful for most applications –
average users want to be able to store very large files
04 Create a partition
Right-click the unallocated space and select
the Insert option in the pop-up menu. GParted then
“By default, GParted will
with minimal effort (and without a trip to GParted).
Sadly, the document scanner targeted in this
displays a dialog; the bar in the middle lets you move
the partition along the unallocated space using the
create the partition at the
tutorial has issues dealing with large partitions: handles. Since dragging is less accurate than typing, beginning of the storage
if the USB stick is larger than about 1GB or has
an advanced file system, the scanner’s firmware
click the ‘New size’ field and enter the numeric value
500. By default, GParted will create the partition at medium – this is a valid
perishes. Addressing this problem starts out by right-
clicking the existing partition. Select Unmount in
the beginning of the storage medium – this is a valid
default for most, if not all situations. Next, assign a
default for most, if not
order to remove it from your workstation’s file system
tree: the successful unmounting process triggers
file system via the combo box. Small partitions (less
than 2GB) should be created with FAT16: this super-
all situations”
a rescan, which can take up to a minute. Next, primitive file system is a gold standard for universal
right-click it again and select Delete. GParted’s disk
overview window will reflect this change by displaying
the entire space of the medium as ‘unallocated’.
compatibility across operating systems and devices.
Finally, click the Add button to commit the newly
created partition to GParted’s cache of operations.
05 Apply the changes
Look at the GParted window again: the
space below the table has been populated with a
series of actions. This is furthermore signified by
the status bar, which now displays ‘2 operations
pending’. Actually changing the partition layout
requires you to click the green checkmark button.
GParted will display one final warning before getting
to work – click Apply in the ‘Apply operations to
Device’ button.
File system operations can take a bit of time: a
progress bar is displayed with further information.
When done, check whether the file system is
correct: if GParted created an ext4 file system, right-
click the partition and use the ‘Format to’ option to
remedy the situation.

06 Deploy the USB stick

With that, we’re done with partitioning.
Just unmount the USB stick. Your newly formatted
storage medium is ready and waiting to accept loads
of scanned documents.

The Ubuntu Book 125

Supercharge Ubuntu

Remote control with Remmina

Manage that server in the attic without getting your clothes dusty
Desktop computers are a relatively new The core idea behind remote protocols is easy: a as if he was in your local network. Please be aware that
invention: in the dark ages of computing, server mobilises its GUI, which is then accessed by this can be quite unsafe: hackers perform port scans to
users accessed systems which sat metres a client. If the network connection between the two find “vulnerable” VNC and RDP servers, which are then
or miles away. As the power of GUI-based workstations systems is fast enough, non-video tasks can be handled attacked with a range of sophisticated malware, which
grew, developers created remote access protocols. with relative efficiency – don’t think about playing Quake is of course not what you want.
Remmina is unique in supporting a few widely spread III or World of Warcraft via Remmina though. The app can be powered up via the Dash: simply enter
protocols: in addition to VNC, the program is also In theory, both RDP and VNC can also be used across Remmina to open the connection manager window.
capable of communicating with hosts using Microsoft’s public networks – if your router is set up to expose the Then, follow the instructions on the next page in order to
RDP protocol. relevant ports, a remote user can connect to the system take control of another Ubuntu workstation.

Remote control Windows 10 Handle a Windows workstation from an Ubuntu desktop

Enable scaling Say goodbye Connection manager
If your desktop’s resolution does not Click this symbol to Remmina can connect itself
match the one of the host, scrolling disconnect Remmina from to multiple hosts at the same
will occur. Click this symbol to make the host cleanly. Simply time. The “Remmina Remote
Remmina scale the content so that closing the window can Desktop Client” window acts as
it fits your window – be aware of the cause the host to crash in a manager where new remote
possibility of optical artefacts some circumstances connections can be set up

Connection details
Remmina’s Basic
Keyboard grabber tab lets you enter
Sending Ctrl+Alt+Del to information about the
a virtualised host can server IP, the user name
be difficult. Press this and the password. The
button to make Remmina resolution and color
grab any and all keyboard depth toggles allow you
input – pressing to set basic properties of
Ctrl+Alt+Del in this state the host display
sends the gesture to the
remote host

Work area Rendering quality For the Paranoid!

The blue speaks a clear Most remote desktop protocols Some hosts permit
language: this is Windows land. provide a set of quality levels encrypted data transfers
Click any of the symbols in permitting you to trade display via SSH. If this is the case,
order to interact with them as quality for rendering speed. the options related to this
if you were running a normal Make your personal choice in feature can be set up via
installation of Windows the Advanced tab the SSH tab

126 The Ubuntu Book

Remote control workstations with Remmina

Tutorial Remote control an Ubuntu laptop from a workstation

01 Permit remote access

Ubuntu does not permit remote desktop
connections by default. Open the Dash, and
enter “Desktop Sharing”. Ubuntu will proceed to
presenting a settings application, which should be
started to reveal a form similar to the one shown on
the right.
Proceed to checking the “Allow other users to
view your desktop” checkbox in order to enable
basic access. Checking the “You must confirm
each access to this machine” box is ideally suited
to situations where a notebook or similar computer
must be accessed from time to time – if the host is
to be unattended, requiring a password tends to be
a better approach.

“Our tests showed most

Wi-Fi systems are fast
enough to provide good
performance – if this is
not the case, the quality
can always be reduced”

02 Find the IP address

The following steps assume that host and
client are in the same network. If that is the case,
you can open a Terminal window on the client and
then proceed to entering ifconfig. This command
dumps information about the current connection
03 Create a connection
Click the Plus button in Remmina’s main
window in order to start the connection creation
04 Take control
As Remmina connects to the host, a
dialog similar to the one shown in figure two will be
state – find the network adapter you use to dialog. The Name field should be populated with a displayed on the host’s screen. Click the Allow button
connect to the network, and note the value shown string which describes the connection. in order to start transmitting data – if you don’t agree,
next to “inet addr:”. Next, proceed to changing the Protocol combobox Remmina’s remote window will remain black as no
so that it’s value reads “VNC – Virtual Network data is sent and no commands are accepted.
wlan2 Link encap:Ethernet HWaddr Computing”. Not doing this will lead to connection
inet addr: Bcast:
problems with Ubuntu clients: RDP is a Microsoft-
esque invention which is not particularly widely
supported under Unix. The Server field must then be
05 Do your thing!
With that, server and client are connected
successfully. It now is up to you to decide what
inet6 addr: fe80::eade:27ff:fe0f:eaba/64 populated with the IP adress determined above, while needs doing next – start apps, run console scripts
Scope:Link the Resolution and Color depth fields can be set up or write emails to your heart’s content! As already
according to your taste. stated above, you need to be aware that games and
Should you connect two systems frequently, try Finally, proceed to clicking the Connect button in videos are bad candidates: stuttering frame rates
to configure your router to assign a static IP to the order to make Remmina start the link-up process. should be expected due to the way how VNC handles
host in order to be able to reuse the connection The main window of the program will show an extra display updating.
configuration created in the next step. tab bearing the name of the connection profile – bring
it to the front in order to see its contents.
When working via a decently fast network, setting
the quality to Best yields an aesthetically pleasing
06 Clean up
When you’re done, click the disconnect
button to sever the connection between client
display. Tests that we performed showed that most and host. Mark the connection profile in the main
Wi-Fi systems are fast enough to provide good window of Remmina, and click the red “no” symbol in
performance – if this is not the case, the quality can order to delete it – alternatively, the profile can also
always be reduced later. be changed by clicking the Pen symbol.

The Ubuntu Book 127

Supercharge Ubuntu

Switch languages with FCITX

This alternative input system is handy for working with Asian texts
Navigate FCITX Take a look at an FCITX-enabled workspace
Who’s active? Latin only! Virtual keyboard
The name of the currently- Beware of the Fullwidth layout: This flyout provides further
active input scheme is it creates “normal-looking” text, information on how the
shown in the title bar of the which, however, lives in a different virtual keys of the currently-
virtual keyboard fly-out. unicode mapping. This means that enabled FCITX layout are
Click it to cycle through the it can not be processed with most matched to the keys of a
various options offered! text editors native QWERTY keyboard

The FCITX toggle

Click this symbol if you
want to access the
main menu of the input
system: it is described
in further detail on the
facing page

Speaking Greek?
Should the need for
Greek numerals and
characters arise, users
of FCITX don’t need to
fret. The product comes
with a ready-to-deploy
layout handling all
important characters

Speaking Russian? Que Bellisima! Advanced indexing

For all those who want Roman numerals can make boring All kinds of advanced
to write to a Russian texts look smart. FCITX contains numerical symbols are
penpal, you don’t have a special substitution schedule ready and waiting – it
to worry, as FCTIX which lets you enter Roman takes one click in FCITX
also takes care of any numbers ranging from 1 to 9 via to unearth them!
Russophiles the numerical keyboard

The X Window System can gather user sudo apt-get install fcitx fcitx-pinyin fcitx-sunpinyin reboot is required: the X-Server can not accommodate
input from a variety of input sources. If the fcitx-googlepinyin fcitx-anthy fcitx-mozc new input sources while a session is running. Should
developer of a new keyboard or similar input Once apt-get has downloaded the archives (expect your system run any important daemons, killing the X
trinket wants to make his product accessible to Unix, he a file transfer volume of about 70MB for this), open Server is also a permissible approach.
simply sets out to code a new input source. a terminal and enter im-config in order to start the After the reboot, the indicator menu area will be
Sadly, FCITX is not included in Western versions deployment process. enriched by the addition of a keyboard symbol. Click on
of Ubuntu by default. Getting started requires you to Then, simply follow the instructions shown on the this in order to open the context menu which provides
download a group of modules – a workable version can screen: on the author’s Ubuntu 14.04 LTS machine, the access to the various functions contained in FCITX and
be obtained with the following apt-get command: correct click sequence was OK, No, OK. After that, a the modules that were downloaded alongside it.

128 The Ubuntu Book

Switch languages with FCITX

Using the keyboard

FCITX works by substituting the keys on your physical keyboard with a second set of
alternative keys. Sadly, keeping the mapping between virtual and real key placing is
not always easy – especially if you use the features of the product rarely. Fortunately,
FCITX provides an easy-to-use memory aide. Click the FCITX symbol in the indicator
menu area, and proceed to hit the Toggle virtual keyboard option.
Once this is done, a semitransparent overview of the currently-active keyboard
layout will float in the middle of the screen. Clicking its title border changes the
currently-enabled input mode: the content of the virtual keys will, of course, be
adjusted to the new selection.
Should you use a non-UK keyboard, be aware that some of the keys will not match
the placements in the virtual keyboard. If you use the corresponding characters rarely,
simply click the corresponding key with your mouse – the character in question will
automatically appear at the corresponding cursor position.

“Your results look much more serious

and organised if your formulae have a
professional-looking design”

Enter mathematical symbols Change advanced settings

Make your documents look high-tech with FCITX Make FCITX do what you tell it to object shapes
Be it research, finance mathematics keyboard to the Math mode, and get An ancient German proverb states select the input source which FCITX
or the determination of an outcome tapping away – LibreOffice, Gedit that no one can design a system will use to generate the “character
of a war game, your results look and most other Unixoid applications which satisfies everyone. This input signals”. Global Config allows
much more serious and organised should be able to handle the Unicode problem, of course, also affects the you to modify the various keyboard
if your formulae have a somewhat characters perfectly well with no or noble art of application design: a shortcuts, while the Appearance tab
professional-looking design. Writing minimal extra effort. solution can be had in the form of is responsible for changing the look
Integral, +INF and Co screams Please be aware that many fonts options or preference dialogs. of the virtual keyboard.
amateur – using LaTex is not for the include but a small subset of the In the case of FCITX, the relevant Finally, most add-ons have
faint of heart and requires some skill mathematical symbols included in settings can be found behind the preference dialogs of their own.
and determination. FCITX. If you do happen to notice Configure entry of the main context They can be accessed by selecting
FCITX lets you work around that small rectangles or white spaces menu. Click it to open a dialog the name of the relevant Add-on
problem by providing an effortless instead of the characters, try providing an array of further choices. on the “Add-on” tag – a click on the
way to enter special characters for switching to a different font in order The first tab – it usually goes by configure button at the bottom will
these uses. Simply set the virtual to obtain better results. the label “Input Method”, lets you provide further options for you.

Hunt down issues

Even though Japan is a very important market for
both games and applications, quite a few developers
don’t test their products on a system with FCITX. The
use of trigger keys can then lead to hilarious results
– the project maintainers keep a list of offenders in
their wiki, which can be accessed via the URL https://
Support. In some cases, the team even provides basic
work-arounds which can be used to tame rebelling
applications. In some cases, however, disabling FCITX is
and remains the only workable solution.
Should your problems be on a more “global” level, so
that they affect all applications in the exact same way,
visiting the FAQ provided at
FAQ. This is likely to provide a suitable remedy to the
problem at hand. Finally, firing up Google might also
lead to a solution.

The Ubuntu Book 129

Supercharge Ubuntu

BitTorrent with Transmission

Upload and download data with the BitTorrent protocol
BitTorrent is a P2P protocol which permits Finding BitTorrent content can be difficult if the other users. As a matter of courtesy, users should
its users to share files in a fashion similar to provider does not supply you with the .torrent file. Due always try to upload at least as much data as they
filesharing systems like Napster or Kazaa. to the decentralised nature of the network, there is no download – not doing so will cause the P2P networks to
Obtaining content from the BitTorrent network is easy: a central source for the .torrent files. Tracker sites avoid slow down.
.torrent file contains a bit of information called a “seed”. this problem by acting as a database of commonly used A word of warning: BitTorrent is extraordinarily
Once open, it will then connect to other systems called .torrent files, the most popular one being The Pirate Bay. easy to track, and its legality can be pretty sketchy.
peers, which will attempt to provide your computer with As a file gets downloaded, your computer Downloading movies, music or games in this way is
a full image of the file as time goes by. automatically proceeds to sharing its contents with illegal and could lead to prosecution.

Transmission in action Understand key metrics displayed in the Transmission window

Download speed Upload speed Torrent search
This metric informs you about the The upload speed indicates the speed of Power users can have up to thousands
current download speed: the higher it the “opposing traffic”. The higher it is, the of BitTorrent streams active in parallel.
is, the faster data will be transmitted more data is transferred to other users of Transmission’s search box allows you to
to you from other peers the torrent limit the displayed information to a subset

Active torrent list

Transmission displays
a list of active transfers
in its main window. The
bold text is the name
of the file, while the
progress bar shows how
much data has already Download dialog
been downloaded Click a .torrent
file to open it with
Transmission. This pop-
up allows you to specify
where data is to be
saved and which priority
is to be assigned to the
torrenting stream

Speedbrake Auto-delete Cumulated statistics

BitTorrent downloads will take up all of the Keeping .torrent files around once the Transmission adds up the speeds of
network bandwidth available. This can lead to download process is started is a waste of all your torrents for you. The bar at the
lag in other applications – the speedbrake is space. Check this box to make Transmission bottom-right corner shows an aggregate of
enabled if the tortoise symbol is highlighted eliminate unneeded files automatically download and upload speeds

130 The Ubuntu Book

BitTorrent with Transmission

Control the download speed

Internet connections have finite bandwidth per
definition: if the upload gets congested, other
applications start to stutter and/or lag. Transmission
addresses this problem with its throttling feature, which
restricts BitTorrent transfers to a set speed.
Click Edit>Preferences to open the transmission
settings dialog. The Speed tab shown in the
accompanying figure contains two groups of controls:
the normal speed limits, which must be enabled via
checkbox, are active at all times. The second level of
speed limits is found below the “Alternative Speed
Limits”, and is enabled only if the Tortoise button shown
on the facing page is pressed.
Determining sensible speed limits is easy.
Open in a web browser while
Transmission is not running, and run the speed test.
Deduct 50 to 100 KB from the determined performance
results to keep other programs happy. If you work on
a shared connection, higher deductions should be
applied to prevent slowdowns.

Stay awake while downloading Advanced filtering

Hibernation is downloading’s natural predator Make sure that unneeded information is not on-screen
Do you want your downloads to keep keep the system alive while data is Keeping an eye on the torrents that however, is not of any particular use if
going while you’re out of the house? being transferred: as there always is you have on the go is not always easy. you are not a torrent professional.
It’s a problematic proposition due some kind of upload running, setting As such, Transmission has some The text box on the right allows
to the automatic stand-by function: this checkbox means that your options to filter what’s shown in a you to enter a string of choice.
when left alone, both workstations workstation, in practice, will never more advanced way. Transmission then uses what you
and notebooks will eventually go to shut down automatically. The three fields next to the ‘Show:’ have input here in order to narrow
sleep in order to conserve energy. This can be solved by stopping label allow you to reduce the amount down the displayed elements quickly
This problem can be worked the seeding process when a set ratio of data shown on screen. Firstly, and simply.
around efficiently. Open the has been reached. Change to the the leftmost combobox allows you Clicking on the delete symbol on
aforementioned Preferences Seeding dialog and enable the “Stop to select torrents according to the the rightmost border of the button
dialog, and proceed to changing seeding at ratio” checkbox – the transfer state they are currently in. allows you to clear the field of your
to the Desktop tab. The checkbox higher the ratio, the more data needs Setting it to ‘error’ makes solving any inputs in order to reset the display to
“Inhibit hibernation when torrents to be transferred before torrents download problems you encounter the choices that have been set in the
are active” makes Transmission shut down automatically. that much easier. The middle one, first two comboboxes.

Get long-term statistics

BitTorrent can be addictive. When yours truly was younger, he had a friend who
downloaded terabytes of data per month. Keeping a tab on your data volume is
important not only for egotistic reasons: if you overdo it with downloading, most ISPs
will shut you down after a month or two.
Transmission addresses this problem via the Statistics module which can be opened
in the menu (Help>Statistics). It is made up of two sections: the top of the form covers
the traffic caused since the last start-up, while the bottom of the window covers the
entire history of the Transmission installation. Clicking the Reset button restarts the
counting cycle: savvy Internet users click it whenever their billing cycle restarts.
The factor called Ratio is the holy grail of BitTorrenting. It is determined from the
upload and download traffic: if the number is higher than one, the corresponding user
has uploaded more data than he has downloaded. Having a ratio that is less than one
qualifies a person as “leech”, which can get you banned from most private trackers at
short notice.

“The factor called Ratio is the holy grail

of BitTorrenting”
The Ubuntu Book 131
Supercharge Ubuntu

Visualise your data

with Chart.js
Chart.js is a JavaScript library that helps you draw gorgeous
graphs of all kinds on your website
Data visualisation is one of the most important there that cost a lot and do not let you even get a glimpse of what they
considerations when you need to convey a message to your are capable of before you actually pay for them. Thankfully, the open
audience in the clearest manner possible. Whatever the source world comes to your rescue. There are many open source data
message may be, if you want it to be instantly understood it is vital that visualisation tools available that you can play with to illustrate your
data is plotted as charts and graphs, not plain tables. Since humans data in the best possible way. Here we will take a look at one such tool
are wired to understand images better than text, data visualisation will – Chart.js. It is easy to use and offers a great deal of control over how
almost always save the day for you and your presentation. the graphs and charts look and feel when they are plotted. Please note
It’s all very well understanding the theory, but it then raises the that while using Chart.js you may have to fiddle with JavaScript code
question of how to do it. There are tons of data visualisation tools out snippets, but it is very easy to handle and can be mastered by anyone.

Above Chart.js lets

“Since humans are wired to understand you draw common
graphs with just a
images better than text, data tiny bit of code. This
is a pie chart with
visualisation will almost always save the custom tool tips
day for you”
132 The Ubuntu Book
Visualise your data with Chart.js

01 Installation
To install the Chart.js library, just download
the JavaScript library from the official Chart.js GitHub
repository and then include the chart.js file wherever
you’d like to use it:

<script src=“Chart.js”></script>

Note that you need to pass the proper path of the

chart.js file in your file system, while including the
library file.
Instead of manual download, you can also use the
JavaScript package managers like NPM or Bower.
As you may already know, NPM is used commonly to
manage Node.js modules, but it also supports front-
end libraries, while Bower is created solely for front-
end libraries. The biggest difference is that NPM uses
a nested dependency tree, while Bower requires a flat
dependency tree, putting the burden of dependency
resolution on the user. Coming back to Chart.js, here
is how to grab it using Bower:

$ bower install Chart.js --save

If you want to use NPM: Above Use the global default values and just
$ npm install chart.js --save change the parts you want, as in this example of a label: “My Second dataset”,
false bezierCurve chart fillColor: “rgba(151,187,205,0.2)”,
Also, Chart.js is available from CDN: https://cdnjs. strokeColor: “rgba(151,187,205,1)”,
03 Line charts
One of the most commonly used charts, the
pointColor: “rgba(151,187,205,1)”,
pointStrokeColor: “#fff”,

02 Create your first chart

Once you have the chart included, you can
start plotting graphs. The first step is to create a
line chart plots data points and then connects them
on a line. It is generally used to show trend data. If more
than one line chart is plotted on a single window, it can
pointHighlightFill: “#fff”,
pointHighlightStroke: “rgba(151,187,2
canvas tag and assign an ID to it. Later, you need to also be used to show comparison of data sets. To draw data: [28, 48, 40, 19, 86, 27, 90]
get the element using the ID assigned to the canvas a line chart, you can just call the Line() method on the }
and use it to instantiate the Chart class. For example, Chart object. For example: ]
create a canvas with the ID myChart at the location };
you’d like to draw the graph in the HTML file: var myLineChart = new Chart(ctx).Line(data,
options); The options argument holds the info about other
<canvas id=“myChart” width=“400” height=“400”></ aspects of the graph, such as whether the line
canvas> Now, there are two arguments for the Line() method. between the data points should be curved or not.
Let us get an understanding of their usage. The first You can even set the radius of the point dot in pixels.
Then, in JavaScript, get the context of the canvas argument data holds the data points, labels and other Note that it is not mandatory to set all of the values; you
element using the ID, and instantiate the Chart class metadata about how the graph should look and feel can just set the value that you’d like to change. The rest
using the context you got in the first step: once the points are plotted. Here is a sample dataset: of the fields are taken from the global default values.
For example:
var ctx = document. var data = {
getElementById(“myFirstChart”). labels: [“January”, “February”, “March”, var myLineChart = new Chart(ctx).Line(data, {
getContext(“2d”); “April”, bezierCurve: false
var myNewChart = new Chart(ctx). “May”, “June”, “July”], });
PolarArea(data); datasets: [
{ This creates a chart using all the default options, with
The steps remain the same if you are using jQuery, it label: “My First dataset”, just the bezierCurve option set to false, meaning the
is just the syntax that changes: fillColor: “rgba(220,220,220,0.2)”, lines connecting data points will be straight lines.
strokeColor: “rgba(220,220,220,1)”,
var ctx = $(“#myChart”).get(0). pointColor: “rgba(220,220,220,1)”,
var myNewChart = new Chart(ctx);
pointStrokeColor: “#fff”,
pointHighlightFill: “#fff”, “If more than one line
If you noticed, after creating the Chart object, the 20,1)”,
pointHighlightStroke: “rgba(220,220,2 chart is plotted on a
method PolarArea() is called. This draws a Polar area data: [65, 59, 80, 81, 56, 55, 40] window, it can be used to
chart with the data passed as the argument to the },
PolarArea() method. { show comparison”
The Ubuntu Book 133
Supercharge Ubuntu

pointStrokeColor: “#fff”, new Chart(ctx).PolarArea(data, options);

Global configuration pointHighlightFill: “#fff”,
Along with the global prototype methods, the global pointHighlightStroke: “rgba(220,220,2 The data structure used here is fairly simple:
configurations are also available for you to set up. This
allows for changing options globally across chart types,
avoiding the need to specify options for each instance, data: [65, 59, 90, 81, 56, 55, 40] var data = [
or the default for a particular chart type. You can find it }, {
in the chart.js file. { value: 300,
label: “My Second dataset”, color:“#F7464A”,
fillColor: “rgba(151,187,205,0.2)”, highlight: “#FF5A5E”,

04 Bar chart
Like line charts, bar charts are a very popular
choice when the user needs to display data points
strokeColor: “rgba(151,187,205,1)”,
pointColor: “rgba(151,187,205,1)”,
pointStrokeColor: “#fff”,
label: “Red”
spread over time or some other parameter. Bar charts pointHighlightFill: “#fff”, value: 50,
are generally rectangular bars with their height pointHighlightStroke: “rgba(151,187,2 color: “#46BFBD”,
corresponding to the data point (if the bar is on the 05,1)”, highlight: “#5AD3D1”,
x-axis) or their length corresponding to the data point data: [28, 48, 40, 19, 96, 27, 100] label: “Green”
(if the bar is on the y-axis). Multiple bars can be plotted } },
side-by-side to make comparisons. Here is how you ] {
can plot a bar chart in Chart.js: }; value: 100,
color: “#FDB45C”,
var myBarChart = new Chart(ctx).Bar(data,
options); 06 Pie charts
Pie charts are excellent at showing the
relational proportions between data. They are
highlight: “#FFC870”,
label: “Yellow”
Note that the data structure used for a bar chart is generally used to plot the percentages of different {
similar to the one used in line charts. items, and as such the sum total of all the items value: 40,
comes out to 100. As we saw earlier, the angle doesn’t color: “#949FB1”,

05 Radar chart
A radar chart is a way to show data as a two-
dimensional chart. In these kinds of charts, three
matter in radar charts, but pie charts use the angle
(or the arc) of each segment to show the proportional
value of each piece of data.
highlight: “#A8B3C5”,
label: “Grey”
or more variables are represented on axes starting A popular variation of pie charts is the doughnut {
from the same point. Another quality of these types chart. The major difference is that the inner portion value: 120,
of charts is that the relative position and angle of the of the pie chart is filled, while for a doughnut chart it color: “#4D5360”,
axes is typically uninformative. That means you can is empty. Hence, both the charts effectively use the highlight: “#616774”,
use radar charts to plot more data points compared same class in Chart.js, but have one different default label: “Dark Grey”
to bar or line charts. value – their percentageInnerCutout, set in the global }
The process to plot radar charts using Chart. configuration file. This equates to what percentage ];
js is not different; you just need to call the Radar() of the inner should be cut out. This defaults to 0 for Each array element has a value, default colour,
method: pie charts, and 50 for doughnuts. Though there are highlight colour and the label to be displayed. As with
different aliases for both of the charts, they differ only other charts, you can keep the default options or
var myRadarChart = new Chart(ctx).Radar(data, in the default value. change them as you wish.

To provide context of what each point means, we

need to include an array of strings that shows around
var myPieChart = new Chart(ctx[0]).
var myDoughnutChart = new Chart(ctx[1]).
08 Prototype methods
For each chart, there is a set of global
prototype methods on the shared ChartType, which
each point in the chart (called labels). For the radar Doughnut(data,options); you may find useful. These are available on all chart
chart data, we have an array of datasets. Each of objects created with Chart.js. Here, for example, let
these is an object, with a fill colour, a stroke colour,
a colour for the fill of each point, and a colour for the
stroke of each point. We also have an array of data
07 Polar area chart
Polar area charts look similar to pie charts,
but there is one major difference – the radius of
us use a line chart object:

var myLineChart = new Chart(ctx).Line(data);

values. The label key on each dataset is optional, and various segments changes depending upon the
can be used when generating a scale for the chart. values, while the angle remains the same. Pie charts First method is clear(). This clears the chart canvas
Here is how the dataset looks: have the same radius for all the segments and on which myLineChart is drawn. You can use this
the angle varies depending on the values. To plot a between animation frames to clear the frame and
var data = { polar area chart using Chart.js, you need to use the render again:
labels: [“Eating”, “Drinking”, “Sleeping”, PolarArea() method:
“Coding”, “Cycling”, “Running”],
“A popular variation of pie charts is the doughnut
label: “My First dataset”,
chart. The major difference is that the inner portion of
fillColor: “rgba(220,220,220,0.2)”, the pie chart is filled, while for a doughnut chart it is
strokeColor: “rgba(220,220,220,1)”,
pointColor: “rgba(220,220,220,1)”, left empty”
134 The Ubuntu Book
Visualise your data with Chart.js


Next method is stop(), used to stop the current

animation loop. The frame is paused once you call
this method:


Use resize() to manually resize the canvas element.

This is run each time the browser is resized, but you
can also call this method manually if you change the
size of the canvas nodes container element:


The last method we will discuss is destroy(). This will

clean up any references stored to the chart object
within Chart.js, along with any associated event
listeners attached by Chart.js:


There are a few other methods available as well.

In addition to these generic methods, there are
several chart-specific prototype methods. Space
constraints make it difficult to cover all of them
here, but you can look them up in the official Chart.
js documentation.

09 Extend existing chart types

As we all know, open source software not
only means being able to freely use and learn stuff,
but also being able to extend and build upon the
existing elements. On the same lines, let us see
how you can extend an existing chart class with
extra functionality. Let’s say, for example, that you
Above This scatter chart is a result of
community extensions “If you’re a power user,
want to run some more code while initialising every
line chart: under Chart.helpers, including things such as
and are not opposed to
looping over collections, requesting animation having a bit of an explore
Chart.types.Line.extend({ frames, and easing equations. On top of this,
// Passing a name registers this chart there are also some more simple base classes of things, Chart.js provides
in the
// Chart namespace in the same way
of Chart elements. These all extend from Chart.
Element, and include elements such as points,
easy ways to add new
name: “LineAlt”,
initialize: function(data){
bars and scales.
There are already a handful of community
chart types in to the
console.log(‘My Line chart extensions listed on Chart.js. One of them is existing library”
extension’); scatter chart. Take a look here: dima117.github.
Chart.types.Line.prototype. io/Chart.Scatter.
apply(this, arguments); Chart.Type.extend({
} name: “Scatter”,
}); defaults : {
// Creates a line chart in the same way options: “Here”,
new Chart(ctx).LineAlt(data); available: “at this.options”

10 Adding new chart types

If you’re a power user, and are not
opposed to having a bit of an explore of things,
initialize: function(data){
Chart.js provides easy ways to add new chart this.chart.canvas
types to the existing library. The format here },
is relatively simple. You just need to pass in a draw:function() {
name and provide the defaults for the new chart }
type. There are a set of utility helper methods });

The Ubuntu Book 135

Supercharge Ubuntu

Command-line efficiency:
Take the terminal further
Get confident with the terminal and put the command line to use to get
work done on Ubuntu
he power of words is more expressive than Building on this foundation, you should feel confident There are few tasks that cannot be accomplished
pointing – particularly when you want to keeping a terminal open all the time, ready to quickly run at the command line; the real question is which ones it
achieve something complicated, and do it fast. a command or two, but there are other ways to quickly is best suited to. We’ll round off with a few snippets of
Commands are more reliable than pointing and clicking get to a command shell. commands that will keep you productive, and help to
for getting things done repeatedly, and accurately: we’ll apt-get install tilda and you’ll have a drop-down run your Ubuntu system.
show you how they can be chained together to produce terminal, callable by keyboard shortcut (F1 by default). If Once you’ve learned a few key commands, think of
just the result you want. you’re using Kubuntu, then install yakuake. There’s also them like Lego bricks, and start looking for new and
While we hope you come to appreciate the power a more minimalist version, yeahconsole, that you can try productive ways to put them together – we’ll give you a
of the command line, we’ll also show you its use in on more lightweight desktops. couple of simple examples to get you started.
situations where little other choice exists, such as
maintaining a web server for your pet project.
We’ll also help get to grips with rogue processes “Commands are more reliable than pointing and
which use too much of your precious system resources.
If you find some of the desktop metaphors hard clicking for getting things done repeatedly, and
to leave behind, that’s no problem – we’ll show you
some GUI-type apps and shortcuts that run within the
accurately: we’ll show you how they can be chained
terminal, giving you the best of both worlds. together to produce just the result you want”

136 The Ubuntu Book

Command-line efficiency

Left Don’t be

Pipes - the power daunted by the old-

fashioned look of

of Unix plumbing the terminal

Assemble a palette of commands

to produce just the result you
want from a command-line query
Remember the grep ls ~/.bash_history we used
in the introductory article (p.28), to find instances of
ls used so far? The entire contents of bash_history
can be seen by typing the command history – give
it a go.
Now we’re going to take the output of history
and join it to the input of other commands using one
of Unix’s most powerful features, the pipe. On UK
keyboards, | is found above \, to the left of Z. We can
use it to connect two commands like so:
history | tail
We can chain together as many commands as
we wish. Let’s sort the commands into alphabetical
order, remove duplicates, and then view them one
page at a time:
cat ~/.bash_history | sort | uniq | more

This is quite a fascinating thing to try. Note how we

used the contents of the history file, rather than the
output of history, as the latter puts a number in front
of each command, and sort would leave them in that
numerical order. There is a way of just grabbing the
commands, using Awk to filter the columns – this is
something we’d encourage you to investigate if you
need to go even further with the command line.

Tail to go
The tail command has a useful ‘live’ switch, -f
(for ‘follow’), which, after showing you the last ten
lines of a file, keeps it open to display new lines as
they arrive. This is very handy for monitoring log
files: Ubuntu applications that generate a lot of
information about access and system changes,
such as web servers and databases, place and
update logs under /var/log/.
If you’ve put up a web server, you’ll find a lot of
the logs are of malicious attempts to find common
flaws in PHP web apps. Assuming you’re not running
a common PHP CMS, like Drupal or WordPress, the
never-ending stream of information can drown out
what you want to find.
For example, a 404 result – resource not found,
indicating an image or script (or a whole page)
looked for but not found – can be of use to diagnose
problems when you’re building your site. Combine
tail -f with grep to filter out the extraneous noise
of live results:
tail -f /var/log/nginx/error.log | grep 404

The Ubuntu Book 137

Supercharge Ubuntu

Collecting output as text

A secure copy
We can use > to write text into a file. Let’s say we SCP uses SSS as a transport layer, to copy files across
wanted to take a list of what is in a directory, and networks – including the Internet – without exposing
save it: the files to anyone looking to intercept their contents.
The scp command has much the same syntax as the
ls /bin > bin.20160212.txt ssh and the cp commands combined. To copy a file from
The > will overwrite the existing contents of a file; if your home folder to that of your Raspberry Pi, given
you want to add content without overwriting, use >> the same address as above: scp ~/
(there’s no space between the symbols), which adds
pi@ You’ll be prompted for your
content to the end of the file.
password, then the file will be transferred.
ls /usr/bin >> bin.20160212.txt Running a command on a folder, and every subfolder
and file inside, is a lot quicker with the command
We used cat to dump a text file into the terminal, line. Changing permissions, copying folders, many
but it’s designed to take more than one file, and join commands have a recursive option – usually -r. For
(concatenate) them together; then they can be piped
scp this also applies, and you could retrieve every file
into a single file if you wish:
from your Pi with: scp -r pi@ ~/
cat ubuntu-day1.txt ubuntu-day2.txt mypibackupfolder/.
ubuntu-day3.txt ubuntu-day4.txt
ubuntu-day5.txt ubuntu-day6.txt
ubuntu-day7.txt > my-ubuntu-week.txt Wildcard
Reversing the direction, we can feed a file to a The other short cut to repeating commands over
command – sort < bin.20160212.txt – then put
multiple files, is wildcard substitutions. * will be
that through another process, and then send it to a
new file: sort < bin.20160212.txt | head > unpacked by the command line as ‘every possible
first-of-bin.20160212.txt character here’; use it on a part of a name like this:
cp ~/Music/*.mp3 /media/musicplayer/
…to copy every MP3 to a plugged-in device. If you have
files named ubuntu-report.txt, ubuntu-notes.txt, and “mc stands for
The network is the computer, as the saying goes. It’s
ubuntu-test.txt, you could perform an operation on all of
them, but leave ubuntu-howto-video.mp4 alone, with:
Midnight Commander;
normal to be working on several computers at once, mv ubuntu*.txt ~/Documents/. it’s a visual file manager
even if your interaction is limited to reading webpages, One tool that may help you with moving and copying files
and streaming music across the internet. But with is mc: apt-get install mc. for the command line,
Ubuntu VPSs (virtual private servers) available for
a couple of pounds a week, it’s tempting to try your
mc stands for Midnight Commander; it’s a visual file
manager for the command line, and is a quick way of
and is a quick way of
newfound skills on your own server – to set up a
website for your projects, perhaps.
performing a number of the file operations we’ve looked
at in these pages. In addition, its built-in editor, mcedit, is
performing a number of
SSH (Secure Shell) gives remote access to Unix slightly friendlier than nano. file operations”
servers – whether Ubuntu, Mac OS X or even a
Raspberry Pi. You connect with ssh then the name
or address of the server, plus any login details.
For example, if you have a Raspberry Pi on your
home network, and your router has assigned it
the address, you would connect with
ssh pi@
If your VPS hosts your project website about
different flavours of Ubuntu, say, and you’ve given
it the domain name, you could
connect with ssh
A word of warning: the internet is not a safe place;
there are many random attempts to SSH into servers,
and root is the commonest login name to try. Set the
server to not allow root login, by setting the value of
PermitRootLogin to no in /etc/ssh/sshd_config .
You should first set up a regular user with a strong
password, and credentials to use sudo – something
that will probably have been arranged during the
system setup. Restart the SSH server with sudo
service ssh restart, and try logging in from a
separate terminal session before closing the current
one, so that you still have access if something has
gone wrong.

138 The Ubuntu Book

Command-line efficiency

Midnight Commander A GUI for the command line

Drop-down menus Twin pane interaction

F9 gives access to drop-down Moving or copying files or folders from one
menus, to configure mc, and to directory to another is done with F5 (copy) or
change permissions and other F6 (move). As you can see from the window’s
properties, as well as performing titlebar, we’re copying from a remote
actions for which you have forgotten directory; mc will transparently handle
the many keyboard shortcuts copying over SSH and FTP

Function key shortcuts Hints and tips

That bottom row of numbers is a key to the Above the function key listing you’ll see
shortcuts available on function keys. If your info on current operations – here listing
version of Ubuntu has hijacked one of the the directory in the left pane, to which a
F-keys, you can use the Esc key followed by file is about to be copied from the remote
the digit (pressing 0 for 10) machine in the right pane

matching, as occasionally you’ll run across an app with overall CPU and memory state. We recommend installing
All those programs, and upper-case letters in its executable’s name (although this is htop, a more informative top which splits CPU load by core,
one goes wrong… rather frowned upon). can be scrolled sideways, and allows you to interactively
Once you have the magic PID, just add it to kill; for kill processes.
When an app starts to eat your resources, and clicking on
example, kill 3579. You can also killall firefox. Either sends
the window bar’s X won’t close it, open up a terminal and
a SIGTERM to Firefox, telling it to stop; it will shut down as
deal with the problem. Every program running on Ubuntu
cleanly as it can, after trying to save any data.
has a process identity (PID); knowing this, you can send the
Sometimes a program has a bad memory leak, is trapped
process a signal to terminate. Let’s pick on Firefox as an
in a race condition, or suffers from one of many other bugs
example. ps gives us a list of all of the running processes;
that can leave it locked up and unreachable. If it’s slowing
ps -auxww gives us the most complete listing. If you’ve a lot
Ubuntu right down, and waiting on the off-chance that it
going on, you may have to scroll back up the list to find it – no
clears itself is not viable, a SIGKILL tells the Linux kernel to
need to reach for the mouse to grab the scroll bar: the right
just drop the app, instantly killing it, but losing any unsaved
Shift key and PgUp/PgDn will scroll you up and down.
data too. The SIGKILL is sent with kill -9 3579.
Even that is unnecessary effort. Remember grep? ps
You can see all of the busiest processes in the terminal
auxww | grep -i firefox – note that you don’t have to put the
at any time by running the top program, which also shows
dash after ps, while the -i after grep tells it to ignore case
their memory and CPU use, as well as information on

The Ubuntu Book 139

Supercharge Ubuntu

Your command-line
cookbook: diced and sliced
Some quick recipes for using the command line
to tackle a range of tasks and problems
Over time, you’ll build up your own listing of terminal See step 3 for ways of making searches for command- look at some of the tools we mention in step 4; they’ll
apps and piped-together commands that you go to for line tips without even opening Firefox or Chromium. help you work out what’s going on whenever troubles
particular tasks. We’re rounding off this guide with a few We’re not suggesting avoiding GUI apps, particularly arise, or you’re just connected to a strange network and
for you to try that show you the breadth of applications websites, altogether; if you’re simply after information, need to know more.
of the command line in day-to-day use. We hope you’ll however, a command-line web browse is a lot quicker We also take a brief look at working with disks,
feel inspired to build on them and research more ways and has far fewer distractions. something that can be scary enough in a GUI, and finish
of getting things done speedily, and accurately, to solve Network troubleshooting is a topic that deserves its off the tutorial with a tool that could be even more useful
your problems without having to reach for a mouse. own book – in fact there are many of them – but have a than mc.

01 Disk usage
Disk sizes keep growing, but so do files, with
HD video and 24-bit 192kHz audio files. Keep track of
You’ll notice that if you’ve got any other disks
plugged in, these are tallied too. In fact, df is a useful
your disk space with df, the ‘disk free’ command. df -h quick check to see what disks are plugged in, and
gives you the answer in kB, MB and GB, rather than mounted (available), and shows both the device and
large numbers of bytes. the mount point on the file system.
The same is the case with du, which tells you how The reason the default is in the less readable byte
much space a folder is using, along with each item it size is so that they can be sorted. For example:
contains. Try out both commands, with df -h and du -a /var | sort -n -r | head
du /home. …shows the biggest users of memory in /var.

140 The Ubuntu Book

Command-line efficiency

05 Disk division
Your hard disk is divided up into partitions.
Ubuntu will have its files in one or more of these, most
likely formatted with ext4 file system. There will also
be a swap partition, to optimise memory use. If your
PC also has MS Windows, there will be a partition
with FAT32 or NTFS formatting, and maybe others for
recovery and backup.
All of these were created by the operating system
installer(s), but Ubuntu has the tools for you to do the

02 Imagination
Commands are built to do one, simple, small
thing well – but that doesn’t stop you using them for
– or your town (the -4 may not be necessary on your
network) – for a local update; have a look at it in your
regular browser, too.
job yourself, where necessary. For example, say you
have an SD card, formatted with FAT32, but you need it
to be FAT16 for compatibility with an old device. Plug in
other purposes. wc is the word count program; wc -l the card, and run sudo fdisk -l.
tells you how many lines are in a file. Put that counting You should be able to identify the SD card by its size;
ability to use elsewhere. it may be listed as /dev/sdb (with a single partition of
There are many files in /usr/bin/, where Ubuntu /dev/sdb1). Unmount it first with umount /dev/sdb1
keeps the majority of your apps. Although the terminal and format with mkfs.fat /dev/sdb1 – but make
displays them more densely, ls actually outputs one sure you’ve got the disk, or you will wipe everything off
file per line – feed that to wc and you can quickly count another device – one of many reasons why you should
the number of programs in the directory: always maintain good backups.
ls /usr/bin | wc -l

04 Network woes
Network troubleshooting is a huge topic, which
we can scarcely touch on here, but know that Ubuntu
has all the tools at hand (or an apt-get away). The
simple ping is a useful diagnostic: ping
and if you get back regular packets, you know not just
that your network is connected successfully to the rest

03 Web of commands
Although JavaScript-heavy webpages
don’t work well with command-line web browsers,
of the internet, but that you can also resolve domain
names into IP addresses. ping will decide
between one and none of those two working. 06 GNU Screen: the persistent terminal
There’s plenty left to explore, but we’ll leave
fallback for mobile sites makes even Facebook route -n tells you about your gateway to the you with a parting gift, one even more useful than mc.
relatively useful in the terminal with a browser-like outside world, and ifconfig about your network When you SSH into your Raspberry Pi, or a remote
w3m or links2, and Twitter clients like rainbowstream hardware, and its configuration. A traceroute Ubuntu server, you’ll be placed in a fresh terminal
are every bit as good as their GUI equivalents. to another domain can give you information about session, and unable to scroll back through what you
But it’s for quick queries of the web that the bottlenecks along the way, and for the Swiss Army were doing – other than look at command history.
command line fits best. Surfraw, written many knife of network programs, download netcat. GNU screen – sudo apt-get install screen
moons ago by (a then far less famous) Julian – is a terminal multiplexer, giving you multiple
Assange, queries everything from Amazon through windows within a terminal, but it has one killer feature:
currency converters, to acronym databases, with a
single command like: sr -t acronym www.
“It’s for quick queries persistence. Run screen, leave your SSH session, now
SSH back into your server and run screen -r, and it
Lastly, while curl is a great tool for downloading
web resources, websites are even being written to
of the web that the will reattach you where you left off (like at the Emacs
session in the screenshot above). Like all of the best
suit it. Try curl -4 command line fits best” command-line apps, it’s a real time-saver.

The Ubuntu Book 141

Supercharge Ubuntu

Develop with Python

Python is relied upon by web developers,
academic researchers and engineers, and
is one of the languages Ubuntu is written in.
Here’s how to put Python to professional use

142 The Ubuntu Book

Develop with Python

Let Python handle all of the day-to-day

System administration upkeep that keeps your system healthy
System administration tasks are some of the most
annoying things that you need to deal with when
you have to maintain your own system. Because
of this, system administrators have constantly SYSTEM ADMINISTRATION:
been trying to find ways to automate these types BASH, PERL, PYTHON
of tasks to maximise their time. They started with
basic shell scripts, and then moved on to various
scripting languages. For a long time, Perl had been
the language of choice for developing these types of
maintenance tools. However, Python is now growing
in popularity as the language to use. It has reached
the point where most Linux distributions have a
Python interpreter included in order to run system
scripts, so you shouldn’t have any excuse for not
writing your own scripts.
Because you will be doing a lot system level work,
you will have most need of a couple of key Python
modules. The first module is “os”. This module
provides the bulk of the interfaces to interacting
with the underlying system. The usual first step is to
look at the environment your script is running in to
see what information might exist there to help guide
your script. The following code gives you a mapping
object where you can interact with the environment
variables active right now:
import os

You can get a list of the available environment most beneficial way in the long run is to do this is to os.listdir(cwd)
variables with the function os.environs.keys(), edit the values directly within the environs mapping.
and then access individual variables with Another category of tasks you may want to You can move around the filesystem with the function
os.environs[key]. These environment variables are automate is when working with files. Get the current os.chdir(new_path). Once you’ve found the file you
also used when you spawn a subprocess. So you will working directory with: are interested in, you can open it with and
want to change values, like the PATH or the current open it for reading, writing and/or appending. You can
working directory, in order to run these subprocesses cwd = os.getcwd() then read or write to it with the functions
correctly. While there is a putenv function that edits and os.write(). Once you are all done, you can close
these values, it doesn’t exist on all systems, so the You can then get a list of the files in this directory with: the file with os.close().

Running subprocesses from Python

The underlying philosophy of Unix is to build small, This gives a long file listing for the current directory.
specialised programs that do one job extremely well. The function run() was introduced in Python 3.5 and
Scheduling with cron
You then chain these together to build more complex is the suggested way of handling this. If you have an
behaviours. There is no reason why you shouldn’t older version, or need more control, you can use the Once you have your scripts all written up, you may
want to schedule them to run automatically without
use the same philosophy within your Python scripts. underlying Popen() function instead. If you want to your intervention. On Unix systems, you can have cron
There are several utility programs available to use get the output, you can use: run your script on whatever schedule is necessary. The
with very little work on your part. The older way utility crontab -l lists the current contents of your cron
of handling this was through using functions like cmd_output =[‘ls’, ‘-l’], file, and crontab -e lets you edit the scheduled jobs
that you want cron to run.
popen() and spawnl() from the os module, but a stdout=subprocess.PIPE)
better way of running other programs is by using the
subprocess module instead. You can then launch a
program, like ls, by using:
The variable “cmd_output” is a CompletedProcess
object that contains the return code and a string
“There are several utility
holding the stdout output. It may not be the same programs available to use
import subprocess way that you are used to, but the methodology is[‘ls’, ‘-l’]) essentially the same. requiring very little work”
The Ubuntu Book 143
Supercharge Ubuntu

Python has several frameworks available for your

Web development web development tasks
With the content and the bulk of the computing hosted
on a server, a web application can better ensure a
consistent experience for the end user. The popular
Django framework provides a complete environment of MODEL
plugins and works on the DRY principle (Don’t Repeat
Yourself). Because of this, you should be able to build
your web application quickly. Since Django is built on
Python, you should be able to install it with sudo pip Manipulates Updates
install Django. Depending on what you want to do with
your app, you may need to install a database like MySQL
or PostgreSQL to store your application data. There are
Django utilities available to automatically generate a
starting point for your new project’s code:
django-admin startproject newsite

This command creates a file named “” and Sees Uses

a subdirectory named “newsite”. The file “manage.
py” contains several utility functions you can use to
administer your new application. The new subdirectory
contains the files “”, “”, “” USER
and “”. These files, and the subdirectory they
reside in, comprise a Python package that is loaded
when your website is started up. The core configuration
for your site can be found in the file “”. The URL the files “”, “” and “”, among from django.conf.urls import url
declarations, basically a table of contents for your site, others. The simplest possible view consists of the code: from . Import views
are stored in the file “”. The file “” contains urlpatterns = [ url(r‘^$’, views.index,
an entry point for WSGI-compatible web servers. from django.http import HttpResponse name=‘index’), ]
Once your application is done, it should be hosted on a def index(request):
properly configured and hardened web server. But this is return HttpResponse(“Hello world”) Next, get the URL registered within your project with the
inconvenient if you are in the process of developing your following code:
web application. To help you out, Django has a web server This isn’t enough to make it available, however. You will
built into the framework. You can start it up by changing also need to create a URLconf for the view. If the file from django.conf.urls import include, url
directory to the “newsite” project directory and running “” doesn’t exist yet, create it and then add the from django.contrib import admin
this command: following code: urlpatterns = [ url(r‘^newapp/’,

python runserver

This will start up a server listening to port 8000 on your

local machine. As this built-in server is designed to be USER
used for development, it reloads your Python code for
each request, so you don’t need to restart the server to
see your code changes. These steps get you to a working
project. You are now ready to start developing your
applications. Within the “newsite” subdirectory, type:

python startapp newapp

This will create a new subdirectory named “newapp”, with

Virtual environments
When you start developing your own applications, you
may begin a descent into dependency hell. Several
Python packages depend on other Python packages.
This is its strength, but also its weakness. Luckily, you
have virtualenv available to help tame this jungle. You DATABASE
can create new virtual environments for each of your INTERPRETER
projects. In this way, you can be sure to capture all of the
dependencies for your own package.

144 The Ubuntu Book

Develop with Python

Using The Pycharm Ide

When you are in the
middle of developing
your application, you
may need to have
several different
terminal windows
open in order to have
a code editor open,
a monitor on the
server, and potentially
somewhere to test and
monitor output. If you
are doing this on your
own machine, this isn’t
an issue. But if you are
working remotely, you
should look into using
tmux. This can provide
a much more robust
terminal environment
for you to work in.

The Project Pane The Status Bar The Editor Pane

This pane is the central location for your project. PyCharm does a lot of work The main editor pane can be configured
All of your files and libraries are located here. behind the scenes. The status to match your own style, or one of the
Right-clicking in the pane brings up a drop-down bar helps you keep track of all of other main editors, like emacs. It handles
menu where you can add new files or libraries, these background processes syntax highlighting, and even displays
run unit tests, or even start up a debugger error locations in your scripts

“To help you out, Django You initialise it with: Bear in mind that any time in the future that you
make changes to your model, you will need to run the
has a web server built python makemigrations newapp makemigrations and migrate steps again.
Once you have your application finished, you can
into the framework” Once it has been created, apply the following get ready to make the move to the final hosting server.
migrations to the database: Don’t forget to check the available code within the
Django framework before you go ahead putting too
include(‘newapp.urls’)), python migrate much work into developing your own.
url(r‘^admin’,, ]

This needs to be put in the “” file for the main

project. You can now pull up your newly created
Other Python Frameworks “For a really self-contained
application using the URL http://localhost:8000/
While Django is one of the most popular frameworks around
for doing web development, it is by no means the only one
around. There are several others available that may prove to
framework, you could
The last part for applications is usually the database.
The actual connection details to the database, like
be a better fit for particular problem domains. For example,
if you are looking for a really self-contained framework, you
look at web2py”
the username and password, are contained in the file could look at web2py. Everything you need to be able to have version 3. This latest version was renamed BlueBream. Zope
a complete system, from databases to web servers to a is fairly low-level, however. You may be more interested in
“”. This connection information is used for all looking at some of the other frameworks that are built on
ticketing system, are included as part of the framework. It is
of the applications that exist within the same project. so self-contained that it can even run from a USB drive. top of what is provided by zope. Pyramid is a fast, easy-to-
Create the core database tables for your site with: If you need to have even less of a framework, there are use framework focussed on the most essential functions
several mini-frameworks that are available. For example, required by most web applications. It provides templating,
CherryPy is a purely Pythonic multi-threaded web server the serving of static content, mapping of URLs to code, and
python migrate more. It does so while providing tools for app security.
that you can embed within your own application. This is
actually the server that is included with TurboGears and If you are looking for some ideas, there are several
For your own applications, you can define the data web2py. A really popular microframework is a project called open source projects that have been built using these
model you need within the file “”. Once the flask. It includes integrated unit testing support, jinja2 frameworks, from blogs and forums to ticketing systems.
templating and RESTful request dispatching. These projects can provide some best-practices when you
data model is created, you can add your application to
One of the oldest frameworks around is zope, now up to go to construct your own application.
the INSTALLED_APPS section of the “” so
that Django knows to include it in any database activity.

The Ubuntu Book 145

Supercharge Ubuntu

Python is fast becoming the go-to

Computational science language for computational science
Python has become one of the key languages used
in science. There is a huge number of packages
available to handle almost any task that you may have
and, importantly, Python knows what it isn’t good
at. To deal with this, Python has been designed to
easily incorporate code from C or FORTRAN. This way,
you can offload any heavy computations on to more
efficient code.
The core package of most of the scientific code
available is numpy. One of the problems in Python is
that the object-oriented nature of the language is the
source of its inefficiencies. With no strict types, Python
always needs to check parameters on every operation.
Numpy provides a new datatype, the array, which
helps solve some of these issues. Arrays can only hold
one type of object, and because Python knows this
it can use some optimisations to speed things up to
almost what you can get from writing your code directly
in C or FORTRAN. The classic example of the difference
is the for loop. Let’s say you wanted to scale a vector by
some value, something like a*b. In regular Python, this
would look like:

for elem in b:
c.append(a * elem)
“There is a huge number of packages available to
In numpy, this would look like: handle almost any task that you may have and,
a*b importantly, Python knows what it isn’t good at”

Spyder, the IDE for scientists Variable Explorer

The variable explorer pane lets you
access all of the data structures within
the current Python interpreter. You need
to actually run your code for anything to
show up here

The Editor Pane

This pane is where you can
open and edit your source files.
Above this pane are buttons
to allow you to simply run the
code, or run it under a debugger.
Under the debugger, you can set
breakpoints and step through
each line of code individually

Ipython Console
The console window lets you interact
directly with the underlying interpreter
that will be used when you try and run
your code

146 The Ubuntu Book

Develop with Python

Interactive science with Jupyter

For a lot of scientific problems, you need to play with your Jupyter will correctly print mathematical expressions
data in an interactive way. The original way you would do this within the produced web page, as it supports the
was to use the IPython web notebook. This project has since appropriate formatting. You can also mix documentation
been renamed Jupyter. For those who have used a program blocks and code blocks within the same page. This means
like Mathematica or Maple, the interface should seem very that you can use it to produce very powerful educational
familiar. Jupyter starts a server process, by default on port material, where students can read about the techniques,
8888, and then will open a web browser where you can and then actually run it and see it in action.
open a worksheet. Like most other programs of this type, By default, Jupyter will also embed matplotlib plots
the entries run in chronological order, not in the order that within the same worksheet as a results section, so you can
they happen on the worksheet. This can be a bit confusing see a graph of some of the data along with the code that has
for users at first, but it means that if you go to edit an earlier generated it. This is huge considering the growing need for
entry, all of the following entries need to be re-executed reproducible science. You can always go back to the data
manually in order to propagate that change through the rest and see how any analysis was done in order to reproduce
of the computations. any result.

Above The ability to generate complex plots is essential

“Python knows what

it isn’t good at; it can
incorporate code from C
Above Jupyter Notebook is a web application for creating and
So, not only is it faster, it is also written in sharing documents that contain live code and equations
a shorter, clearer form. Along with the new
datatype, numpy provides overloaded forms
of all of the operators that are of most use, care of as many of the menial tasks as possible,
like multiplication or division. It also provides like creating a plot window, drawing axes, selecting The Need for Speed
optimised versions of several functions, like a coordinate system, etc. The low-level functions Sometimes you need as much speed as you are capable
the trig functions, to take advantage of this new give you control over almost every part of a plot, of pushing on your hardware. In these cases, you always
datatype. The largest package available, that from drawing individual pixels to controlling every have the option of using Cython. This lets you take C code
is built on top of numpy, is scipy. Scipy provides aspect of the plot window. It also borrowed the from some other project, which has probably already
been optimised, and use it within your own Python
sub-sections in several areas of science. Each idea of drawing graphs into a memory-based program. In scientific programming, you are likely to have
of these sub-sections need to be imported window. This means it can draw graphs while access to code that has been worked on for decades
individually after importing the main scipy running on a cluster. and is highly specialised. There is no need to redo the
package. For example, if you are doing work with If you need to do symbolic maths, you may development effort that has gone into it.
differential equations, you can use the “integrate” be more used to using something more like
section to solve them with code that looks like Mathematica or Maple. Luckily, you have sympy,
which can be used to do many of the same things.
import scipy You can use Python to do symbolic calculus, or
import scipy.integrate to solve algebraic equations. The one weird part
result = scipy.integrate.quad(lambda x: of sympy is that you need to use the symbols()
sin(x), 0, 4.5) function to tell sympy what variables are valid to
be considered in your equations. You are then able
Differential equations crop up in almost every to start doing some manipulations using these
scientific field. You can do statistical analysis registered variables.
with the “stats” section. If you want to do some You may have large amounts of data that you
signal processing, you can use the “signal” need to work with and analyse. If so, you can use
section and the “fftpack” section. This package the pandas package to help deal with that. Pandas
is definitely the first stop for anyone wanting to do has support for several different file formats,
any scientific processing. like CSV files, Excel spreadsheets or HDF5. You
Once you have collected your data, you can merge and join datasets, or do slicing or
usually need to graph it, in order to get a visual subsetting. In order to get the best performance
impression of patterns within it. The primary out of the code, the heaviest lifting is done by
package you can use for this is matplotlib. If you Cython code that incorporates functions written
have ever used the graphics package in R before, in C. Quite a few ideas on how to manipulate your
the core design of matplotlib will be familiar as data were borrowed from how things are done in R.
it has borrowed quite a few ideas. There are two You now have no reason not to start using
categories of functions for graphing: low-level Python for your scientific work. You should be able
and high-level. High-level functions try to take to use it for almost any problem that comes up!

The Ubuntu Book 147

150 Mint 17.3 ‘Rosa’ Cinnamon
“These re-spins of Ubuntu
Is this variant better than Ubuntu?

152 Elementary Freya

Discover this Mac-like, consistent
each add something new”

154 Netrunner 17 ‘Horizon’ 150 154

A plasma desktop with striking

156 LXLE 14.04.3

A Lubuntu respin, great for old

158 Deepin Linux 2014.3

An elegant HTML5 desktop


148 The Ubuntu Book


The Ubuntu Book 149

Beyond Ubuntu

Mint 17.3 ‘Rosa’ Cinnamon

Is it better than Ubuntu? We discover whether Mint’s focus on the
desktop experience warrants the lavish praise it has received
RAM Many flavours of Linux – Ubuntu included – culmination of lots of separate improvements over an extended
512MB RAM (1GB recommended) seek to run on devices large and small, with touch period. Cinnamon has a slick interface, which seems to have
screens or keyboards, and in order to do so have become more responsive over recent releases – bucking the
STORAGE left behind the traditional desktop interface. This may or may general trend in computing for software to get heavier and slower
9GB disk space not be a good thing, but for people who want to get things done as it matures. Meanwhile, underneath the polished exterior, Mint
(20GB recommended)
on their computer, and don’t want to have to learn new ways of steadily improves audio, video and file handling. The speed of
doing things (after all, you don’t expect your new car to put the Linux Mint, especially on older hardware, is noticeable.
Graphics card capable of 800 x 600
steering wheel and the pedals in different positions), Linux Mint Rebooting after installation, a ‘Welcome Screen’ window
(1024 x 768 recommended) is a welcome refuge. gives shortcuts to getting to know Mint in various ways, from
DVD drive or USB port More than that, Linux Mint has polished the traditional documentation, through ‘Apps’ (to install extra software),
desktop interface until it’s hard to find fault with anything that to helping out with Mint – which can involve anything from
it does, developing its own Cinnamon desktop when GNOME artwork to new ideas: user feedback plays a big part in the Mint
took a different direction. Mint has always included proprietary development process.
hardware drivers (in 17.3, Driver Manger now tells you if the Cinnamon has a traditional taskbar, with the usual shortcuts
drivers are Open Source), and codecs for MP3 and DVD playback, to network connections, battery health, removable drives etc in
which many other distributions do not carry. the right hand corner; menu and shortcuts to favourite apps in
17.3 will be the last Mint release based upon the Long the left (you can drag any app you like here to create a shortcut);
Term Support (LTS) 14.04 release of Ubuntu; as such it’s the and open windows (minimised or not) in the middle – with

150 The Ubuntu Book

Mint 17.3 ‘Rosa’ Cinnamon

“Linux Mint has polished the traditional desktop interface until PROS
it’s hard to find fault with anything that it does.” A desktop that involves
no learning of new
interfaces, nor concessions
to mobile devices, and
thumbnails displayed when you hover over them. The taskbar outside of Mint, the Software Sources manager can take care of
works flawlessly.
applets at the right are all great pieces of software, particularly any conflicts that could arise from mixing sources. Mint’s other
the updated battery applet, and the audio applet, which provides preference and administration tools all work well, but it’s the day-
a quick and useful interface to your music collection. to-day use of the desktop itself that shows off Mint’s slick design, CONS
The default taskbar shortcuts are for browser, file and the careful decisions taken and improvements made. Stability and gradual
manager, and terminal – the three most needed items for a The only problem we had was when the screen-saver locked improvements are at
GNU/Linux user. We’re glad that Mint hasn’t hidden the terminal us out with no password dialogue – something a little command the expense of latest-
and-greatest updates of
away in a misguided attempt at ‘user-friendliness’; as you’ll line knowledge enabled us to fix, but not a good thing in a software packages, and
appreciate from our earlier articles on the command line, its ‘newbie-friendly’ OS – but it only happened on one test machine. proprietary codecs are not
power is one of the hidden strengths of Ubuntu, and other Unix- In long term use, it was otherwise always a joy to use. in the Free Software spirit.
type operating systems.
Nevertheless, Mint’s own tools will keep you away from
reliance on the command line. Software Manager has SUMMARY
a reasonable interface for finding new apps, but recent Dedicated to a friendly and familiar interface for traditional desktop users, Linux Mint is
improvements are below the surface: it detects the fastest the one to choose if you’ve felt lost since Windows XP became unsupported – but you’ll find
mirror, and will now warn you if there is a problem with corrupted it a great improvement over XP. Not for compulsive upgraders and free software purists,
but a great experience for new and experienced users alike.
packages, or if the mirror hasn’t updated. If you need to add
other Ubuntu-related repositories to download software from

The Ubuntu Book 151

Beyond Ubuntu

Elementary Freya
Not just a Mac clone, but a well-thought-through aesthetic approach to
stable and consistent computing
CPU Elementary OS is not just a slight twist on Ubuntu, were certainly solid throughout our use, and being written in just
1GHz processor but rather a serious attempt at making something C and Vala languages, don’t bring in the stack of dependencies
(Intel i3 recommended)
that holds together consistently from both upon which many of its rivals depend – so Elementary misses
aesthetic and usability angles. The strong resemblance to out on the penalty to performance, stability and resource
RAM OS X is far from coincidental: Elementary’s Pantheon desktop footprint that would have entailed.
is based upon GNOME3, but owes much to both Apple and The streamlined interface is a result of the Elementary
Google’s Chrome OS. developers’ commitment to ease of use: everything should be
5GB of disk space
This new version fixes some boot issues with UEFI and Secure available without using the command line. We found that to be
(15GB recommended) Boot systems. Installation handled the WI-FI and graphics cards, the case – but some of the GUI choices left us a little puzzled. For
with a checkbox to select proprietary drivers, alongside media example, Alt grab (holding the left mouse button down while Alt
URL codecs. Installation works without an Internet connection, but is pressed to drag a window) does not work, meaning a window that option sacrifices security updates. As with Linux Mint, cannot be moved to have its title bar above the top of the screen.
encrypting the entire disk is an option – albeit one with slight Right-click choices are also removed from much of the desktop.
performance penalties for some of the lower-end hardware that Elementary’s own apps do include a terminal (with
Elementary can run on. background transparency by default); a text editor called
Throughout the installation, the default wallpaper of mountain Scratch; a mail client; a calendar app; and a file manager. These
scenery is subtly reassuring in its solidity. A subliminal message all bear some resemblance to their GNOME counterparts in
about Elementary’s stability? Elementary’s additions to Ubuntu use, certainly nothing unfamiliar, while a desktop email client

152 The Ubuntu Book

Elementary Freya

“Elementary OS is a good beginner’s distro… the combination PROS

of stability and consistent aesthetics will appeal to many” Great for new users and
tired aesthetes who would
is something of a rarity in these webmail-dominated days – rather clear idea of what is best for the user experience, and if like a simple, attractive
desktop, and solid, fuss-
although opening up the Geary mail app for the first time results that’s what you are here for, just go with it. If not, perhaps turn free computer use.
in an invitation to connect your Gmail account. the page and take a look at some of the alternatives. Limiting
Noise is similar to Rhythmbox on other Ubuntus (or iTunes choice does have the benefit of making Elementary extremely
elsewhere), and offers all the basics but, like the rest of easy to grasp – it’s a good beginner’s distro, and the combination CONS
Elementary, resists the urge to allow the extreme customisation of stability and consistent aesthetics, will undoubtedly appeal to Won’t appeal to power
that appeals to some GNU/Linux users. If you want a word many users. users, or those offended
by Mac OS X clones. Having
processor, you’ll have to go to the Software Center and download If you’re looking for fuss-free computing (once you’ve installed
to bypass a pay link to
LibreOffice (or an alternative) for yourself, and possibly a better an office suite!) – possibly on an old Netbook – and don’t want download is also a rather
web browser than the included Midori. to sacrifice a good-looking desktop in the process, try out jarring experience.
Like many OSs, Elementary collects data on usage to help Elementary OS.
to tailor development, as well as provide prompts and hints
during use: some users are concerned about such things, and
Elementary makes it easy to turn off this collection through SUMMARY
selecting Privacy Mode. This is available through the System Power users are almost certain to look elsewhere, as many things Ubuntu users take for
Settings menu, as is most of what you would like to customise on granted are removed, but it’s all in a good cause. Elementary OS presents a refreshingly
your desktop. consistent interface, is relatively light in its use of system resources – and great on old
Customisation is not nearly as flexible as many Linux variants, Netbooks – and is a stable and reliable platform for day-to-day use.
and this is quite deliberate. Just like Apple, Elementary has a

The Ubuntu Book 153

Beyond Ubuntu

Netrunner 17 ‘Horizon’
Netrunner’s Plasma desktop offers a glimpse of a third way, between
traditional desktops and tablet-focussed GNOME Shells
CPU The other Ubuntu respins reviewed in these pages and then the customary, but well-executed, slideshow, as files
64-bit CPU are all based upon Long Term Support (LS) release are written to disk. Interestingly, Netrunner is the only one of the
(16 & LTS run on Intel Atom)
of Ubuntu; Netrunner is different, in that it does respins not to comment on the apparent strength or safety of
maintain – and also improve with new releases – an LTS your chosen password.
RAM branch, but it also has new releases based on more recent Based on KDE’s Plasma desktop (version 5.4.3), and last
Ubuntu versions. autumn’s Kubuntu release, Netrunner comes with all of the
Netrunner’s homepage states the three principles of the OS: codecs and apps to get running straight away by default, with no
power-up and don’t dumb-down the user; include add-ons, further configuration – provided you have working installation
codecs, customizations; and, finally, avoid lock-ins and favour media, of course.
free (libre) alternatives. However, something has slipped in Our patience with the installation was rewarded with sight
Intel GMA 945 Graphics Card /
production – with the ISO on the USB stick refusing to boot, no of the garish desktop. Perhaps not to everyone’s taste, but we
Video Memory 128MB matter what clever tricks we tried. By falling back on burning eschewed wallpaper decorations, to give its night club ambience
a DVD, we were eventually able to boot the live image (we were a chance to grow on us.
URL reminded once again how slow DVDs can be), from where we Based as it is on Kubuntu 15.10, the software is more up could have a look around, before clicking “Install Netrunner”, and to date than most LTS respins – Firefox 42.0.3, VirtualBox 5,
getting on with the show. LibreOffice 5, and a 4.2 Linux kernel. Regular updates shouldn’t
This was straightforward enough, with vertical tabs marking carry a heavy price – Kubuntu manages them well enough
off the stages as you agree to timezones, disk partitions, etc, most of the time – but Netrunner had a number of moments of

154 The Ubuntu Book

Netrunner 17 ‘Horizon’

“Krunner is a powerful shortcut to not just launch, but killing PROS

rogue apps, and making calculations and conversions.” It feels very slick (when
it worked), with plenty of
flakiness: a few freezes and settings apps having blank windows replacing almost everything, and you have a desktop that you apps, Plasma widgets are
great fun – and sometimes
when opened from shortcuts; apps not starting from the menu, can really make your own. If you’re not convinced by Unity or quite useful, too!
or evenAlt-F2 quick launch (Krunner) – which is an otherwise GNOME Shell, and want something more than a traditional
powerful shortcut to not just launch, but killing rogue apps, desktop, or Mac clone, Plasma offers a path to a powerful
and even calculations and conversions. Battery life was also desktop that will work with both tablets and PCs. CONS
surprisingly poor under Netrunner 17. Netrunner 17 is certainly worth a try. Go ahead and make a live Installation only worked
It’s a shame, as Netrunner has a lot going for it. Plasma 5 is DVD and give it a go – but you might want to wait for the release of from DVD; some desktop
flakiness; problems
an improvement over earlier KDE desktops, not just in terms of the next LTS, later this spring, when we’re confident things will be
launching some apps. Also
features, but performance has sharpened up too. KDE has some working much better. You could also try the last LTS, 14.2, which a few freezes and crashes.
great tools and apps, with Calligra, the office suite, being a great despite not having all of the desktop updates of 17, is still a great
alternative to LibreOffice – with parts of both installed. There is OS to try.
plenty of software installed by default, but not as much as LXLE
manages to squeeze into a much smaller ISO.
Plasmoids, KDE’s embedded widgets, embed in the desktop, SUMMARY
and give you interactive mini apps of the type other desktops Despite a bad start with the ISO not working on USB sticks, Netrunner did eventually install
have only in the taskbar. From weather reports, through games, – although the problems didn’t all stop there. Nevertheless, the Plasma 5 desktop is very
to controlling media playback, or reading online comics, there’s configurable, has loads of useful widgets, and can look great. Give it a try, and if you like
a widget for almost everything. Combine these with KDE’s Netrunner’s potential, look forward with us to the next LTS.
very configurable desktop layout, with options for moving and

The Ubuntu Book 155

Beyond Ubuntu

LXLE 14.04.3
Faster, stylish, and loaded with software, LXLE’s respin on Lubuntu could
be the top choice on older hardware
CPU If you’ve got an older PC you want to revive, LXLE alternatives are installed (UTox, and KDE’s Marble for these two
Pentium III CPU (P IV recommended) – the “full featured OS for an ageing PC”, as their examples). Indeed, during start up, the logo sits above the slogan
homepage puts it – could be the Ubuntu for you, with “Be Free, Be Open.”
RAM the light-on-its-feet LXDE desktop on top of Ubuntu’s power After a quick boot up, the user finds herself with a
512MB RAM and flexibility. choice to make – which other desktop do you want LXLE
(1024MB recommended)
LXLE is a respin of Lubuntu – but there are noteworthy to look, and function, like? If you’re looking for a replacement
differences. LXLE ships with a lot of software not included with for Windows XP (the default look, though simply labelled
8.4GB disk space
the Lubuntu boot image – both codecs/drivers and desktop “Lubuntu”), or a classic GNOME 2 type desktop, you’ll feel
(20GB recommended) software – and benefits from several tweaks for usability, at home right away. The other choices are: netbook mode
including several useful additions to the already excellent (good for small screens), Unity – with the vertical launcher, and
URL PCManFM file manager. More than that, it’s lighter on system other Ubuntu touches – and lastly, the inevitable Mac OS X resources than Lubuntu, yet smooth, sleek, and easy to use. look, with dock living on the far left edge. Underneath it all,
LXLE has a great reputation for detecting and configuring of course, is the flexible LXDE desktop environment, with
difficult hardware, from printers to Wi-Fi cards. The proprietary all of the familiar (though configurable) tools and icons – plus one
codecs installed (if you opt in during LXLE installation) help unusual extra.
here, but this Ubuntu respin’s attitude to proprietary software The thing that caught our eye straight away was wallpaper,
is ambiguous: yes, Adobe Flash player is included, but for other and plenty of it! LXLE has 100 – yes, one hundred – pre-installed
services, like Skype and Google Earth for example, Free Software wallpapers, all better than average, and on the taskbar is a

156 The Ubuntu Book

LXLE 14.04.3

“A marvel, squeezing into the lightweight LXDE environment all PROS

of the functionality found in more resource-hungry desktops” Quick, consistent, and
improves on the already
random switcher: click and be amazed. The wallpapers folder alternative to Firefox, that also fills in duties as a calendar, mail fast and friendly Lubuntu
with even more speed and
lives inside the Pictures directory of your home folder, so it’s client, and personal organiser. yet more friendliness.
pretty easy to add even more. The Guayadeque music player is more than adequate as a
The menu system is good – if not quite as good as Mint’s – and default – those with strong preferences elsewhere have a lot
is also accessible in the File Manager as a folder view, but for of choice from within Ubuntu’s repositories – and with tools like CONS
quick launch Alt-Z allows you to run any program after typing its Audacity included, you can create and edit, as well as consume Some very minor
first few letters (Quick Launch can also be clicked in the taskbar). various media. inconsistencies, plus an
awful lot of unwanted
Alt-C brings up a terminal emulator – in this case, the highly LXLE is a marvel, squeezing into the lightweight LXDE
software if you’re a
configurable Roxterm. environment all of the functionality found in any of the more minimalist who knows
You’ll also need the terminal to configure Conky – the hideable resource-hungry desktops. You won’t need an older PC to what they want.
desktop balloon full of information on your CPU, RAM, battery appreciate its speed and power.
and other system stats; a rare lapse in beginner-friendly ease of
use. Another inconsistency in LXLE is a weather app that looks
like it belongs on a smartphone, not the otherwise carefully SUMMARY
styled LXDE desktop. We really liked LXLE: it’s full of thoughtful choices, starting at log-in, when you can match
There is a lot of other software to try – the default installation the desktop to the style of use with which you are most comfortable. The extra packages,
of LXLE gives you gigabytes of productivity apps, games, and and subtle interface improvements over the stock LXDE of Lubuntu are all positives, and
while the desktop is configurable, the defaults make it good to go straight away.
multimedia software, from ebook readers to home banking
software. Mozilla’s SeaMonkey suite is a less demanding

The Ubuntu Book 157

Beyond Ubuntu

Deepin Linux 2014.3

And now for something a little different: an Ubuntu-based distro with its
own, very elegant, HTML5 desktop
CPU Even if you’re fairly familiar with Ubuntu, you may functions, including the Control Centre, a slide-out interface
Intel Pentium IV 2.0GHz never have heard of Deepin, as it’s still not that well to preferences and settings for users, network connections,
(Core2 recommended)
known outside of China. That’s gradually changing collecting all of the things normally hidden away under a stack of
with each new release. Deepin 2014.3 appeared in April 2015, menus – it’s very nice. In fact, it’s one of the best on any OS.
RAM the last of the Ubuntu-based Deepins. There is a more recent, Move the cursor top left and you’ll get the Launcher, where
1GB RAM (2GB recommended)
Debian-based version, but it shares the same desktop and apps are grouped by categories. If you don’t see the app you
features, albeit with several, slight improvements. need on the launcher screen, you can type a few letters into the
10GB disk space
Installation is painless (the boot disc also allows you to run Launcher, and the selection is narrowed until the software you
(20GB recommended) a ‘live’ distro, to try without installing), making sensible default want appears. Right-clicking any of the items that come up in
choices, and just asking for language, name and password. It’s the Launcher gives you options for adding them to the OS X-style
GRAPHICS one of the best installers we’ve seen. Dock, to the Desktop, or to autostart.
Modern video graphics Favourable first impressions are not spoilt on starting up the As well as a large range of included Free and Open Source
card recommended
installed systems, as Deepin shows a screencast introducing Software, Deepin has the proprietary drivers for most wifi and
its interface, before delivering you to that same Deepin Desktop graphics cards (although some users report trouble with the
Interface (DDE), built using web technologies like HTML5. Nvidia drivers), and some other proprietary software, such as the
Stealing shamelessly from Apple’s OS X, it’s a slick and appealing Skype client, and Adobe’s Flash player.
desktop – as you can see in the screenshots. Moving the cursor Speaking of Microsoft, Deepin installs Codeweavers’
to the corner of the screen is a shortcut to various (customisable) CrossOver. This lets you easily install and run most Windows

158 The Ubuntu Book

Deepin Linux 2014.3

“Built using web technologies like HTML5, and stealing PROS

shamelessly from Apple’s OS X, it’s a slick and appealing Quick booting, nice
looking; interesting
desktop – as you can see” desktop constructed of
web technologies, a good
package manager and
software. Typically, this tends to be used for legacy games, as opens a hotkey display to show shortcuts for this, and everything works on older hardware.
there is little else not available in Ubuntu’s repositories – so users else), and has a fullscreen overlay (‘Quake-mode’). Occasionally
might like to also check out Deepin Game’s vast range. the Terminal would seem to lose its history – the up arrow would
Deepin’s own apps - such as Deepin Music, Deepin Movie and recall none of the previously issued commands – yet history CONS
the Deepin Store, are unique to this OS. The built-in multimedia showed them all. Deepin’s last Ubuntu-based
release has some stability
apps are fine, except Movie’s very occasional crash, with Music Despite all of the niggles there’s a lot to like here – from
issues, and some odd
being remarkably deft at finding cover art. We were playing an installation to the excellent Control Centre – whether you try the choices in the design and
old episode of the Goon Show (ask your grandparents, they’ll Ubuntu-based 2014.03 or a more recent Debian-based version. dependency of Deepin’s
remember it), and up popped an image of Sir Harry Secombe. Definitely one to keep an eye on. own apps.
Deepin Music works well with online radio stations after a plug-
in installation, and can be docked, or just put into mini-mode,
leaving essential controls in the smallest possible desktop SUMMARY
space. Deepin Music was also one of the few places where We can’t ignore all of the stability issues, nor, we admit, is an OS X rip-off desktop design,
some untranslated Chinese was on display, but nothing that however user friendly, going to please everyone. Such shameless stealing has a long
would stop the average non-Chinese speaker from using the honourable history in computing though, and Deepin is clearly on an upward trajectory.
Well worth trying – this is one to watch, and very friendly to those new to Linux.
app successfully, and this release supports 23 languages. The
Deepin terminal doesn’t support tabs, but can be split (the menu

The Ubuntu Book 159

of al
al ci
tri Spe

this book?
Exclusive offer for new

Try es
3 issjuust
for *
* This ofer entitles new UK direct debit subscribers to receive their first three issues for £5. After these issues, subscribers will then pay £25.15 every
six issues. Subscribers can cancel this subscription at any time. New subscriptions will start from the next available issue. Ofer code ZGGZINE must
be quoted to receive this special subscriptions price. Direct debit guarantee available on request. This ofer will expire 31 March 2017.
** This is an US subscription ofer. The USA issue rate is based on an annual subscription price of £65 for 13 issues which is equivalent to $102 at the
time of writing compared with the newsstand price of $16.99 for 13 issues being $220.87. Your subscription will start from the next available issue.
This ofer expires 31 March 2017.
Dedicated to
all things Linux
Written for you
Linux User & Developer is the only
magazine dedicated to advanced users,
developers & IT professionals
In-depth guides & features
Written by grass-roots developers and
About industry experts

the Free assets every issue

Four of the hottest distros feature every month –
mag log in to FileSilo, download and test them all!

subscribers to…

Try 3 issues for £5 in the UK*

or just $7.85 per issue in the USA**
(saving 54% off the newsstand price)
For amazing offers please visit
Quote code ZGGZINE
Or telephone UK 0844 249 0282+ overseas +44 (0) 1795 418 661
+ Calls will cost 7p per minute plus your telephone company's access charge
From the makers of

Discover this exciting and versatile programming language
with the new edition of The Python Book. You’ll find a complete
guide for new programmers, great projects designed to build
your knowledge and tips on how to use Python with the
Raspberry Pi – everything you need to master Python.

Also available…

A world of content at your fingertips

Whether you love gaming, history,
animals, photography, Photoshop,
sci-fi or anything in between, every
magazine and bookazine from
Imagine Publishing is packed with
expert advice and fascinating facts.


Print edition available at
Digital edition available at
Ubuntu Book
The ultimate handbook
for all Ubuntu users

Perfect for

Discover the power Master the Download the best

of Ubuntu Ubuntu apps free software
Everything you need to know, from Get to grips with the powerful 2XUGHƬQLWLYHOLVWRIWKHRSHQVRXUFH
setting up to performance boosts software packaged with Ubuntu software you need right now