Beruflich Dokumente
Kultur Dokumente
Ubuntu
5IF
5IFVMUJNBUFIBOECPPL #PPL
GPSBMM6CVOUVVTFST
r-FBSOUPVTF6CVOUV
r4FDVSFZPVSTZTUFN
r(FUUPLOPXUIFUFSNJOBM
r%JTDPWFSUIF4PGUXBSF$FOUSF
Welcome to
The
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.
The
Publishing Director
Aaron Asadi
Head of Design
Ross Andrews
Production Editor
Alex Hoskins
Designer
Perry Wardell-Wicks
Printed by
William Gibbons, 26 Planetary Road, Willenhall, West Midlands, WV13 3XT
Distributed in Australia by
Gordon & Gotch Australia Pty Ltd, 26 Rodborough Road, Frenchs Forest, NSW, 2086 Australia
Tel: +61 2 9972 8800 Web: www.gordongotch.com.au
Disclaimer
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.
Part of the
bookazine series
The
Ubuntu Book
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
U
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.
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,
Adopting the
full version of
Ubuntu
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: ubuntu.com/download. 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:
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.
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.
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.
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 wiki.ubuntu.com/HardwareSupport.
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.
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 help.ubuntu.com 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.
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.
Kubuntu
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.
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.
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.
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
38 Accessibility in Ubuntu
Make Ubuntu easier to use
44 Commanding Ubuntu
Get to grips with the command line
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
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
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.
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.
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
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.
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.
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
Application
This section
displays results
related to the
applications scope.
You’ll see all the
applications that
match the search
query here
Sources
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
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.
/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.
/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.
/srv can contain data directories of services such as HTTP (/srv/www/) or FTP.
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.
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.
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
Mousetweaks
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.
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
Standard
toolbar
Here you have
quick links to
settings, add file
and help options
Description
Set the
description
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.
[share]
comment = Ubuntu File Server Share
path = /srv/samba/share
browsable = yes
guest ok = yes
read only = no
create mask = 0755
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
Extra
features
The ‘gear’
button hides
lots of extra
features,
including
options for
creating and
restoring
disk images,
benchmarking
tool, drive
settings
dialog and if
supported,
SMART
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.
Tutorial Perform basic diagnostic and management tasks with your drives
H
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.
and familiar
things
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
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.
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
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!
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.
Tutorial Set up your backup the right way with Déjà Dup
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.
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)
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.
Calendar
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.
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.
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.
“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.
relied on NetworkManager” Provide a proper port and finally hit the Apply system wide button to finish with setup.
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.
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.
74 Communicate with 70 72
Empathy
Set up and use this instant messenger
78 Unlock LibreOffice
Calc tricks
Use spreadsheets like a pro
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”
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.
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 Hello.java, 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.
General
options
This area holds
all the major
options that
Firefox has
to offer. You
can open new
windows, print,
view history,
edit settings
and more
Editing
buttons
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.
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
features
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 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
General
settings
You can find
these under
Empathy>
Preferences.
Under the
General
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.
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
Standard
toolbar
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
among
LibreOffice
suite software.
It has four
main sections
– Properties,
Styles and
Formatting,
Gallery, and
Navigator
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.
Formula
toolbar
This toolbar has
the options to
view and add
various formulae
to spreadsheets
Customisation
bar
This menu lets
you access the
most-used aspects
of Calc UI, like
customisations,
navigations,
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.
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.
Operators
&
Attributes
Operators
consists
of a set of
operators
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.
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.
Slides pane
The slides pane
contains thumbnail
pictures of the
slides in your
presentation in
the order in which
Workspace
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.
Writer
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.
04 Quick
maths
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.
07 Create a
backup
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.
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.
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
spreadsheet
Miscellaneous
17 Presenter
mode
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.
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
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’.
“Choose a coloured
background or to select a
background image”
The Ubuntu Book 91
Create with
Ubuntu
94 Work with LibreOffice draw
Create cool vector graphics
98 Manage images 94 96
with Shotwell
Keep tabs on large numbers of image iles
102
Properties sidebar
Opens sub-sections
for object properties
that you can change to
suit your requirements.
The sub-sections are
context based
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.
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
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
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.
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
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.
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
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.
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.
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
06 Control red-eye
levels
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 gimp.org/downloads 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.
09 Add Auto-
Levels
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.
17 Use the
Quick Mask
Right PulseAudio is
a lot more than just
a sound system with
volume control
01 Discover your
sinks and sources
Left PulseAudio
should automatically
work out the sinks
and sources
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
08 Make use
of roles
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
$ patricks ls
$ patricks ls si 0 pr
126
Best free software All the software you need to use at home & work
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.
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.
“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!”
Gaming on linux
Not sure it’s a thing? Think again – here are some awesome free games
“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”
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.
Firefox Vs Chromium
The verdict
Features
9 | 8
Memory efficiency
8 | 6
Extensibility
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
Overall
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 download-chromium.appspot.com.
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 http://download.opensuse.org/
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
Tails
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
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
Planets
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.
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
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.
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.
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
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
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.
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>
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)”,
com/libraries/Chart.js.
03 Line charts
One of the most commonly used charts, the
pointColor: “rgba(151,187,205,1)”,
pointStrokeColor: “#fff”,
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.
options);
myLineChart.clear();
myLineChart.stop();
myLineChart.resize();
myLineChart.destroy();
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
T
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”
Left Don’t be
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
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
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.
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 google.com
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 8.8.8.8 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 http://wttr.in/Liverpool command line fits best” command-line apps, it’s a real time-saver.
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 os.open() 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 os.read()
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().
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
PYTHON
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.
“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 manage.py 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 manage.py migrate much work into developing your own.
url(r‘^admin’, admin.site.urls), ]
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”
Ipython Console
The console window lets you interact
directly with the underlying interpreter
that will be used when you try and run
your code
156
“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
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.
1 GB RAM
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
STORAGE
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
elementary.io 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
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
1GB
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
STORAGE
10GB HDD
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
GRAPHICS
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
netrunner.com 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
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
STORAGE
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
www.lxle.net 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
Enjoyed
this book?
Exclusive offer for new
Try es
3 issjuust
for *
£5
* 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
subscribers to…
Python
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…
Perfect for
switching
from
Windows