Nathan Haines

Beginning Ubuntu for Windows and Mac Users

Nathan Haines

Any source code or other supplementary material referenced by the author in this text is available to readers at www.apress.com/9781484206096 . For additional information about how to locate and download your book’s source code, go to www.apress.com/source-code/ . Readers can also access source code at SpringerLink in the Supplementary Material section for each chapter.

ISBN 978-1-4842-0609-6e-ISBN 978-1-4842-0608-9

DOI 10.1007/978-1-4842-0608-9

© Apress 2015

Beginning Ubuntu for Windows and Mac Users

Managing Director: Welmoed Spahr

Lead Editor: Louise Corrigan

Technical Reviewer: Jess Bermudes

Editorial Board: Steve Anglin, Louise Corrigan, Jonathan Gennick, Robert Hutchinson, Michelle Lowman, James Markham, Susan McDermott, Matthew Moodie, Jeffrey Pepper, Douglas Pundick, Ben Renow-Clarke, Gwenan Spearing, Steve Weiss

Coordinating Editor: Mark Powers

Compositor: SPi Global

Indexer: SPi Global

Artist: SPi Global

For information on translations, please e-mail rights@apress.com, or visit www.apress.com .

Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at www.apress.com/bulk-sales .

This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Exempted from this legal reservation are brief excerpts in connection with reviews or scholarly analysis or material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the work. Duplication of this publication or parts thereof is permitted only under the provisions of the Copyright Law of the Publisher’s location, in its current version, and permission for use must always be obtained from Springer. Permissions for use may be obtained through RightsLink at the Copyright Clearance Center. Violations are liable to prosecution under the respective Copyright Law.

Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.

While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.

Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.

For Alexander, who eats everything, will try anything, and is constantly learning.

Introduction

Ubuntu is a lot of things: an operating system, a software ecosystem, a development platform, a home computer solution, a server foundation, a cloud computing paradigm, a stunning new phone, and a community. Ubuntu and its community of developers, contributors, and enthusiasts help to make Ubuntu a first-class experience no matter where you find it.

In this book, we’re looking at Ubuntu as an amazing desktop operating system. I’ll nod at other possibilities here and there, but this book will help you feel at home with Ubuntu and get things done, whether you want to create business documents, relax with music or a movie, play some games, or just look at pictures of cats on the Internet. And yes, you can even run phone and server applications, right on your everyday computer.

What makes Ubuntu so great?

Ubuntu works a lot differently than Windows or OS X traditionally has. It has evolved separately from these proprietary operating systems, and that makes it both exotic and unfamiliar at times. And while the general concepts of windows and launcher icons are the same, there are a lot of underlying assumptions that make Ubuntu a very different experience. The main difference is the way that the Ubuntu, Free Software, and Open Source communities all come together to form the operating system you think of as Ubuntu. These combined efforts make Ubuntu a powerful way to get work done.

Ubuntu Is Built From Many Pieces

The first thing to know is that Ubuntu is built around an operating system kernel called Linux. The kernel is the program that is responsible for coordinating all of a computer’s hardware and software. It manages hardware driver support, schedules how applications run and cooperate together and communicate with hardware, and takes care of a lot of behind-the-scenes details that we don’t generally worry about when it comes to using a computer.

The kernel itself doesn’t do anything on its own. It lets other software run in a way that can be built around the operating system and not the specific hardware. This means that a lot of other software must be written to be used with the Linux kernel and distributed alongside that kernel in order to produce a working, controllable computer system.

There are a lot of working parts, and the first thing you’ll usually hear about when you look online is the GNU project. The Free Software Foundation rewrote a lot of the Unix userspace tools, or the command-line utilities that one would use to work with Unix using a text interface. The goal was to provide utilities that could be freely used, examined, and distributed. When the Linux kernel was first published in 1991, the GNU userspace was quickly brought to Linux and together they made a freely distributable operating system that others could build on.

Because it takes a lot of software working together to create a working system, it is common to see references to a GNU/Linux operating system. I won’t use that convention in this book but GNU tools are a major underpinning of most modern Linux-based systems, and we’ll be using a lot of them in Chapter 5.

Since 1991, Linux has been bundled with other software and distributed in a way that makes it usable out of the box. Several projects began to form that distributed bundles in different ways, and these are now known as Linux distributions, or distros for short. The first distro to focus on creating a full computer system containing only Free Software was called Debian, and since 1993 it has gathered together a vast collection of freely redistributable software that runs on over 20 different computer architectures and can be further modified for use in other projects.

Free Software is a term of art that refers to software that can be used for any purpose, commercial or private, and can be freely examined, modified, and redistributed to others. This allowed Linux to receive improvements from others and incorporate them so that everyone could benefit from them. It also allowed a more and more useful collection of software to be included along with the new kernel.

Ubuntu Is Linux for Human Beings

In 2004, a Debian developer named Mark Shuttleworth decided that he wanted to take Debian and focus on releasing on a consistent time-based schedule that would offer fresh software but with special attention given to polishing the user experience and providing high-quality language translations as well. Linux distros tended to include massive amounts of software that you had to choose between during installation, and it often took three to five CDs worth of data to download before you could start an install. In the early 2000s, this was a lot of information to download. One of Ubuntu’s initial goals was to fit on a single CD and provide a beautiful desktop with one web browser, one office suite, one e-mail client, and so on. By doing so, the install process was simple and streamlined but additional and alternative software choices were still only a few clicks away.

Another major goal was to build a community that embraced the African philosophy of ubuntu—humanity toward others. Thus, the Ubuntu Code of Conduct ( http://www.ubuntu.com/about/about-ubuntu/conduct ) set clear guidelines for how community members should treat each other. The idea that everyone should be treated with respect and newcomers should be welcomed and celebrated worked to create an online community that was much friendlier and respectful than a lot of other technical communities. It was such a successful example that Ubuntu spread very quickly and many technical communities have adopted their own codes of conduct.

As Ubuntu continued to mature, it further distinguished itself from its origins. While Ubuntu still depends greatly on the Linux kernel, the GNU userspace, the Debian distribution, and thousands of other software projects, it still brings these components together in a way that offers a stunning and unique desktop experience right out of the box. This collaboration also allows Ubuntu to provide security updates and bug fixes to all of the software it installs on your computer.

Ubuntu has been working to redefine the desktop experience, and the Unity desktop shell is a brilliant and bold new interface that dedicates almost your entire screen to your applications but keeps your favorite applications, indicators, and hybrid local and online searches at your fingertips. In addition, a single one-gigabyte DVD download results in a comprehensive, complete computing experience in only about four gigabytes of space once installed on your hard drive. From there you can add other software as you see fit.

By knowing some of the history of Ubuntu, we can see how it can be so different than other operating systems. But these differences are often strengths. Because Ubuntu is freely distributable, you can download and try it for free. And the install disc that you download can also be installed on a USB drive instead of a DVD, and you can even run Ubuntu directly from the disc and give it a try before you actually choose to install it. That means that the best way to learn more about Ubuntu is to dive in and just try it. But it also means that an Ubuntu disc can be used to test and recover data from computers that aren’t working too well, even if they’re not running Ubuntu.

A wide array of software that can be arranged to accomplish any task, dozens of supported languages, and a friendly, helpful community to turn to for support and exciting activities are just some of the things that make Ubuntu so great. The first chapter will help you get Ubuntu installed and up and running so that you can experience it for yourself.

Ubuntu 14.04 LTS is the latest long-term support release of Ubuntu. It provides a platform for a lot of different experiences and will continue to receive security updates until April 2019. For simplicity’s sake, this book is going to assume that you are running Ubuntu 14.04 LTS installed on a computer hard drive, and Chapter 1 is going to help you set this up. But as you explore Ubuntu and become more comfortable with it, you may want to use your computer in a different manner than Ubuntu assumes. There are various flavors of Ubuntu that come preinstalled with different software selections. They are useful in a lot of different circumstances but are all variations of Ubuntu. You could install Ubuntu and by adding and removing software end up with the same configuration. The next chapter will describe some of these differences as well.

If you do not already have an Ubuntu DVD, visit the Ubuntu web site at http://www.ubuntu.com/ and download the Ubuntu Desktop installer. Every six months a new installer called a “point release” will be available that contains all updates to that point. At the time of publication, Ubuntu 14.04.3 LTS is the latest version.

Additional resources

No book can cover everything, and this book cheerfully doesn’t try to. A lot of topics are covered in enough detail to get you started, but with Linux and Ubuntu you can always dig a little deeper. Apress has an amazing assortment of books on all topics and for all skill levels and is a great place to look for comprehensive guides. In addition, there is an incredible amount of resources provided by the Ubuntu community — persons just like you who are sharing what they’ve learned — and I encourage you to explore them and to contribute back. We all make up Ubuntu together.

The official Ubuntu documentation on your computer is also available online, along with additional community-maintained help. https://help.ubuntu.com/

Ask Ubuntu is a question-and-answer site where Ubuntu users can help each other. It’s a great place to search for help and ask specific support questions. http://askubuntu.com/

The Ubuntu community portal is a great place to find ways to contribute back to Ubuntu and to find resources that can assist you. http://community.ubuntu.com/

Your Ubuntu Local Community (LoCo) Team is filled with friendly people who are crazy about Ubuntu, and they are happy to point you in the right direction if you want to meet other Ubuntu users or help share Ubuntu with others. You can find more about your local team and view upcoming Ubuntu events in your area at the Ubuntu LoCo portal. http://loco.ubuntu.com/

Your local Linux User Group is filled with Linux enthusiasts, many of whom are familiar with Ubuntu. Search for them online and join them at their next meeting!

The Ubuntu subreddit is a fun place for readers to highlight and discuss Ubuntu news and community matters. Read the rules in the sidebar, and if I remove your support question with a gentle reminder to use Ask Ubuntu, it’s not personal! http://reddit.com/r/Ubuntu/

Planet Ubuntu is an aggregate of various personal and project-related blogs that share Ubuntu news regarding announcement, development, events, parties, and other interesting topics gathered from Ubuntu member blogs. http://planet.ubuntu.com/

Ubuntu Insights is Canonical’s portal for news, partner announcements, industry white papers, and is a place to read about Ubuntu’s place in the computing industry as a whole, as well as consumer products featuring Ubuntu. https://insights.ubuntu.com/

There’s a great, big community out there, and we’re all hoping that Ubuntu will help you be more productive, have more fun, and be happier. Don’t hesitate to reach out if we can help! Just remember, you’re a part of the Ubuntu community, too!

Acknowledgments

I was able to write this book thanks to the love and support of many people.

So thanks to all of the teachers and staff at school and college that got me started in computer support and technical writing – too many to mention, although I’m sorely tempted. Their encouragement of my interest in computers and programming, and the opportunities they created set me down the path I’m on today.

Thanks to my family who have put up with my obsession for computers and video games even in a pre-Internet world. The cyberspace of the 80s and 90s that I once so clearly envisioned is very different from how we live today in how seamlessly we’ve woven it into our everyday lives. I think that turned out even better. Thanks, Michael and Sylvanna, Mom, John, Dad, Doris, Jon, Teasha, and Holland.

Thanks to all my friends who have meant so much to me along the way: David, Lutz, Anna, Emily, Casey, Kelly, Andy, Markus, Justin, Tom, Matt, Jerome, Patrick, Andrew, Leif Arne, Eric, Marshal, and all the others who have been a constant support and inspiration. Thanks especially to indie and hybrid author friends: Ralph, Ryan, and a couple of other Nathans, among others.

Thanks to Alexander, Blair, Claudia, and Jeffrey, because sometimes you can choose your family.

And of course, thanks to all of my Ubuntu family and friends: Neal, Jess, Robert, Melissa, Brendan, Lyz, Akkana, George, Steve, Richard, Jono, Stuart, George, José, Sujeevan, Daniel, David, Alan, Oliver, Ian, Gaven, everyone on the Ubuntu Community Council and the Ubuntu LoCo Council, Gareth, Ilan, Orv, Tom, Justin, and everyone at SCaLE, and everyone else who has put up with my jokes and happily welcomed my contributions to the Ubuntu project. My work has been paid back many times over.

And thanks to everyone at Apress, who were wonderfully enthusiastic and patient throughout the entire adventure! Thanks, Louise, Christine, Jim, Mark, Karen, and all the others I didn’t see who worked behind the scenes to make this book the best it could be.

Finally, special thanks to Christopher B. Wright, who wrote the awesome book Pay Me, Bug!, released it under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 (CC BY-NC-SA 3.0) License, and then gave me permission to use the cover and excerpt found in Figure 3-23.

Images from Tears of Steel are licensed under the Creative Commons Attribution 3.0 license. (CC) Blender Foundation | mango.blender.org

Contents

Chapter 1:​ Installing Ubuntu 1

Preparing to Install Ubuntu 2

System Requirements 2

Creating an Ubuntu DVD 2

Creating a Bootable Ubuntu USB Drive 3

Booting into Ubuntu 4

Installing Ubuntu 6

Beginning the Install 6

Setting Regional Settings 9

Creating the Primary User Account 10

Install Proprietary Graphics and Network Drivers 12

Manually Install AMD Graphics Drivers 14

Manually Install Nvidia Graphics Drivers 15

Additional Ubuntu Flavors 17

Installing Kubuntu 17

System Requirements 18

Preparing to Install Kubuntu 18

Using Kubuntu 19

Installing Xubuntu 21

System Requirements 21

Preparing to Install Xubuntu 21

Using Xubuntu 22

Installing Lubuntu 25

System Requirements 25

Preparing to Install Lubuntu 25

Using Lubuntu 26

Installing Ubuntu GNOME 28

System Requirements 29

Preparing to Install Ubuntu GNOME 29

Using Ubuntu GNOME 29

Installing Ubuntu Server 33

System Requirements 34

Installing Ubuntu Server 34

Using Ubuntu Server 37

Installing a Minimal Ubuntu System 38

System Requirements 38

Installing a Minimal System 39

Using a Minimal Ubuntu System 40

Multiple Operating Systems 40

Dual-Boot with Ubuntu and Windows 40

Dual-Boot with Ubuntu and OS X 47

Summary 49

Chapter 2:​ Getting Started with Ubuntu 51

Ubuntu Desktop 51

Unity Launcher 52

Unity Dash 53

Unity Menu Bar and Indicators 57

Unity HUD 58

Managing Windows 59

Installing and Updating Software 59

Ubuntu Software Center 59

Updating Ubuntu 61

Upgrading Ubuntu 62

Managing User Accounts 63

Guest Access 65

Finding Things in Ubuntu Instead of Windows 65

Finding Things in Ubuntu Instead of OS X 67

Connecting to a Windows Desktop Remotely 69

Running Windows Applications 70

Connecting to Windows Shared Folders and Printers 71

Sharing Files and Printers with Other Computers 73

Sharing Printers between Computers 75

Sharing Office Documents with Others 76

Sharing Photos and Graphics with Others 76

Formatting Disks to Work with Other Operating Systems 77

Summary 78

Chapter 3:​ Productivity at Home and Work 79

Writing Documents without Distractions Using FocusWriter 79

Managing your Personal Finances Using HomeBank 82

Managing Your Professional Email, Contacts, and Calendar Using Evolution 84

Managing Your Calendar with Thunderbird Using Lightning 86

Integrating Your Online Accounts with Ubuntu 88

Chatting Online with Friends 90

Organizing Your Thoughts with Mind-Mapping Software Using Freemind 93

Personal Wiki Note Taking Software Using Tomboy 94

Installing Additional Language Support 96

Configuring Language Support 98

Configuring Your Text Entry Settings 98

Adjusting Keyboard Settings 100

Installing Language Fonts 101

Keeping Track of Your Personal Time Management Using Hamster 101

Organizing Collections of Books, Movies, Games, and More Using Tellico 104

Managing your Ebook Library Using Calibre 106

Printing Labels and Cards Using gLabels 108

Backing Up and Restoring Personal Files Using Déjà Dup 110

Restoring Files 113

Capturing Screenshots and Recording Your Desktop Using GNOME Screenshot and Kazam 114

GNOME Screenshot 115

Kazam 115

Summary 117

Chapter 4:​ Enjoying Media and Other Entertainment 119

Play DVDs and Media Files 119

Organize Your CD and Digital Music Collection Using Rhythmbox 122

Copy Audio CDs to Your Computer 124

Listen to Podcasts 126

Back Up and Create Music CDs Using Brasero 127

Backing Up a Music CD 127

Burning a Disc Image to Blank Media 128

Creating a Music CD 128

Create Video DVDs Using DeVeDe 129

Organize and Edit Your Photos Using Shotwell 132

Importing Photos 133

Managing Events 134

Working with Photos 134

Editing Photos 134

Sharing Photos 136

Advanced Photo Editing Using GIMP and Darktable 136

Record and Process Audio Using Audacity 138

Play MIDI Files 139

Explore the Universe Using Stellarium 139

Play Legacy PC Games 143

Purchase Legacy Games from GOG.​com 143

Run DOS Games and Software Using DOSBox 144

Play Adventure Games Using ScummVM 145

Play Commercial Games Using Steam 146

Summary 147

Chapter 5:​ Command-Line Tricks and Applications 149

Introduction to the Command Line 149

Accessing the Command Line 150

The Ubuntu Command Line 151

Working with Files and Directories (Folders) 151

Running Commands 153

Redirecting Output 154

See What’s Running on Your Computer 154

Multitask on the Command Line 156

Diagnose a Connection to a Server 158

View Information about the Operating System 159

Determine Your Distribution and Version 160

Determine your Architecture and Kernel Version 161

Add New Users via Command Line 161

Check Your Disk Space 163

Edit Text Files 164

Read Email 166

Browse the Web 168

IRC 172

Connecting to a Server 173

IRC Etiquette 174

Play Text-Based Games 174

Summary 177

Chapter 6:​ Power User Tools 179

Managing Running Processes 179

Managing Disks and Thumb Drives 182

Using Multiple Workspaces 183

Installing Alternate Desktop Environments 186

Installing Software from the Command Line 189

Understanding Ubuntu’s Software Collection 190

Keeping Software Up to Date 190

Searching for Software 191

Installing New Software 192

Removing Software 193

Expand Your Software Options 193

Creating Application Launchers for Programs 196

Working with Virtual Machines 197

Creating a Virtual Machine 198

Running Your Virtual Machine 200

Installing Guest Additions 201

Recommended Uses 202

Summary 202

Appendix A:​ Ubuntu Releases 203

Release Schedule 203

Long-Term Support 203

List of Ubuntu Releases 204

Appendix B:​ The Future of Ubuntu 205

Phones 205

Snappy 207

Ubuntu Personal 209

Summary 209

Index

Contents at a Glance

About the Authorxv

About the Technical Reviewerxvii

Acknowledgmentsxix

Introductionxxi

Chapter 1:​ Installing Ubuntu 1

Chapter 2:​ Getting Started with Ubuntu 51

Chapter 3:​ Productivity at Home and Work 79

Chapter 4:​ Enjoying Media and Other Entertainment 119

Chapter 5:​ Command-Line Tricks and Applications 149

Chapter 6:​ Power User Tools 179

Appendix A:​ Ubuntu Releases 203

Appendix B:​ The Future of Ubuntu 205

Index211

About the Author and About the Technical Reviewer

About the Author

Nathan Haines

is an author, instructor, speaker, and computer consultant who fell in love with Ubuntu in 2005, and helped found the Ubuntu California Local Community Team to share that excitement with others. As a current leader of the Ubuntu California Local Community team and a member of the Ubuntu Local Community Council, he works to help others share Ubuntu worldwide.

He got started in IT support during high school, when he got an after-school job helping the campus technician and later worked over the summer at his high school, then his school district, and finally at his college, learning technical writing along the way. He later taught computing classes to professionals and worked his way up to the highest levels of technical support and consumer service.

When not working with computers, he’s more than likely admiring the latest Nintendo hardware, wishing he had more time for retro console and PC gaming, and indulging in linguistic curiosity by studying German or dabbling in Old English or Tolkien’s constructed Elvish languages. The queue of sci-fi and fantasy books on his Kindle is probably growing instead of shrinking, although sometimes camping trips help with that.

Despite a knowledge of HTML that was forged in 1995 with Internet Explorer and Netscape Navigator 2.0, Notepad, a lot of browser refreshing, and stone knives and bearskins, he manages to keep a web site online that is standards-compliant but always in need of updating at http://www.nhaines.com/ .

As a hybrid author who enjoys stiff drinks, moonlit walks on the beach, and five-star Amazon reviews on his books, he would love to hear from you at nathan@nhaines.com or nhaines@ubuntu.com.

About the Technical Reviewer

Jess Bermudes

is a software developer who, like most college kids, experimented with wacky things, in this case Linux operating systems. After being introduced to Ubuntu in 2007 and quickly letting the power of root go to his head, he joined the Ubuntu California Local Community Team to help them show others the fun and power of computing with Free Software.

His interests span the entire field of computing, dabbling in areas such as robotics, game development, and computer-assisted learning. With this background he works as a freelance consultant developing custom software solutions at both the high and low levels of programming, building the systems needed to bootstrap startup companies.

In addition to his work with the Ubuntu California Team, he also volunteers with the Southern California Linux Expo helping the A/V team develop the systems required to record and stream the conference talks.

© Nathan Haines 2015

Nathan HainesBeginning Ubuntu for Windows and Mac Users10.1007/978-1-4842-0608-9_1

1. Installing Ubuntu

Nathan Haines1 

(1)

CA, US

All things considered, installing an operating system should really be difficult and arcane. It controls your computer. After starting everything up, it loads the drivers, runs every program, orchestrates how software and hardware work together, provides the computer user interface, and determines how you will work with your machine.

But it’s not.

Those days are over. Long gone are the days when you’d have to feed the computer the Initial Program Loader from punch cards, paper tape, or magnetic tape. Flicking front-panel switches to input a bootstrap program is another forgotten ghost of computing history. Searching for driver disks to have on hand to support your new graphics or sound card mostly isn’t necessary anymore. Even just watching the monitor so you know when to swap to the next installation floppy or CD is a distant memory. Today, you insert a DVD or USB drive with the installer, boot up the computer, and away you go. Installing a modern operating system is done using the same pretty, graphical interface as the end result.

Ubuntu is like Windows 10 and OS X in that the installation media contains a comprehensive set of drivers for most hardware devices found in a common home computer, and computers have enough storage space that the installer will set up a basic running system with a standard configuration. After everything’s set up, you can make changes, but everyone gets the same starting point. This makes installation fast: a standard image can be installed to the hard drive. It also makes installation easy: other than language, region, time, and user information, once the installer knows where to install the OS, it doesn’t need any information to start installing. And if you have an active network connection, it guesses at the region and time settings, too.

No, Ubuntu can be installed in 20–30 minutes, depending on how fast your disks are, and if you run the installer after clicking “Try Ubuntu” from the installation media, you can even browse the Web or play Solitaire or Mines while you wait.

There are a lot of ways to install Ubuntu, so this chapter will make some assumptions. The first is that you are using the latest long-term support release of Ubuntu, which is 14.04 LTS. The second is that you are installing Ubuntu from a DVD or a USB drive that was at least temporarily dedicated to holding the Ubuntu installer. These same assumptions will be made throughout the entire book. If you are new to Ubuntu, this will provide a stable, reliable starting point as you become familiar with Ubuntu.

This isn’t the only way to experience Ubuntu. Newer versions such as Ubuntu 15.10 will have more up-to-date software and minor enhancements, but will require updating to Ubuntu 16.04 LTS no later than July 2016. Ubuntu 14.04 LTS is supported until April 2019. Ubuntu has quite a few flavors such as Kubuntu and Xubuntu, which keep the core Ubuntu system and replace the default interface and applications to offer a different experience. All of the applications described in this book will be available and run fine on any Ubuntu flavor, but much of Chapter 2 will no longer apply because these different interfaces have varying features and distinct workflows. There are ways to add additional desktop environments to an existing Ubuntu install and gain the benefits of a flavor, and this is explained in Chapter 6. But if you later find that you prefer a different flavor of Ubuntu, you can install it from scratch. This will give you a cleaner, simple base that’s built around your favorite interface and you can still install any additional software you need.

This chapter guides you through the basics: preparing to install Ubuntu 14.04 LTS, performing the actual installation, and optionally switching to more advanced graphics drivers—in case you need them for gaming or additional monitor support. The remainder of the chapter will offer a brief look at additional Ubuntu flavors, giving you an idea of the differences you can expect with those interfaces during installation and daily use.

Preparing to Install Ubuntu

The first thing you’ll need to do is to download and prepare installation media for Ubuntu. These are usually distributed as DVD images, but you can also prepare a USB drive as well. Installation DVDs are much easier to create than USB keys, and sometimes you will receive a copy of Ubuntu with a book, from a library, from a friend, or from a local Linux User Group or Ubuntu Local Community team. If you have any trouble with this chapter, these are very useful resources to search for. The following steps are geared toward Ubuntu, but generally apply to the other flavors of Ubuntu as well.

System Requirements

Ubuntu is available for both 32-bit and 64-bit computers, and you should install the 64-bit version if your computer will run it. You will also need a computer that has 3D graphics acceleration although most computers have this feature built in.

In order to install Ubuntu, you will need to have at least 6.5 GB of hard drive space available. That said, 20 GB is a more comfortable amount to allow for additional software and storage for your own content. You’ll also be happiest with a computer that has at least 2 GB of RAM, although 1 GB should also be usable with 32-bit installs.

You can download the Ubuntu installer from http://www.ubuntu.com/download/ . It will be in the form of a DVD image with an .iso file extension.

Creating an Ubuntu DVD

If you want to install Ubuntu from a DVD, insert a blank DVD into your computer. In Windows you can right-click on the downloaded file and choose the menu option that says “Burn disc image” to move the installer to a blank DVD. In Ubuntu, right-clicking the file and choosing “Write to Disc…” will accomplish the same thing. On either OS you will want to make sure to check the “verify” option before burning the DVD, to guard against disc burning errors.

On OS X, you can run Disk Utility, then drag the downloaded file to the left pane where your hard drives are listed. Click on the Ubuntu ISO and click on the Burn icon in the toolbar, and the installer will be moved to the blank DVD. Make sure to enable the option to verify the burned disc.

Once the disc is burned, you’ll be ready to use it to start Ubuntu on your computer. Use a felt-tip pen to label the disc “Ubuntu 14.04.3 LTS,” with an accurate point release number if you downloaded a later version, and add “32-bit” or “64-bit” as appropriate. With this DVD, you can run Ubuntu straight from the disc, which is a great way to demonstrate Ubuntu on a friend’s computer without changing it, or to do basic computing on a computer that has malware or viruses installed or is having trouble booting up. This makes it much more useful than a simple install disc, so you may want to keep it in a safe place so you can use it or lend it to friends in the future.

Creating a Bootable Ubuntu USB Drive

Preparing a USB drive to install Ubuntu is a lot more complicated, but if you want to install Ubuntu from a USB drive, you will need a drive with at least 1 GB free, formatted with the FAT32 file system. The completed drive will be identical in functionality to an Ubuntu DVD, although some drives can be configured with “persistence,” which means that settings changes and files will be saved to the USB drive for next time.

Windows

On Windows, you’ll need to download a special utility to copy the installer to the USB drive. You can download the Universal USB Installer from http://www.pendrivelinux.com/ . This site contains step-by-step instructions with screen shots that you can refer to, but the basic steps are to run the program, choose Ubuntu 14.04 LTS from the drop-down list, and select the ISO you would like to copy. If it’s in the same directory as the utility there’s a good chance it will be automatically selected it. Choose your USB drive’s drive letter and click “Create.” Be very careful to choose the right drive letter because if you choose your system disk, it can make your system disk unbootable.

OS X

On OS X, you will need to use the command line to convert the ISO file into a disk image, identify the internal device name, and copy the disk image over. This will destroy or make unrecoverable all data on the target disk, and it is easy to accidentally target the wrong disk, so consider burning a DVD instead and creating a USB drive using Ubuntu.

Once you download the Ubuntu ISO, go to Applications, then Utilities, and open Terminal. This will open a command-line interface where you can type commands directly to the computer. Type the commands exactly as indicated, including upper and lowercase letters. You should substitute the bold text to match your computer’s settings.

The first thing you will need to do is to convert the ISO file to a disk image IMG file. To do this, you will type:

hdiutil convert -format UDRW -o ∼/Downloads/ubuntu-14.04.3-desktop-amd64 .img ∼/Downloads/ubuntu-14.04.3-desktop-amd64 .iso

You may need to change the location or the filenames if you saved the ISO outside your Downloads folder or if you downloaded a 32-bit version of Ubuntu or a version other than 14.04.3 LTS. This step may take a long time. Once hdiutil is finished, the next step is to determine the device name of your USB drive. This is extremely important. First, you’ll run diskutil to list all attached drives:

diskutil list

Then, connect your USB drive to your Mac and run the same command again. You’ll see an extra disk listed, and that will be the name of your target disk, in the format /dev/disk2. The actual name depends on what drives are connected and the order of connection since the computer was started, so you’ll need to repeat this step again each time you create a USB drive with Ubuntu. Next, you want to unmount the USB drive so that OS X doesn’t try to use it while you’re copying the disk image you created. Run the next two commands, substituting the IMG file you created above and the drive name you found with diskutil.

diskutil umountDisk /dev/diskX

sudo dd if= ∼downloads/ubuntu-14.04.3-desktop-amd64 .img of= /dev/diskX bs=1m

diskutil eject /dev/diskX

Tip

Replacing “disk” with “rdisk” in the command above can greatly increase the speed of the command because of the way the disk is accessed. But if you’re only making one USB drive, I’m a big fan of “slow and steady.”

The sudo dd command will take several minutes to complete, because it copies the disk image directly to the USB drive. Once all of the commands finish, you have a USB drive that can be used to run or install Ubuntu.

Ubuntu

On Ubuntu, even if you are running it from a DVD or USB drive, open the Unity dash and search for “Startup Disk Creator.” Chose an inserted disc or ISO and then select a USB drive from the list, and click “Make Startup Disk” to create a bootable USB drive. Any inserted disc or ISO located in the Downloads folder will be listed automatically. If the “Make Startup Disk” option is grayed out, you may need to use a different USB drive or delete some files to clear enough space.

Due to a change in the disk images, Ubuntu 14.04 LTS discs or ISOs should only be created while running Ubuntu 12.04 LTS through Ubuntu 14.04 LTS, and discs or images for Ubuntu 14.10 and later should be created from Ubuntu 14.10 or later.

Booting into Ubuntu

Every computer’s startup process is different. It is determined by the computer manufacturer, but more specifically by the motherboard manufacturer. When a computer turns on, it runs special software that’s built into the motherboard. Traditionally this was called the BIOS, but most computers built today use UEFI.

On any Mac, insert the disc or USB drive, turn on the power, and hold down the Option key until you see a list of drives. Choose your Ubuntu media with the mouse or arrow keys, and continue booting.

On other computers, you will need to configure the BIOS or UEFI to boot from your disc or USB drive. There is no standard way of doing this, so you may need to consult your manufacturer’s documentation for instructions. First, insert the disc or USB drive into your computer, then turn it on. You can usually watch the startup screen for messages such as “Press <ESC> for startup menu,” “F9 to change boot device,” “F12 Boot Menu,” or something similar. These will let you choose a device to boot from for the current boot only. You only have a couple of seconds to press the key, so plan to let the computer boot at least twice for you to be able to locate and read the message. If your installed OS begins to boot, let it finish before restarting the computer, then use the OS’s shutdown feature. If your computer has no OS, then you can simply reboot at any time.

The other option you have is to change the boot search order in your BIOS or UEFI configuration. This will change your settings until they you change them again, and may be the only way to choose a different boot device. For this you want to search your startup screen for messages like “DEL to enter BIOS” or “F10 to enter setup.” You should be able to find a boot options or advanced menu with a boot order option. You’ll want to move your boot device type to the top or front. Sometimes USB drives are only listed if they are plugged in when the computer turns on. Once you have changed the startup order, follow the onscreen instructions to save your changes and boot or exit the configuration.

When your computer reboots, you will know that you were successful if you see a solid color screen with a simple icon at the bottom, as shown in Figure 1-1.

Figure 1-1.

This is the Ubuntu bootloader screen. It means your computer has booted from your installation media

The icon means that pressing any key on the keyboard will allow you to set up various accessibility options. If no keys are pressed for five seconds, the bootloader starts Ubuntu in English and will ask whether you want to install Ubuntu or just try it out. If you already know whether you want to install Ubuntu or try it without installing, pressing the spacebar can speed the final startup process.

Pressing the spacebar (or any other key) will prompt you for a default language for your Ubuntu experience and then allow you to choose other accessibility and startup options (see Figure 1-2). F5 can be used to activate high-contrast themes or a screen reader.

Figure 1-2.

From the bootloader you can choose your language and other startup options

You can also use this menu to verify your installation media or test the computer’s RAM for errors. Both are useful troubleshooting tools if anything goes wrong during installation. The last option is useful if you changed your boot settings and accidentally booted from the Ubuntu installer instead of your computer’s hard drive. It should hand control back over to your installed operating system without booting the Ubuntu installer.

Installing Ubuntu

Ubuntu 14.04 LTS is the flagship of the Ubuntu project. Powerful and stable with an elegant user experience, this is where you should start if you have never run Ubuntu or Linux before. It features the Unity desktop interface, LibreOffice, and Thunderbird, and is a suitable replacement for Windows and OS X in most casual desktop computer use.

Beginning the Install

Ubuntu will show a splash screen while it boots, and then you will see a welcome screen. This is the first step of the Ubuntu installer, and one of only seven screens you will have to interact with to install Ubuntu on your computer. On the left hand side of the installer is a list of languages. From here you can easily choose the language you are most comfortable with and interact with Ubuntu in that language for the rest of the session. If you install Ubuntu, it will be installed in the language you choose on the welcome screen (see Figure 1-3).

Figure 1-3.

On the Welcome screen, you can easily pick a system language and try or install Ubuntu at your leisure

The first option, Try Ubuntu, will run a desktop interface with most of Ubuntu’s features present. Software updates are disabled at first, but you can run the default selection of programs and try out the Unity interface without installing it on your computer. This is a fantastic way to see if Ubuntu is compatible with your computer’s hardware and also allows you to try out newer versions of Ubuntu or different flavors before you upgrade. The second option, Install Ubuntu, will begin the installation process.

If your computer has an active Ethernet connection, Ubuntu will try to use it to connect to the Internet. But if your computer has a supported wireless network card, Ubuntu will display available a list of available networks that you can choose to connect to (see Figure 1-4). While your installation media has all of the software necessary for a complete installation, if you connect to your home network from here, the installer will download certain updates from the Ubuntu servers, and it will also remember your connected wireless network on your newly installed system. Once you have decided on your network settings and click “Continue,” you’ll see the system requirements for the installation.

Figure 1-4.

Ubuntu will help you connect to the Internet and can download additional updates while installing

The most important requirement is disk space. The installer will tell you if each condition was met, but you can still continue even if the laptop is on battery power or if there is no Internet connection. The installer will install a basic, complete Ubuntu system, and you won’t have to choose various software packages during install. However, there are two optional choices that you can make on this screen that can install additional software.

The first option is “Download updates while installing.” This doesn’t update the entire system, but does update core software related to the install process to help ensure that the install process goes smoothly.

The other option is “Use this third-party software.” By default, Ubuntu is composed of software that is licensed with either a Free Software or Open Source license. This means that anyone can redistribute every component under relatively well-known terms. But occasionally some proprietary software is needed for a working computer system. Software with proprietary licenses cannot always be redistributed. Many Linux users are sensitive to using proprietary software for a variety of philosophical and practical reasons. For instance, some hardware requires special drivers or firmware that is not available in source code form. This prevents them from being studied and improved upon by the community if they find any bugs or security issues. Sometimes this can be a minor inconvenience, such as when the system libraries for MP3 playback were patent encumbered. Canonical purchased a distribution license to include MP3 libraries in Ubuntu, but the license has restrictions on its source code. Other times the lack of freely distributable software can cause frustration, such as when firmware for a wireless network card can’t be included. Binary-only network card firmware can be a security vulnerability because you don’t know what the card is doing. On the other hand, if you have a laptop that needs wireless communication, then you may need the binary firmware anyway.

Software such as MP3 libraries, Adobe Flash for Firefox, and certain video and audio codecs can be added after Ubuntu has been installed, but most new users expect this software to be included in a “complete” desktop operating system, so Ubuntu allows users to automatically install a small selection of non-free software. The software doesn’t cost any additional money for you because Canonical has taken care of all licensing concerns, so it is a good idea to select the checkbox if you aren’t familiar with these issues. If you want to minimize the proprietary software installed on your computer, however, feel free to leave it unchecked. You can still add software support on a case-by-case basis later.

The next screen lets you choose how you want Ubuntu to be installed on your computer’s hard drive (see Figure 1-5). If you are installing on a new computer or you want to completely replace the existing operating system, the answer is simple. Choose “Erase disk and install Ubuntu,” and your hard drive will be partitioned, formatted, and dedicated to Ubuntu automatically.

Figure 1-5.

Installing Ubuntu on a new computer is automated, but advanced formatting is also possible

If your computer has an operating system already installed and you would like to keep it, then it should be detected here. You may have an option “Install Ubuntu alongside Windows 8,” for example. This will allow you to shrink the space allocated to Windows 8 and create dedicated space for Ubuntu using a simple graphical slider. But there may be problems with computers that contain extra disk partitions for recovery or factory reset data that prevent Ubuntu from adding a new partition. And sometimes Ubuntu may not detect other installed operating systems. These scenarios will be dealt with at the end of this chapter, in the section Multiple Operating Systems. For now, be aware that unless Ubuntu offers an “install alongside” option, other operating systems and data will be lost unless you use the “Something else” option.

Two optional settings are available when choosing to erase the drive and install Ubuntu. “Encrypt the new Ubuntu installation for security” sets up full-disk LUKS-based drive encryption. With this setting, a small unencrypted boot partition is created for the Linux kernel and bootloader, and the rest of the drive is encrypted and Ubuntu installed on this encrypted portion. This provides strong protection against data theft from a lost or stolen computer or hard drive by requiring a separate password to unlock the Ubuntu partition each time the computer boots.

The other option, “Use LVM with the new Ubuntu installation,” enables Logical Volume Management, which is a system to allow a computer to deal with disk storage in a more flexible way. This advanced option allows experienced system administrators to use one disk to mirror another, or to store data across multiple disks as though they were one large drive. This is traditionally used on servers more than desktops. Choosing this option will automatically configure a working system, but this book doesn’t cover LVM usage.

The installer has seven screens, but the button at the bottom of this one says “Install Now.” When you finish this screen, Ubuntu will repartition your hard drive and begin copying Ubuntu to your disk while you finish answering the install. This helps to shorten the install time, but it also means that this is the point at which you commit to the install. Clicking “Quit” now will bring up the Ubuntu desktop from the disc and can start the installer again in the future. Clicking “Install Now” will cause a delay that can take from a few seconds on a blank hard drive to a couple of minutes if Ubuntu needs to resize existing partitions and file systems. When it has applied the partition and formatting changes to the hard drive, the next screen will appear.

Setting Regional Settings

The next screen asks for your location so that it can set your time zone. You can either click directly on the map or type your location into the text field (see Figure 1-6). The map will update your location to the major city nearest to your click and highlight your time zone. Typing a city or location name into the text field will bring up a list of matches from Ubuntu’s time zone database. This information not only sets your current time, but also applies any applicable Daylight Savings Time or Summer Time rules for your locale. Your time zone information is updated periodically along with other Ubuntu updates as your local legislation changes.

Figure 1-6.

Ubuntu customizes itself based on your location and preferred language

Next you can set your keyboard layout. The default selection is selected based on the language you chose on the installer’s first screen (not the location on the previous screen), so it’s quite likely that you won’t need to make any adjustments. If your keyboard doesn’t match the installer’s selection, then you can either select it from the list or click on “Detect Keyboard Layout” and type a series of keys that will help Ubuntu narrow down the list of likely candidates for you. This shows characters in several different languages before asking some additional yes or no questions and should help you find something that matches your physical keyboard layout. Once you have made a selection you can test your keyboard settings in the text field before clicking “Continue.”

Creating the Primary User Account

The only other information that Ubuntu will need from you during the installation is all about you. This is the last installer screen, and you’ll enter your name, the name you want to give to your computer, your account username, and a password (see Figure 1-7).

Figure 1-7.

On the last installer screen you will set up your user account and computer name

Your name will appear on the computer’s welcome screen when it boots and can contain any supported character. The computer name will also be shown on your local area network, but it can only consist of Latin letters a–z, dashes, and numbers. Your username will be the actual name of the user account your computer uses to identify you and name your personal storage folder. Your password will log you into the computer and should be something secure and unique.

Tip

Choosing a good password is a matter of balance. On the one hand, a password should be secure, but on the other hand you will be typing it in daily. A good way to strike a balance between security and convenience is to pick a passphrase. This can be something simple like “grandmother’s rhubarb pie.” This is very easy to remember, yet very difficult for a computer to guess because it is so long. “Rhubarb” would be guessed almost instantly because it is a dictionary word, and “rhubarb pie” would take about 12 years for a desktop computer to guess by brute force at 4 billion guesses per second. But “grandmother’s rhubarb pie” would take that same desktop computer one septillion (1,000,000,000,000,000,000,000,000) years to crack. Feel free to throw in a number or symbol or two as well, but don’t worry about making something hard for humans to read. A short password of numbers and symbols is trivial for a computer to guess. Just remember to stay away from famous quotes or proverbs.

A password is required for system security, but if you will be the only one using your computer, you may want to log in automatically. You can choose this setting and once booted, Ubuntu will log you in and go straight to the computer desktop when your computer is turned on. If you require your password to log in, however, this will allow you to encrypt your home folder. This means that all of the files stored in your personal storage folder will be encrypted and unreadable when you are not logged in. For security-minded persons, the virtual memory area on disk is also wiped and encrypted when you choose this, but your files are accessible to the system and any simultaneously logged-in user while your account is logged in. This is an extremely efficient way to keep your files safe if your computer or hard drive is ever stolen.

Once you answer these last questions, Ubuntu can finish the installation with no further input from you. The entire process usually takes about 20 to 30 minutes in total, depending on your computer and disk speed. A slideshow explaining some of the features of Ubuntu is presented while you wait (see Figure 1-8), and if you had chosen to try Ubuntu and ran the installer from there, this is where you could sit back and browse the Web or play a game such as solitaire.

Figure 1-8.

Ubuntu displays an overview of major features while it installs

Once the install process is finished, the installer will display a window saying that the installation is complete and you can restart your computer. When you are ready to restart, Ubuntu will shut down and then wait for you to remove the install disc or USB drive from the computer and press Enter. Then it will reboot your computer and boot into Ubuntu. Your installation is now complete, and you are ready to proceed to Chapter 2.

Install Proprietary Graphics and Network Drivers

Ubuntu is powered by the Linux kernel and has excellent hardware support. A hardware driver is special software that communicates between the operating system and a specific hardware component of a computer. They are usually designed so that a program can tell the operating system something generic like “I want to play this sound file,” and the operating system uses a software library to decode the sound format and then uses a sound driver to play it on the computer’s sound card. The driver is written to work closely with the operating system so that the driver and not the rest of the software handle the hardware details.

Because of this interface, most drivers become an extension of the operating system. In Ubuntu and other Linux-based operating systems, drivers are written as kernel modules that can be either baked into the kernel or loaded on an as-needed basis, saving memory. It is this close relationship that leads to a practical and philosophical dilemma.

Some hardware is easy to support. Most hard drives, CD-ROM drives, and USB drives, for instance, communicate using the basic ATAPI protocol. Therefore the same generic driver supports all of these devices and is easily maintained. Other hardware such as video cards and network cards are more difficult. Two video cards from the same manufacturer may work in completely different ways, and many wireless network cards require the computer to send their firmware to the network card every time they are powered on. In these cases, driver support can depend on the manufacturer.

When a driver is licensed under a Free Software or Open Source license, it can be examined, maintained, and improved by the developer community. This is important because it helps to ensure compatibility when new versions of the Linux kernel become available, and it ensures that any security issues or bugs can be addressed in a timely fashion once discovered. Some manufacturers only provide proprietary drivers for various reasons. These drivers are usually precompiled and can only be used as-is. This makes it difficult or impossible to inspect the quality of the drivers or provide fixes to problems—leaving your computer’s performance and safety in the hands of the manufacturer. Therefore, Ubuntu installs freely licensed drivers whenever possible. However, some hardware has no free alternative or has both free and proprietary drivers. For this situation, Ubuntu provides a tool to make installation simple.

After Ubuntu is installed on your computer, you can run “Additional Drivers” by searching for it from the Dash. To access the Dash, press the Super key on your keyboard or click the Ubuntu icon on the Launcher at the left edge of your screen. Additional Drivers searches your computer for hardware that has proprietary drivers available from Ubuntu and presents a list of devices and available drivers. Some drivers are optional, and others are required to use a device. For example, Figure 1-9 shows an AMD graphics card that has a free driver, and two proprietary ones. The free driver was installed by default and may not work as efficiently or support all of the features of the AMD card. The proprietary driver is provided by AMD but is unlikely to see major improvements in Ubuntu 14.04 LTS. The Broadcom network card does not have a free driver available and will be nonfunctional without the proprietary driver.

Figure 1-9.

Additional Drivers displays available and in-use drivers and simplifies installation

Providing a choice between drivers allows Ubuntu users to choose whether they are comfortable using proprietary software that cannot be reviewed or improved Ubuntu developers. This tool also installs the proprietary drivers in a manner that ensures they will continue to be loaded when Ubuntu’s Linux kernel receives updates.

Sometimes hardware that was manufactured after a specific Ubuntu release will require drivers to be downloaded directly from the manufacturer. Because this is most common for video cards and can be important for gamers, the general process for both AMD and Nvidia graphics cards is outlined below.

Caution

While the following instructions were valid at the time of writing, you should read all release notes and double check the instructions provided with the latest version of the drivers downloaded from the manufacturer to ensure compatibility. Make sure your files are backed up before installing drivers manually—broken graphics drivers may leave you without a graphical interface!

Manually Install AMD Graphics Drivers

AMD provides drivers for its Radeon line of graphics cards. Named AMD Catalyst, it contains both drivers and a software utility for configuring various settings graphically. The drivers must be partially compiled to ensure compatibility with the specific Linux kernel being run on the computer. This can make installation complicated, and requires interaction with Ubuntu’s command-line interface. The installation can be broken down into three steps: downloading the driver, preparing for installation, and the installation itself.

Downloading the AMD driver

First, go to the AMD website at http://www.amd.com/ . The exact download location is subject to change, but you can look for a navigation heading similar to “Drivers + Support” and choose “Linux (32-bit & 64-bit)”. This will bring you to the AMD Catalyst download page. On the line that says “AMD Catalyst™ 15.7 Proprietary Linux x86 Display Driver,” click on download. Note that Ubuntu 14.04 LTS support was added in the 14.6 version of the driver, so be sure to download that version or later.

The driver will be saved in your Downloads folder as a zip archive. Open Files and navigate to your Downloads folder, then right-click on the installer archive and choose “Extract Here.” This will decompress the installer into the same folder.

Preparing for installation

The actual installation must be done with the command line, so open the Dash and run Terminal. Once the terminal is open, you should navigate to the folder with the installer. This should be as easy as typing:

cd ∼/Downloads

and pressing Enter.

Next, you will need to make sure that DKMS and some other software development tools are installed. DMKS will automatically recompile the driver whenever you install a new version of the Linux kernel, for example, during an operating system update, and the other software will allow the driver to be compiled successfully. To do this, simply type:

sudo apt install dkms dh-make dh-modaliases execstack libc6-i386 lib32gcc1 xserver-xorg-dev

and press Enter. You will be prompted for your password, which you should type and press Enter. For security purposes, your password will not be echoed back as you type. The apt tool will recommend extra packages and ask for confirmation. Press Enter to confirm the installation and Ubuntu will automatically download and install the software you need, displaying a progress bar at the bottom of the screen. Once the software is installed, type the following:

sudo chmod +x amd*.run

This will allow the installer to be run. Then you can run the AMD installer by typing:

sudo ./amd-driver-installer-15.20.1046-x86.x86_64.run --buildpkg Ubuntu/trusty

Because the file name will need to be exact, you can type “./amd” and press Tab and the file name should be filled in for you. Then you can add the rest of the command listed above. Press Enter to run the installer. The installer will perform some setup and then begin compiling the graphics driver. This can take a few minutes, but once it is finished, you will have three Debian packages that are ready to be installed on your computer. If the installer offers to automatically install the drivers, you can follow the on-screen instructions. If you do not install the drivers automatically, you can proceed to the next section.

Installing the driver

The three packages containing the AMD graphics drivers will need to be installed at the same time, so we’ll continue using the command line to perform the installation. In the same directory as before, type:

sudo dpkg -i fglrx*.deb

When you press Enter, the drivers will be installed. Next, you can configure Ubuntu to use the new drivers by running:

sudo amdconfig --initial

You can now reboot your computer and the driver should be in use. You can verify this by opening a terminal and typing:

fglrxinfo

If the proprietary AMD graphics driver is in use, you will see a message displaying information about the card, otherwise you will see the message “Error: unable to open display (null). If you need to make advanced changes to your graphics settings, you can do so by running the AMD Catalyst Control Center. To actually change your configuration you will need to run it by opening a terminal and typing:

sudo amdcccle

Manually Install Nvidia Graphics Drivers

Nvidia provides drivers for its GeForce line of graphics cards. The drivers must be partially compiled to ensure compatibility with the specific Linux kernel being run on the computer. This can make installation complicated, and requires interaction with Ubuntu’s command line-interface. The installation can be broken down into three steps: downloading the driver, preparing for installation, and the installation itself.

Downloading the driver

First, go to the Nvidia GeForce website at http://www.geforce.com/drivers . Under Manual Driver Search, choose your card type and operating system (either “Linux 32-bit” or “Linux 64-bit”) and click “Start Search.” After the site searches for the drivers, it will display a link under the heading Results. Click the result to go to the download page, and click the “Agree & Download” button.

The driver will be saved in your Downloads folder as a script ending in “.run.”

Tip

If you don’t know your card’s model, opening a Terminal window and running “lspci | grep VGA” may display the hardware model. If not, check the documentation that came with your computer.

Preparing for installation

The actual installation must be done with the command line, so open the Dash and run Terminal. Once the terminal is open, you should navigate to the folder with the installer. This should be as easy as typing:

cd ∼/Downloads

and pressing Enter.

Next, you will need to install some software development tools to compile the driver. To do this, simply type:

sudo apt install build-essential

and press Enter. You will be prompted for your password, which you should type and press Enter. For security purposes, your password will not be echoed back as you type. The apt tool will recommend extra packages and ask for confirmation. Press Enter to confirm the installation and Ubuntu will automatically download and install the software you need, displaying a progress bar at the bottom of the screen.

Once the software is installed, you need to remove and disable software that will conflict with the proprietary GeForce driver. To do this, type:

sudo apt purge nvidia-glx nvidia-glx-legacy nvidia-glx-new nvidia-settings

Press Enter to remove the software if necessary. Ubuntu may report that some packages could not be found. This is okay because it means they weren’t present on the system. Then, you will need to prevent the free drivers from being installed. To do this, type:

sudo gedit /etc/default/linux-restricted-modules-common

and press Enter. A text editor will appear. Find the line that starts with “DISABLED_MODULES” and replace it or if the file is empty, simply type in the following:

DISABLED_MODULES="nv nvidia_new"

Save the file and close the text editor.

Installing the driver

Now you are ready to install the drivers. Before continuing, you will need to disable the graphical display. To do this, first press Ctrl+Alt+F1. Your monitor will go dark and after a couple of seconds you will see a text-based login prompt. Type in your username and press Enter, then type your password and press Enter again. Your password will not be echoed back to the screen for security purposes. The graphical interface is still running in the background, so at the command line you should type:

sudo service lightdm stop

Ubuntu will ask you for your password. Type it and press Enter. When the graphical interface has shut down you will see “lightdm stop/waiting” and the command prompt again. Next you must switch back to your Downloads folder and prepare the installer to run. At the command prompt, type:

cd Downloads

sudo chmod +x NVIDIA*

To actually begin the install process, type:

sudo ./NVIDIA*

and press the Tab key to complete the rest of the installer name, then press Enter. The installer will walk you through installation of the driver. Once it is finished, reboot your computer by pressing Ctrl+Alt+Del. When your computer restarts, you will be presented with the normal Ubuntu welcome screen. If you need to make advanced changes to your graphics settings once you log in, you can do so by running the Nvidia X Server Settings tool. To actually change your configuration you will need to run it by opening a terminal and typing:

sudo nvidia- settings

Additional Ubuntu Flavors

Ubuntu 14.04 LTS comes in four additional, popular flavors: Kubuntu, Xubuntu, Lubuntu, and GNOME. The steps for creating and booting from each flavor’s installation media are identical to that used for Ubuntu. Once you’ve downloaded the appropriate disc image you can follow the steps listed at the beginning of this chapter. While the look and feel of each flavor is distinct, the installation process is extremely similar.

The following sections walk you through the installation details and provide links for more documentation about the respective flavors.

Installing Kubuntu

Kubuntu is a flavor of Ubuntu that showcases the KDE Plasma desktop environment and its rich ecosystem of software. Sporting a clean, sleek, blue look, the Kubuntu desktop features an efficient desktop that is similar to Windows in a lot of ways but also allows for serious customization options. For this reason, KDE has long been a favorite desktop environment for advanced users.

Kubuntu was the first flavor of Ubuntu to be released. While Ubuntu used to ship with the GNOME desktop environment by default, the software repositories also included KDE and related software. Users could install KDE and choose between that and other desktop environments at login. It was also possible—although a little bit of work—to replace GNOME with KDE entirely. A group of Ubuntu community members who enjoyed using KDE worked together to create a new downloadable disc and installer that would install Ubuntu without GNOME and instead provide KDE and related software right out of the box. Canonical initially sponsored Kubuntu developers directly, but in 2012 they stopped and Blue Systems employed several key developers to continue working on Kubuntu. Canonical still provides the build systems infrastructure used to create and release Kubuntu on the same release schedule as Ubuntu.

System Requirements

Kubuntu is available for both 32- and 64-bit computers, and you should install the 64-bit version if your computer will run it. Kubuntu does not require hardware 3D graphics acceleration although most computer have this feature built in and it makes the desktop animations much smoother.

In order to install Kubuntu, you will need to have at least 6.5 GB of hard drive space available, although 20 GB is a more comfortable amount to allow for additional software and storage for your own content. You’ll also be happiest with a computer that has at least 2 GB of RAM, although 1 GB should also be usable.

You can download the Kubuntu installer from http://www.kubuntu.org/getkubuntu . It will be in the form of a DVD image with an .iso file extension. Once you have this file downloaded, you can create Kubuntu installation media using the instructions found at the beginning of this chapter. You can also find more documentation about Kubuntu and KDE at http://docs.kubuntu.org/ .

Preparing to Install Kubuntu

The Kubuntu installer provides the same options and steps as Ubuntu, as shown in Figure 1-10.

Figure 1-10.

The Kubuntu Welcome page

Using Kubuntu

The Kubuntu desktop is fairly straightforward (see Figure 1-11). The K Menu in the bottom left of the screen will let you search and launch your applications. Unlike the analogous menus in Windows, Ubuntu, and GNOME, the K Menu isn’t launched with the Super key. Instead, Alt+F1 will open the K Menu and you can click a choice or type your search immediately. Running applications will be displayed in the panel at the bottom of the screen.

Figure 1-11.

The default Kubuntu desktop is clean and ready to use or customize

The biggest change with Kubuntu is the desktop style. The KDE Plasma Desktop is built around the concepts of widgets and activities. You can customize your desktop with widgets, which are pieces of functionality that display content and information so that you have it handy at a moment’s glance. The Plasma toolbox—also called a “cashew” because of the icon shape—is available in the top right of the desktop as well as the far right of the default desktop panel at the bottom of the screen.

The default Kubuntu desktop has a Desktop folder widget, which displays any files you have in your desktop folder. You can remove or resize this widget and add more folder widgets as well. Not only can folder widgets show folders on your computer but they can also display folders on remote computers that you have access to. Widgets can provide weather information, webcomics, news, calculators, hardware information, even a web browser.

Activities are ways to customize your desktop for specific kinds of activity or work. Unlike virtual desktops (or workspaces) that simply give you more room to organize your running applications, activities provide independent desktops with completely separate widget layouts. Typically, you might have one activity set up for casual computing, one for work, one for software development, and so on. Each can have its own set of widgets and configuration, and automatically launch specific programs as well. They aren’t active unless you’re using them, so unused activities won’t slow down your computer.

KDE and GNOME both strive to be comprehensive desktop solutions with different design goals. Therefore Kubuntu comes preloaded with KDE apps that integrate more easily into the established look and feel of KDE (see Figure 1-12). For instance, Kubuntu ships Amarok instead of Rhythmbox and Kontact instead of Thunderbird. These applications are more or less equivalent but they do have different features and different workflows.

Figure 1-12.

Kubuntu includes different default applications than Ubuntu. They are just as powerful

Because Kubuntu is simply Ubuntu with a different selection of software, you can install the same applications on any Ubuntu flavor. This means that you can install Amarok on Ubuntu or Thunderbird on Kubuntu. A default install is just a shortcut to a specific type of desktop and workflow. You are never limited to the default choices. In fact, if you prefer the Ubuntu Software Center to KDE’s Muon, you can even install that yourself. They use the same update system internally and will not conflict with each other.

KDE itself has always been famous (or infamous, depending on your perspective) for the sheer number of complex settings you can change. And while the default settings are a great starting point, you can still change most of the behavior (see Figure 1-13). If you find that Unity or GNOME doesn’t fit the way you work, with a little bit of configuration, KDE might be the perfect environment for you.

Figure 1-13.

KDE is loved for its customizability. You can change the window style, animations, and much more

Installing Xubuntu

Xubuntu is a flavor of Ubuntu that showcases the Xfce desktop environment and a variety of lightweight software. Sporting a striking blue and gray theme, the Xubuntu desktop is efficient and appeals to a more classic and minimalistic aesthetic than either Unity, GNOME, or KDE. Xfce is also not as resource intensive as the other desktop environments and is ideal for slightly slower computers or systems without supported 3D acceleration.

In the beginning, Xubuntu emerged as an alternative to Ubuntu that was ideal for slow computers with limited amounts of RAM. While it is no longer the most lightweight flavor of Ubuntu, it still remains a popular choice as a modern but basic computing experience that can easily be added on to.

System Requirements

Xubuntu is available for both 32- and 64-bit computers, and you should install the 64-bit version if your computer will run it. Xubuntu does not require hardware 3D graphics acceleration although most computer have this feature built in and where present it makes the desktop animations much smoother.

In order to install Xubuntu, you will need to have at least 6.5 GB of hard drive space available, although 20 GB is a more comfortable amount to allow for additional software and storage for your own content. You’ll also be happiest with a computer that has at least 1 GB of RAM, although 512 MB should also be usable.

You can download the Xubuntu installer from http://xubuntu.org/getxubuntu/ . It will be in the form of a DVD image with an .iso file extension. Once you have this file downloaded, you can create Xubuntu installation media using the instructions found at the beginning of this chapter.

You can also find more documentation about Xubuntu and Xfce at http://docs.xubuntu.org/1404/ .

Preparing to Install Xubuntu

The Xubuntu installer is nearly identical to Ubuntu’s, but is in the style of the XFCE interface. The slideshow after the final step introduces some of Xubuntu’s features (see Figure 1-14).

Figure 1-14.

The Xubuntu installer’s slideshow gives information and a tour about how to use the interface

Using Xubuntu

Xubuntu’s desktop looks like a simplified version of Ubuntu and GNOME2’s desktop before Ubuntu 11.04 (Figure 1-15). In the top left corner of the screen is the Whisker Menu, which you can open by clicking or by pressing Ctrl+Esc. This is the main application launcher and displays your favorite applications when first opened. You can browse the different categories by clicking on the right side of the Whisker Menu (see Figure 1-16).

Figure 1-15.

The default Xubuntu desktop is functional and light

Figure 1-16.

The Whisker Menu allows you to launch applications, change settings, and shut down the computer

As with most other modern operating systems, you can also type the name of the program you would like to run and the list of applications will be filtered as you type. Right-clicking on an application in the menu lets you favorite or unfavorite it. Your currently running applications are listed to the right of the Whisker Menu icon.

Xfce has less options than the more complex desktop environments because it seeks to stay small and simple. The desktop does have some customization options, which you can quickly access by right-clicking on the desktop and choosing “Desktop Settings” from the pop-up menu. From there you can change the way the desktop behaves as well as remove the default icons that are present.

Many applications will be familiar. The default web browser and mail client are Firefox and Thunderbird, respectively, and they work as well as ever. But other applications are chosen for their efficiency. LibreOffice is not installed by default, but AbiWord provides word processing and Gnumeric provides spreadsheet support. Both read Microsoft Office formats but only Gnumeric supports OpenDocument spreadsheets. Music playback is provided by gmusicbrowser, which manages your music library and also includes a wide variety of interface layouts so you can find one convenient for you, and even make it look like iTunes, Rhythmbox, and many other different music players. Video playback is provided by Parole and instant messaging is provided by Pidgin, which was once the default in Ubuntu.

Additional software is provided by the Ubuntu Software Center, and indeed any software available in the Ubuntu software repositories can be installed and run under Xubuntu.

Xubuntu was once the best way to run Ubuntu on computers that just weren’t up to the task of Ubuntu’s interface and default applications. Today, users who want a comfortable desktop that is simple and minimalistic use Xubuntu as a classic interface that still offers the hardware and software compatibility of Ubuntu.

Installing Lubuntu

Lubuntu is a flavor of Ubuntu that showcases the LXDE desktop environment and a variety of lightweight software. Sporting a refined blue and gray theme, the Lubuntu desktop is a classic desktop that is designed to use as few resources as possible while still providing a contemporary computing experience. While complex web browsing is necessarily memory and processor intensive, any of the local applications are quite efficient.

Lubuntu arose as an even more lightweight option after Xubuntu began adopting more and more GNOME and other heavy applications that made it difficult to run on older machines. Lubuntu now provides one of the fastest and most comfortable experiences for older systems out of all of the various Ubuntu flavors.

System Requirements

Lubuntu is available for both 32- and 64-bit computers, and you should install the 64-bit version if your computer will run it. Lubuntu does not require hardware 3D graphics acceleration although most computer have this feature built in and where present it makes the desktop animations much smoother.

In order to install Lubuntu, you will need to have at least 2.5 GB of hard drive space available, although 15 GB is a more comfortable amount to allow for additional software and storage for your own content. You’ll also be happiest with a computer that has at least 256 MB of RAM, although 512 MB will be noticeably more comfortable. Lubuntu developers also recommend a minimum 1 GB of RAM for systems intended for web usage with complex sites such as YouTube, Facebook, or Google Docs.

You can download the Lubuntu 14.04 LTS installer from http://help.ubuntu.com/community/Lubuntu/GetLubuntu . It will be in the form of a CD image with an .iso file extension. Once you have this file downloaded, you can create Lubuntu installation media using the instructions found at the beginning of this chapter.

You can also find more documentation about Lubuntu at https://help.ubuntu.com/community/Lubuntu/Documentation .

Preparing to Install Lubuntu

The Lubuntu installer’s slideshow is much like Ubuntu’s, with the minimalistic style of the LXDE interface, and the slideshow after the final step introduces some of its features (see Figure 1-17).

Figure 1-17.

The Lubuntu installer’s slideshow provides an overview of the desktop

Using Lubuntu

Lubuntu is a simple desktop that looks very similar to a classic Windows desktop (see Figure 1-18). The panel at the bottom of the screen contains the menu that contains your installed applications, there quick launch icons for the file manager, web browser, and to show the desktop, and your running programs are listed to the right. Lubuntu ships with Openbox as its window manager and uses the older term “iconify” to refer to minimizing a window. Middle-clicking on the show desktop icon will “shade” all windows, which means that the windows will be reduced to only their title bars. Clicking once on a title bar will restore that window. Middle-clicking the desktop background will display a list of all open applications across all virtual desktops. Aside from these charming quirks, the interface should be quite familiar to most computer users.

Figure 1-18.

The default Lubuntu desktop is functional and light

Lubuntu does include Firefox as its standard web browser, but lighter applications replace the standard Ubuntu offerings. Sylpheed is the standard -mail client and it is very fast and responsive (see Figure 1-19). AbiWord and Gnumeric replace LibreOffice for word processing and spreadsheet editing, respectively. A simple but respectable music player called Audacious provides audio queuing and playback, and MPlayer provides video playback. A graphics editor called mtPaint provides a photo and imaging interface straight out of the early 1990s.

Figure 1-19.

Sylpheed e-mail client and PCManFM file manager are fast and powerful

Additional software is provided by the Lubuntu Software Center, and any software available in the Ubuntu software repositories can be installed and run under Lubuntu.

Lubuntu is now the least hardware-intensive flavor of Ubuntu and is a pleasant way to bring new life to computer running older versions of Windows that are no longer supported. With the advantage of modern software and security updates, Lubuntu can keep older computers useful as well as safe.

Installing Ubuntu GNOME

Ubuntu GNOME is a flavor of Ubuntu that ships with a standard GNOME 3 desktop and applications. For users who prefer the GNOME Shell interface, installing Ubuntu GNOME provides an easy way to enjoy a computer experience that is almost 100% GNOME 3.

At the inception of the Ubuntu project, GNOME provided both the default desktop environment and user shell. This relationship continued until the GNOME project decided to focus on a radical new interface for desktop interaction. While Ubuntu and GNOME ultimately pursued different approaches as they work toward their shared goal of moving past the traditional desktop interface, Ubuntu GNOME brings the two back together again.

System Requirements

Ubuntu GNOME is available for both 32- and 64-bit computers, and you should install the 64-bit version if your computer will run it. Ubuntu GNOME does not require hardware 3D graphics acceleration although most computer have this feature built in and acceleration greatly enhances the GNOME Shell experience.

In order to install Ubuntu GNOME, you will need to have at least 6 GB of hard drive space available, although 20 GB is a more comfortable amount to allow for additional software and storage for your own content. You’ll also be happiest with a computer that has at least 1 GB of RAM, although 2 GB will be noticeably more comfortable.

You can download the Ubuntu GNOME installer from https://wiki.ubuntu.com/UbuntuGNOME/GetUbuntuGNOME . It will be in the form of a DVD image with an .iso file extension. Once you have this file downloaded, you can create Ubuntu GNOME installation media using the instructions found at the beginning of this chapter.

You can also find more documentation about Ubuntu GNOME at http://ubuntugnome.org/documentation/ .

Preparing to Install Ubuntu GNOME

The steps for creating and booting from Ubuntu GNOME installation media are identical to that used for Ubuntu at the beginning of this chapter.

Using Ubuntu GNOME

Ubuntu GNOME is very similar to Ubuntu in terms of default software selection, but the user interface is provided by GNOME Shell instead of Unity (see Figure 1-20). The interface is designed to emphasize both simplicity of the interface and working with a single program at a time. This makes GNOME Shell a very unique experience from that of Windows, OS X, or Ubuntu.

Figure 1-20.

Ubuntu GNOME’s desktop looks similar to Ubuntu’s, but behaves quite differently

Pressing the Super key or clicking on Activities in the top right activates the Activities overview (see Figure 1-21). This shows the GNOME Dash on the left, all applications currently open on the active workspace in the middle, and all workspaces on the right. Workspaces is the Ubuntu and GNOME term for virtual desktops and the feature is functionally equivalent. At the top of the overview is the application search and you can search all installed applications on your OS. Clicking the grid button at the bottom of the Dash will display all installed programs one screen at a time for you to search for. Clicking a Dash icon, window thumbnail, or workspace will close the Activities overview and display the item you clicked on.

Figure 1-21.

GNOME Shell’s Activities overview shows the Dash and all applications on the active workspace

The top panel displays the current application’s name and icon. If the application supports GNOME 3, then clicking its name in the top panel will display the application’s menu (see Figure 1-22). The middle of the panel displays the current day of the week and time, and clicking on it shows a calendar and any upcoming appointments. The right side of the panel shows the computer’s status, and clicking on it allows you to adjust the audio volume, log out, or shut down the computer.

Figure 1-22.

The top panel provides the menu for applications with GNOME support

GNOME 3 adopts a user interface philosophy that promotes simplicity. There is no list of running applications on the screen outside of the Activities overview. In some applications, such as the file manager Nautilus, the title bar and toolbar have been combined, and the menu moved to the panel (see Figure-22). The minimize and maximize buttons are also gone. Dragging the window to the top of the screen will maximize a window, and right-clicking on the title bar will allow you to select “Minimize.”

It may seem strange that GNOME 3 would remove such important buttons, but the GNOME Project decided to emphasize using workspaces over managing lots of windows. The Activities overview always creates an empty workspace that you can use to sort your programs. Any program you launch will appear on the current workspace, but you can then drag the window thumbnails in the Activities overview to a different workspace on the right. The Activities overview will initially only show you the programs running in the current workspace (see Figure 1-23).

Figure 1-23.

Workspaces allow you to separate windows by activity

In Figure 1-23, Firefox is running in one workspace, LibreOffice Writer is in another, and the last one has LibreOffice Calc and the GNOME Calculator running in a third workspace. The main advantage of organizing your windows this way is to help you organize your display. If you have a spreadsheet and tools in one workspace, for instance, and Firefox or a game like Solitaire or Mines in another workspace, you can take a break by switching workspaces and when your break is finished you can switch back to a workspace with the windows exactly where you left them.

GNOME 3 also replaces the notification icons in the top panel. When supported applications indicate a new notification, they are placed into the Message Tray at the bottom of the screen. You can either push the mouse against the bottom edge of your desktop or press Super+M to display any new notifications, which are sorted by applications. Clicking the application icon in the tray displays the queued messages.

Ubuntu GNOME provides an alternative desktop environment that contains most of the same applications as Ubuntu but a new and unique interface that tackles a modern computer workflow in a way that is distinct from Ubuntu’s Unity interface. If you prefer this way of interacting with your computer, this is the most convenient and foolproof way to enjoy a GNOME 3 experience.

Installing Ubuntu Server

Ubuntu Server is a special install of Ubuntu that doesn’t include a graphical interface and contains a smaller selection of preinstalled software. This allows the software you do install to make the most of your hardware. Ubuntu Server is one of the most popular server operating systems available, and is very easy to install.

System Requirements

Ubuntu Server is available for both 32- and 64-bit PC-compatible computers, and you should install the 64-bit version if your computer will run it. It is also available for several other architectures as well, including ARM.

In order to install Ubuntu Server, you will need to have at least 1.5 GB of hard drive space available, although 5 GB is a more comfortable amount to allow for additional software and storage for your own content. Ubuntu requires 512 MB of RAM, but the recommended amount of RAM depends heavily on the work you will be doing on the server.

You can download the Ubuntu Server installer from http://www.ubuntu.com/server . It will be in the form of a CD image with an .iso file extension. The steps for creating and booting from Ubuntu Server installation media are identical to that used for desktop Ubuntu.

You can also find more documentation about Ubuntu Server at https://help.ubuntu.com/14.04/serverguide/ .

Installing Ubuntu Server

When you boot the Ubuntu Server installer, you will select a language and then you can choose to install Ubuntu Server on your computer (see Figure 1-24). The Ubuntu server installer will start almost immediately.

Figure 1-24.

Ubuntu Server’s boot menu has extra options for installation, but no “live” mode

On the first page you will choose your language again by highlighting it with the arrow keys and pressing Enter. Ubuntu will be installed in the language you choose on this screen. Next, you will choose your geographical location that defines your locale. Once you have chosen your location, you can choose your keyboard layout. If you have a nonstandard keyboard, you can have the installer attempt to detect it, or you can simply choose it from a list by choosing “No” when the installer asks if you wish to detect your layout (see Figure 1-25).

Figure 1-25.

The language and locale settings are quite similar to the Ubuntu desktop installer

After loading some drivers and installer instructions, the installer will attempt to auto configure the network. Then it will ask you for a hostname for your server, and then ask you how you want to proceed with the network installation. Most servers are set up manually so that their network information doesn’t change, but if you are installing a home server or in a virtual machine you may want to configure the network using DHCP. This will result in your server’s IP address changing from time to time, based on your router’s settings.

Next, the server install will ask for the full name of the user that will have administrative access to the server. Enter your full name, press Enter, and then you can use the suggested username or create a new one. Because there is no graphical interface on the server, you will need to remember the username you enter here. Next, you should enter a password. The last step in setting up the primary user account is to choose whether or not the user’s home directory should be encrypted. This works identically to desktop Ubuntu and is transparent while logged in. After you set a password, the installer will attempt to retrieve the correct time from the Internet and use your public IP address to determine your time zone. You will be asked to confirm the preferred time zone and offered the chance to pick your time zone from a list.

The installer will then begin to load disk partitioning rules and present you with partitioning options. Unless you know how you would like to partition the disk, it’s safe to choose one of the guided options. The first option, “Guided – use entire disk” will create a partition table and several partitions. The next two set up Logical Volume Management (LVM), with or without encryption. The final option allows you to manually define a partitioning scheme and partitions as well as mount points for each partition. Follow the onscreen prompts to set up your hard drive. If you are not familiar with LVM, you may want to choose “Guided – use entire disk.” By default, the installer will use 100% of the available space on the disk that you choose. Finally, it will list the changes that will be made and ask you to confirm them (see Figure 1-26). At the point, installation of the core Ubuntu system will begin. This will take at least several minutes.

Figure 1-26.

Setting up a hard drive is essential but can cause data loss. Double check the confirmation screen!

After the core system has been set up, the installer will configure the package manager, which will keep Ubuntu updated. If your network requires proxy settings, enter the information when prompted, otherwise simply press Enter. Ubuntu will download updated package information and download and install any available updates.

Once these updates have been installed, the installer will offer to set up automatic updates. This will automatically check for security updates daily and install them if found. This is recommended for home or project servers, but you may want to keep automatic updates disabled for production servers if you have an alternate method of ensuring updates are installed.

The Ubuntu installer will then offer a list of several predefined roles that can be automatically installed. For instance, you can choose a collection of software to create a LAMP server (a Web server with database and programming support for web sites), a mail server, and many others. Select a role with the up and down arrows, and use the spacebar to toggle the collections on and off. Press Enter once you have selected the packages you would like. The installer will then install the rest of the Ubuntu server software. This is the bulk of the installation process and will take the longest amount of time in the process. Once it is finished, the installer will perform cleanup tasks and then reboot. The “tasksel” program provides these roles and can be used to add additional roles to an existing Ubuntu system. You can type “man tasksel” on the command line of a running Ubuntu server for more information (see Figure 1-27).

Figure 1-27.

Ubuntu Server makes preparing a new server for common tasks nearly effortless

Using Ubuntu Server

After it boots, Ubuntu Server will display a series of startup messages and then a login prompt. Entering your username and password will display some system statistics and then the command prompt. From here you can interact with your new server via the command line (see Figure 1-28).

Figure 1-28.

The first three lines welcome you to your server, and logging in displays the server status at a glance

Server administration is an entire book in and of itself, but the Ubuntu Server documentation linked at the beginning of this section can get you started with a few simple projects. With Ubuntu running on an older PC or a dedicated virtual machine, you can learn at your own pace. Ubuntu Server is a small and compact operating system you can build a server on, and with the popularity of both the server and cloud installs, the skills you learn using Ubuntu can easily be put to use in production environments.

Installing a Minimal Ubuntu System

A minimal Ubuntu system is a special install of Ubuntu that contains the very bare minimum of software required to boot and compose a standard Linux environment. This system doesn’t include a graphical interface and can be used as a base for systems where resources are at a premium. Minimal Ubuntu installs can be performed using the Ubuntu Server disc.

System Requirements

Ubuntu Server is available for both 32- and 64-bit PC-compatible computers, and you should install the 64-bit version if your computer will run it. It is also available for several other architectures as well, including ARM.

In order to install a minimal Ubuntu system, you will need to have at least 1.0 GB of hard drive space available, although 5 GB is a more comfortable amount to allow for additional software and storage for your own content. Ubuntu minimally requires 192 MB of RAM, but a recommended amount of RAM depends heavily on the work you will be doing on the server.

You can download the Ubuntu Server installer from http://www.ubuntu.com/server . It will be in the form of a CD image with an .iso file extension. Once you have this file downloaded, you can create Ubuntu Server installation media using the instructions found at the beginning of this chapter.

Installing a Minimal System

The steps for creating and booting from Ubuntu Server installation media are identical to that used for desktop Ubuntu. Once you’ve downloaded the appropriate disc image, you can follow the steps listed at the beginning of this chapter (see Figure 1-29).

Figure 1-29.

Selecting a special install mode is the only difference from an Ubuntu Server install

You can also find more documentation about Ubuntu Server at https://help.ubuntu.com/14.04/serverguide/ . It will equally apply to a minimal system because of the command-line interface.

When you boot the Ubuntu Server installer, you will first select a language. On the next screen, press the F4 key. You will see a menu that allows you to customize the type of Ubuntu install. Use the up and down arrow keys to choose “Install a minimal system.” If you are installing Ubuntu into a virtual machine, choose “Install a minimal virtual machine” to conserve even more space. Because virtual machines use a small set of virtual, standard hardware, Ubuntu will only install the most likely drivers for virtual use. Press Enter to make the menu selection, and then press Enter again to choose “Install Ubuntu Server.” The Ubuntu server installer will start almost immediately. From this point on, the install process is identical to the instructions in the “Installing Ubuntu Server” section above.

Using a Minimal Ubuntu System

A minimal system is useful for any number of interesting and esoteric uses where resources are limited, whether it be for a small server running on older hardware or a platform to build more complicated software. A minimal install can be an excellent way to put together a lean system using your preferred window manager. It can even be a good way to install packages one by one to see how a standard Linux environment is built from many components. With only a core selection of software available, you can choose exactly the software you want to work with while still enjoying all the benefits of Ubuntu—a robust package manager, five years of security updates, and a comprehensive selection of precompiled software packages.

While Ubuntu is often thought of as a great choice for beginning Linux users, it is also a compelling choice for expert computer users. A minimal Ubuntu install is a perfect starting point for self-teaching or serious do-it-yourself projects.

Multiple Operating Systems

Dedicating a computer to a single operating system is always the simplest way to use a computer. But there are many reasons this might not be practical. First and foremost is a situation where you only have one computer and you still need your old operating system. In this case, installing two operating systems on one computer can be a way to work with a new operating system while still being able to use the first one.

The first thing to know is that a computer can only run one operating system at a time. When the computer starts, the bootloader is responsible for loading the rest of the operating system. Therefore, to dual-boot you need to install a bootloader will allow you to choose between installed operating systems. The second thing to know is that each operating system will be installed and set up independently. Each operating system will have its own settings and normally they will not interfere with or affect one another. Sometimes disk storage can be shared as long as each operating system can read the same file systems, but the home or primary user folders cannot be directly shared between two different operating systems.

Caution

You should always keep up-to-date backups of your files and computer data. But if there were ever a time to have a recent backup, it’s when resizing file systems, creating partitions, and installing bootloaders. Make sure your files are backed up before making any changes to your computer!

Dual-Boot with Ubuntu and Windows

Most PC-compatible computers come with Microsoft Windows preinstalled. This is useful for many reasons—notably that you can take the computer out of the box and turn it on and it will start up and boot into a working interface. This was not always the case with computers. However, Windows is expensive and there are many programs that run best when running directly on Windows while it is running directly on the computer hardware (as opposed to a virtual machine). It is often useful to be able to keep Windows installed on a computer even when primarily using Ubuntu.

Ubuntu can often be installed alongside Windows without special concerns, but sometimes legacy formatting restrictions can cause installation problems. It is always best to install Windows first, then install Ubuntu next, because Windows is designed to be the only operating system on a computer and the Ubuntu installer is designed to work alongside other operating systems if they are present. An Ubuntu installation proceeds as outlined earlier in this chapter until the fourth screen, which asks for the installation type (see Figure 1-30).

Figure 1-30.

Ubuntu does its best to detect any existing operating systems on a computer

Ubuntu offers to either install itself alongside your existing operating system or replace it entirely. It is noteworthy to mention here that if Ubuntu does not correctly detect your existing operating system on this screen, continuing will probably erase it as well.

Ubuntu must be installed into its own dedicated file system. If you choose to install alongside Windows, the installer will create these file systems automatically. If you have installed Windows manually and left empty space unallocated for Ubuntu, the installer will simply use the entire remaining disk space. Otherwise, Ubuntu will show you a screen that displays your hard drive and allows you to adjust the amount of space allocated between Windows and Ubuntu (see Figure 1-31).

Figure 1-31.

Sliding the divider will determine how much disk space Ubuntu and Windows will have available

Ubuntu will reserve an amount of disk space equal to the RAM in your computer for virtual memory. This allows your computer to temporarily load more information than it has available RAM, and also allows your computer to hibernate and power down without closing all programs if your hardware supports it. Accounting for this extra dedicated space, you should give Ubuntu at least an additional 10 GB for itself. You can use the mouse to resize the Windows and Ubuntu file systems. If you want to install Ubuntu onto a different hard drive, you can select it from the drop-down list at the top of the installer window. A second hard drive is a good way to install Ubuntu on a desktop computer. Once you click “Install Now,” the Ubuntu installer will shrink the Windows file system, shrink its containing partition, create several new partitions for Ubuntu, and then create new file systems. This action is irreversible and begins the rest of the Ubuntu install. The installation procedure from this point on continues as detailed earlier in this chapter.

When you start your computer after Ubuntu is installed, Ubuntu’s bootloader, GRUB, will give you 10 seconds to choose a different file system before Ubuntu is started. You will also have the ability to test your system memory for errors, which can be a useful diagnostic tool (see Figure 1-32).

Figure 1-32.

Ubuntu will allow you to choose an operating system to boot when your computer starts

Custom partitioning

Most computer hard drives use a partition scheme called Master Boot Record (MBR). This uses a partition table at the beginning of the drive that defines the way the drive is dedicated to different file systems. Unfortunately, MBR was created in 1982 to support the massive new 10 MB hard drives that would soon be available on the IBM PC XT computers. Because of this, the original specification only allows for 4 partitions to be created. Creating more partitions requires using one of these “primary” partition slots to define an “extended” partition, which can hold an unlimited number of additional “logical” partitions. Because this part of the partition table has remained unchanged ever since, Windows computers are limited to only 4 drive letters per disk unless some partitions are created in the extended partition space.

Ensuring the ability to reinstall Windows

Traditionally, computers come preinstalled with Windows on a single primary partition, and a computer manufacturer may have created additional primary partitions to store backup, recovery, or diagnostic tools. This can cause a conflict because these are always created as primary partitions to allow the computer to boot directly into them.

Beginning with Windows Vista, Windows began creating a dedicated boot partition to increase reliability. Most new computers with Windows preinstalled now contain two Windows primary partitions: a “recovery” partition that allows the owner to reinstall Windows to its factory-shipped condition, and a “backup” partition created by the manufacturer to assist the user in creating full computer backups. This means that there are no more partitions available for Ubuntu, and most computers do not come with separate Windows install discs.

If this is the case, Ubuntu will not display an option to install alongside Windows. You will have to make a decision to modify the partition layout yourself. Personally, I order the installation media from my manufacturer for about $20 plus shipping and remove the backup and recovery partitions. Some manufacturers install a tool that allows you to create a recovery disc using blank DVDs. Another alternative would be to download the Windows 8.1 or Windows 10 setup disc directly from Microsoft if your computer’s case has a Windows product key on it. This will allow you to reinstall Windows again in the future. But if you do not want to do this, you will need to use a different hard drive.

By default, Ubuntu also replaces the bootloader on your first hard drive to allow your computer to automatically start up. If you uninstall Ubuntu in the future, your computer will not be able to fully boot from the hard disk without installing a new bootloader. You can use a Windows recovery disk or setup disc to do this and choose “Automatic Repair.” Windows should reinstall its own bootloader and you will be able to boot directly into Windows again.

Using the graphical partitioning tool

If Ubuntu cannot install itself automatically because there are no available partitions or if you want to specifically choose a different disk or bootloader target, you can choose “Something else” from the Installation Type screen and click “Continue.” Ubuntu will start a graphical partition editor (see Figure 1-33).

Figure 1-33.

A typical dual-boot partitioning scheme. The last partition is an extended/logical partition

The partitioner will list all hard drives and partitions. Ubuntu doesn’t use Windows drive letters, but instead refers to physical hard drives in the order in which they are connected to the computer. The first hard drive will be named /dev/sda, the second /dev/sdb, and so on. Each partition on a hard drive is numbered and added to the physical drive name. Primary partitions are numbered from 1 through 4, but logical partitions always begin at number 5 even if there are lower numbers available. Unless notified, no changes will be made to your hard drive until you click “Install Now.”

If you already have four primary partitions, you will have to remove at least one to install Ubuntu. You can do this by selecting it and clicking the minus (-) button under the partition list. You may also need to resize an existing partition to create more room to install Ubuntu. In Figure 1-33, /dev/sda1 is the Windows boot partition and /dev/sda2 is the system partition that is named C: in Windows and contains the operating system and all user files. By selecting /dev/sda2 and clicking on “Change…,” the partition can be given a smaller size, which creates free space for Ubuntu.

By clicking “free space” and clicking the plus (+) button, you will be able to create a new partition (see Figure 1-34). The Ubuntu installer will also allow you to choose various other properties, such as whether the new partition will be a primary or logical partition and whether it should be located at the beginning or end of the available free space. “Use as” will indicate what file system should be created inside the partition, and if changed on an existing partition will cause the partition to be formatted. “Mount point” describes where the file system will be available inside Ubuntu, and the drop-down list will list several common locations depending on the selected file system.

Figure 1-34.

The partitioner lets you choose settings such as file system type and mount point

Ubuntu needs at least two partitions to run optimally, and they can be either primary or logical partitions. The first is a main system partition of at least 6.5 GB, which is mounted at “/” and is formatted as “Ext4 journaling file system” unless you have a reason to use a different compatible file system. The second is swap partition. Once you choose “swap” from the “Use as” list, the mount point will gray out because it is not necessary.

Additional partitioning scenarios

There are other reasons to set up custom partitions. For example, creating dedicated /boot or /home file systems, or especially dedicated /var file systems on servers can be very useful. A dedicated /home file system is helpful because it contains all of your user data and program settings, so it allows you to completely reinstall Ubuntu without losing any of your personal data. A separate /var file system on a server prevents the main disk from filling up with logs or other data and causing the operating system to fail.

The bootloader can also be installed on a different disk. By default, it will install to the first hard drive, but if you want to install Ubuntu on its own hard drive and choose to boot from it during startup, you may want to install the bootloader to the same hard drive as Ubuntu instead, or even to a specific partition. This is most useful for computers that have an easy to access BIOS or UEFI boot manager.

Once your partitions are set up properly, you can click on “Install Now.” This will write the changes to disk and begin the Ubuntu installation. The installation procedure from this point on continues as detailed earlier in this chapter, and every boot will display the operating system selection menu shown in Figure 1-32.

Dual-Boot with Ubuntu and OS X

All Macs come with OS X preinstalled, and thanks to the Unix-like nature of the operating system and the purpose-built hardware, most Apple users are very happy staying with the default software. Upgrades are extremely reliable thanks to the limited hardware and software combinations. So for many users who want to install Ubuntu on their Mac, it will be their first time installing an operating system. Luckily, it’s still a pretty easy process, and dual-booting ensures that you can still boot into OS X for top speed.

Although all Intel-based Macs are basically PCs, there are still some differences to a traditional PC. They all boot using EFI, not BIOS. And bootable Mac hard drives are partitioned using the GPT partitioning scheme. But Ubuntu has limited support in resizing Apple file systems. For this reason, I like to make room for an Ubuntu install in OS X before running the installer.

From the OS X desktop, with Finder as the current application, choose the Go menu and then Utilities. Then, double-click Disk Utility to launch that application. When it appears, it will show all of your hard drives and partitions in the left pane. You’ll want to select the actual disk that you wish to modify, not a partition. The partitions have friendly names that you are used to working with such as “MacBook Pro Drive” and are indented underneath the disks, but the disks begin with their storage capacity (see Figure 1-35).

Figure 1-35.

Disk Utility shows you disks¸partitions, and allows to you format and resize them

Once you’ve selected the drive, you’ll see five options at the top of the right pane. The middle option, “Partition,” will let you resize your OS X partition and create room for Ubuntu. You can click a the displayed partition to select it, then drag the resize handle at the bottom corner of the partition to graphically resize the disk, or you can simply change the number in the size field. You can estimate the amount of space needed for Ubuntu by taking 10 GB of space for Ubuntu plus the amount of RAM installed on your machine, and increasing that by the amount of storage you want. I recommend at least 20 GB plus the amount of RAM for a simple desktop install. Once you have freed enough space, click the “Apply” button. Disk Utility will ask if you want to partition the disk, and should state “Partitioning this disk will change one of the partitions. No partitions will be erased.” and list any partitions that will be resized. Then it is safe to click the “Partition” button.

Once the resize operation finishes, you can reboot your Mac. By holding the Option key, you will be able to choose to boot with your Ubuntu installation media. An Ubuntu installation proceeds as outlined earlier in this chapter until the fourth screen, which asks for the installation type (see Figure 1-36).

Figure 1-36.

This screen shows that Ubuntu detected your OS X install

Ubuntu offers to either install itself alongside your existing operating system or replace it entirely. It is noteworthy to mention here that if Ubuntu does not correctly detect your existing operating system on this screen, continuing will probably erase it as well.

Ubuntu must be installed into its own dedicated file system. If you choose to install alongside OS X, the installer will create these file systems automatically. If you resized your partitions with Disk Utility and left free space unallocated, the installer will simply use the entire remaining disk space. Otherwise, Ubuntu will show you a screen that displays your hard drive and allows you to adjust the amount of space allocated between OS X and Ubuntu (see Figure 1-37).

Figure 1-37.

System Preferences ➤ Startup Disk lets you customize your default OS

If you want to install Ubuntu onto a different hard drive, you can select it from the drop-down list at the top of the installer window. A second internal hard drive is a good way to install Ubuntu on a desktop computer. Once you click “Install Now,” the Ubuntu installer will create several new partitions for Ubuntu, and then create new file systems. This action is irreversible and begins the rest of the Ubuntu install. The installation procedure from this point on continues as detailed earlier in this chapter.

Once Ubuntu has finished installing, you will be able to choose which operating system to boot by holding the Option key when you turn on or restart your Mac. If you would like to change the operating system that boots automatically, in OS X you can go to the Apple Menu, then System Preferences, and in System Preferences double-click on Startup Disk applet. Although Ubuntu will be displayed as “Windows,” you can change your preferred default operating system here.

Summary

Ubuntu can fulfill many tasks, and that leads to various ways to install it. Because each computer and each user is different, there is no one right way to install Ubuntu. However, most users will be able to start with Ubuntu itself, go through a simple install process, and have a working computer with no difficulty at all.

The best thing about being able to install an operating system is that it gives you the ultimate freedom over your computer. Not only can you confidently install Ubuntu using these instructions, but after you are comfortable with the operating system you can refer back to this chapter to read about the various flavors of Ubuntu that are available as well.

© Nathan Haines 2015

Nathan HainesBeginning Ubuntu for Windows and Mac Users10.1007/978-1-4842-0608-9_2

2. Getting Started with Ubuntu

Nathan Haines1 

(1)

CA, US

One of the best things about Ubuntu is that it’s ready for use as soon as it’s installed. You can get almost anything done immediately, and new applications are just a couple of clicks away. Some of the power of Ubuntu is in its differences from other operating systems.

Ubuntu is best approached as its own experience, without comparison to other operating systems—in fact, all operating systems are best approached this way. Therefore, the rest of the chapters in this book talk about Ubuntu directly. But it’s hard to leave behind the habits and experience we’ve formed from working with computers. You’re probably fairly handy with a computer running Windows or OS X. This chapter will help you take what you already know and apply that knowledge to Ubuntu, so that you feel comfortable more quickly. And it will help you work more closely with your other computers as well. It’s a lot like a travel guide, complete with a phrasebook!

Tip

All modern operating systems using the desktop model of interaction have the same fundamentals. You can think of switching between them a bit like visiting a different country. There are different languages and customs, but with a bit of preparation you can fit right in.

Try to think of learning a new operating system like the same kind of adventure, and you’ll find the experience a lot more fun—and enjoyable.

Ubuntu Desktop

The Ubuntu desktop is simple and elegant right out of the box. Your new Ubuntu system has several programs preinstalled, and the desktop interface is called Unity, with a launcher along the left hand side, a panel with information about the running program and its menus on the left, and informative indicator menus on the right. Each window has several window controls on the top left of its title bar (see Figure 2-1).

Figure 2-1.

This is the default Ubuntu desktop with a web browser running

Unity Launcher

On the left edge of the screen is the Unity Launcher. This is where you can pin and launch your favorite applications, and see which applications are running. The top icon opens the Dash home lens, where you can search your computer and online sources as well. The icons underneath are application launcher icons, and you can click on them to run the corresponding application. Running applications will have a pip or arrow on the left, and will display two pips if two windows are open, or three pips for three or more windows. Clicking on a running application’s launcher icon will display the application. If an application has more than one window open, scrolling the mouse wheel will cycle through the open windows. Clicking the launcher icon when an application with multiple windows is focused will display all open windows. You can then click on a window to select it, or click the red X button to close it.

Right-clicking on a launcher icon will display a quick menu that lists application-specific commands. Different commands may be available depending on whether the application is currently running. The quick menu will also list all open windows, which can be selected with the mouse. You can also quit all open instances of an application.

Locking an icon to the Launcher keeps the icon displayed when it is not running. This gives you instant access to your favorite and most commonly used applications at a single click. Likewise, you can unlock icons as well.

You can also rearrange most of the Launcher’s icons. Simply click and drag the icon off to the right. It will pop off the Launcher, and you can place it in any position you like, or drag it to the trash. This will remove the launcher icon—not the application. You can use the Super key (the Windows Logo or Command key) plus a number to automatically run or switch to the corresponding launcher icon, so arranging them can help you launch applications even more quickly. Pressing and holding the Super key not only displays the corresponding number over the launcher icon, but also the entire list of keyboard shortcuts you can take advantage of in Unity.

You can make the Launcher disappear until you need it by turning on the auto-hide feature. To do this, run System Settings from the Dash or the Gear indicator menu. Click on the Appearance icon and then the Behavior tab. Then you can turn on the “Auto-hide the Launcher” feature. This setting takes effect immediately, so you can test any changes you make before closing System Settings. By default, the Launcher will appear when you push the mouse pointer “past” the left side of the screen. This gives you fast access to the Launcher without it getting in the way of your running applications.

Unity Dash

The Unity Dash (see Figure 2-2) is designed to streamline the way you search for information both on your computer and online. You can use it to search for applications, recently opened files and folders, or online results. In Ubuntu 14.04 LTS, over 80 online and offline search applications called “scopes” are used to display information to you. The most useful thing to know is that pressing “Enter” activates the first result listed at any time, and you can use the arrow keys to select results as well as the mouse. Pressing Esc will clear the search field. You can use the Maximize and Unmaximize button in the top-left corner of the screen to switch in and out of full-screen mode for the Dash if you do not prefer the default setting, which is based on your screen resolution.

Figure 2-2.

The Unity Dash shows recent applications, files and folders, and online results

These results are custom tailored to the information they provide. For instance, clicking on an application result will launch the application. Clicking on a file result will show a larger preview and file options, and double-clicking will open the file in the default viewer. Clicking on a song or music album will show a track list and let you listen to the song as a preview. Clicking a weather forecast result will show you detailed forecast information.

The most exciting thing about these search results is that local and online results work the same way. You can listen to a music preview whether the search results were found in your Music folder, the Amazon MP3 Music Store, 7Digital, or SoundCloud. Clicking on a Google Docs result will open the document in your web browser. You can focus on what you’re looking for and not where you found it.

Outside of the launcher, this is the primary way that you’ll run applications. To open the Dash, either click on the Dash Home button at the top of the Launcher or press the Super key on your keyboard. A typical Home display is shown in Figure 2-2. The top shows the last six applications you’ve run—not including any that are locked to the launcher. You can expand that list to show more. You can drag any application icon to your launcher to lock it there. Underneath are files and folders that have recently been opened. You can click any result for more information.

The Dash Home will return search results from your computer as well as online sources, and you can use the “Filter Results” drop-down to choose specific categories as well as sources to refine your search. However there are six other lenses you can use to search for specific types of information. You can select them by pressing Ctrl+Tab when the Dash is open, clicking directly on their icon at the bottom of the Dash, or using the shortcut key for a specific Lens. For example, Super+A opens the Applications Lens, Super+M opens the Music Lens, and so on. These shortcuts are displayed on the Keyboard Shortcuts overlay that appears when you hold down the Super key, under the Dash section.

The App Lens displays all installed applications and can be used to browse or search through this list. This lens also shows software that is available from Ubuntu’s software repositories and can be used to search for and install new applications. Lastly, it shows Dash plug-ins that can be individually enabled or disabled to customize your search experience.

Application searches search both application titles and descriptions. A search for “graphics,” for example, will display the installed Image Viewer as well as Inkscape vector graphics editor. This means that you do not have to know the name of an application beforehand. You can also type a keyword that relates to its function. Right-clicking on any application result will display information about the application and allow you to install, uninstall, or launch the application (see Figure 2-3).

Figure 2-3.

The App Lens shows installed and available applications, and right-clicking a result gives you more information and the chance to install it

The various other scopes are very similar. The Files scope shows files in your home folders, the Photos scope shows images in your Pictures folder, and so on. If you add your online accounts to your System Settings, these scopes also return results from your Google Drive; your Picasa, Facebook, and Flickr accounts; messages from your Twitter feed, and on and on. The Dash lets you think about what you want to find without having to worry about where it is.

Dash Privacy

The power to search online means that your search queries are encrypted and sent to Canonical search servers on the Dash Home, where they are performed in a manner that is anonymous to the online source. Searches related to your online accounts such as Google, AOL, Facebook, Yahoo, and so on are sent directly to the relevant service provider. For some people this can be a privacy or performance concern. In addition, you may find some online sources unhelpful or uninteresting. There are two simple ways to change Dash behavior with regard to online searching.

To disable certain search plug-ins so they are not used in future searches, simply go to the App Lens and expand the list of Dash plug-ins sections or search for the name of the plug-in. Click on the plug-in to see a description of what it does, and simply click the “Disable” button to turn the plug-in off (see Figure 2-4). That online search will not be used again unless you manually reenable it by selecting it and clicking the “Enable” button.

Figure 2-4.

Each search scope can be enabled or disabled by right-clicking on it in the App Lens

If you would rather disable all online search results, there is a master setting that applies to all Dash scopes. You can run System Settings from the Dash (or from the Gear menu in the top right-hand corner of the screen), then click on the “Security & Privacy” icon. From there, you can click on the “Search” tab and turn off the option that says “Include online search results” (see Figure 2-5). This will prevent the Dash from accessing the network altogether until you turn the feature back on. It does not change the status of individual plug-ins, so any plug-ins you have disabled will remain disabled if you reenable online results in the future.

Figure 2-5.

System Setting’s Security & Privacy applet lets you globally disable online searching in the Unity Dash

Unity Menu Bar and Indicators

The panel at the top of the screen is very versatile (see Figure 2-6). On the left it shows the name of the currently active application. When you bring your mouse over the panel, it also displays the current application’s menu when you bring your mouse over the panel. These drop-down menus work just as the application menus in Windows or OS X including responding to menu accelerator keys when holding Alt, but they remain hidden when not in use for a less cluttered screen.

Figure 2-6.

The Unity panel shows the global Application menu as well as indicator menus

The right side of the panel is dedicated to application and system indicators. They provide an instant visual cue to your computer’s status. The network indicator displays your connection status, the power indicator displays your laptop or wireless mouse battery, the messaging indicator alerts you to new e-mails or instant messages, the sound indicator shows you the current volume, and the date/time indicator shows you the time.

Clicking on an indicator displays a menu with further information. For example, the sound indicator will give you the option to mute or unmute the master volume, or adjust it using a slider control. If a supported media player is running, it will display information about the current media file and allow you to quickly pause and resume playback or seek through your current playlist. For instance, you can run Rhythmbox and start playing music, then close Rhythmbox. The sound indicator provides fast access to your playlist without having to switch away from your current application.

Unlike system notification tray applets in Windows, indicator icons only display menus—they do not perform actions when clicked, double-clicked, or right-clicked. Therefore, both clicking and right-clicking display the menu for that indicator. This provides a consistent experience for all indicators. The sound indicator does have a special feature that mutes or unmutes the system volume when middle-clicked.

Unity HUD

One unique and very powerful feature of Unity is called HUD. Just like a Heads-Up Display, it gives you quick access to your application’s menus at the press of a button.

Traditionally, you access a menu using either the mouse or the Alt key combined with a menu accelerator key, such as Alt+F for the File menu, Alt-E for the Edit menu, and so on. Application menus were a way to expose commands to the user in the days before graphical interfaces and before application toolbars were invented. But many powerful applications have extremely complex menus. LibreOffice Writer is an example of an application with an overwhelming array of commands. This makes the software very versatile, but finding and remembering where any menu command is located can be daunting. HUD provides the answer to this.

By tapping the Alt key, you activate the HUD. Then, you can begin typing the command or feature you are looking for. As you type, the search will narrow down through the application menu items, and you can simply press Enter when you see the result you want in the first position. Alternatively, you can click on an option or use the arrow keys to select an option and press Enter. The HUD remembers the last 30 days of use and will begin to favor your most frequently used items.

Using HUD not only prevents you from searching and reading through the menus yourself, but also gives you context as you search. For example, in LibreOffice Writer, if you are looking for the Word Count feature, you can simply search for the word “count” (see Figure 2-7). Several options are available, and HUD indicates that the Word Count feature can be found under the Tools menu. This can allow you to access advanced application options without taking your hands off the keyboard, increasing your efficiency and speed.

Figure 2-7.

HUD lets you search any application’s menu system

Managing Windows

Most application windows have three window controls on the left of the title bar. In order, these close the window, minimize (or iconify) the window, and maximize the window. Maximizing a window merges its title bar with the Unity menu bar, and its window controls appear along with the application menu when you bring the mouse to the top panel. This makes for very efficient screen use, and combined with auto-hiding the Launcher dedicates all but the top 24 pixels of the screen to your application. This gives you more space on smaller screens and better focus even on larger screens.

You can also resize windows by dragging a window to the top, left, or right of your screen. Dragging to the top of the screen maximizes a window. You can drag it down from the panel to restore the windowed size. Dragging a window to the left or the right maximizes it to that half of the screen, and is perfect for displaying two windows side by side. Dragging a snapped window away from the edge of the screen restores the previous window size as well.

You can switch between applications by pressing Alt+Tab. If you continue holding Alt, the application switcher will appear and you can choose any running application as long as you are holding Alt. Each time you press Tab, you will cycle forward through the list to the next running application. Releasing Alt when the desired application is highlighted will switch to that application. Alt+Shift+Tab moves in reverse. You can also click on a displayed application icon with the mouse to switch to it while you are holding Alt.

If you have multiple windows open in the same application, you can easily switch between them by pressing Alt+` (backtick) on a U.S. keyboard. If your keyboard layout is set to match your physical keyboard, you can press the leftmost key above the Tab key even if it is not the backtick key. The application switcher will display all open windows instead.

If you want to see all open windows, simply press Super+W. This spreads all windows out visually, and you can use the arrow keys or the mouse to select a window to bring into focus. If you start typing, Unity will narrow down the displayed windows to show only those that match your search.

Installing and Updating Software

Ubuntu is a comprehensive operating system. As discussed in the last chapter, the Ubuntu operating system consists of a Linux kernel, the standard GNU userspace, X or Mir for the graphics display system, and tens of thousands of other Free Software and Open Source projects. All of the software that comes with Ubuntu has been built from its source code directly on Ubuntu and packaged for delivery and installation. (Technically, some proprietary software and drivers were not compiled by Ubuntu, but they are installed and updated in the same manner.) This includes not only the software included on your installation media and in a newly installed Ubuntu system, but thousands upon thousands of other applications that are available from the Ubuntu software repositories.

There are two methods for installing software graphically. The first is via the App Lens in the Ubuntu Dash. This is the only method on Ubuntu phones and in the future will become the primary method on the desktop as well. In the App lens, you can search for an application. If it is available in the Ubuntu software repositories but not installed on your system, you can click on the icon for more information, and choose to install it directly from the Dash You’ll need to enter your account password to authorize the installation. The app’s icon will be added to the Launcher, and you will be able to keep an eye on its progress. The first 50% is the download from the Ubuntu servers, and the second 50% is the local install process.

Ubuntu Software Center

The other way to install new software is through the Ubuntu Software Center (see Figure 2-8). This is a catalog where you can browse, search for, and install new software that is provided by Ubuntu. You are also provided with reviews and ratings from other Ubuntu users and can write your own as well. This is the best way to install software if you don’t know exactly what you’re looking for.

Figure 2-8.

Ubuntu Software Center provides a catalog with thousands of free and paid applications

The Ubuntu Software Center provides a look at thousands of software packages. Because the packages are located in the Ubuntu software repositories, it always downloads and installs the most up-to-date version of an application for the current Ubuntu release. In addition, anything installed will receive updates through the Software Updater along with all other software. This makes Ubuntu Software Center an easy way to install software, and will be the primary method of installation used for the rest of this book. You can see Chapter 6 for faster ways to install software if you know precisely what you are looking for.

Additional third-party software is available from the Ubuntu Software Center, and these applications may be free or paid. The price, if applicable, will be displayed with the software listing and payment goes to the third party, with a small portion of the sales price going to Canonical to cover the payment processing fees and is indirectly used to support Ubuntu development. In order to purchase third-party software (even if “free”), you will need to create an Ubuntu One account. This account is used on Ubuntu phones and for many Ubuntu community resources, so it is useful beyond software purchases. You can use your Ubuntu One account in the future to download compatible purchases to any new Ubuntu computer without additional payment.

Other sources

If you download software for Ubuntu directly from a web site, you’ll be provided with a .deb file. This is a Debian package file and is used by Debian and Ubuntu to allow your operating system to install and uninstall software cleanly by using the Debian package manager. You can simply double-click on the deb file, and Ubuntu Software Center will open and display the information provided by the Debian package. You can choose whether or not to install the software from that screen. With the exception of certain packages like Google Chrome and Steam, which add their own repositories to Ubuntu’s list of software repositories, software you install manually will not receive automatic updates with bug or security fixes and in any case have not been reviewed by Ubuntu developers, so make sure to only install software you trust.

Updating Ubuntu

The Ubuntu repositories are where all Ubuntu-provided software is contained, and is shared between desktop, server, cloud, and mobile versions of the operating system. In principle, the only differences between these versions are the default installed set of packages and some system settings. This means that all software on your system in your default install as well as all software you install from the Dash or the Ubuntu Software Center is maintained and supported by Ubuntu. Your computer will check for updates on a daily basis (see Figure 2-9.)

Figure 2-9.

Software Updater tells you about software updates. This is the detailed view

One a week, Ubuntu will inform you about recommend updates. These updates will only provide maintenance updates. Installing the updates is automatic and only requires your password authorization to begin. If security updates are available, Ubuntu will notify you immediately. These are important enough that your password is not required.

The Software Updater provides updates for all software contained in the Ubuntu repositories, and acts as a single way to make sure all of your applications are secure and up to date. All updates are signed and verified by the Ubuntu developers so you can be assured that updates are trustworthy.

Upgrading Ubuntu

Because all software provided by Ubuntu is also maintained by Ubuntu, this makes OS upgrades simple as well. The Software Updater tool will notify you of a newer version of Ubuntu and facilitate the upgrade (see Figure 2-10).

Figure 2-10.

Upgrading to a new version of Ubuntu is simple

A new version of Ubuntu is released every six months: once in April and once in October. Every fourth release is supported for five years instead of nine months, and is considered a Long Term Support (LTS) release. Ubuntu 14.04 LTS is the release covered in this book, and the next LTS release will be Ubuntu 16.04 in April 2016.

When a new version of Ubuntu is released, the Software Updater will notify you of the available update. LTS releases, by default, will only notify you once the next LTS release is available, and only after a delay of three months. This allows for any major bugs to be addressed, and post-release updates to settle down with the help of early adopters. This allows you to enjoy a stable system at all times.

When you are notified of a newer version of Ubuntu, it’s important to install all updates still pending for your current release. Once your software is up to date, you can click the “Upgrade…” button in the Software Updater. This will display the release notes for the new version of Ubuntu. After reading the release notes, you can choose to continue with the update. This is a lengthy process that downloads a very large amount of data and cannot be interrupted once it begins.

This upgrades all software on your computer with newer versions. For the most part, it actually uses the same methods as minor software updates—a testament to the power of the software packaging system. While it should be safe to browse the Web or play a simple game, you should make sure your system is plugged into AC power if you are upgrading a laptop, and refrain from doing any important work on your computer during the upgrade. Once finished, reboot immediately. Your system will restart and you will be running the new version of Ubuntu.

Managing User Accounts

Ubuntu was designed to handle multiple users on a single computer, and it is easy for each user to have his or her own account where each user’s settings and program data can be stored separately from the others’. While any installed applications are available to every user, application settings are stored in each user’s home folder. Things like mail, personal files, language settings, and desktop and wallpaper preferences are user specific. Giving each computer user a dedicated account allows each user to use the computer without affecting the other users’ experience.

Creating a new user account can be done from the Gear Menu > System Settings, by clicking on the “User Accounts” applet. This applet displays all user accounts installed on the system, and the panel is initially locked (see Figure 2-11). While locked, you can only make changes to your own user account, such as changing your display name or password.

Figure 2-11.

User Accounts is where accounts can be added, removed, and modified

Adding, removing, or changing other user accounts modifies the operating system, and requires administrative access. You can click the “Unlock” icon at the top right of the window. You will be prompted for your password and then you will be able to modify other user accounts. The applet will automatically lock again after 15 minutes of disuse. The “+” and “-” buttons, to add or remove a user account, respectively, also become available.

To add a new user, click on the “+” button under the user list. The “Add account” window will appear, and you can choose between a “Standard” account or an “Administrator” account (see Figure 2-12). A user with an administrator account is able to install or remove software with his or her password just like the user account created during installation. Standard accounts cannot authorize system-level changes, and an administrator user will need to authorize any such action taken by the standard user when prompted. The “Full name” field shows the display name of the user that will be shown on the Ubuntu welcome screen, and the “Username” field must be a single word. The down arrow to the right of the username field will display some suggested usernames based on the Full name field. The username is used for the user’s home folder, so something simple is often better. Fill in these fields and click “Add” to create the new account.

Figure 2-12.

A new account can be added to the computer in seconds

Once the user account is created, a password must be created. The User Accounts applet will show the new account with “Account disabled” to the right of the “Password” field. Click on “Account disabled” to show the password options window. The “Action” field lets you choose whether to set a password or allow the account to be used without a password. The last option, “Enable this account” and its toggle, “Disable this account,” only function after a password has been set. Once you choose one of the first two options and set a password, clicking the “Change” button will enable the account, which will become visible on the Ubuntu welcome screen. The password options window also has a link to the help topic “How to choose a strong password,” which has additional tips to keep in mind when changing an account password.

The User Accounts applet can also be used to change an account between standard and administrator status and to set the language that will be used on screen when the user logs in.

Guest Access

The guest account on the main screen creates a temporary guest session with an isolated, temporary guest account and home folder. It provides visitors access to an Ubuntu computer in a secure manner. The account is prevented from making system changes or viewing the home folders of other users, and once the guest session is logged out, Ubuntu destroys the temporary account and its files. This means that no settings are permanent and the visitor must use an external drive or online access to save any work done during the session. Only one guest account can be logged in at a time.

Multiple user accounts work together with the guest session to allow each computer user to work with the computer and customize his or her experience without affecting other users. Whether to allow for file security or enhance computer accessibility through different appearance and language settings, Ubuntu’s user account system is a versatile way to maximize the utility of your computer.

Finding Things in Ubuntu Instead of Windows

If you’re coming from Microsoft Windows (Figure 2-13), you should find Ubuntu fairly easy to adapt to.

Figure 2-13.

A typical Windows 10 desktop with one Web browser window open

Here are some guidelines that should help you make the transition:

The Windows Logo key is called the Super key in Linux. The Alt key is still called Alt, but is also sometimes referred to as Meta. These names refer to modifier keys used on Unix terminals long before Windows or PCs existed.

The Windows Taskbar is replaced by the Unity Launcher on the left side of the screen. The Launcher cannot be moved to other sides of the screen, but it can be resized in System Settings, under Appearance. The system notification area (sometimes called the system tray) is similar to the indicator menus at the top right corner of the screen in Ubuntu. The Action Center in Windows 10 is duplicated by the Messaging and Date indicators.

The Start Menu and Start Screen are replaced by the Dash search. File search is provided by the Dash and the File lens can be accessed directly by pressing Super+F. The Control Panel is replaced by the System Settings menu under the Dash or the Gear indicator menu. Task Manager is replaced by System Monitor in the Dash.

Changing the desktop wallpaper image can be performed by right-clicking the desktop and choosing “Change Desktop Background.” This brings up System Settings, Appearance. The theme can be changed from the default Ambience theme, which is a dark theme to Radiance, which is a light theme. The High Contrast theme assists users with visibility problems. Custom themes are not supported by Unity and require third-party software.

Windows are controlled similarly in both Windows and Ubuntu. The window controls are located at the left of the title bar instead of the right. The system menu is accessed by clicking on the window icon or the top left corner of the title bar in Windows and can be accessed by pressing Alt+Space or right-clicking a title bar in Ubuntu. The menu bar in most applications is accessible at the top of the screen and not in the window itself.

The Windows Explorer file manager is replaced by the Nautilus file manager, labeled Files in the Launcher and Dash. The C: drive in reference to the system drive is known as the root directory. Disk and storage drives are not assigned drive letters but are mounted in the existing file system, usually under /media/username. Folders are often referred to as directories—especially on the command line. The user folder is known as the home folder. Hidden files begin with a . (period), and are often called “dot-files.” The Windows registry is replaced by a combination of text configuration files, often in /etc and individual dot-files in each user’s home folder, usually in a hidden directory such as .mozilla or .config.

The functionality of the Windows Store is provided by the Ubuntu Software Center, as well as the Dash App Lens. Windows Update is replaced by Software Updater, which tracks maintenance and security updates for all applications installed via the Ubuntu Software Center or otherwise installed from the Ubuntu software repositories.

Finding Things in Ubuntu Instead of OS X

If you’re coming from OS X (Figure 2-14), Ubuntu will feel extremely familiar.

Figure 2-14.

A typical Mac OS X desktop with Finder focused

Here are some guidelines that should help you make the transition:

The Option key is used for Alt, but is also sometimes referred to as Meta. These names refer to modifier keys used on Unix terminals long before Mac OS or OS X existed. The Command key is used for the Super key.

The Dock is replaced by the Unity Launcher on the left side of the screen. The Launcher cannot be moved to other sides of the screen, but it can be resized in System Settings, under Appearance. The menu bar extras are similar to the indicator menus at the top right corner of the screen in Ubuntu.

Launchpad and the Apple Menu are replaced by the Dash search. Spotlight-like file and online search functionality is provided by the Dash Home, and the File lens can be accessed directly by pressing Super+F. System Preferences is replaced by the System Settings menu under the Dash or the Gear indicator menu. Activity Manager is replaced by System Monitor in the Dash.

Changing the desktop wallpaper image can be performed by right-clicking the desktop and choosing “Change Desktop Background.” This brings up System Settings, Appearance. The theme can be changed from the default Ambience theme, which is a dark theme to Radiance, which is a light theme. The High Contrast theme assists users with visibility problems. Custom themes are not supported by Unity and require third-party software to install.

Windows are controlled similarly in both OS X and Ubuntu. The window controls are located at the left of the title bar, but the Maximize control in Ubuntu functions like the Full-Screen control in OS X. Additional window controls can be accessed by pressing Alt+Space or right-clicking a title bar in Ubuntu. The menu bar in most applications is accessible at the top of the screen. The App Menu features can sometimes be found by right-clicking the application’s Launcher icon.

Finder is replaced by the Nautilus file manager, labeled Files in the Launcher and Dash. The Mac drive in reference to the system drive is known as the root directory. Disk and storage drives are mounted in the existing file system, usually under /media/username. Folders are often referred to as directories—especially on the command line—but are also called folders. The user folder is known as the home folder.

The functionality of the Mac App Store is provided by the Ubuntu Software Center, as well as the Dash App Lens. Windows Update is replaced by Software Updater, which tracks maintenance and security updates for all applications installed via the Ubuntu Software Center or otherwise installed from the Ubuntu software repositories.

Connecting to a Windows Desktop Remotely

You may find it useful to run Windows programs during your transition to Ubuntu, or you may want to use Windows-only programs from time to time. Luckily, Ubuntu comes with a remote desktop client preinstalled. Remmina Remote Desktop Client can connect to other computers in a variety of different ways, including Remote Desktop Connection, VNC, and SSH. Remote Desktop Connection (also known as Terminal Services) is available in Windows 10 Pro and higher editions, and SSH is available in all Unix or Linux-based operating systems. In order to connect to a computer remotely, it must be powered on and not sleeping or hibernating.

Your first step is to set up your Windows system to accept remote desktop connections. This is fairly simple, and you can do so by right-clicking Computer or This PC in the Start Menu or Windows Explorer and choosing “Properties” from the context menu. When the System Properties window appears, you can click the “Remote” tab or the “Remote settings” option and make sure that “Allow remote connections to this computer” is enabled. If you have trouble logging in, make sure that “Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended)” is unchecked.

You can run Remmina by searching for its name or “remote desktop” in the Dash. The first time you run it, it will display an empty window. You can save various profiles for connecting to remote computers and double-click them in the future. To set up a connection to a Windows computer, you’ll need to know the IP address of the computer or the host name if your routers supports Windows host name resolution. You’ll put this in the Server field, and your Windows username and password in to save time. If you are connecting over the Internet, keep the color depth at 256, but if you are connecting to another computer on the same network, you may want to increase the color depth to 16, 24, or even 32-bit color.

Changing the connection name and clicking “Save” will save the connection for later. You can connect to the same computer in the future just by double-clicking the entry when Remmina starts up. Clicking Connect will connect to the Windows machine (see Figure 2-15). By default the wallpaper is hidden to save bandwidth and increase performance, but in most other respects you will be able to interact with Windows just as though you were running it on your local machine. Others may or may not be able to use the remote machine while you are connected depending on your version of Windows.

Figure 2-15.

You can connect to remote Windows machines and use them with ease

The toolbar allows you to scale the display to match the available space or enter full-screen mode and focus on Windows only. You can customize these options in the toolbar or in the connection preferences to tune the experience to your preferences.

Running Windows Applications

Sometimes you’ll find it convenient or necessary to run Windows applications that aren’t available for Ubuntu. Whether it’s a game or a utility, it can be difficult to do without some applications, and connecting to a remote Windows machine isn’t always possible or convenient. Luckily, there is a utility that allows Windows software to run directly under Ubuntu.

The Wine project is often described as an emulator. This is not technically true; in fact, Wine is an acronym for “Wine Is Not an Emulator.” Technically, it is an application compatibility layer, and it works by independently providing the parts of Windows that Windows applications rely on. This means that an application running under Wine thinks it’s running under Windows. The good news is that unlike emulating an entire operating system (which we’ll talk more about in Chapter 6), there is no extra overhead while running Windows programs this way. But the bad news is that many complex applications that rely on undocumented behavior or fancy programming tricks may work only partially or not at all. The bottom line is that once you install Wine, you can run Windows programs simply by double-clicking them in the file manager. You can also install Windows programs and pin them to the Launcher or run them from the Dash.

To install Wine, open the Dash and switch to the App Lens, or open the Ubuntu Software Center. Then in either interface, search for “wine.” Select “Wine Windows Program Loader” and choose “Install.” During installation, you will be asked to accept the Microsoft TrueType core fonts for the Web license agreement. This will install some standard Windows fonts on your system and is required to install Wine. Once the installation is complete, you can simply run Windows applications by double-clicking on them. If an archive manager appears, close the window and right-click the Windows application and choose Open With > WINE Windows Program Loader. Both Windows installers, as well as the applications they install, run alongside your other applications (see Figure 2-16).

Figure 2-16.

With Wine, you can pit Aisleriot Solitaire and Windows Solitaire against each other. Fight!

While many applications will run without further effort, some applications can be made to run using various amounts of configurations changes. For a place to find reviews on whether an application will run or tips to improve performance for any specific application, visit the Wine Application Database at https://appdb.winehq.org/ . Applications reviewed by other Wine users and are rated on a color scale, where Platinum applications run perfectly right “out of the box,” Gold applications just need a little special configuration. Silver applications have some issues that shouldn’t get in the way of normal usage. Bronze applications run but have issues that interfere with typical usage and Garbage applications are completely unusable. Reading the reviews will help you decide whether an application will work and can save you a considerable amount of time instead of testing on your own.

Connecting to Windows Shared Folders and Printers

One of the nicest things about having multiple computers is the ability to share information between them. This pays off in many ways—from being able to continue work on a document on a second computer and saving the changes to the original computer to buying one big hard drive to store large files on, to being able to watch a movie stored on another computer from a netbook or a set-top media box. Sharing resources also means being able to print from any computer in your home to a printer that’s attached to one computer instead of a network.

There are many different ways for computers to communicate, but one common language between Windows, Mac, and Linux systems is called Server Message Block (SMB). An early attempt by Microsoft to standardize this Windows protocol for multiple operating systems named a specific version the Common Internet File System (CIFS), which is sometimes referred to in documentation and software library names. But today, Windows, OS X, and Linux use SMB to share files and printers together. In Ubuntu, the software that supports this is called Samba. This chapter will use the term “Windows file sharing” to refer to SMB-compatible file sharing across all operating systems.

The first step is to make sure that your Windows system is sharing folders and printers properly. To ensure this, it should not be part of a Homegroup and if you have a File & Sharing Wizard it is the simplest way to ensure that Windows Firewall is set up properly to allow File and Printer Sharing connections. To set up a shared folder, simply right-click any folder you would like to share and then click “Sharing,” “Share with…,” or “Sharing and Security” (see Figure 2-17.

Figure 2-17.

After connecting to a Windows shared folder it works just like a local folder

If you are on the same network as a Windows machine with shared folders or printers you would like to connect to, simply open Files and click on “Browse Network” in the sidebar. After a short search, the available computers and workgroups will be displayed. Navigate to the computer you wish to connect to and double-click it. You will see a prompt asking for a username and password. Enter a username and password for the remote computer, then click “Connect.” You’ll see the shared folders displayed. Simple double-click to open one (see Figure 2-17). You can bookmark a shared folder with the Bookmarks menu.

Shared Printers are similarly simple. First, open Printers via the Dash. You can also open System Settings via the Dash or Gear indicator menu and click on Printers. Either way, the printer configuration window will appear. Click on the Add button in the toolbar and the New Printer window appears. Under Select Device, click the arrow next to Network Printer. Choose “Windows Printer via SAMBA,” and the right side of the window will show “SMB Printer.” Click Brows to open a SMB Browser. This displays the Windows network, and you can navigate to the corresponding workgroup and computer that is sharing the printer (see Figure 2-18).

Figure 2-18.

Shared printers work just like local ones—if the remote computer is turned on!

Select the desired printer and then click OK. The SMB Browser will disappear and the printer URI will have been filled in for you in the New Printer screen. Click Forward, and you can choose a compatible printer driver by selecting a manufacturer and model. Then click “Forward” again and set any printer options that apply to the shared printer. Click “Forward” again and you will be able to give your printer a name. Once you confirm these options, Ubuntu will ask if you wish to print a test page. This is a good way to test the printer as well as save a copy of your printer settings. Now the printer will be listed as a choice when you print from any application.

Sharing Files and Printers with Other Computers

Samba has two components—a client that can access shared files and printers on other computers and a server that can share files and printers on an Ubuntu system with other computers. Ubuntu used to ship with only the client and would automatically ask you to install the server if you tried to share a folder (and would perform the install automatically if requested). In Ubuntu 14.04 LTS, both components are installed by default.

With the client installed, Ubuntu will automatically detect other computers with Windows file sharing enabled. This is enabled by default on Windows systems attached to “home” or “work” type networks and Ubuntu systems, and must be explicitly enabled on Macs under System Settings. In Ubuntu, opening “Files” and clicking on “Browse Network” on the left sidebar will begin searching for shared resources on the local network. After a moment, all computers that have Windows file sharing enabled should appear on the right side of the screen (see Figure 2-19).

Figure 2-19.

Ubuntu automatically detects other computers with available shared folders

Windows Vista and later requires remote computers to log in using a user account and password that exists on the host computer. This changes the old behavior in Windows XP, which allowed anonymous access by using the username “Anonymous” and an empty password to access publicly shared folders. While this can be changed in Windows, it’s a much better idea to leave the default setting and log in with your username and password for the remote computer. Once you have logged in, you will see several hidden shares that end in the character “$,” which would be invisible on Windows. “C$”, for instance, is the C: drive on the remote machine. Any public shares are listed as well. You can simply open any share and navigate through its files and folder as you would a local folder. You can drag and drop files or double-click files to open them locally. Ubuntu will handle the file transfers behind the scenes.

Sharing folders with other computers is quite simple in Ubuntu. Just right-click on any folder in Files, and choose “Local Network Share.” A “Folder Sharing” window will appear, and you can set up sharing options by checking the “Share this folder” option (see Figure 2-20).

Figure 2-20.

Sharing your own folders with others is simple to configure

The share name is the name that will be displayed to other computers and can be different than the folder’s actual name. For backwards compatibility with old versions of Windows, you may want to keep the share name to 12 characters or less. The “comment” field appears in Windows on some screens and gives further information about the share. By default, a shared folder can be modified by the owner but is read-only by others. The option “Allow others to create and delete files in this folder” is self-explanatory, but makes the shared folder editable by anyone who can access the share. “Guest access (for people without a user account)” is also useful if you want to share a folder with your local network without requiring each remote user to have a user account and password on your computer.

Sharing Printers between Computers

Reliable printer sharing is one of the great joys in life. When your home has only one printer but you have multiple computers, there’s no beating the convenience of being able to print to a central location no matter where you are. Depending on your printer and your network environment, there are two main ways to connect to remote printers.

Many printers have built-in network support, and this is by far the easiest way to connect to a printer over a network. Part of what makes this so simple is that most network printers simply implement SMB or Samba and can be left on during the day so that they can be printed to by all computers on the same network. As long as Ubuntu includes a driver for your printer, this tends to be the easiest way to connect, and Hewlett-Packard printers tend to be very reliable because the manufacturer maintains open source drivers that are included with Ubuntu.

Ubuntu’s support for Windows file and printer sharing means that accessing files on other computers and making them accessible from other computers is quick, easy, and should work no matter which operating system your other computers or network appliances are using.

Sharing Office Documents with Others

On Ubuntu you’ll start off with LibreOffice. This full-featured office software is more than capable of opening, editing, and saving Microsoft Office documents. But by default it uses the Open Document Format to save its files in. This standard format is now supported by all modern office software, but legacy office software may have limited support.

LibreOffice supports saving files in many various formats. By default, a document will be saved in its original format. However, you may find it convenient to offer files in different formats to ensure an optimal viewing experience for others.

In LibreOffice, you can choose “Save As…” from the File menu. You can either type a file name with a standard extension (“.odt” for Open Document Text format, “.doc” for Word 97 format, “.docx” for Word XML format, “.html” for HTML, and so on) or choose a specific format from the drop-down list under the folder view. Clicking Save will save a copy of the document and continue saving under the new filename and format. Word formats are useful for sharing files that must be edited by users with Microsoft Office, which may have limited support for the Open Document format.

If you would like to ensure that the other user can view and print a document precisely as you formatted it, but you do not need or want them to edit it, you can save a copy of the file as a PDF. This is available via the “Export as PDF…” option under the File menu in LibreOffice, and will create a file that represents a printed document that can be viewed and printed by others on any operating system with a PDF viewer.

Note

In producing this book, my editors needed Word 2010-format documents and provided Word template files. However, I don’t own a modern copy of Microsoft Word and used Ubuntu exclusively. I opened the template in LibreOffice and saved it in Open Document Text format and started typing. When I finished a chapter, I would save it as Word XML (DOCX) format and send it to my editors. Each of us was able to use our preferred tools to deliver this book into your hands.

Sharing Photos and Graphics with Others

Graphics images are among the easiest files to share between operating systems, as the Internet has seen to it that the most common and useful file formats are supported and shared between all modern operating systems. Therefore, most formats should work without issue. I will simply add a note about each of the most common file formats.

JPG files are the most common format around. This is a “lossy” format, which means that it saves space by not encoding all of the data perfectly when it’s compressed. This format is designed for real-world photographs and takes advantage of how the human eye works. This does mean that editing and saving JPG files results in a slight loss of quality that can build up over time. For a finished photograph that does not need to be edited more than once or twice, JPG is the clear winner. For art with large single-color fields or line art, the compression can interfere with the image quality.

GIF is a fairly ancient file format that was developed to be easy for the slow computers available in 1987 to process. GIFs have only 256 colors, and therefore tend to be low quality, but they are often used online to show short animations. For any other purpose they are a bad choice, even if they work everywhere.

PNG was developed as a response to a patent lawsuit regarding the GIF format, and is probably the most versatile image format around today. With good lossless compression, the resulting files are not subject to quality loss over multiple edits, and while photographs result in much larger file sizes in JPG, line art is much smaller and more crisp than GIF. This is a perfect format for works in progress and can be opened in almost every image browser.

TIFF was an early black and white-only format that was developed as a common format for desktop document scanners. t is still often seen as a format for scanners and faxes. While the format became quite versatile for grayscale and color documents and can flexibly hold lots of notes and other information about a scanned document and can even use JPEG compression for documents, it’s probably better to choose JPG for a final file or PNG for a file that will be edited by others.

Formatting Disks to Work with Other Operating Systems

Computers store data on hard disks, floppy disks, CD, DVD, and Blu-ray discs, magnetic audio tape, paper tape, solid state disks, and flash memory, and the physical formats have changed tremendously since the 1940s. The logical formats have changed even more rapidly. I’ll use an analogy to help illustrate how computers and disks work.

A disk is like a ruled piece of paper. You might have a single sheet, or various sizes of notepads. They can be opened and viewed by anyone. Internal and external hard disks, optical discs, and media cards are all like a notepad.

When you write in a physical notepad, the notepad doesn’t really care what you write. You can write in English or German. Japanese kana represents sounds. Hebrew characters represent sounds but are written from right to left. Chinese ideograms represent ideas. All of these can be written between the lines on the same notepad. But only some of these ways of writing will make sense to readers. These writing systems are like the disk format and file system and the readers are like the operating system.

Windows and Mac computers were typically used in homogeneous environments. This meant that in the days before networking was widespread, Microsoft and Apple were free to develop their own way of reading and writing data to a disk in a manner that was efficient and supported the way their software worked. For this reason, Windows computers first supported only FAT file systems written to a full or MBR-formatted disk. Mac computers supported HFS file systems on a full or Apple Partition Map-formatted disk As their needs became more complex, Windows computers began supporting NTFS and GPT, and Apple computers began supporting FAT so they could read and write Windows-formatted disks, and started using HFS+ and GPT. But priority was given to the native file formats on each system.

Linux grew up in a world where it needed to read a lot of different file formats. So while the “extended file system” was developed to serve its needs better than the Minux file system it started with and Ubuntu today uses the fourth version of this system, ext4fs, it also often needed to read Windows- and Mac-formatted disks. This resulted in rich file system support that Ubuntu benefits from today. The upside is that Ubuntu can read almost any disk format that it sees. But Windows and OS X are still very limited in the formats that they support. Here are some tips for formatting disks so that they can be used on Windows and Mac computers.

Both Windows and OS X can read MBR and GPT formatted disks. MBR is good for small media devices, but GPT should be used for any hard drive and is required for drives larger than 2.1 TB. Apple Partition Map can only be read by OS X and Ubuntu, and has been replaced by GPT on OS X.

File system support is trickier. The only format that Windows and OS X both support for reading as well as writing is FAT32. This format can be read in almost any consumer device on the market, but can be prone to corruption if a computer or device loses power while writing, and also has a file size limit of approximately 4 GB. Especially for video and backup files, this can be restricting.

The native Windows format is NTFS, and Ubuntu can read and write this format reliably. However, OS X can only read NTFS and not write to it. For sharing between Windows and Ubuntu computers, however, this is a very robust and reliable format.

The native OS X format is HFS+. Ubuntu doesn’t have trouble reading this format, but Windows cannot read it at all without third-party software. While it is suitable for sharing between Windows and Ubuntu computers, it will cause problems with Windows.

The write-once-only nature of early optical discs posed special problems, and therefore early CD-ROMs used a file system called ISO 9660. This was extended in a few different ways to support long file names and was eventually replaced by UDF, or Universal Disc Format. The upside is that CD, DVD, and Blu-ray data discs use these formats exclusively. This means that optical discs can be read by any computer with a compatible disc drive. So you’ll never need to worry about formats—your burning software will take care of that decision.

Summary

Using a new operating system can be very much like living in a different part of the world with different customs: much is still familiar, and just a little bit of context can make your environment much more comprehensible.

Ubuntu has its own strengths and works very well with others. Whether you move to Ubuntu only or use it along with other operating systems, Ubuntu is flexible to work with other computers over the network or via floppy disk. Armed with this knowledge, you’re ready to begin using Ubuntu as a part of your everyday routine.

© Nathan Haines 2015

Nathan HainesBeginning Ubuntu for Windows and Mac Users10.1007/978-1-4842-0608-9_3

3. Productivity at Home and Work

Nathan Haines1 

(1)

CA, US

A fresh Ubuntu installation is reasonably complete. The applications and tools that are present form a comprehensive computer system that can be used for all basic daily computer use and more. But the Ubuntu software repositories are home to thousands more software packages that can transform your computer into a powerful tool to boost your productivity. The possibilities are nearly endless.

One of the strengths of the default software—from the Firefox Web browser to the Thunderbird email client to the LibreOffice office suite—is familiarity. This world-class software is common on Windows and Mac computers and is familiar enough even if you haven’t used it before. Instead of focusing on the default applications, this chapter covers additional software that can enhance the most common tasks that users will want to accomplish: from advanced email management to note taking, time management, organization, file backup, and working with web apps and mobile apps. Each is available through the Ubuntu Software Center.

Writing Documents without Distractions Using FocusWriter

Writing is one of those activities that is really personal. There are a lot of different ways of writing, and every writer has his own preferences and rituals. Personally, I like to write outlines and notes with a fountain pen in a notebook, which is how this very book started out. Then I like to switch to a word processor for most of the actual writing. LibreOffice is a great way to format documents, and I used it exclusively to write this book. But the features and toolbars can also be distracting.

A lot of creative writers prefer to use simplified writing environments. Early word processors were very simple with little to no interfaces for menus, toolbars, and status bars (sometimes referred to as “chrome”). While pressing F11 in Text Editor, Ctrl+Shift+J in LibreOffice, or opening a terminal and running nano (see Chapter 5) will reduce distractions, there’s a purpose-built word processor that’s designed with writers in mind.

FocusWriter is a minimalistic word processor that fills your entire screen (see Figure 3-1). Unlike other similarly focused text editors and word processors, FocusWriter opens OpenDocument Text and Rich Text Files as well as plain text. It also supports simple text formatting. The default theme in Ubuntu 14.04 LTS is a gentle gray background with black text, but the background can be set to any color or photo, and the text font and foreground and background colors can be customized as well. Starting with Ubuntu 14.10, FocusWriter comes with four new default themes, and the default gives the appearance of a wooden writing desk with a white sheet of paper.

Figure 3-1.

FocusWriter provides a distraction-free environment for writing

The lack of other windows and indicators allows you to focus on your writing without distractions. Basic shortcut keys for copying and pasting work, as well as formatting with Ctrl+B for bold text, Ctrl+I for italic text, and so on. The word processor keeps track of your word count and time writing, and also allows you to set an alarm or timer to help you keep track of your progress. This is perfect for using the Pomodoro technique or setting up a word count goal for events such as National Novel Writing Month.

Despite the empty look of the writing area, FocusWriter does have an interface that appears as needed. By bringing the mouse up to each edge of the screen you will access a different interface feature. In the application, only one feature is visible at a time. The composite screenshot below (see Figure 3-2) displays all edges for illustrative purposes.

Figure 3-2.

Each edge of the screen provides a different tool for working with your documents

The top of the screen contains the menus and a customizable toolbar. You can rearrange and add or remove toolbar buttons and labels in the menu system under Settings ➤ Preferences....

The left side of the screen shows all “scenes” present in the current document. Scenes are separated by “##” on a single line per standard writing convention, but this is easily customized in the preferences as well. The scene selector allows you to quickly jump between portions of your document. The right side of the screen displays a standard scroll bar and can be used to manually scroll through your document.

The bottom edge of your screen shows you all open documents as well as statistics for the current document. If you’ve set a time or word count as a daily goal in the preferences, it also displays your goal progress as well. The right side of the status bar shows the current progress of any active timer or alarm as well as the current time.

The one fun feature of FocusWriter that might be tricky to enable is the “Typewriter sounds” feature. This feature plays a clacking typewriter sound each time you press a key while editing your document. It requires additional software that may not be preinstalled on your computer. If you use the Ubuntu Software Center to install FocusWriter, you will see that the software detail page shows “Mixer library for Simple DirectMedia Layer 1.2, libraries (libsdl-mixer1.2)” under Optional add-ons. You can select the check box next to this item and click “Apply Changes” to install this automatically or you can install the package libsdl-mixer1.2 via the command line.

FocusWriter is a fun and easy way to cut out distractions and write creatively. With a little background music or white noise and a serene landscape background, the only thing missing to fuel your writing time is a mug of tea or coffee.

Managing your Personal Finances Using HomeBank

Managing money is a major life skill, and it’s a lot easier if a computer can do all the math for you. There are several financial management programs available in Ubuntu, but one of the simplest to use is HomeBank.

HomeBank is a single-entry home accounting program, and it keeps track of your account balances and transactions (see Figure 3-3). You can import QIF, OFX, or QFX files exported Quicken, Microsoft Money, or You Need A Budget, and you can also import OFX files downloaded from your bank. This can help you get a head start in populating your data.

Figure 3-3.

A high-level overview of your current account balance and recent spending

When you first run HomeBank, you’ll see a welcome dialog. Creating a new file will walk you through entering your personal information and your first account. “Accounts” can track any type of money, whether it is cash at hand, money stored in a bank account, or the monetary value of an asset or liability. You can also set up accounts to be excluded from the budget or reports if you want to track something separately.

Once you have HomeBank set up, running the application will show the main window. It shows all of your accounts sorted by category, with the bank reconciled and current balances as well as a balance that includes transactions you’ve entered but which take place in the future. It also shows a pie chart of your spending by category, which you can adjust to show for the last month, the current month to date, by quarter, rolling 30, 60, or other day period, and otherwise customize to your preferences. At the bottom of the screen, you’ll see upcoming transactions that are scheduled as bills.

Double-clicking on an account will show the account window. It works just like a check register (see Figure 3-4). Adding transactions adjusts your balance. Aside from the date and amount, you can also enter payee and category details as well as a memo. This allows you to keep track of your account balances. Reconciliation is handled manually, so you’ll need to compare your transactions with a printed bank statement. You can select a transaction and click the reconcile button from the toolbar to mark it as reconciled. When you finish, the “bank balance” displayed on the main screen should match your latest bank statement.

Figure 3-4.

Entering transactions works just like a standard check register

HomeBank also allows you to set up your budget expectations with the budget dialog, and you can adjust budget amounts for each category on a month-to-month basis. The main window offers several reports, and clicking on the respective toolbar button will display a report window. By default it shows an informative but bland list view, but you can choose between various chart views for each report.

An extremely useful feature of HomeBank is the ability to view a vehicle cost report. This allows you to track not only repair and maintenance costs, but also your fuel economy. Be sure to use Edit ➤ Preferences from the menu and choose “Use Imperial units” under “Display formats” if you want to view your fuel economy in terms of miles per gallon.

Altogether, HomeBank is a simple yet power way to track your finances. While best spending practices are still your responsibility, having your spending data and friendly reports available will help you keep on track of your money.

Managing Your Professional Email, Contacts, and Calendar Using Evolution

Evolution is a deluxe email and personal information management software in Ubuntu. In addition to email, it also manages your contact list, calendar appointments, and to-do lists as well. It is equivalent to Microsoft Outlook and is very similar in organization. For many years it was the default email manager in Ubuntu, but it was replaced by Thunderbird in an effort to make the default desktop more simple and lightweight. However, if you can make use of the extra functionality in Evolution, you will find that this application will make your life a lot more simple.

The first time you launch Evolution, the Evolution Account Assistant will appear. This setup wizard will guide you through the process of setting up your first email account. For this, you will likely need the details of your email provider’s server settings; however, popular public providers may be set up automatically. The very nice thing about setting up your email with an IMAP account is that you can continue using Evolution along with Thunderbird, Outlook, Windows Mail, or your phone and view the same email on each device. Once you have set up your mail account, Evolution will launch and prompt you for your account password. Then you’ll see the main Mail window (see Figure 3-5).

Figure 3-5.

Evolution is a very capable email and personal information manager

Evolution can handle multiple email accounts from different servers, and each account has its various folders listed on the left side of the window. The right side of the window has the message list for the currently selected folder and a preview pane for the current message below the message list. The message view is particularly useful because it groups email by reply in a threaded view, which you can turn off if you like by choosing the menu option View ➤ Group By Threads. This is very handy for mailing lists or long email discussions on a single topic.

On the bottom left of the window you’ll see buttons that allow you to switch to other modes as well. Evolution supports multiple contact lists, calendars, a task list, and various memos and to-do lists.

Contact view lists your contacts, and you can track user details both locally and by syncing them with online address books provided by Google, LDAP servers, or over WebDAV. This allows you to utilize your phone and work contacts while keeping them separate from each other. Clicking the down arrow to the right of the “New” button on the contacts view allows you to create a new address book, and the “Type” drop-down menu allows you to choose an online data source for your address book.

The Calendar view allows you to view and edit appointments and other schedule data as well as a task list. In addition to your local calendar, you can also add CalDAV, Google, ICS, and weather sources that you can display one at a time or in aggregate on the calendar display (see Figure 3-6).

Figure 3-6.

Calendar view shows schedules from multiple calendars side by side

The nice thing about Evolution’s multiple calendar support is that you can easily import shared calendars as well. This lets you view your friends’ or coworkers’ public calendars and coordinate your schedules. You can easily toggle any calendar’s display by clicking the check box beside the calendar on the left-hand side of the window.

The monthly thumbnail calendar lets you navigate to dates quickly, and dates with appointments are displayed in bold. You can change the calendar view from day, work week, week, month, or agenda-style list by clicking the toolbar buttons. The task list can be resized with the drag handle to make more room for the calendar view.

Task view lets you set up working tasks that you can schedule start and due dates for, record priorities and notes, and mark canceled or completed. Tasks can easily be marked completed by clicking the check box next to a task on either the calendar or task view.

Memo view is similar to task view except there is no priority or completion status. Memos are virtual sticky notes you can use to keep miscellaneous information around. They can be searched or printed from this view.

One very nice feature of Evolution that isn’t available by default is the ability to connect to a Microsoft Exchange server. This allows it to function as a drop-in replacement for Microsoft Outlook for business use, and you can send and accept appointments via email. If you use the Ubuntu Software Center to install Evolution, you will see that the software detail page shows “Exchange Web Services integration for Evolution (evolution-ews)” and “Exchange support for the Evolution groupware suite (evolution-mapi)” under Optional add-ons. You can select the check box next to these items and click “Apply Changes” to install them automatically, or you can install the packages evolution-ews and evolution-mapi via the command line. I usually install evolution-mapi support first to see if it is compatible with the Exchange server I wish to connect to. If it is not compatible then I install and try evolution-ews instead.

Evolution is a heavy-duty email client that can be used to manage your email, schedule appointments with yourself and other, take advantage of your existing Google and work email, calendars, and address books, and keep track of work tasks and other information. If you are used to Microsoft Outlook, then Evolution can smooth your transition over to Ubuntu. You can even manage your work email in Outlook and your personal email in Thunderbird if you prefer—both programs coexist peacefully on the same computer.

Managing Your Calendar with Thunderbird Using Lightning

Thunderbird is a nice, simple messaging client. Famous for email, it also handles Usenet, RSS, and instant messaging as well. But it doesn’t include a calendar, and that can feel like a strange omission for a basic desktop. Most computer users use online calendaring tools, but it can be extremely convenient to have this tool on your desktop as well. If Evolution is too heavy for your comfortable use, you can add calendar functionality to Thunderbird as well.

The calendar plug-in for Thunderbird is called Lightning, and it adds a “Today Pane” and dedicated Calendar and Tasks tabs to Thunderbird. You can toggle the Today Pane on and off from the bottom right corner of the Thunderbird window, and you can open the Calendar and Task tabs by clicking the respective icon on the right side of the tab view, just under the title bar.

On the bottom left of the Calendar tab (see Figure 3-7), you’ll see a list of calendars, with “Home” being the default calendar. You can right-click here and choose “New Calendar…” to create a new calendar, and you can either create a local or remote calendar. Choosing “On the Network” allows you to choose an ICS, CalDAV, or Sun Java System Calendar Server, and if you installed Google Calendar support, you can add a Google Calendar for synchronization.

Figure 3-7.

Calendar view shows schedules from multiple calendars side by side

To add your personal Google Calendar, log into your calendar in a Web browser at http://www.google.com/calendar/ . Then click the Gear menu icon in the top right of the Calendar page and choose Settings from the drop-down menu. Click the Calendars tab and then click on the name of the calendar you want to access in Thunderbird. You’ll see the section “Private Address.” Right-click on the XML icon (not the ICAL icon) and choose “Copy Link Location.”

Next, go to Thunderbird, switch to the Calendar tab, and right-click in the calendar list and choose “New Calendar…” Select “On the network” and click “Next,” then choose Google Calendar and paste your private XML link into the “Location” field by clicking in the field and pressing Ctrl+V or right-clicking in the field and choosing Paste. Thunderbird will ask you for your Google account and password. Enter it and click OK, then you can name your calendar and choose an event color. When you click “Next,” your calendar will be created and Thunderbird will synchronize your appointments. When you create a new event and select your Google calendar during creation, the event will appear on the Web and any other device where you use your Google account.

If you use the Ubuntu Software Center, search for Thunderbird, and click on “More Info,” you will see that the software detail page shows “Calendar Extension for Thunderbird (xul-ext-lightning)” and “Calendar Extension for Thunderbird - Google Calendar support (xul-ext-gdata-provider)” under Optional add-ons. You can select the check box next to these items and click “Apply Changes” to install Lightning and additional Google support, or you can install the packages xul-ext-lightning and xul-ext-gdata-provider via the command line.

Lightning is a great add-on to Thunderbird that adds basic calendar support to the email client. You can use it to manage your appointments and keep your schedule synchronized across all of your devices.

Integrating Your Online Accounts with Ubuntu

Now that most home computers are connected to the Internet, online services have become a routine part of computing for many of us. Working online allows us to talk and share photos with our friends, keep track of and share Google Drive documents from any online computer, and sync our calendars with the Web.

Ubuntu supports various online accounts that integrate with some of its default applications. For instance, you might use Facebook or Flickr to share photos with friends, or you might use Google Docs to collaborate on documents, or Google Calendar to manage your schedule. Adding your online accounts to Ubuntu allows you to bring your online data to your computer seamlessly. Ubuntu’s Online Accounts manager allows for easy online data integration. Simply click on the Gear menu in the top-right corner of the screen, click on “System Settings…” in the menu, and then click on the Online Accounts icon. This brings up the Online Accounts applet (see Figure 3-8). The left-hand side of the window displays all currently configured accounts, and the right-hand side shows individual Ubuntu applications that integrate with the account.

Figure 3-8.

Ubuntu brings your online accounts directly to your desktop

Because no accounts are configured, the only item on the left is the “Add account…” option. On the right, all online account types are displayed, and you use the drop-down menu above the list to filter accounts by the type of services they provide. This can help you prioritize which accounts you add to Ubuntu. You can always add or remove accounts at any time.

Each online account can actually integrate with your desktop in various ways. The Facebook account integrates with the Unity Photo Lens and Shotwell. This means that when you add your Facebook account to Ubuntu, the Photo Lens will show your Facebook photos alongside the photos on your computer. When organizing your photos, you can send them to your Facebook account to share with your Facebook friends directly from Shotwell.

Google is another example of a service that has many different services. Adding your Google account will show your personal and shared Google Docs files in search results on both the Unity Home and File Lens, and the Photo Lens will show pictures from your PicasaWeb and Google Photos accounts. Ubuntu also synchronizes your Google Calendar events. When you click on the Date and Time indicator at the top right of your screen, the calendar will show dates with events in bold along with the next five scheduled events from the selected date underneath the calendar. If you have Evolution installed, your Gmail email and contacts along with your calendar will be automatically integrated into Evolution with no further setup.

Ubuntu’s online accounts support allows you to sign into your online services in one place and integrate them into your Ubuntu desktop. For instance, if you have Facebook, Flickr, and Google accounts all set up, the Unity Photo Lens will display photos from all three services together. But the Online Services applet keeps you in control of what information you share with your local applications. Each account can be enabled or disabled altogether, or on a per-application basis (see Figure 3-9).

Figure 3-9.

You’re in control of the data you share with your computer and online

Clicking on an account shows exactly what applications can integrate with the online data. Evolution Data Server can synchronize your Google email, contacts, and calendar, for example. Your Google Calendar data will appear in the Date and Time indicator, but without Evolution installed, Ubuntu won’t use your Gmail data. You might choose to install Evolution or disable Gmail integration. (Mozilla Thunderbird does not use Ubuntu Online Accounts integration and works independently.) You can also disable the Google Drive search plug-in if you prefer not to see your Google Docs files in the Unity Dash alongside your local files. This allows you to customize how your data are shared.

This integration technology also provides seamless integration of local and online data in Ubuntu on phones and tablets, so online account integration should increase in Ubuntu 16.04 LTS and beyond as more online providers are added to Ubuntu.

Chatting Online with Friends

With the simple integration of online accounts, Ubuntu also makes instant messaging a uniquely pleasant experience. Instead of installing and running a different chat client for each network, Ubuntu comes with Empathy instant messaging client. It uses the online account information you already entered into the Online Accounts applet to allow you to see all of your friends in one place, and it integrates into the Unity interface, with both notifications and the Messaging indicator (see Figure 3-10).

Figure 3-10.

You can talk to your friends in one place, no matter what chat network they use

All chats have the same clean interface, and while some advanced graphical features aren’t supported, it can be nice to have a single way to talk with friends. If the chat network supports it, you can send and receive files as well as start audio and video chat via Empathy’s menu system. You can use the Messaging indicator, represented by the envelope icon in the top-right corner of the screen, to change your online status and set it to away, busy, invisible, or offline. This allows you to change your status even if Empathy is not running or if you’re working in a different application. When new instant messages come in, the Messaging indicator will turn blue and a Unity notification will appear at the top right of the screen. These do not interfere with your current application and like all notifications will fade when your mouse is over them and can be clicked through.

The one online account that will not sound familiar but can be incredibly useful is called “Salut.” This is cryptically described as “link-local XMPP.” That means that it announces your presence on your local network and listens for others, the same way network printers and file shares are automatically detected. If you add this to your Online Accounts, you will be able to see others who have done the same on the network around you. It doesn’t need a server and doesn’t communicate over the Internet across a router, so this is a really useful way to set up messaging between different family members’ computers at home, or among colleagues at a small office with no additional software involved.

If you are unhappy with the way Empathy works, you can also install Pidgin from the Ubuntu Software Center. Pidgin was once the default instant messaging client in Ubuntu, and still remains popular today. Aside from being available on Windows as well, it also has multiple third-party plug-ins to add features and chat network support. It does not use Ubuntu’s online account integration, so you’ll need to set up your online accounts individually in Pidgin itself. As an instant messaging client, Pidgin supports more online services than Online Accounts does (see Figure 3-11), and is quite capable on its own. It calls link-local XMPP “Bonjour,” and you can use Bonjour support to see and talk to others who are using Empathy and “Salut.”

Figure 3-11.

Pidgin is another popular chat client that supports a variety of chat networks

Skype is available from the Ubuntu Software Center, and has been optimized to work with Ubuntu. Firefox also has a built-in voice and video chat service called Hello that you can use to talk with others without installing additional software. By clicking the Hello icon in the Firefox toolbar, you’ll be able to create a secure chat room with a Web link you can send to friends. When they follow the link, they will join the conversation in their Web browser. In addition to voice and video, you can also share your screen or specific Firefox tabs, which makes Hello great for collaboration and remote computer assistance. Neither you nor the other person needs to create an account to use Hello, and the voice and video chat will work with most other Web browsers. This is a fast way to securely communicate with a friend without installing additional software.

Ubuntu’s default instant messaging experience is built into the operating system and offers the convenience of a single way to interact with all of your friends. By integrating with the Messaging indicator, you have complete control over your online presence at all times without leaving your current application, and your accounts are securely authorized in the Ubuntu Online Accounts applet in System Settings. While other instant messaging software is available, Ubuntu keeps you in touch with your friends right out of the box.

Organizing Your Thoughts with Mind-Mapping Software Using Freemind

Mind mapping software is a great way to organize thoughts and notes in a structured manner that is still free enough to experiment and brainstorm. This category of software is increasingly popular in creative circles, and is a great way to explore an idea because you can being thinking in broad terms and then come back to each category and begin to focus on more specific concepts.

Freemind is a popular mind mapping tool in Ubuntu, and can be used to create mind maps. The software works rather simply, with a concept in the middle, and then you can add “elements” to represent subconcepts. A map can range from simple to very complex. The included documentation comes in the form of a mind map and demonstrates some of the variety of formatting options, categories, icons, and hyperlinks that can be included in each element (see Figure 3-12).

Figure 3-12.

Freemind’s documentation shows the advanced formatting options available

Using the software is fairly simple. Once you have your main concept (“drinks,” for example), you can add nodes that branch off of the main node. Just hovering your mouse over a node until it turns gray and pressing the Ins key will create a child node and place the cursor so you can begin typing. You might add “tea.” Typing a name and pressing enter will leave the new node selected. Moving your mouse back over the main node again and pressing Ins, you might add “coffee.” Then hovering over tea you could add “black,” “white,” “green,” and “oolong.” Under “coffee” you might add “americano,” “espresso,” “latte,” and so on. As you thought of variations on each category you can add more child nodes. “Earl Grey” might go under black tea, or you might add a new node called “flavored” and leave each category for types of leaves.

Removing a node is as simple as hovering your mouse over it so it turns gray and pressing the Del key. A confirmation window will pop up and ask if you really want to delete the node. Deleting a node will also delete all child nodes it contains.

You can edit nodes as well. Clicking on a node allows you to rename it. Dragging a node elsewhere will attach it to a different node. Right-clicking on a node allows you to set a lot of different options. Exploring the documentation will help illustrate the possibilities, but you can add or remove various predefined icons, change the formatting or style, and even export a branch as a new mind map if you decide you want to expand on a concept more fully on its own.

A nice thing about Freemind is that it has a large number of export options. You can export a mind map as an HTML, XHTML, Java, or Flash applet for adding to a web site, an OpenOffice.org Writer file that can be opened in LibreOffice, an image, and more. This makes sharing mind maps with others extremely easy.

Freemind is a nonconventional organizational and planning tool that is useful for keeping track of projects, Internet research, and organizing all manner of research for authors of both fiction and nonfiction. It may just be the tool that helps channel your creativity.

Personal Wiki Note Taking Software Using Tomboy

Everyone likes to keep notes handy. These simple reminders can be practically anything—lists, memos, or tiny documents that are not quite worthy of text or LibreOffice files because they are small or somehow related. Just as sticky notes are a way of life for some, keeping notes on the computer brings a new level of convenience to the desktop.

Tomboy is an easy-to-use note manager that combines the simplicity of sticky notes with the power of wiki software. When you open Tomboy, you’ll see a list of notes. The very first time the “Start Here” note will open with an explanation of Tomboy and an invitation to click on the linked note, which explains how Tomboy functions (see Figure 3-13).

Figure 3-13.

Tomboy lets you create simple notes that can link to each other

This note taking software is easy to use. The “Search All Notes” window displays all notes sorted by notebook, and you can use the search bar to search the full text of any note. At any time, pressing Ctrl+N will create a new note. Then you can click on the blue, underlined title at the top of the note to change its name. Typing underneath the title will let you create the body of the note, which can be formatted by choosing a format and typing, or selecting regions of text and clicking the “Text” button in the toolbar to choose your formatting. The shortcut keys for formatting are mostly standard, but you can view them in the “Text” formatting menu for reference.

One of the unique features of Tomboy is the ability to link notes together. You can select text and click the “Link” button in the toolbar to immediately create a new note with the title of the text you selected. This note is linked to the previously selected text and can be opened again by simply clicking on the link. This allows you to expand on ideas in unlimited detail and keeps individual notes simple while making it easy to organize collections of notes.

Notes can further be sorted into notebooks, which provide for further organization. Simply clicking on the “Notebook” button in the toolbar of any note allows you to select an existing notebook or create a new notebook. Lastly, notes can be exported to HTML format and shared via email or on the Web.

Tomboy also includes a dedicated indicator applet so that it stays running even after you close the last note. You can use this menu in the top right side of the screen to quickly create a new note or open a recently opened note.

Keeping track of the little pieces of information we gather throughout the day can be tricky. Tomboy helps you organize and manage this information and keep notes cross-referenced with a simple, easy-to-use note editor with powerful formatting and simple linking between notes.

Installing Additional Language Support

One of the easiest features to take for granted is language support. Anyone who speaks English is pretty lucky in that most computer software is written entirely in English by default. But anyone who is bilingual is aware at how different menus, terms, concepts, and even simple text can be from one language to another.

Ubuntu is surrounded by a global community of developers and users, and this global community also speaks dozens of languages. One of the ways that Ubuntu embraces these members is through robust and comprehensive language support. Dozens of languages can be chosen right at installation so that Ubuntu users can feel right at home. It can be easy to forget how foreign a computer can be when it isn’t in one’s primary language (see Figure 3-14).

Figure 3-14.

Even the familiar becomes strange when it’s in an unfamiliar language

One last thing to remember is that using Ubuntu in a different language is a fantastic way to practice your language skills, and the language tools and text entry will assist you whenever you are working in multiple languages.

Language support in Ubuntu covers a variety of areas, and they are all important. The foremost, naturally, is translation support. Figure 3-14 shows Ubuntu as it appears in German. The web browser shows “Suche oder Addresse eingeben” instead of “Search or enter an address.” The menus are all in German: “Datei” instead of “File,” “Bearbeiten” instead of “Edit,” and so on. LibreOffice names new documents “Unbennant 1” instead of “Untitled 1.” Fonts capable of displaying a language’s native script are also important although the Ubuntu font supports the extended Latin, Greek and ancient Greek, and Cyrillic alphabets. Other fonts fill in where needed for other languages.

Localization is the next detail. Germany uses specific formats and spellings that are distinct from other German-speaking regions (see Figure 3-15). The clock in the top right of the screen shows 24-hour time instead of the 12-hour time popular in the United States. Numbers use commas as decimal points and periods as thousands separators so that Jupiter takes 4.332,59 days to orbit the sun instead of 4,332.59 days. And even the standard folders in the home folder are renamed. Pictures are found in the “Bilder” folder, the Desktop is now “Schreibtisch,” and the Trash is now stored in the “Papierkorb.” The first time you log in after setting a new language, your computer will ask whether you want to add the standard folders in the new language. Your system will begin using these new names as defaults, but the existing content will not be moved. Some languages have more dramatic changes. Right-to-left languages such as Arabic or Hebrew display appropriately and the Unity Launcher and the direction of progress bars also orient themselves from right to left. The calendar changes. The week might start on Monday instead of Sunday. A locale might not use the Julian calendar at all and instead use an alternate calendar. These details all add up to give a computer a native feel in any given language and location.

Figure 3-15.

Locales affect numbers, dates, calendars, measurement units, and currencies

The last component of language support is text input. At a basic level, this means various keyboard layouts to support the hundreds of physical keyboard designs available throughout the world and at various times in computing history. The Spanish keyboard has an Ñ key, and the German keyboard starts with QWERTZ instead of QUERTY and has keys for Ä and ß. Greek keyboards start :ΣΕΡΤΥ instead of QWERTY. A matching keyboard layout means that the characters that appear on your screen match the characters printed on your keyboard keys. The indicators on the top right of the screen show the current layout. “En” for English, “De” for German, and so on. Clicking on the indicator allows you to select between installed layouts, launch the Character Map, and change other settings.

Configuring Language Support

You can check your current language support and add or remove additional languages by launching “Language Support” from the Unity Dash or the System Settings menu. The Language Support window appears and displays “Checking available language support” as Ubuntu verifies the language tools available for your language and locale. For instance, an Ubuntu system installed with English (United States) is missing spelling dictionaries and locale format settings for Australia, British, Canada, and South Africa. Running Language Support will declare that “This language support is not installed completely,” and clicking “Details” will show the software packages required to complete language support. You can install the extra software or click the “Remind Me Later” button. If you do not install these extra languages, the extra English locales will not be fully available, but this can be ignored unless you wish to use them.

After language support has been verified, the Language Support window is available. It displays all installed languages in order of preference, with the current setting displayed in black. You can drag and drop languages to order them in preference. The first language will be used for the computer interface, and any untranslated portions of a program will be displayed in the next available language in order of preference. There may be a brief delay when you make a change. These changes will take effect the next time you log into your computer, but do not require a reboot. Your language settings only affect your session while you’re logged in, but you can apply your settings to the entire system if you are an administrative user. Computer startup and the login screen will be affected, but other user accounts will retain their current language settings. You will need to enter your password to authorize the change.

Clicking “Install/Remove Languages…” will allow you to add or remove support by language, which will install the associated locale settings as well. The new window lists all supported languages and you can use each language’s check box to select or unselect it. Click “Apply Changes” to automatically download the translations, locales, and any extra fonts and remove any unselected languages. You will need to enter your password to download and install the new software.

The Regional Formats tab on the Language Support window allows you to select the locale settings for your computer. This affects all sorts of formatting (see Figure 3-15) and the drop-down list will display all regions currently available for the installed languages. This can be set up independently of the display language and will only affect your account. You can likewise make this change system-wide with the “Apply System-Wide” button and your password.

Configuring Your Text Entry Settings

Text entry affects how you use your keyboard to enter text into the computer. In the most straightforward setup, you can simply select the layout that matches your keyboard so that the character printed on any given key matches the character that appears on your screen when you press it. Certain languages with complex scripts have more elaborate text entry systems called Input Method Editors. Other keyboards have special keys or features. However you prefer to enter text, Ubuntu has a setting for you. You can launch “Text Entry” from the Unity Dash or choose “Text Entry Settings…” from the input indicator menu at the top right of your screen.

The Text Entry settings window shows a list of various input sources you can use (see Figure 3-16). These correspond to various keyboard layouts. You can click on the + button to add a new layout or the – button to remove the selected layout. You can use the up and down buttons under the list to move the selected layout and the keyboard button to the right to graphically view the selected keyboard layout. These can then be cycled through at any time by pressing Super+Space or by clicking the input indicator in the top right of the screen and selecting one directly (see Figure 3-16).

Figure 3-16.

The Text Entry window and input indicator allow for quick adjustments

Certain languages have complex scripts. Japanese, for example, has two syllabaries and a logographic script that contain well over 50,000 characters between them. These would not all fit on a standard desktop keyboard. These complex languages use an Input Method Editor to assist a user in entering text.

Input Method Editors are installed along with language support, and can be selected as an input source in the Text Entry screen. Japanese support, for example, installs both the Anthy and Mozc Input Method Editors. Entering text specific to each language Input Method Editor, but for illustrative purposes we will look at Anthy for entering Japanese (Figure 3-17). Many languages have multiple Input Method Editors (for example, some Japanese speakers prefer Mozc over Anthy), so don’t be afraid to try each one and find which works best for you.

Figure 3-17.

Anthy allows for quickly entering Japanese text phonetically

In Japanese, you can greet someone by saying “こんにちは,” which you would recognize as “konnichiwa” if you heard it said out loud. Using Anthy, you can write each syllable phonetically, and as you type “kon,” “ni,” “chi,” and “ha” each syllable is transformed into the appropriate hiragana character. (Knowing the linguistic reason that the particle wa is spelled ‘ha’ is unfortunately your responsibility.) When the word displays correctly, you can press Enter and the text entry is confirmed.

Typing in other scripts can be changed via the input indicator menu or a hovering preferences toolbar that appears as you type. Typically, kanji can be entered by typing a word and pressing Space. This will highlight the entire word, and pressing Space again will bring up a dictionary with various options. For instance, typing “ohayou” and then pressing Space twice will result in “お早う,” which is a formal way of writing “ohayo-” with both hiragana and kanji characters. The Input Method Editor includes a dictionary that contains these mappings.

Adjusting Keyboard Settings

There is one more fantastically useful feature for some users who have one keyboard layout but sometimes need to write in a language with characters not supported by the current layout. This can be launched by clicking the “Keyboard Settings…” link in the bottom right of the Text Entry settings window or by launching “Keyboard” from the Unity Launcher, clicking the “Shortcuts” tab, and selecting “Typing.” This allows for customization of two different special keys called Compose and Alternative Characters (or AltGr).

Some International English keyboards have an AltGr key, usually located on the Right Alt key. It allows for quick input of special characters, so that AltGr+s might type ß, or AltGr+$ might type €. These characters will be indicated on your keyboard accordingly—usually on the top right corner of the key.

The Compose key, however, is a feature from early 80s DEC terminals and Sun keyboards and allows for simple mnemonic entry of special characters. This ranges from letters to symbols to punctuation. Pressing Compose places the computer in character compose mode, and then the next two letters will enter the a composed character if valid (or produce no input if invalid). For example, Compose, a, e produces the æ in Old English “hwæt.” Compose, n, ∼ produces the ñ in Spanish “sueño.” Compose, a, ', produces the á in Spanish “sábado.” Compose, o, ", produces the ö in Köln. Compose, -, l produces £ and Compose, =, c produces €. A little bit of practice will save a lot of time for those who are learning a new language or simply occasionally need a character not found on the keyboard in front of them. For instance, Compose, <, " and Compose, >, " produce typographically correct quotes as used around “this” word instead of the straight quotes produced by the " key on its own.

You can learn more about the AltGr and Compose key by visiting the Ubuntu documentation at https://help.ubuntu.com/community/ComposeKey and view a list of supported Compose key sequences at https://help.ubuntu.com/community/GtkComposeTable .

Installing Language Fonts

By default, Ubuntu ships with fonts capable of displaying most modern language and installing language support will bring in any additional fonts. But there are two packages that can quickly add additional language support so that you never end up seeing a Unicode error box on a web page.

The first font is called “Ancient Scripts,” and this provides everything from ancient hieroglyphic and cuneiform script support to musical notation, various symbols, and Emoji support.

The second is called “GNU Unifont” and has a character for every visible Unicode character in the Basic Multilingual Plane. This acts as a fallback font so that it will display any time your computer tries to display characters that are not provided by any other font.

Both can be found in the Ubuntu Software Center, or you can install the ttf-ancient-fonts and unifont packages via command line.

Whether you are monolingual, learning a new language, or comfortable with many languages, the language display and input support in Ubuntu is world class. Your computer experience will be comfortable, familiar, and convenient in the world’s most popular languages.

Keeping Track of Your Personal Time Management Using Hamster

Time management is an important skill for everyone to some degree. It can be used to track your daily routine to make yourself more efficient, to pace yourself when working on a project, or it can be used to track billable hours when working with a client. All of this can be accomplished by using Hamster Time Tracker (Figure 3-18).

Figure 3-18.

Hamster keeps track of your activities throughout the day

To begin using Hamster, launch “Time Tracker” from the Unity Dash. You can alternatively run “Hamster Indicator” if you would like to add an indicator menu to the top right of your screen on the Unity menu bar. The Time Tracker window will appear (see Figure 3-18). The goal of Hamster is to record your activities and their duration. In the screenshot above, several activities have been recorded and Hamster is tracking a server maintenance activity.

Activities are started by typing in a description, such as “reading email.” An activity can be associated with a category and this can be indicated with the at (@) symbol. For instance, “reading email” is unsorted as in Figure 3-18, but “reading email@Work” would be categorized under work. The window lists today’s activities and summarizes the amount of time spent on each category under the list. Tags can also be used to further describe an activity.

Once you enter an activity name, you can click “Start Tracking.” Hamster will record the start time of the activity and begin tracking time spent, which is shown in the “Today” list. You can close or minimize Hamster and perform work. When you are finished, you can open Hamster and click “Stop tracking,” which will record the end time and duration of an activity. This allows you to quickly note your start and stop times throughout the day and leaves the details to Hamster. Clicking the pencil icon next to any activity will bring up a window where you can edit the activity (see Figure 3-19), and the “Add Earlier Activity” button will allow you to set create an activity and specify the start time and an end time if it is in the past.

Figure 3-19.

Hamster has a weekly overview where you can quickly edit activity details

Clicking the “Show Overview” button displays a weekly overview with a bar chart display of time tracked at the top of the window as well as a list of activities and time tracked per day. You can also edit any activity entry here. The overview window can also show an overview by day, week, month, or year, and the back and forward arrows will move to the previous or next unit of time while the home icon will display the current unit of time. The drop-down menu with the date will allow you to change the date range or zoom level, and hovering over the bar chart will display a zoom out icon in the top-right corner that will let you zoom out all the way to the yearly view.

These overviews are very handy, and you can also use the Overview ➤ Save report… menu to save the displayed overview to an HTML file. This pleasant-looking report is perfect for sharing with clients or team members.

Edit ➤ Preferences allows for convenient customization. By default Hamster will remind you of your current task every 27 minutes, but you can customize this to 25 minutes if you’re a Pomodoro fan or change the reminder interval from 5 minutes to never. You can also set the day’s start time for the purpose of daily time reporting and it can use your to-do list from Evolution or Getting Things Gnome if you use those task management programs as well. The “Categories and Tags” tab lets you quickly add, remove, recategorize, or rename activities and categories to help speed up activity entry, and the “Workspaces” tab allows you to use the workspaces feature of your Ubuntu desktop to automatically switch activities. This is extremely useful if you use a different workspace for work, personal use, and entertainment.

Hamster is a very unobtrusive way to keep track of your time at and away from the computer, and its flexibility ensures that no matter why or how you wish to track your time, you’ll be able to fit it into your workflow.

Organizing Collections of Books, Movies, Games, and More Using Tellico

Most of us have collections of things of one kind or another. Whether it’s art, books, movies, video games, or more, there’s nothing better than being able to admire a lovely collection of things that have special significance. On the other hand, it can be pretty hard to keep track of large collections, and that’s where Tellico is ready to help fill in.

Tellico was original written by its author to manage his books, but has since grown to allow for virtually any kind of collection. Right out of the box, it also comes with profiles for comic books, videos, music, coins, stamps, cards, wine, board games, and you can create custom collections as well. If you need to keep track of it, you can do it with Tellico.

Once you choose a collection type, adding entries to the collection is simple. The middle of the toolbar will have a “New” button with the icon of the collection type. Clicking on it will display a new entry window where you can enter in item details (see Figure 3-20). You can be as brief or as detailed as you would like. Every field is optional. Tellico is smart enough to understand certain formatting as well. For instance, titles are sorted correctly if the first word is an article such as “the” or “a.” And the author field is sorted as a name. In the example given, “J.R.R. Tolkien” is displayed and sorted by his last name. Tellico treats it the same if I enter “Tolkien, J.R.R.” If a book has multiple authors, just separate their names with semicolons (;) and Tellico will be able to group them correctly.

Figure 3-20.

Tellico allows you to manage each item in a collection and track details as well

You can also use Tellico to keep track of items you lend out. By selecting one or more items and right-clicking on them, you can choose “Check-out…,” which will bring up a Loan window. You can enter a name, loan and due dates, and a note. Once it is returned, you can select the items and use the “Collection ➤ Check-in” menu option to mark the items as returned.

It’s the unfortunate reality for anyone who tracks collections that adding a new item is exciting, but the data entry required to track an existing collection in a new application is staggering. Tellico makes this easier in several ways. First, it can import data from many different file types. File ➤ Import shows a list, but CSV data can be easily imported and mapped to fields, and Tellico can import entries from GCstar, Alexandria, Goodreads, and many more.

Tellico also has a list of online databases for each default collection type. By right-clicking an entry and choosing “Update Entry,” you can choose between various databases to complete the information in the entry. Using the Open Library, for instance, can get author, publisher, genre data, and even cover art. This quickly and easily allows you to fill in the gaps when building a collection.

Every field tracked by Tellico can also be modified and customized. Clicking the “Fields” button displays the list of collection fields and allows them to be edited in innumerable ways. For instance, the Games collection type has a “Platform” field with a drop-down list of various consoles and computer platforms. But this list doesn’t include the first couple of console generations or the latest. Figure 3-21 shows how the list is separated with semicolons and how easy it is to add new values.

Figure 3-21.

Each collection’s fields can be completely customized

All of this information can be sorted in various ways and reports can be generated and saved as HTML files or printed. This is useful for making your own checklists or sharing your collection via email or on the Web.

Keeping track of your favorite collections is made easy and simple with Tellico. The combination of common collection profiles, the ability to import details from online sources, and the flexibility of customized fields all combine to make tracking your collections almost as much fun as collecting them.

Managing your Ebook Library Using Calibre

The digital revolution has transformed many industries, and the book publishing industry is no different. With the advent of electronic publishing, traditional and independent publishers can both publish ebooks. The publishing industry has also standardized around the EPUB format, while Amazon instead opted to extend the old MOBI ebook format. Classic books and new works are alike are available in these and other formats, and ebook software is not only available for computers and smartphones, but dedicated reading devices with both e-ink and LCD displays are available. Reading has never been more accessible, but keeping track, managing, and backing up all of your ebooks can be daunting. Calibre can manage your ebook library across your computer and your devices.

The first time you run Calibre, it will ask you to choose a name and create a new folder to hold your ebook library. Then you can choose your ebook device from a list of over 40 supported devices. If your device supports it—such as Amazon Kindle or Apple iOS devices among others—Calibre can be set up to send new books to your device through the Internet. Details vary by device, but the Calibre welcome wizard will assist you with this process. Once you have finished configuring Calibre, press the “Finish” button and Calibre will initialize and show the library (see Figure 3-22).

Figure 3-22.

Calibre manages both your computer and your device’s ebook libraries

Calibre allows you to work with both your computer and your ebook device. For instance, if you have a Kindle ebook reader that has a significant library on it, you can view your device, select multiple books, and right-click your selection and choose “Add books to library.” This will copy the ebooks off of your device and store them in your Calibre library on your computer and will act as a backup. This is valuable even if you use a device like a Kindle or Nook that lets you re-download your purchased books from their respective ebook platform. It also makes the books available to view and read on your computer when they are DRM-free (see Figure 3-23). You can also edit a book’s metadata, which can be useful to keep items like author names uniform, or to choose a specific cover image for your library.

Figure 3-23.

Calibre includes a sophisticated ebook viewer in addition to library management

If it were only an ebook library management system and ebook viewer, Calibre would be extremely useful. But two other features set it apart. The first is the ability to convert an ebook into various other formats. Whether Kindle, EPUB, MOBI, LIT, PDF, or TXT, Calibre can convert into 17 different formats, and will also “smarten” punctuation (or unsmarten it, at your preference), set fonts, detect document structure, clean up HTML and CSS formatting markup, and otherwise create very nice ebooks even from plain text files. It even knows which formats are supported by which devices, so it can convert on the fly when copying to an ebook reader—but only when necessary.

The second is an ebook editor that is simple but very easy to use. You can adjust the text, formatting, headings, tables of contents, chapter divisions, metadata, and all other information in a specific version of an ebook, and you can use this to jazz up public domain books from Project Gutenberg that may be available only in plain text, repair ebooks with formatting errors, or even polish your own ebooks.

Calibre lets you manage your digital library whether you have a vast collection or are just starting out. You can copy and convert books, edit your books, and make the most of your electronic library. This is the ideal solution for enjoying your ebooks on any device.

Printing Labels and Cards Using gLabels

Among the many revolutions that home computers were set to kick off, desktop publishing and printing was one of them. Quite a few programs became quite popular in the 1990s with the advent of high-DPI color dot-matrix printers and homemade labels and greeting cards were born. While greeting card shops didn’t exactly go out of business, being able to pick up a template for business cards, mailing labels, or stickers and print to them is an incredibly simple way to give a project a high quality, professional touch. gLabels can get you started in a hurry.

When you open gLabels, you are presented with an empty window with some tools displayed. When you click the “New” button on the toolbar to start a new project, you are given a list of recent template products you have used, and can use the “Search” tab to choose a predefined template. gLabels comes with a massive database of commercial templates (see Figure 3-24), and will walk you through creating custom templates as well. The first step is to choose a product. As an example we’ll look at simple name badges for an Ubuntu get together.

Figure 3-24.

gLabels supports over 10,000 commercial card and label templates out of the box

The tools are relatively simple, and you can add text, rectangles, lines, circles/ellipses, images, and barcodes to a label. gLabels supports SVG vector graphics, so you are free to design complex graphics in a dedicated program like Inkscape, leaving gLabels for simple positioning and formatting. This lets gLabels remain simple and easy to work with. You can also import photos or other graphics.

When the project has been created, it will show an outline of the label, with a “safe area” outlined in red around the edges. The area outside of the red line is called a “trim area.” For consistent results, you’ll want to keep all important designs and text inside the red safe area and out of the trim area to compensate for slight alignment changes between your printer as well as the cut of the template.

To add an element, simply click the corresponding button on the tool bar, then click on the label. You can reposition any object just by clicking on it and dragging it to the desired location, and you can use the resize handles to control the size. Holding the Ctrl key as you click a handle will preserve the object’s aspect ratio so that a circle or image doesn’t become distorted.

The object property pane on the right side of the window allows for precise control over the size, position, and properties of an element. For example, Figure 3-25 shows the “Hello, my name is” text field selected. The object property pane with the “Text” tab selected shows the current text value and can be used to easily read and edit the displayed text independent of the font and colors chosen. The “Style” tab allows for simple selection of a font, font size, color, left/center/right alignment, and line spacing. The “Size” tab sets the dimensions of the text field for long or multiline text, and the “Position” tab allows the position of an object to be defined in points, inches, or millimeters (depending on the settings located in gLabels preferences).

Figure 3-25.

A simple “write your name” badge takes two minutes to design

Aside from static elements, gLabels also supports data merging, and this allows you to take data from CSV files or your Evolution address book and use them to print custom information on each card. To set this up, use the Objects ➤ Merge properties menu option. Just pick your data format and then choose the data file with the Location option. The Merge Properties window will display a list of records and the field name and data that go along with each record. You can use the “Record/Field” name in text or barcode elements to print that information for each record on the screen. This is perfect for ID badges, mailing labels, moving box labels, and all kinds of other printables that change. You can use LibreOffice Calc to create the list and then export it as a CSV for gLabels.

gLabels may not usher in a new era of desktop printing, but it is an extremely simple and reliable way to handle printing on most of the templates you’ll find in stores. It makes short work of any simple design work and uses more powerful programs like Inkscape for more complex designs. No matter your need, gLabels will get the job done.

Backing Up and Restoring Personal Files Using Déjà Dup

If I could offer the most important thing I’ve learned over two decades of professional computer support experience, it would be to back up your data. The next piece of advice I’d offer is that backing up your files is only the second most important part of a backup. The most important part of a backup is—of course—restoring your files. Ubuntu ships with an integrated reliable and easy solution called Déjà Dup. A graphical frontend to the time tested and very robust command line-based backup project called duplicity, Déjà Dup performs automatic backups, makes recovering missing files painless, and can even encrypt your back up data for peace of mind.

Once you’ve used Ubuntu for a couple of days, you’ll see a reminder to back up your files (see Figure 3-26).

Figure 3-26.

Your first introduction to Déjà Dup might be a friendly reminder

This dialog box explains the concept of backups and allows you to dismiss the dialog permanently by clicking the “Don’t Show Again” button, or set up a backup right away by clicking the “Open Backup Settings” button. If you choose to close the window without choosing one of the other buttons, Ubuntu will remind you to configure your backup settings after another few days have passed. You can access your backup settings by launching “Backups” from the Unity Dash or by using the Gear menu in the top-right corner of the screen, clicking on “System Settings…,” and choosing “Backups.” Setting up a backup using Déjà Dup is incredibly simple. The Overview window will let you fully restore a backup or start a backup immediately (see Figure 3-27).

Figure 3-27.

Backup options are simple, and the backup settings window is friendly to use

There are only four quick, simple configuration options before you can start backing up your files, and the default settings are all reasonable. You can click on each option on the left pane to see each setting.

The first setting is “Folders to save.” By default, Déjà Dup will only save your home folder. This also saves everything inside your home folder, including your documents, pictures, music, videos, and application settings. It does not include your Steam library and any installed Steam games and save files, which you can back up and manage with the Steam client, but this is a noteworthy exception because it is hard coded but not visible. Backing up your home folder is the best setting unless you have specific needs, and will generally protect all of your files on your computer. If you want to add more folders such as different internal drives, you can click the “+” button and select more folders to back up. You can remove any folder by selecting it in the list and clicking the “-” button. These settings only affect future backups, and does not remove files or folders from an existing backup.

The next setting is “Folders to ignore,” and by default it includes your Trash folder and Downloads folder. Note that Folders are separated by a forward slash (/) and tilde (∼) stands for your home folder. These are typically good folders to ignore, but you can remove “∼/Downloads” if you would like to back up downloaded files, and you can add extra folders to ignore if you wanted to exclude folders with large files, such as your Videos folder, either because they are not important to backup or if you would like backups to finish more quickly. You are responsible for backing up any important data in the folders listed in this option.

“Storage location” is very important. By default, it will use a folder inside your home folder called “deja-dup” as a placeholder. You will want to change this to a different location before you start backing up files. It is important to keep your backups on a different hard drive than your primary files. By storing your files on an external hard drive or a remote network location you can create an off-site backup that allows you to recover data in the case of computer failure or physical damage. The “Storage location” drop-down list will display any attached external hard drives as well as various network options such as Windows Share or SSH for storing a backup on other machines you own. You can also install the package deja-dup-backend-s3 to add Amazon S3 cloud storage support to the list, or deja-dup-backend-cloudfiles to add Rackspace Cloudfiles support to the list. In most cases, you can simply choose an external hard drive. Any folder name will do, but I recommend the name of your computer. This allows you to use the same hard drive to back up multiple computers.

The last option is “Scheduling,” and it is simple. You can choose to automatically start a backup every day or every week. This allows you to balance the need for fresh backup data with the slight performance hit that running a backup can cause. You can also choose whether or not your backups are kept for six months, for a year, or forever. Déjà Dup will not automatically delete old backups unless there is no more space available for newer backups.

Once you have configured your backup settings, you can wait for Déjà Dup to back up your files later or you can go back to the Overview option and click “Back Up Now…” to manually initiate the backup process (see Figure 3-28).

Figure 3-28.

Déjà Dup shows its progress in the Unity Launcher as well as the Backup window

The first time you back up your files, Déjà Dup will perform a full backup. This means that all files in your folder will be backed up. Although your backup is compressed, this process can take quite some time. After a full backup is complete, Déjà Dup will scan your existing backup and only backup files that have changed in some manner. This is called an incremental backup and is much faster and smaller. This makes the most of your backup storage space, but requires the original full backup and each subsequent incremental backup in order to recover your data. Once a month, Déjà Dup will perform another full file backup. This minimizes the dependency chain of backups to help protect against file corruption. As the last step in the backup process, Déjà Dup automatically runs a recovery test to ensure that the backup was successful.

Restoring Files

There are two ways to restore your files, and both are simple. In the case that you want to completely restore your files, simply open your backup settings by launching “Backups” from the Unity Dash or by using the Gear menu in the top-right corner of the screen, clicking on “System Settings…,” and choosing “Backups.” Then click on “Restore…” where you can enter your backup location and folder and click “Forward.” Then you will see a list of backup dates that you can choose to restore from. Click “Forward” again and you can choose whether to restore your files to their original locations (this is perfect for restoring files on a new computer or Ubuntu install) or you can restore your backup to a specific folder. This is a good way to recover your files from a different computer without overwriting any files on the new computer. It is also a useful way to fully test an existing backup. Once the restore operation has completed, you can use the Files application to access your restored files.

To restore only specific files, you can use the Files application without opening your backup settings. First, plug in your backup storage device if your backups are located on an external hard drive. Then, in Files, navigate to the folder with missing files or files you wish to revert to their backed-up state.

For files that are missing from a folder, you can right-click in the empty space in a folder and click “Restore Missing Files....” Choose your backup location if you are prompted, then click “Forward.” Déjà Dup will scan your backup for files that are no longer in the folder and display a list of files and dates they were last seen in the backup data (see Figure 3-29). From this list you can check any number of files you wish to restore and click Forward. You will see a summary of the pending restore operation. Click “Restore” to restore the backed-up files to the current folder. If you want to revert to a previous version of a file, you can do that for each file as follows.

Figure 3-29.

You can recover missing files with a right-click and a menu command

For a file you wish to revert to an earlier revision, right-click on the file and choose “Revert to Previous Version…” and choose the backup location if prompted. Then click “Forward” and choose a date to revert the file to from the list of dates, and click Forward. You will see a summary of the pending restore operation. Click “Restore” to destroy your current file and replace it with the backed-up version.

To be successful, backups must be performed regularly and at least one backup should be off-site. Déjà Dup helps make this problem simple and automatic. While the best backup is the one you never have to use, you can be sure that your files are safe with Ubuntu.

Capturing Screenshots and Recording Your Desktop Using GNOME Screenshot and Kazam

Being able to record your desktop is useful for many things, from saving error messages for technical support personnel, to creating a tutorial video to teach others how to perform a task, to taking a screenshot of your desktop background to share with others. No matter the reason, you can take screenshots out of the box with Ubuntu and Kazam offers desktop recording and advanced screenshot options.

GNOME Screenshot

GNOME Screenshot is installed with Ubuntu and is available without additional software installation. It is useful for capturing the entire screen, a single window, or a specific area. It can be started by launching “Screenshot” from the Unity Dash (see Figure 3-30) or by pressing the PrtScn (Print Screen) key on your keyboard.

Figure 3-30.

GNOME Screenshot is very simple to use

Launching GNOME Screenshot will allow you to set up a variety of options, including whether or not to grab the entire screen, or just the current window. For the current window, you can choose whether or not to include the window border or apply a border or drop shadow around the screenshot. You can also choose whether or not the mouse pointer should be displayed in the final screenshot. Setting a time delay will allow you to take a screenshot where the PrtScn key wouldn’t work, such as in a menu. The GNOME Screenshot window will disappear when you click “Take Screenshot” so that it does not appear in the final screenshot. Once the screenshot has been taken, the captured area will flash white and the Save Screenshot window will appear so you can give the screenshot a name and save it.

To take a screenshot without launching GNOME Screenshot first, you can simply use the PrtScn key. This shortcut key will take a screenshot of the entire screen. You can also use Alt+PrtScn to capture only the current window, or Shift+PrtScn to draw a rectangle on the screen and capture only that area. Once the screenshot has been captured, the Save Screenshot window will appear and you can name and save the screenshot or you can click the “Copy to Clipboard” button. This is useful if you want to paste the image into another application such as GIMP or LibreOffice without saving it to disk first.

If you want to quickly take a screenshot and automatically save it, Ctrl+PrtScrn will capture the entire screen, then save it using the current date and time to your Pictures folder. Other than a sound effect and the screen flashing, there is no interruption and the process is completely automatic.

Kazam

Kazam is a very useful tool that performs both screenshots and desktop recording. It is popular with Ubuntu developers for demonstrating new software and features to new users. It also has some convenient shortcut keys for controlling its operation.

When you first launch Kazam, it displays a simple window that contains desktop recording options, which it calls “screencasting”. You can access additional configuration options via the Kazam ➤ Preferences… menu option (see Figure 3-31).

Figure 3-31.

Kazam allows you to record your desktop in various video formats

Just like GNOME Screenshot, Kazam can record an entire single screen, multiple monitors, a single window, or a specific area of the screen. You can also choose whether to capture the mouse cursor as well as audio played through the speakers. Kazam can also record the microphone so that you can narrate the screencast as you record it. Each of these options is available from the main Kazam window and can been turned on or off individually. This is especially useful for creating demonstrations for others. Be sure to record a small video to test that the sound is being captured correctly. You can adjust the capture sources via the Preferences window. In the main window you can also configure a delay between when you click “Capture” and Kazam beings recording your screen. Once you click “Capture,” the Kazam window will disappear and a countdown will appear on the screen.

Once your desktop is being recorded, you can simply control your computer as usual until you are ready to finish recording. You can then use the Kazam indicator menu at the top right of your screen to pause or finish recording. Once you finish recording, Kazam will ask if you want to edit your recording or save it for later. If you are not sure whether a specific video editor has been installed, you will want to save the file instead.

Because turning off recording with the mouse will appear in your video, you may wish to familiarize yourself with several shortcut keys that are available.

To hide the Kazam window, press Ctrl+Super+S. You can use this keyboard shortcut to show the window again while you are not recording. This helps you to set up your screen without distraction. To begin recording, you can press Ctrl+Super+R. This starts the countdown timer before recording begins. You can pause and resume recording with Ctrl+Super+P. Once you are finished recording, Ctrl+Super+F will end the recording and bring up the edit or save window. Ctrl+Super+Q will close Kazam entirely.

Screenshots work similarly with Kazam, and the main advantage of Kazam over GNOME Screenshot is that it will show you the current dimensions of the selected area and let you resize the selected recording area until it is just right before you press Enter to confirm the selection and start the recording.

Together, GNOME Screenshot and Kazam provide flexible ways to record your computer use. Whether you’re saving a screenshot for future reference or helping others by providing assistance, recording your screen is simple in Ubuntu.

Summary

As powerful as Ubuntu is straight out of the box, the Ubuntu Software Center provides thousands of applications to make you more productive and efficient as you work. I hope that these applications give you a heard start as you familiarize yourself with Ubuntu. After all, the quicker you’re able to finish your work, the sooner you can relax and enjoy spending time on your computer.

© Nathan Haines 2015

Nathan HainesBeginning Ubuntu for Windows and Mac Users10.1007/978-1-4842-0608-9_4

4. Enjoying Media and Other Entertainment

Nathan Haines1 

(1)

CA, US

Ubuntu has been shown to have a lot of really useful productivity tools. But it is also home to fantastic entertainment options as well. While the rest of this book focuses on getting things done, this chapter is all about enjoying your computer and getting the most out of your personal media—purchased movies, music, podcasts, and so on. It even covers a few basic suggestions about gaming, whether you are nostalgic for the past or looking forward to the next big retail game.

In addition to sitting back and watching a movie or listening to music, most of us are media creators as well. If we don’t have digital cameras, we all have cell phones that take photos and videos. Our music CDs have to be copied to the computer, or the old digital songs we purchased need to be converted to a compatible format for our new music players. Videos can be transferred to DVD to make them easier for nontechnical friends to watch. And photos can always be made more impressive with a little bit of patience and a bit of color adjustment and cropping. We’ll look at a few good ways to get started.

Play DVDs and Media Files

By default, Ubuntu comes with the software needed to play a couple dozen media formats. And the included media player is basic and does an adequate job at letting you watch videos. But there are dozens more compression formats for video and audio, and each of them have various statuses as far as patent and licensing. Unfortunately, this precludes Ubuntu from shipping with full support, because the laws governing such things vary across the world.

Ubuntu can install support for most formats, and its media player will detect when an unsupported file type is loaded and attempt to search for the software package needed to play back the media. However, there’s one way to simply install support for most all formats at once. You can simply install the “Ubuntu Restricted Extras” package from the Ubuntu Software Center. This will pull in support for not only multimedia packages but also additional software such as Adobe Flash Player and Microsoft “core Web” fonts that are allowed to be downloaded from the Internet, but not allowed to be shipped on a disc. If you checked the “Install this third-party software” box during installation, Ubuntu Software Center will warn you that there’s a conflict with existing MP3 decoding software. Continue the installation anyway—Ubuntu will remove the Fluendo MP3 codec and replace it with the LAME MP3 codec. They are functionally equivalent and the change will not affect software compatibility or playback quality. Other than a prompt to agree to the Microsoft TrueType Core Fonts EULA, installation is automated, but will take some time to download.

Once complete, you will be able to play most formats, and even unprotected DVDs. However, most DVDs are copy protected, and the decryption software must be installed manually. This can be performed automatically with a command provided by Ubuntu Restricted Extras; however, you will need to run it manually in a terminal window. As you’ll see in Chapter 5, the command line is simply an efficient way for you to tell your computer exactly what to do, and it will follow your commands precisely. In this case, these commands have already been typed out in a file called a script. All you need to do is tell Ubuntu to run that script.

First, open a Terminal using the Dash or by pressing Ctrl+Alt+T. You’ll see a window with a black screen and a command prompt that shows your username and computer name. It will look similar to the following:

nathan@ubuntu-book:∼$

The only thing you must do is type in the following command:

sudo /usr/share/doc/libdvdread4/install-css.sh

Make sure that there are no uppercase letters and that all punctuation is correct, and then press the Enter key. If you receive a message ending in “command not found,” enter the command again, and double-check your typing for spelling or punctuation mistakes. Forward slashes (/) are necessary, and are not the same as backslashes (\). There should be no spaces other than the one following “sudo.” If you are successful, the script will download the DVD decryption software and install it (see Figure 4-1).

Figure 4-1.

It looks complex, but downloading and installing DVD decryption is done for you

Another helpful tip is to install VLC media player (see Figure 4-2). It supports a dizzying array of file formats—not just video and audio formats but also video discs, streaming media, and subtitle files. It can also dynamically adjust cropping and stretching for aspect ratio and multiple audio tracks. This powerful media player is also available in the Ubuntu Software Center and will make use of the playback software in the Ubuntu Restricted Extras folder.

Figure 4-2.

VLC can play almost any media and supports video discs, subtitles, and more

VLC has many options, but for most videos you won’t need to do much more than start playback. The menus are very comprehensive, and you can also right-click on the video screen to adjust options specific to the current media. Double-clicking on the video playback or pressing the “F” key will toggle in and out of full-screen mode, and this is probably the most useful feature in general. To open a media file you can drag and drop it onto the VLC window, and Media ➤ Open File… can be used to pick specific files, or Media ➤ Open Disc… can be used to open DVD discs. While Blu-ray is listed as a disc type, commercial Blu-ray playback is difficult to set up and is unreliable due to the content protection system used for most titles.

You may want to set up VLC to be your default media player, and this is easily accomplished, but the setting can be difficult to find. The simplest way is to click on the Gear menu in the top right corner of the screen and choose “About this computer.” This will open System Settings with the “Details” applet activated. Then you can click on “Default Applications” in the left pane and choose “VLC media player” from the drop-down menu next to “Video.” VLC is so versatile that I always set this up for myself as one of the first things I do on a new Ubuntu computer.

Regardless of what default media player you choose, you can always open a media file in a specific player by right-clicking on the file and then choosing “Open With.” Ubuntu will display installed applications that can display the selected media file.

By installing Ubuntu Restricted Extras, you prepare your computer to work with almost any video or audio file you might encounter. All of the various libraries are installed so that most Ubuntu programs will automatically detect and use them, and you’ll never have to worry about finding a “codec pack” that you have to download from an untrusted web site. VLC is optional but is the easiest way to play DVDs and other video files. The next time you’re ready to relax with some entertainment, you’ll be able to sit back and enjoy your content without worrying about which format the files are in.

Organize Your CD and Digital Music Collection Using Rhythmbox

Music is an important part of many of our lives, and over the years there have been many ways to enjoy it, from vinyl records to 8 tracks to audio cassette tapes to CDs. The digital realm has also seen just as many format changes. MP3 is the most ubiquitous format, yet FLAC and Ogg Vorbis are the de facto Free archival and playback formats. Ogg Opus is even higher quality for music, Windows prefers Windows Media Audio format, and Apple and Nintendo media players prefer AAC. Ubuntu happily supports all of these digital formats so that you can enjoy your music no matter where or when you received them.

Ubuntu’s music manager is called Rhythmbox, and it provides a unified way to manage your music (see Figure 4-3). By default, it displays all supported music files in your Music folder, and it can also download and play podcasts, interface with Last.fm and Libre.fm, stream online radio streams, and play audio CDs. It can also copy your CDs to your computer in one of several various formats.

Figure 4-3.

Rhythmbox is a one-stop solution for your music listening needs

As a music player, Rhythmbox is fairly basic. When launched, it shows your music library (see Figure 4-3). The top of the window shows previous track, play/pause, and next track buttons as well as repeat and playlist shuffle options, along with the current playing audio file and a progress indicator that you can drag to skip through the song. The volume button can also be clicked to change the volume relative to the system volume. On the left side of the window under “Library,” you can see various music sources as well as saved playlists. To the right, the search field can be used to narrow down the listed audio files. If the Play Queue is empty, the Play button will begin playing the tracks displayed on this screen. The artist and album fields can also be used to show specific tracks.

Right-clicking a selected track will bring up a context menu, allowing you to add a song to the play queue or to a new or existing playlist. Once Rhythmbox is playing audio, you can continue working with other programs or even close the Rhythmbox window. Music will keep playing and you can use the Sound Indicator in the top right of the screen to access play controls without switching back to Rhythmbox (see Figure 4-4). This allows you to quickly pause or skip a track or begin playing a playlist without leaving your current application.

Figure 4-4.

The Sound Indicator gives you fast access to your music while you work

Copy Audio CDs to Your Computer

Rhythmbox can play audio CDs that are located in your computer’s optical drive tray, but it can also copy your music off your CDs and to your computer for more convenient playback. Each of these activities can be activated in the same place.

When you have an audio CD loaded in your computer, the disc will show up under Devices. Rhythmbox will automatically attempt to look up the disc on the Internet to access album cover art and track names. Clicking on the disc will display the track list (see Figure 4-5). You can press the Play button or double-click on a track to begin playing it directly off the CD.

Figure 4-5.

Rhythmbox downloads CD track information from the Internet when available

If you want to copy CD music to your computer, you can use the “Extract” button. First, make sure any tracks you wish to copy have been checked. You can also edit the album information. Selecting a track, then clicking the title, artist, or genre a second time will allow you to edit the track details before you begin the copy. Once you are ready to begin copying tracks to your computer, click the Extract button. Rhythmbox will display the copying progress at the bottom of the window and you will be able to monitor this even when you switch to other music sources such as the Play Queue, your music library, and so on. You can click the “Stop” button to the right of the progress indicator to discard the current track and stop copying files.

By default, Rhythmbox compresses copied audio using the Ogg Vorbis audio format. This is a high-quality audio codec that is more efficient than MP3, but not as widely supported. By using Edit ➤ Preferences in the Rhythmbox menu, then clicking on the “Music” tab, you can change the preferred format by clicking on the drop-down menu. You will be able to encode to Ogg Vorbis, Ogg Opus, and FLAC; and if you’ve installed Ubuntu Restricted Extras as described earlier in this chapter, you will also be able to choose MPEG Layer 3 Audio (MP3) and MPEG 4 Audio formats as well. Any changes you make to this setting will be used for future copies you make from CDs.

MP3 has the widest range of compatibility with other computers and devices, and FLAC is the Free Lossless Audio Codec that saves space without losing any audio information during compression. FLAC is a great way to back up your CDs, and you can also combine the programs Sound Juicer and Sound Converter, available in the Ubuntu Software Center, to create FLAC backups of your music and convert these master files into audio more suitable for your devices. In the future, you can convert from FLAC into new formats without having to use your original media, which can be very useful if you keep your original media in storage.

Listen to Podcasts

Podcasts are on-demand audio programs that can be subscribed to. This lets your music player, phone, or computer check for new episodes on a regular basis and download them automatically so that you can listen to new episodes at your leisure. Podcasts can be found on any topic, and most are free. They make any commute melt away and are an incredible resource for learning, news, and entertainment.

Rhythmbox also allows you to subscribe to and listen to podcasts so you can listen to them at your computer. Clicking on the “Podcasts” category under Library will show you a list of all podcasts you have subscribed to. A podcast “subscription” means that your computer will periodically check for new episodes and download them and does not refer to a for-pay subscription. Podcasts are listed at the top of the window and you can select all available podcast feeds or click on individual titles to filter the episode list at the bottom of the window. Clicking the “Update” button will check all podcasts for new episodes immediately. Clicking the “Add” button will allow you to search for new podcasts (see Figure 4-6).

Figure 4-6.

You can easily search, preview, and subscribe to new podcasts

You can type a podcast title into the search field or the podcast feed URL if you know it. Podcast feeds end in “.xml” and you can copy a link from a podcast’s website if it does not show up through a title search. Rhythmbox will display a list of podcasts that match your search term and you can click each result to see a list of episodes on the bottom half of the screen. Double-clicking an episode will begin streaming the episode for playback, and you can use this to preview a podcast. If you want to add a podcast to your library, click the “Subscribe” button. Clicking “Close” will return to your list of subscribed podcasts.

Rhythmbox will download the latest episode of a newly subscribed podcast, and you can double-click an episode to begin downloading and playing it. Right-clicking an episode will allow you to download or delete a particular episode, and right-clicking on a podcast feed at the top of the window will allow you to update or delete that feed.

Back Up and Create Music CDs Using Brasero

Optical media such as audio CDs and CD-ROMs were an amazing change in a world where audio cassette tapes needed to be played back in sequence and flipped over halfway through, and hard drives were measured in dozens of megabytes. They delivered high-quality audio and large amounts of data in a small, portable format. However, optical discs are fragile, and recordable discs may only have a lifetime of 2–10 years of reliable storage. Hard drive space is now measured in terabytes, and new recordable discs are cheap. Making backup copies of CDs and creating custom music mixes to keep in the car is just good sense. In Ubuntu, Brasero will help you keep your data safe.

Backing Up a Music CD

There are two ways to back up CDs. The first is to copy the audio off of the disc and store it for later. Rhythmbox or Sound Juicer is better suited for this task. The other way is to copy the entire contents of the CD to a hard drive or a blank recordable disc. This is where Brasero excels.

When you first launch Brasero from the dash, it gives you five options. We’ll look at four of these options in this chapter.

To back up a disc, click the “Disc copy” button. A smaller window will appear and allow you to choose an audio disc to back up from one of your computer’s optical drives. Then you will be able to choose a destination for the information. Brasero will default to a new disc in the same burner, and you will be prompted to replace the original disc with blank media when necessary. If you have two optical drives you can place a blank disc in the second drive and copy from one drive to another. This does not save time but it does allow the copy to complete without further intervention.

If you are copying to blank media, you can click the “Properties” button to change the burning settings. You can lower the burning speed if your drive is having trouble burning copies, and if you have an audio CD player that is having trouble with copied discs, lowering the speed can often improve performance in that player. You also have the option of using burnproof, which combines data caching and your optical drive’s positioning to prevent slow data transfer from causing a burn failure. “Simulate before burning” goes through the burning process with the laser turned off and is only useful with a slow hard drive or an oversized disc. Because your computer will be used to store the original disc’s data before it is written to the blank media, you can choose a storage location for the resulting temporary files. By default, they are stored in the /tmp folder, which is the usual location for temporary data files. Once you are ready to begin the copy, you can click the “Copy” button to create an image and burn it to a new disc. If you click “Make Several Copies,” then Brasero will display a prompt after the first copy has been burned, and you can either insert additional blank discs to make more copies or end the copying process.

If you are copying to an image file, the Properties button will allow you to choose a file name and save location as well as a disc format type. You can choose between cdrdao format (which allows for an exact duplicate made including CD-Text and other subchannel information); and bin/cue format, which are the most common formats; and readcd/readom format, which is used by certain Linux tools. Unless you have a specific requirement, the default cdrdao format is a good choice. Brasero requires additional software for the cdrdao and cue formats, and will prompt you to install them if needed. Once the image is complete, Brasero will display a confirmation. You can back up the image just like any other file and burn the image to a blank disc in the future.

Burning a Disc Image to Blank Media

If you have a disc image that you would like to burn to a blank disc, then after launching Brasero you’ll click on the “Burn image” button. Click on the button that says “Click here to select a disc image” and find the image you wish to burn. When you insert blank media, Brasero will display the media type and capacity and allow you to choose a specific disc if you have more than one inserted into more than one optical drive. The Properties button allows you to change your burning settings, and in addition to the preferences described in the previous section, the “Leave the disc open to add other files later” option allows you to create a multisession disc if you want to add more data later. This is compatible with most computer optical drives but usually causes non-computer audio players to be unable to read the disc until the disc is “closed.”

Clicking “Burn” and “Burn Several Copies” functions identically to the “Disc copy” procedure described in the last session.

Creating a Music CD

Creating a new music CD from existing audio files is quick and easy. There are two ways to create music CDs. The first is to create a traditional audio CD that will play in most audio players, and the other is to create a data CD filled with MP3 files that can be played on other computers and in special players. Because MP3 files are heavily compressed, an “MP3 CD” can hold six times more audio than a traditional audio CD. Some players can also read Ogg Vorbis format files as well. Check your playback devices for format compatibility.

After launching Brasero, click either “Audio project” for a traditional audio CD, or “Data project” for an MP3 CD. This will show a new window that you can drag audio tracks to (see Figure 4-7).

Figure 4-7.

Creating a music disc is simple: traditional on the left, MP3 data CD on the right

You can right-click on the Files launcher icon and choose “Music” to open your music folder immediately, and copying files to the disc is as easy as dragging them to the Brasero window. For traditional audio CDs, Brasero will copy the album title of the first track you copy as the disc name. For both types of discs you can change this by editing the title field under the track/file list. As you add files, Brasero will show how many more minutes of audio can be added to the current audio disc, or how much space is remaining on the data disc. The same files are used in Figure 4-7 on an audio CD and a data CD to illustrate the capacity difference.

For audio CDs, the track information will be written to the disc as CD-TEXT information if your optical drives support it. For audio players that support CD-TEXT, it can display the album and current track names during playback. You can select any track, then click on the track or artist name to edit this information without changing the original file. You can also use the toolbar to add a two-second pause between two tracks, or split a single audio file into multiple tracks.

Once your disc is prepared, you can either create an image file to be burned later or burn directly to a disc. The drop-down menu under the disc name will allow you to choose between these options. You will be prompted for an image location and filename or for burn preferences before your audio files are converted and the disc is created. These options are as described earlier, except that only the bin/cue image format is available for image file creation.

As storage technology changes, audio continues to be delivered in new and more convenient formats. Whether you now purchase your audio on disc or via digital download or record your own audio to share with others, Brasero allows you to create and back up music discs that protect your original purchases and are compatible with audio players of all descriptions.

Create Video DVDs Using DeVeDe

Video streaming is becoming more and more ubiquitous, and smart TVs and set top media appliances are increasingly able to play common video formats directly. But video DVD still remains a useful format to share videos in. DeVeDe can create simple DVDs with optional menus in minutes.

Launching DeVeDe displays the Disc type selection window. DeVeDe supports several video disc formats. Most are not very common anymore, but are available if you have older video playback devices. Clicking “Video DVD” is the most useful option.

This brings up the main window (see Figure 4-8), which allows you to define “titles” that act as stand-alone movies, and for each title you will specify video files that will play in order for each title before returning to the DVD menu. As you make changes, DeVeDe will track the estimated disc usage as you add files. Your video files will also be converted to the proper format once you are finished setting up the disc structure.

Figure 4-8.

DeVeDe’s main menu lets you set up the disc structure and add video files

The first step is to choose your default format. If you live in an area that uses ATSC such as North America or most of South America, choose NTSC. If you live in an area that uses DVB, choose PAL. Most modern players and televisions support both formats, but playback quality can be slightly degraded if your source files differ significantly in framerate.

Next, you can add a title. This is a collection of one or more films that will be played in order, from start to finish before you return to the main menu. This allows you to offer different viewing choices. When you click “Add” on the left side of the window, you can provide the title name and the action to perform when the title ends. This can be anything from showing the disc menu, to looping to the beginning, to playing a different title. You can select a title and click “Properties” to edit an existing title.

With a title selected, you can add individual video files on the right side of the window. Clicking “Add” brings up the Add File window (see Figure 4-9). Clicking on the File button allows you to select a video file. DeVeDe displays the file properties underneath the file name. You have the option of choosing a specific video format if it is different than the disc default, selecting a specific audio track if there are more than one, and adjusting the file volume, which can be useful if a file has much softer or louder audio than the others in the same title. You can also add subtitles, and DeVeDe supports several common formats, some of which you can create with software available in the Ubuntu Software Center. DVD subtitles can be enabled or disabled by the video players, but you can use the “Force Subtitles” to configure subtitles to show by default. This is usually used when a file has audio in a different language than the rest of the title.

Figure 4-9.

You can control how each file is added to a title

Advanced options are available to explore, but are not usually necessary. You can specify whether to divide the file into five-minute chapters for easier seeking on the player in the “General” tab and rotate or force letterboxing or stretching for video content that is in a different aspect ratio than the DVD on the “Video options tab.” The other options are fairly esoteric and shouldn’t be necessary unless you are looking for something specific. Clicking “OK” adds the file to the current title, and you can select a file and click “Properties” to adjust these settings again in the future.

The “Disc usage” section allows you to see how much space you have remaining on the disc. You can use the “Media size” drop-down menu to select various disc sizes, and “Adjust disc usage” will increase video quality settings if you have not filled the disc, or decrease them if you are slightly over your disc capacity. You’ll need to click this button after making changes to your video files or menus, and just before clicking “Forward.”

The default menus are meant to be simple, but there are several options that can be changed. You can click “Preview menu” to see the menu, and “Menu options” lets you change a menu title, the font, font size, color, shadow, background image, background audio, and more. These can be adjusted to your satisfaction, and “Preview menu” will show you your changes. You can press “OK” to save your changes or “Cancel” to abandon them. While DeVeDe always creates a menu for compatibility reasons, you can use “Jump to the first title at startup” to prevent the menu from being seen unless the viewer presses the “menu” button on the DVD remote or once the first title ends.

Once you are ready to create your DVD, click the “Adjust disc usage” button to optimize your videos, and then click the “Forward” button. After you choose a location and file name and click “OK,” DeVeDe will create a DVD image in ISO format that will allow you to create a disc using Brasero’s “Burn image” function or right-clicking the image in Files and choosing “Write to Disc....” During the disc creation process, DeVeDe will convert your video files to the proper format for DVD, and this can take a very long time depending on the source videos and your computer’s speed. If you want to run the conversion process overnight, you can check the “Shutdown computer when disc is done” option to save electricity.

Creating DVDs can be a very convenient way to share video files with friends and family, especially with longer video files. DeVeDe makes the process of creating a video disc with menus and multiple titles manageable.

Organize and Edit Your Photos Using Shotwell

One really exciting advance in technology is the spread of digital cameras. From cell phones to iPods to Nintendo handheld videogame systems, cameras are on many of the electronics we buy. The advent of digital photography was exciting for the amateur photographer. No film costs! You could take lots of photos and save the good ones later. This trend continues today with cameras in every pocket. But this also makes organizing and enhancing photos even more important today. Luckily, Ubuntu comes with Shotwell, a digital photo manager that makes importing and adjusting photos easier than ever.

The first time you run Shotwell, it will offer to import the photos in your picture folder. This loads the photos into your library, but Shotwell will not automatically add new photos that are added to your Pictures directory. This keeps your photo library from becoming cluttered, but you can import more photos by dragging them to the Shotwell window or via the File ➤ Import From Folder menu option. You can also use the Edit ➤ Preferences menu option to enable the “Watch library directory for new files” setting so that Shotwell automatically adds new photos to your library. Shotwell sorts your photos into events based on their times, and this is the primary method for managing your photo library. The events are listed in a sidebar on the left, and clicking on an event shows photo thumbnails on the right side of the window (see Figure 4-10).

Figure 4-10.

Shotwell groups photo into events and displays them for easy browsing

Importing Photos

When you plug in a camera, Shotwell will automatically detect it and list it under “Cameras” in the sidebar. You can click on a camera to view the photos on the device, and import the selected or all photos using the toolbar buttons at the bottom of the window. Shotwell keeps track of photos that have already been imported so you can filter them with the “Hide photos already imported” option, and once an import is complete it will ask you whether or not you wish to delete the successfully imported photos from your camera or keep them on the camera. If any of the photos were shot in RAW mode, Shotwell will automatically develop them in addition to copying the RAW image data. This allows Shotwell to make photo adjustments while retaining your ability to use advanced photo editing sortware such as GIMP or Darktable to develop and edit the RAW photos if desired.

If you prefer to connect your camera’s memory card directly to your computer, simply insert the card into your computer’s card reader. Ubuntu will detect and mount the card as a folder, and you can use the Files window to drag and drop photos onto the Shotwell menu or use Shotwell’s File ➤ Import From Folder menu option to select a folder and begin importing photos.

Managing Events

Photos are grouped into events, and Shotwell tries to automatically create events based on the date and time each photo was taken (see Figure 4-10). If this information is not available from the photo, Shotwell will show a “No Event” category that you can use to find and sort photos manually.

Events are named by date, and you can right-click on an event on the left sidebar or double-click on the event name to rename any event. You can move a photo from one event to another by dragging its thumbnail onto the new event. Events are sorted based on the earliest photo they contain, but you can use View ➤ Sort Events from the menu to choose whether the list should be Ascending (earliest event first) or the default of Descending (most recent event first).

Clicking on the events category itself will show a list of events with a “key photo” as the thumbnail. This is the first photo in the event, but you can right-click any photo in an event and choose “Make Key Photo for Event” to change this. In the Events menu if you wish to merge to events, simply click one event and then hold Ctrl while clicking the other events to merge. The toolbar at the bottom of the screen contains a “Merge Events” button that will activate, and you can also right-click a selected event and choose “Merge Events” from the pop-up menu that appears.

Events in Shotwell cannot be empty, so deleting or moving the last photo in an event will cause the event to disappear. Because you cannot create an empty event, you can simply select one or more photos from your Library or any event and use Ctrl+N, or the Events ➤ New Event menu option to move those photos into a newly created event.

Working with Photos

Individual photos can be viewed in the library or each event, and you can use the zoom slider at the bottom right-hand corner of the screen to adjust the size of the thumbnails, or use the plus (+) and minus (-) keys. Clicking on a photo selects it, and the bottom-left corner of the screen displays basic information about the selected photo. Double-clicking a photo zooms in on it and allows for more editing options. You can also press Enter while a photo is selected to zoom in on it. In this zoomed in view, the left and right arrow keys move to the previous and next photo in the event as do the “Back” and “Forward” buttons at the right of the toolbar, and Esc returns to the thumbnail view.

Shotwell can help you keep track of photos, and you can apply a 5-star rating to each one. Selecting a photo and pressing 1–5 will assign the same number of stars to the photo. Pressing 0 will remove the rating. Pressing 9 will mark a photo as “rejected” and hide it from view. You can also right-click a photo and use the “Set Rating” menu to rate any photo. The View ➤ Filter Photos menu option allows you allows you to filter photos by rating, and can be used to show only highly rated photos or to make rejected photos visible again. This can help you choose which photos to keep or edit if you have a large number of photos from an event. In addition to rating photos, you can add tags to help you group photos across events. Simply select a photo and use the Tags ➤ Add Tags menu or press Ctrl+T. A tag window will appear and you can add one or more tags separated by commas. Once you have defined a tag, you can add the tag to new photos by dragging a photo to the tag in the sidebar.

Editing Photos

Most photos only need minor adjustments, and the toolbar exposes Shotwell’s simple editing tools. These tools are mostly automated and allow anyone to make the type of mundane adjustment that any photo might need such as color balancing, cropping, straightening, and so on. While Shotwell doesn’t try to replace more advanced photo editing tools, its editing tools cover a lot of needs (see Figure 4-11).

Figure 4-11.

Cropping and enhancing a photo can be done in seconds

The “Rotate” button allows you to rotate a photo clockwise in 90-degree intervals and holding Ctrl while you click the button will rotate the photo in a counter-clockwise direction instead. In the thumbnail view you can select multiple photos by holding Ctrl while clicking each photo, and the rotate tool will affect all selected photos at once.

The “Crop” button will allow you to adjust the photo’s aspect ratio and composition by zooming in on a specific portion of the photo and discarding the rest. An overlay appears when you click the crop tool and the drop-down menu allows you to choose various aspect ratios, and the “Pivot” button to the right will toggle the cropping reticule between portrait (tall) and landscape (wide) mode. The “Crop” button commits the change.

The “Straighten” tool allows a photo to be rotated 15 degrees in either direction and will crop the photo slightly to maintain its original aspect ratio. After clicking on this tool you can use the overlaid slider to rotate the photo by eye, or you can find an edge that represents a horizontal line, click the mouse on one end of the edge, and drag the pointer until the dotted line matches the angle of the edge. Releasing the left mouse button will rotate the photo up to 15 degrees from its original orientation and you can continue adjusting the rotation using the mouse or the slider. The “Reset” button will remove the current rotation, and pressing the “Straighten” button will apply the new rotation to the photo.

The “Red-eye” button allows you to reduce or remove any “red-eye” effect in a photo caused by light from a camera flash bouncing off the retina of a human’s eye. You can adjust each eye individually, and clicking on the tool will show a small circle you drag onto an affected eye. The size slider adjusts the size of the circle and clicking “Apply” will remove the red-eye effect from the photo. Simply repeat these steps for each affected eye in the photo.

The “Adjust” tool gives you quick control over the color of the photo. The histogram shows you the color range of the photo and you can slide the sliders to stretch the photo’s color range. This produces more contrast in the photo and can often greatly improve a photo’s contrast. Each slider will adjust a color attribute of the photo to help you enhance a photo, and once you are happy with the adjustments you have made you can click “OK.” The “Enhance” tool automatically adjusts the histogram and the shadows sliders, and you can use this tool as a starting point and click “Adjust” to view and change the adjustments.

Shotwell is a nondestructive editor, and this means that your original photos are not modified, but the edits made are stored in Shotwell’s database and applied to the photos in real time. This means that your Pictures folder will not contain any of the changes you make in Shotwell, but it also offers several advantages.

Unlike editors that save over the original photo, subsequent edits do not degrade the quality of the photo, so you can continue to refine the look of a photo until you are happy with it. You can view the original photo by holding the Shift key, and you can also revert all changes and restore any photo to its original appearance. Simply right-clicking a photo or clicking on the Photo menu and choosing “Revert to original photo” will undo all changes applied to the photo in Shotwell.

You can also apply the color adjustments you’ve made to one photo to others as well. To do so, select a photo, then use the Photo ➤ Copy Color Adjustments menu option or press Shift+Ctrl+C to copy the adjustments to the clipboard. Then you can zoom in on a photo or select one or more photos and use Photo ➤ Paste Color Adjustments or press Shift+Ctrl+V to apply those adjustments to the selected photos. This allows you to keep a consistent look across your photos whether you are adjusting for lighting conditions or artistic style.

Sharing Photos

Because Shotwell does not modify your original files, you will need to export photos before you can share the edited photos with others. You can simply select one or more photos and drag them into a Files window and Shotwell will copy the edited photos at full resolution to the folder you selected. For more advanced options, you can select photos and use the File ➤ Export menu option to choose whether to export original unmodified or edited photos, choose the photo format such as JPG or PNG, exported resolution, and more. You might lower the resolution before sharing via email or the Web, for example. You can also use the File ➤ Send To… menu option to export a photo and send it to a shared network folder or email client.

Shotwell can also publish your photos directly to a web photo service such as Facebook, Flickr, Picassa Web (now integrated with Google Plus), and even publish videos to YouTube. If you have integrated an online account for one of these services with Ubuntu (see Chapter 3), it will appear as an option when you select photos and use the File ➤ Publish menu option or press Ctrl+P. The exact process is slightly different for each service, so be sure to follow the onscreen instructions to complete the publishing process.

Advanced Photo Editing Using GIMP and Darktable

As mentioned before, Shotwell can’t replace more advanced photo editing tools. And while it does reduce the need for more advanced software, it works alongside them as well. Under the Edit ➤ Preferences menu option is an “External Editors” tab. There you can set an external photo editor and an external RAW editor. The drop-down menus will list all photo editors installed on your system. Once you have defined the external editors, you can right-click on a photo and chose “Open With External Editor” or where RAW images are available, “Open With RAW Editor” becomes an additional option.

Advanced photo editing is far beyond the scope of this book, but there are two excellent choices that I can recommend to start out with, both available through the Ubuntu Software Center.

The first suggestion for “external editor” is the GNU Image Manipulation Program, or GIMP (see Figure 4-12). This fantastic photo manipulation program is comparable in many ways to Adobe Photoshop, and can be used to create edited, color balanced, and composited photos and artwork. The default view shows the image in one window with the tool and layer palettes in separate windows. While this allows for versatile arrangement especially when working with multiple files, it can be confusing to beginning GIMP users. I recommend using the Windows ➤ Single-Window Mode menu option to consolidate the interface into one single window that can be maximized. It’s also useful to know that the palettes can be hidden and restored with the Tab key, which can help you concentrate on your work. If you’ve used professional photo editing software before, you should quickly feel at home and can use the HUD to search through the GIMP menus by tapping the Alt key. For a friendly and comprehensive introduction, however, I strongly recommend Beginning GIMP: From Novice to Professional, Second Edition by Akkana Peck, also available from Apress.

Figure 4-12.

GIMP allows for advanced photo editing that rivals professional retail software

When a camera saves a JPG file, the data from the sensor is very heavily processed; however, a RAW image file is aptly named because it contains the raw data captured by the camera’s sensor. These data need to be “developed” before they can be used with most other software and just as a film negative offers so many possibilities to a photographer, a RAW image can be exposed, sharpened, and adjusted in ways a compressed JPG cannot. GIMP can import RAW files with a program called UFRaw, and you can install this from the Ubuntu Software Center by searching for “UFRaw” and clicking “Show technical items.” Installing package “Gimp importer for raw camera images” (gimp-ufraw) you will be able to simply adjust RAW images before importing them into GIMP.

The second suggestion, for “external RAW editor”, is the program Darktable, which is comparable to Adobe Lightroom, and allows for complex filters and settings to be applied to RAW image data before it is exported for normal use. This software is complex but powerful, and is the best place to start if you are an experienced photographer familiar with other RAW manipulation software.

With cameras being so common and storage space being so cheap, we all have the ability to create a virtual avalanche of photos, and this can make it hard to find just the right ones to highlight an event or share with others. Shotwell makes it easy to keep your photos organized and make simple adjustments to satisfy most everyday photo needs.

Record and Process Audio Using Audacity

Audio editing can be a bit tricky. It seems like it should be fairly simple, but unlike a photo that we can see, audio can be difficult to visualize. Fortunately, Audacity is a powerful multitrack editor that can be used to record live audio as well as edit, mix, and process existing audio files as well. Audacity can be used for anything from removing pauses from a recording to removing vocals from a song.

When you open a file with Audacity, it is placed in a track and shown in a waveform view. From this you can easily see the volume at various points in the recording. Opening additional files creates new tracks that can be edited together or separately (see Figure 4-13).

Figure 4-13.

Audacity is a powerful multitrack editor that’s good for both quick or advanced projects

The toolbar is complex but each button can be hovered over with the mouse pointer until a tooltip appears that shows the button’s function and shortcut key. For example, the large round buttons are “pause,” “play,” “stop,” “beginning of track,” “end of track,” and “record.” While the tool tips do not name these buttons, hovering over the “play” button shows you that you can press the spacebar to begin playing.

Clicking on a track places the cursor at that time index. When you click the “play” button or press the spacebar, audio playback starts at the cursor position. When you press the button again, the cursor doesn’t move. This lets you use the spacebar to listen to a point in time and determine if it’s the right spot without having to place the cursor again. Clicking and dragging the cursor over part of a track will select that audio. You can use the “Zoom In” and “Zoom Out” toolbar buttons to adjust the view to make positioning the cursor easier. Pressing the spacebar with a selection will play only the selected audio to help you select the right audio. You can drag the beginning and end of the selection to adjust the start and stop times. Once you are happy with the amount of audio that you have selected, you can delete, cut, copy, or paste the selection just as you can with text.

Recording audio is as simple as clicking the “record” button or pressing R. Audacity will begin recording audio in a new track at the current cursor position. Audacity shows a live input and output volume level in the toolbar during recording. If you want to add audio to the current track instead of creating a new track, pressing Shift+R will add audio to the existing track. Audacity will play the other tracks in sync with the recording, so it is possible to record a lead track in time with a background track, for example. The View ➤ Show Clipping menu option will highlight any clipped audio in red, so that you can quickly identify poorly recorded audio.

Audacity comes with many filters and audio effects, and the Effect menu lists all of them. The Help menu has a link to Audacity’s manual online, and the “Editing” section lists all effects alphabetically and also groups them by function. You can use this to learn how to use effects properly. The manual also includes many practical tutorials that you can use to learn audio editing techniques in general.

While recording audio takes time and practice, Audacity is the best tool for the job. From recording a short voice memo to editing recorded music and building podcasts, Audacity’s track editor and effects and plug-in architecture make it easy to work with audio on Ubuntu.

Play MIDI Files

MIDI files are digital instructions that describe music, and while the standard was originally invented so that electric musical instruments could communicate and control one another, the same information is capable of storing musical instructions very efficiently. While the standard is alive and well in the music industry, MIDI files had a brief popular heyday as a way to share music on the computer before actual sound recordings were feasible. Today, MIDI is still useful as a way to generate music from sheet music—as with the Mutopia Project—or to enjoy the soundtracks of classic video games.

MIDI files can be used to control actual hardware. Modern player pianos use MIDI instructions instead of paper rolls to play back a performance by a professional pianist. Sound cards used to have dedicated electronic synthesis hardware, but this is now rare except in professional equipment. Ubuntu has a software MIDI renderer called Timidity that can interpret MIDI instructions and generate high-quality audio.

To install Timidity, open the Ubuntu Software Center and search for “timidity.” There are two similarly named packages, but the correct one to install is “Software sound renderer (MIDI sequencer, MOD player)” that shows the package name “timidity” underneath. Select the package and click Install. The other software package is just additional user interfaces that are not necessary.

Once it is installed, double-clicking a MIDI file will open it in Videos and the player will use Timidity for its audio playback. Other software that utilizes MIDI playback such as DOSBox or Rosegarden will also automatically detect and utilize Timidity.

MIDI files may not be commonly used for casual playback, but they are still popular among certain music cultures and are easy to find on the Web. By installing Timidity on your computer, you will find that yet another means of entertainment opens up to you.

Explore the Universe Using Stellarium

Stargazing is a pastime that has existed for as long as human have lived on Earth. The universe has inspired stories and legends from the most ancient records all the way to science fiction novels and movies in the present day, not to mention the intense study through manned and unmanned scientific undertakings. Before the spread of electricity, the night sky was a bright, almost living thing and on moonless nights the Milky Way galaxy itself was bright enough to see by and cast a shadow on the ground. With the massive amount of light pollution in most cities, most of us have to plan a trip to get a starry night sky. But whether we’re planning ahead or just want to virtually study the sky, Stellarium is a virtual 3D planetarium application that re-creates the visible universe around us with stunning graphics.

The first time you launch Stellarium, you’ll see a view of the sky in a field as it would appear in Paris at the your current local time (see Figure 4-14). If the time difference is right, you’ll enjoy a starry view. Otherwise you might see a mundane daytime sky or a stunning sunrise or sunset. But personalizing your experience is very simple.

Figure 4-14.

Stellarium simulates a beautiful, realistic view of the sky

The interface is simple. The bottom-left corner of the screen has two bars that appear when you touch the left or bottom edge of the screen with your mouse cursor. On the left is quick access to various configuration and settings, and on the bottom gives you access to various display settings. Placing your mouse over each icon brings up a tool tip that gives the icon name and shortcut key. The left toolbar is the most important if you want to set up Stellarium to match your local conditions. Clicking on the “Location window” icon or pressing F6 brings up the location window, where you can set your current location on Earth (or 74 other planets and stars). This influences the position of the stars above the horizon and can be used to plan optimal viewing positions and times for real stargazing.

Once you’ve set your location, you can click the close icon at the top right of the location window or press Esc. Next, you can then click on the “Date/time” icon or press F5 and set an appropriate post-sunset time for your location which matches your seasonal day length in real life. Once you have these options set, the real fun begins, because the next icon is the “Sky and viewing options” icon. Clicking this icon or pressing F4 opens a window with dozens of settings that affects the view afforded to you (see Figure 4-15).

Figure 4-15.

Stellarium’s viewing options are worthy of any planetarium

There are four tabs with various options, many of which have tool tips which appear when you hover the mouse cursor over them. For instance, hovering over the “DSOs” slider on the “Sky” tab informs you that this adjusts the Deep Sky Object markers. Most notable on this page is the light pollution setting, which allows Stellarium to simulate light pollution. You can enter the Bortle Dark Sky Scale number for your location manually, and Stellarium 0.13 (available in Ubuntu 14.10) includes light pollution values in its location database. You can look up your light pollution index online for an accurate representation of your star visibility.

The “Markings” tab allows you to toggle various landmarks that can help you visualize the sky, from sky orientation markings to constellation lines, labels, and art. You can also change the projection type used to display the sky. The “Landscape” tab allows you to select various images for the ground. The default landscape is an empty field in Guéreins, France, where the developer of Stellarium lives, but there are other interesting landscapes representing various earth environments as well as the Moon and other planets. You can also create your own landscape if you have a favorite location. The “Starlore” tab allows you to load different information from different sky cultures, and can be a fascinating way to study ancient legends about the universe. Each culture has its own star names, constellation lines, and constellation art that provide a unique way of looking at the universe around us.

The bottom toolbar is mostly dedicated to toggling specific common settings, and can be used to toggle display of constellation lines, the atmosphere, ground fog, and so on. Each icon has a tool tip that names the setting and provides a shortcut key where available. For instance, pressing A toggles atmosphere visibility. A blue daytime sky suddenly becomes stark and dazzling without the atmosphere to scatter the sun’s light and block out the other stars. Pressing F toggles visible ground fog that simulates poor visibility near the horizon and G toggles the actual landscape, allowing you to view the sky that is still below the horizon. Ocular view simulates the view through telescope or binocular optics—including magnification, field of view, and mirroring—so it is especially useful for planning targets during stargazing tips.

The Configuration window, accessibly by pressing F2, allows for various settings to be adjusted, but most notably the “Tools” tab allows you to download more detailed star catalogs with a single click. These catalogs contain an even greater number of stars than ships by default. The scripts tab can play back automated viewing, time, and positional data. The scripts that come with Stellarium are an intriguing mix that demonstrate interesting events such as lunar eclipse (see Figure 4-16), to other astronomical phenomena.

Figure 4-16.

Stellarium simulates real-world events such as planetary positioning and eclipses

For exploration, the “Search” icon in the left toolbar (also accessible through F3 or Ctrl+F) will quickly find and center the view and track planets, stars, and other objects. Stellarium actually simulates the position of astronomical objects, so you can see the position of the rings of Saturn as visible from Earth, or watch the moons of Jupiter orbit around the gas giant. Stellarium even shows the shadows they cast as they go by. This also means that eclipses are shown in real time. You can use the bottom toolbar to change the passage of time to observe lunar libration, for instance, where the moon’s face appears to wobble as it orbits Earth. Changing the speed of time is also a great way to view sunsets and watch the stars begin to appear in the sky. You can even activate a “Night Mode” that changes the interface to black and red to help preserve night vision.

Stellarium is a wonderful example of professional, high-quality software that satisfies both amateur and professional uses. Observing the sky through software not only helps astronomical study, but can also make real trips into nature to study the stars much more rewarding.

Play Legacy PC Games

Linux has a justified reputation for lacking support for games, and this has taken a long time to change. While Ubuntu comes with simple games such as solitaire and Mines by default, additional game support is increasing all the time. This also lead to the development of emulation software to allow older games designed for other operating systems to run under Linux as well. Even with hundreds of Free and Open Source games available through the Ubuntu Software Center and commercial games beginning to add support for Ubuntu, there are a lot of classic games that are worth revisiting, and “retro gaming” has seen a resurgence in popularity. More importantly, system emulation allows older games from the 80s and 90s that you have purchased and still have on CD or floppy disk can still be enjoyed on modern hardware.

A few older games have been rereleased for free, such as the first two games in The Elder Scrolls series by Bethesda Softworks, and other games that were distributed as “shareware”—games that were available to try before purchasing—are still frequently available, such as early Apogee and ID Software games that still feature iconic gameplay. Some game genres, such as adventure games, are now rare or nonexistent although they were once extremely popular.

It is beyond the scope of this book to detail how to transfer data from legacy storage formats and configure emulators, and finding legal sources for legacy software is difficult. But if you are familiar with DOS and adventure games and still have the installation media for your old games, configuring DOSBox will be part of the fun. Others may want to stick with newer software. But there are some nice alternatives as well.

Purchase Legacy Games from GOG.com

The resurgence in “retro gaming” and interest in forgotten classics led to the founding of a company named Good Old Games in 2008, which later changed its name to GOG.com. The company wanted to make it easy to experience legacy games on modern computer hardware and operating systems as well as support the rights owners of older games. After initial sales success, they were able to negotiate distribution rights for more and more legacy games. As a bonus for classic game enthusiasts, many games include extras such as scanned manuals, original artwork, desktop wallpapers, and game soundtracks.

Many older games that were updated to run under Windows actually run under DOSBox or ScummVM with carefully optimized configurations. Because GOG.com sells games without digital rights management, many of these games can be installed on Windows or via Wine and the installed files can be copied to Ubuntu for use directly with DOSBox or ScummVM without Wine. More recently, GOG.com has begun supporting Linux and an ever-expanding collection of software can be purchased and downloaded and installed with a few simple clicks.

When you download a game from GOG.com, be sure to select “Save File” when Firefox prompts you to save the installer. The game will be provided in the form of an install script that will be saved to your Downloads folder. If you open Files and double-click the install script, it will be opened in a text editor. This a security feature in Ubuntu. To run the installer without the Terminal, you will have to make two simple changes.

The first change will allow Files to run an executable script by double clicking it. To do this, chooseEdit ➤ Preferences from the menu and click the “Behavior” tab. In the “Executable Text Files” section, select “Ask each time.” You will only have to make this change once on your computer, and it still offers a measure of security against inadvertently running scripts.

The second change will be done once for each download. In Files, right-click the downloaded install script and choose “Properties.” Click the “Permissions” tab, and under “Execute,” check the “Allow executing file as program” option and click the “Close” button. When you double-click the installer, Files will prompt you whether you want to run the script or display it’s contents. Click on the “Run” button and follow the on-screen prompts to install your game. Once the installation is finished, you will be able to run the game from the Unity Dash in the future.

GOG.com offers a small number of games for free, some of which support Ubuntu. This is a good way to see how easy installation is before purchasing other titles. For more information, visit their website at http://www.gog.com/ .

Run DOS Games and Software Using DOSBox

Many classic PC games were released for MS-DOS. With computer hardware being very limited in the 80s, DOS was a single-user operating system that provided programs with direct access to hardware, and especially games interacted directly with hardware. Modern hardware is powerful enough to emulate legacy hardware and software, and this emulated environment is indistinguishable to programs running inside. DOSBox is built to emulate a legacy IBM PC-compatible computer running DOS, specifically for the purpose of running games.

Once DOSBox is launched, it displays a window with a startup message and a DOS command prompt. The Z: drive is an emulated drive that contains various DOS utilities such as the MOUNT command which lets you make a folder on your computer accessible via a DOS drive letter. Note that DOSBox uses the older term “directory” to refer to folders. The INTRO command, which can be run by typing “intro” at the prompt and pressing Enter, provides more information about special commands and also offers some examples to show you how to begin.

Typically, you will create a folder inside your home folder to store your installed DOS games, called “dos” or “dosgames.” This folder can be empty, but it must exist to allow DOSBox a place to store data. Then you will copy a game’s installation files from your installation media into a separate folder in your home folder and mount that folder under drive A. Then you can switch to the install “disk” by typing “A:” and pressing Enter. The DIR command will list the contents of the current folder, and once you find the setup or installer program, typing the name and pressing Enter will run the program. After the game is installed to your C drive, you can switch to the C drive by typing “C:” and pressing Enter, change to the installation folder by typing “CD” followed by a space and the name of the folder, pressing Enter, and typing the name of the command followed by Enter (see Figure 4-17).

Figure 4-17.

From setting up a game and playing, DOSBox provides an authentic experience

Because DOS games typically expected unshared access to a CPU that ran anywhere from 8 to 133 MHz and modern computers typically run at 2 or 3 GHz, DOSBox limits the emulated CPU speed. You can press Ctrl+F11 to slow down DOSBox or Ctrl+F12 to speed it up if a DOS game is running at a poor speed. This can affect performance of other applications running under Ubuntu. Clicking the mouse inside the DOSBox window will also “capture” mouse input. If you need to use the mouse in Ubuntu without exiting DOSBox, you can press Ctrl+F10 to release the mouse. You can also toggle full-screen mode by pressing Alt+Enter.

In addition to the INTRO command, the DOSBox web site contains detailed documentation that describes various disk, video, input, networking, and game compatibility notes, so it is the best place to get tips if you cannot get a game running. For more information, visit http://www.dosbox.com/wiki/ .

Play Adventure Games Using ScummVM

Adventure games started out as interactive books where the player would read a description and then type in a simple one or two word command to interact with the story. They typically focus on exploration and puzzle solving while a story unfolds around your character, and the play experience is unique. As computer graphics improved, adventure games began to display graphics and use the mouse. Graphical presentation became more elaborate, and the genre peaked in the 90s when CD-ROMs became common and digitized voice and video could be included. Unfortunately, this drove production costs up and the genre soon ceased to be profitable. Aside from certain notable exceptions, adventure games are rare today.

ScummVM is a software project that can read the graphic and audio assets of classic adventure games and interpret their scripting languages. This allows many classic games to be enjoyed on Ubuntu, and several games have been released free of charge by their rights holders. The Ubuntu Software Center contains both ScummVM and four popular adventure games that were once available at retail: Beneath a Steel Sky, Flight of the Amazon Queen, Lure of the Temptress, and Drascula: The Vampire Strikes Back.

In the Ubuntu Software Center, searching for “scummvm” will return both ScummVM and the four games as the results. Installing any of the games will also install ScummVM automatically (see Figure 4-18). Once the games are installed, they can be launched by name from the Unity Dash.

Figure 4-18.

Ubuntu includes four free, formerly retail adventure games in its repositories

Each game engine has its own shortcut keys, which are often the only way to access important features such as loading and saving the game. For instance, in Beneath a Steel Sky, F5 accesses the game’s menu. Left-clicking on a named object will cause your character to examine it, and right-clicking causes your character to use or interact with it. ScummVM also has its own global menu, which can be accessed via Ctrl+F5. The documentation details specific commands (called “hotkeys” in the documentation) for many popular games, if you do not still have the game’s documentation. In windowed mode, Ctrl+Alt+- and Ctrl+Alt++ will scale the graphics to be larger or smaller, pressing Alt+Enter toggles full-screen mode, and Ctrl+Q quits the current game.

You can copy supported adventure games that you own from their installation media to a folder and add the game to ScummVM. Some games may need additional steps to run properly, which are usually listed in the ScummVM documentation online. You can find more free adventure games and additional notes about specific games and their controls at the ScummVM web site at http://www.scummvm.org/ .

Play Commercial Games Using Steam

The most convenient way to install commercial games on Ubuntu is often via Valve Software’s Steam client. Steam was conceived as a way for Valve Software to sell games directly to players and keep their software up-to-date, and quickly became one of the easiest ways to purchase and manage a computer gaming library. Valve is working on making a dedicated operating system that will power PC-based gaming consoles, called SteamOS. Built on Debian similar to the way Ubuntu is, Valve started encouraging game developers to make games available for Ubuntu so that they would be compatible with SteamOS-based systems in the future. Two years later, there are over 1,200 games available for Linux that run on Ubuntu. Any game purchased through Steam can be played on any supported operating system, so if you’ve purchased games via Steam for Windows or Mac, you may find that some are available on Ubuntu as well.

To install Steam, open a web browser and go to the Steam web page at http://www.steampowered.com/ and click the “Install Steam” at the top of the page. When the next page loads, click the “Install Steam Now” button and download the Steam installer. Open your Downloads folder, then double-click on the “steam.deb” file. Ubuntu Software Center will open, and you can click the “Install” button and enter your password to install the Steam launcher. Once it is complete, you can close the Ubuntu Software Center and launch Steam from the Dash. The Steam launcher will download the latest version of the client and install it in your home folder. This can take a couple of minutes, so you may want to create a Steam account on the Steam website if you do not already have one.

Once the install is complete, Steam will launch and you can choose to create a new Steam account or login to an existing account. Once you have logged in, you will see the Steam store or your game library, depending on your preferences. The Steam store will indicate Ubuntu-compatible titles by showing a penguin icon by the title listing, and Your library will list all of your games, and you can click the “Games” filter at the right of the search field and select “SteamOS + Linux” to view games that are compatible with Ubuntu (see Figure 4-19). Selecting a title and clicking “Install” will automatically download and install the game, and the button will appear as “Play” for installed titles.

Figure 4-19.

Steam makes buying and playing hundreds of games easy

Summary

Ubuntu turns your computer into a multimedia powerhouse. You can enjoy music and videos and back up your media collection. Ubuntu has the tools you need to create your own music, photos, and video, whether you snap occasional pictures with your phone or are a professional photographer. And the Ubuntu Software Center and Steam allow you to explore new worlds—whether observing the virtual skies in Stellarium or mastering orbital mechanics in Kerbal Space Program through Steam. Ubuntu is powerful and flexible enough to balance work and play.

© Nathan Haines 2015

Nathan HainesBeginning Ubuntu for Windows and Mac Users10.1007/978-1-4842-0608-9_5

5. Command-Line Tricks and Applications

Nathan Haines1 

(1)

CA, US

At last we come to the command line! That most powerful and often feared topic of all new Linux users. Fairly or unfairly, the command line has a reputation for being arcane and difficult to use. And it is a half-truth: a lot of arcane utilities have stuck around—and indeed, any Unix or Linux guru can perform magic inside a terminal window. But the other half of this truth is that the most common commands are simple and easy to use, and the command line is therefore both powerful and comfortable.

If you’ve gone through the earlier chapters, you’ve seen how comprehensive and easy Ubuntu is with pretty much no command-line usage. For daily use, it’s pretty simple to get by without ever opening a terminal window or editing a configuration file. Yet if you search the Internet or Ask Ubuntu for solutions to common problems, you’ll usually find advice in the form of commands to run on the command line. This seems to conflict with what I just said in the first sentence of this paragraph, but when you understand the command line, it makes perfect sense.

When specific actions need to be performed in a precise way, it’s very difficult to explain how to perform each step graphically to someone who isn’t familiar with a user interface. On the other hand, with specific commands it is possible to make a computer do precisely what is asked. Giving command-line options virtually guarantees that each step is performed in an exact way. Unfortunately, this also gives rise to the rumor that Ubuntu can’t be used without utilizing the command line, and that scares off a lot of users. Fortunately, the simple fact that we’re all the way into Chapter 5 and have already seen tons of practical applications proves that the command line is optional. But for as optional as the command line is for everyday use, it’s not unimportant, either. The command line also functions as a way to get work done even when something goes wrong.

Computers are dumb. They are fancy calculators that can’t do anything without a list of instructions. And when they operate, they only do what you say, not what you mean. A terminal window is your chance to tell Ubuntu exactly what to do, and have Ubuntu do it. In this chapter, we’ll look at some very specific tasks that are best done on the command line. They’re very simple and extremely useful at the same time. And toward the end of the chapter we’ll take a look at less serious tasks and more fun ones. With luck, you’ll find that some of these programs are useful or fun. At the very minimum, you’ll understand why many Ubuntu users prefer to use a command-line interface in certain circumstances. And even if you decide not to use the command line, you’ll at least see that the command line isn’t scary after all.

Introduction to the Command Line

The command line may seem daunting. But the basic commands are very straightforward, and easy to remember. This section will teach you a bit about the command line as well as some basic ways to navigate your way around. I’m not going to attempt to teach you all about the command line! That would be a book in and of itself. But I’ll teach you what you need to know to understand what’s happening in the rest of this chapter. It’s my hope that if you are intrigued by what we do cover together, you’ll pick up a dedicated book on the subject.

Note

The Ubuntu command line is part of a facet of computer history that stretches back to the 1960s, and more directly from the Multics and Unix operating systems. In the earliest days of command-line interfaces, computer mainframes filled half a room and user terminals in the same building were hardwired back to the mainframes. The earliest terminals were teletypewriters. You’d type in your command, which was electronically sent to the mainframe, and the resulting output was sent back to your “teletype machine,” which typed out the results on printed paper, just like a typewriter. These mechanical terminals were eventually replaced by electronic video terminals (sometimes fondly called “glass teletypes”), which were text-only video displays with built-in keyboards. Now, you run a “terminal emulator” to access the command line. Now you have some context to the brevity of Linux commands and their output. Incidentally, teletype machines and glass terminals are still compatible with Linux computers.

Accessing the Command Line

There are two different ways to access a command line interface in Ubuntu, and they function identically. The most common way is simply running “Terminal” from the Dash. This will launch GNOME Terminal in a window. For a more immersive view, you can maximize the terminal window. This gives you all the power of the command line with all the power of the modern graphical desktop, such as anti-aliased fonts and desktop notifications.

The other method is to switch your computer’s virtual console. Unknown to you, this entire time you’ve been working with virtual console 7, which displays your graphical interface. As the name implies, there are 6 other virtual consoles at your disposal. To switch out of the graphical interface and into a text interface, press Ctrl+Alt+F1 to switch to the first virtual console, which is labeled “tty1.” From here you can use Alt+Left or Alt+Right to switch to the previous or next virtual console, or Alt+Fn, where “Fn” is F1 through F7 to access another virtual console. Note that you need to add Ctrl to the Alt-Fn shortcut when you’re already in the graphical interface but don’t need it when you’re not. This is a fun way to limit yourself to text only if you’re learning to use the command line, but also useful if for some reason your graphical interface isn’t working or freezes and you still want to use your computer. It also mimics what you’ll see if you install Ubuntu server edition on a computer or in a virtual machine. Each console is independent, and any programs you start will keep running no matter what virtual console is active.

If you open a terminal window, you will simply see a command prompt, but if you switch to a virtual terminal, you will see a login prompt instead. It will look like the following:

Ubuntu 14.04.3 LTS ubuntu-book tty1

ubuntu-book login: _

To log in, simply type your username and press Enter. Then you’ll see a password prompt. Enter your password and press Enter. The password prompt won’t give any indication that you’re typing. This is a security feature that prevents others from seeing the length of your password and makes it more difficult to guess.

The Ubuntu Command Line

Once you have brought up a terminal window or logged in at a virtual console, you will see a command prompt. On Unix and Linux machines, the command line interface is provided by a “Unix shell” program. In Ubuntu, the default shell is called “bash.” It gives some simple information before prompting you for a command (see Figure 5-1.)

Figure 5-1.

This is your standard Ubuntu terminal window with a bash command prompt

The command prompt displays the current logged in username, separated with an @ sign from the computer’s hostname. Because you can connect to other Unix and Linux machines over the network, this is a useful reminder of which computer you are controlling. A colon (:) separates the hostname from the current working directory, and finally a dollar sign ($) announces the end of the prompt. Your cursor shows up on the same line after the dollar sign, and your Ubuntu system waits patiently for your command.

You work with the command line by typing a command, and if you need to tell the command anything before it gets started—such as the name of a file—the information it needs is called an “argument.” You separate that from the command with a space before typing it in. When you have typed the entire command, you press Enter to tell the computer to run it. You can also specify options in some cases. These are usually preceded by a hyphen (-). Traditionally, an option with a long name is preceded by two hyphens (--). For example, a command might have “-f” or “--find” as synonyms for the same option. Don’t worry too much about these details. They’ll make sense as you learn more about the command line.

You can always type the command “clear” and press Enter to erase the terminal window to make the display less cluttered. The shortcut key Ctrl+L also performs the same function. Ubuntu will erase the screen and print your command prompt and any partial command you’ve typed at the top of the screen. You can type “exit” and press Enter to close your Terminal window, or log out of the computer (at a virtual console) when you are finished. If you close the Terminal window using the red X icon in the title bar, Ubuntu will prompt you if a command is still running.

Working with Files and Directories (Folders)

Moving around the command line is pretty easy to do, and for most simple uses you’ll be looking at files and folders. On the command line, folders are usually called directories. When you first open a terminal window or log in to a computer, you’ll start at your home directory. This is represented as a tilde (∼) in the command prompt. Let’s take a look together at my system. Follow along, and you’ll see different files, but the commands will work the same. My username on the system I used to write this book is “nathan,” so my home directory is “/home/nathan,” although the prompt just says ∼. Note that Ubuntu like all other Unix-like operating systems uses forward slashes (/) to separate each directory, whereas Windows uses backslashes (\) and Mac OS used to use colons (:), although OS X recognizes both colons and slashes (/) now that it is Unix-based, too. If you want to see what is in my home directory, you can run “ls” to print a directory listing:

nathan@ubuntu-book:∼$ ls

Calibre Library  examples.desktop  pratchett.csv

deja-dup         japan             Public

Desktop          keen              Templates

Documents        Music             Time track, 03.09.2014 - 03.15.2014.html

Downloads        Pictures          Videos

nathan@ubuntu-book:∼$

On your screen, files are shown in light gray, but directories are dark blue. Executable commands such as programs or scripts would be green. I can view the contents of a different directory in two different ways. I can type a space after “ls” and name the directory, or I can change my current working directory and type “ls” again.

When you first log in or open a terminal window, you are placed in your home directory, and commands will typically work with your current directory and its files, which is why it is prominently displayed in the command prompt. To change to a different directory, use the “cd” command. Type “cd” then a space, then the directory you want to change to before pressing Enter. Because my home directory contains a directory called Documents, I can just type “cd Documents” and press Enter to change to that directory:

nathan@ubuntu-book:∼$ cd Documents

nathan@ubuntu-book:∼/Documents$

Now the prompt shows my current directory as “∼/Documents,” and ∼ still refers to my own home directory. It helps to keep the command prompt from being too long. Now I can type “ls” again and see a list of files and folders inside my Documents folder:

nathan@ubuntu-book:∼/Documents$ ls

Artificial Heart         Library.tc     Sales Inquiry.odt   Tea.mm

budget.ods               Library.tc∼    sol.exe

demo scale calendar.ics  nanowrimo.odt  Support policy.odt

nathan@ubuntu-book:∼/Documents$

To change back to my home directory, I can either type “cd ..” and press Enter, which will bring me back up one level into the current directory’s “parent” directory, or I can type “cd” by itself and press Enter. If you ask your computer to change the working directory with “cd” but don’t specify a specific directory, it will change the working directory to your home directory. For a list of some other shortcuts, see Table 5-1.

Table 5-1.

Short names for common directories

Directory

Shortcut

Meaning

Home

∼

Expands to home directory (example: /home/nathan).

Current

.

Refers to the current working directory.

Parent

..

Refers to the directory containing the current directory.

Root

/

The root directory contains all other directories.

Running Commands

You can type the name of any command on your system and it will run when you press Enter. Even if you type “firefox” and press Enter, for example, Firefox will open a new window to display graphics, and you will see any console messages in the terminal window where it is running. (Some “warning” and “info” messages are normal and no cause for alarm.) You will not be able to type new commands until Firefox exits (or at least until you read the later section on multitasking!).

Once a command has finished, bash will print a new command prompt and again patiently wait for your next command. Computers don’t experience boredom, so you should never feel too busy to take your time or to double-check a command before pressing Enter. Most text commands tend to do exactly what you say without further confirmation and only print feedback if there was some kind of error. This can be confusing if you don’t expect it, but the computer assumes that you mean what you say.

In Ubuntu, most of your commands are in the /usr/bin folder or other standardized locations. When you type a command and hit enter, your system will look through a list of folders one by one for that command and run the first match it finds. This list of folders is called the “system path,” and it allows you to quickly run commands no matter what directory you’re working. As a security measure, Ubuntu only looks in the system path when you type a command. To run a specific command that is located outside of the system path, you’ll need to give the full path to the command. For instance, I have a nice white noise generator command that I saved in a file in my Documents directory called “spacedrive.” To run it, I can type in “/home/nathan/Documents/spacedrive” and press Enter, which will let Ubuntu know exactly where to look. But if I just type “spacedrive” and press Enter, Ubuntu will not find the command and I’ll get an error, even if I’m in my Documents directory, because it isn’t in the system path. Sometimes you’ll want to run a script in the same directory. You can use a period (.) to specify the current directory. So if I’m already in my Documents directory (“cd ∼/Documents”), I can run “./spacedrive” and the script starts right up!

Tip

If you create a directory in your home directory called “bin,” Ubuntu will add it to your system path the next time you log in. You can put any scripts you write there and run them with just their name. You can run “mkdir ∼/bin” at the command line or use Files to create the directory. The next time we see the spacedrive script in Chapter 6, it’ll be in ∼/bin.

One last hint is to look at the documentation if you find yourself with questions about how to use a command. There is a lot of help available, and you can usually type “--help” after a command to see a summary of command usage and options. You can also read the manual—or “man page”—of a command to get more detailed information. For example, to find out all about the “ls” command, you can type “ls –help” for a usage summary or type “man ls” and read the manual. It explains each option in detail, and is the best way to learn new ways to use commands. The manual is designed to be a reference guide, so you don’t need to understand every option a command uses. If you want to do something but aren’t sure what the command is called you can search the manuals of commands installed on your system with “apropos” and a keyword related to your intent. For example, “apropos edit” will return a list of man pages with “edit” in the command name or short description. You can scroll through the list (there will be a lot of false positives) and when you find a command that looks interesting, read the man page for that command. It’s a great way to explore and learn right from the command line.

Redirecting Output

Most command-line applications print their output to the terminal as text. One of the most convenient things about using the command line is that you can copy and paste output to save for later. But sometimes you’ll know in advance that you want to save the output of a program to a file, or you’ll want to send the output of one command to another command for processing. This is an iconic feature of Unix that has served Linux very well, and is one of the nicest things about using the command line.

You can redirect the output of a command to a file by using the greater than (>) sign. For example, if you run “ls ∼ > homefiles.txt”, the shell will take the output from ls and place it in the file “homefiles.txt” in the current folder. You can then open up that file in a text editor, or send it to a friend in an email. You should exercise caution, because using > to save output will replace any existing file with the same name. Using two greater than signs (>>) will create the file if it doesn’t exist, and append (add on to the end) of the file if it does exist.

One way that redirection comes in handy is using the command “grep” to search and display specific information to save you from having to search or scroll through large amounts of data. You could save the command’s output to a temporary file, but you can use a special character called a pipe (|) to skip that step. When you pipe the output of one command into another program, they both run in parallel, and any output of the first command is treated as input by the second command. You can run several commands at once in this manner, so if you decide to study the command line in the future, you will get a lot of mileage out of this. But for the purposes of this quick introduction, I simply want you to recognize that when you see a pipe, you’re asking the second command to process the results from the first command.

See What’s Running on Your Computer

Computers are great multitaskers. Almost immediately after the boot process begins, they’re doing more than one thing at once. Technically, a single computer processor can only run one instruction at a time (although multi-core processors can cheat this a little). But computer time is measured in billions of operations per second and a “multitasking” operating system’s job is to schedule tiny little chunks of programs to run, one after the other. Because this all happens faster than human perception, it appears to us as though computers are doing many different things at the same time. Ubuntu gives you access to the same information about which programs are running that Ubuntu itself has. Since Ubuntu has to keep track of all of your programs, there are a few different ways that you can view this information as well.

The easiest way to see what’s running on your system is to use the “ps” command. Short for “process status,” this command will display a list of currently running processes (programs or parts of a program) on your computer. When run with no additional options, this will show any processes that are running as your user and are attached to the current terminal. It looks like this:

nathan@ubuntu-book:∼$ ps

  PID TTY          TIME CMD

2836 pts/12   00:00:00 bash

3111 pts/12   00:00:00 ps

The four columns are simple. PID is the “process ID” for a line. Every time a process starts, it’s assigned a number. The first process that Linux starts during bootup is the “init” system, which starts (or initializes) every other process, so it’s assigned PID 1, and the PID goes up by one every time a new process is started. You can use the PID to force a process to shut down with the “kill” command, but it isn’t important otherwise. TTY shows the name of the terminal a process is running on. This was more important in the days when many users connected to a single mainframe, but is still useful when monitoring a server that many users connect to over the network. TIME shows the cumulative amount of time that the program has used the computer’s processing power instead of waiting on standby. It’s measured in hours:minutes:seconds (if there are four numbers listed, the first one specifies days). The last, CMD, shows the name of the running command.

One of the odd things about ps is that it is actually a very old command, and in various versions of Unix over the years it has displayed different information using different layouts. Because scripts like to run commands like ps and process the output, and many scripts are reused across different operating systems, ps will display Unix-style formatting if it is run with no options or Unix-style options, but will mimic the BSD operating system’s ps display if it is run with BSD-style options so that it will be compatible with old scripts. This means that if you want to display all programs that are running as your user by using the U option from BSD, the output will look a little different.

nathan@ubuntu-book:∼$ ps u

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

nathan    2836  0.1  0.3  29428  3624 pts/12   Ss   22:59   0:00 bash

nathan    3101  0.0  0.1  25084  1284 pts/12   R+   23:01   0:00 ps u

BSD provides a little more information than traditional Unix does. It displays the percentage of computer processing and memory utilization for each process, the virtual and physical memory being used, the current “state” of the process, the time the process was started, and COMMAND displays not just the command name but also the rest of the command line used to start it as well. The details aren’t important right now, but you should know that sometimes the display will change and it’s nothing to be surprised or worried about. There are a lot of additional options you can use but “ps aux” displays all processes running by all users on the computer, and this is a good way to see literally everything that’s running on your system. You can use it to see what processes are running and which user they are running under.

While ps will give you a snapshot of the processes running on your computer, a more interesting program called “top” will show you the processes that are running in real time, updating the list to show which processes are using the most resources.

top - 22:59:43 up 29 min,  3 users,  load average: 1.06, 0.45, 0.29

Tasks: 199 total,   2 running, 197 sleeping,   0 stopped,   0 zombie

%Cpu(s):  9.8 us, 17.3 sy,  0.0 ni, 49.3 id, 18.4 wa,  0.2 hi,  5.0 si,  0.0 st

KiB Mem:   1017500 total,   944564 used,    72936 free,    54172 buffers

KiB Swap:  2095100 total,      412 used,  2094688 free.   422096 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND

2113 nathan    20   0 1439700  74108  35780 S  33.7  7.3   1:07.87 compiz

1396 root      20   0  344404  54224  14916 S  32.4  5.3   1:01.54 Xorg

2594 root      20   0   44556   2248   1876 S  25.4  0.2   0:35.54 http

2906 root      20   0    4508   1008    640 D  21.8  0.1   0:03.10 updatedb.m+

2008 nathan    20   0  635372  16884  10624 S   9.3  1.7   0:01.95 unity-pane+

2442 nathan    20   0  500820  14720   9004 S   8.6  1.4   0:15.32 update-not+

2536 nathan    20   0  713856  19168  11584 S   5.3  1.9   0:07.33 gnome-term+

    7 root      20   0       0      0      0 R   2.0  0.0   0:03.96 rcu_sched

   49 root      20   0       0      0      0 S   2.0  0.0   0:00.59 kswapd0

1951 nathan    20   0  290292   4048   2824 S   1.3  0.4   0:02.83 ibus-daemon

    3 root      20   0       0      0      0 S   1.0  0.0   0:00.67 ksoftirqd/0

    8 root      20   0       0      0      0 S   1.0  0.0   0:02.70 rcuos/0

2011 nathan    20   0  543420  14196   9444 S   1.0  1.4   0:01.11 ibus-ui-gt+

   11 root      20   0       0      0      0 S   0.7  0.0   0:01.30 rcuos/3

1994 nathan    20   0  816452  17152  10648 S   0.7  1.7   0:01.16 unity-sett+

2051 nathan    20   0  612896  11800   7612 S   0.7  1.2   0:01.66 bamfdaemon

2854 nathan    20   0   31588   1660   1136 R   0.7  0.2   0:00.19 top

This is a lot of information packed into a small amount of space, and every last detail is left as an exercise for the reader (running “man top” will display a very detailed manual). But generally, the top section of the screen shows information about the computer itself and the bottom section shows the running processes under all usernames, sorted from the highest computer utilization to the lowest. This program keeps running until you tell it to stop, and is interactive. You can use the arrow keys to scroll the display up, down, left and right, and the PageUp and PageDown keys work as well.

The list of processes updates every three seconds, and you’ll typically use this to find the culprit if a program is causing your computer to run slowly by checking which programs have a high value under the %CPU or %MEM columns. From there you could use the PID of that process to terminate the program, although you should be careful to only terminate programs that you yourself are running or that you know are stuck. Terminating “apt-get” or “dpkg” during a software update could cause major problems. Terminating “firefox” if it’s stuck, however, shouldn’t cause problems. When you are finished using top, you can press the Q key to cause it to quit and return to the command prompt.

You can terminate a process using it’s PID by using the “kill” command, followed by a space and the PID. This sends a signal to the process that means “please stop running” and this is similar to clicking the “Close” button on a title bar. A program might finish its current task or ask you if you would like to save before actually closing. But if a program is really stuck, it may not be able to respond. In that case, “kill -9” followed by a space and the PID will cause Ubuntu to forcibly terminate the program. This guarantees results. Why didn’t I give a full command-line example as usual? Because PIDs are different every time, and if you type in an example from a book, there’s no telling what (if anything) might be running with the example PID on your system. So be sure to check carefully before using the “kill” command!

Multitask on the Command Line

Unix was a multitasking operating system long before interactive graphical user interfaces were common. In order to run multiple programs at once without actually using different terminals, there are a few different ways to stop the current program, ask a program to continue running in the background, and change which program is running in the foreground. Bash, your command shell, handles these requests.

You run a program by typing its name at the command prompt and pressing Enter. We’ll use top as an example because it is easy to see when it is running. If you type “top” and press Enter, it will run in the “foreground,” which means that it is actively using the terminal display and listening for keypresses. But you can stop this program by pressing Ctrl+Z. You will then see the following:

[1]+  Stopped                 top

nathan@ubuntu-book:∼$

This means that the program is no longer in the foreground, and the command prompt means that Ubuntu is waiting for your next command. But the old program is no longer running, either. Instead, Ubuntu has stopped scheduling this program to run on the CPU. It still takes up memory, but will not process any information or slow down the computer. You can run other programs, and in fact you can suspend additional programs with Ctrl+Z. They will be stopped as well. For example, if I now run “man top” to read the top manual and want to suspend that temporarily, I can press Ctrl+Z and see the following:

[2]+  Stopped                 man top

nathan@ubuntu-book:∼$

The “2” in brackets means that this is the second job. You can run and suspend as many programs as your computer’s memory will allow. As useful as it is to interrupt a program to do something else, sometimes you want the program to keep running in the background while you work. And eventually you’ll want to call a program back to the foreground. Bash refers to your running programs as “jobs,” and in fact you can use the command “jobs” to print a list of all jobs whether they are running or not. It looks like this:

[1]-  Stopped                 top

[2]+  Stopped                 man top

nathan@ubuntu-book:∼$

There are two jobs listed, and the “current” job is marked with a plus (+) sign. If we don’t specify a specific job number, any job control command will take effect on the current job. To go back to the man page for top so that it’s running in the foreground again, either “fg” or “fg %2” would work. Because job 2 is the current job, specifying its job number to the fg command with “%2” is optional. On the other hand, if I wanted top to continue running in the background, I could run “bg %1”, and top would begin processing again, but I would still be at the command prompt. I could continue working with other programs until I was ready to bring top back to the foreground again by running “fg %1”.

Sometimes you may want to run a program but have it run in the background right away. To do this, simply add an ampersand (&) to the end of the command line before you press Enter. The command will run in the background until you suspend it or until it finishes on its own. So if I want to run ps in the background, I could simply type “ps u &.”

nathan@ubuntu-book:∼$ ps u &

[3] 10410

Bash will print the job number, but instead of printing the command (which you already know because you just typed it!) it prints the PID, so that you can use kill if you need to. Any command you run this way will continue working in the background until you resume control of it with fg or until it stops on its own. When this happens, the next time bash prints a command prompt it will print a message letting you know what happened:

[3]-  Done                    ps u

nathan@ubuntu-book:∼$

If you run this command, you’ll see that ps actually printed to the terminal before it quit. (You may need to press Enter once more to see a command prompt.) Commands running in the background can still print plain text messages. And these commands work with all programs, not just text-based command line programs. For instance, you can run the graphical benchmark program “glxgears” on the terminal. A new window will open but every five seconds the program will print graphics performance statistics to the terminal. By pressing Ctrl+Z, you will suspend the job and the graphical output will stop. Typing “bg” will cause the program to work in the background, and the processing will start up again. This makes glxgears a perfect program to test out suspending, backgrounding, and foregrounding jobs.

If you’ve ever wondered how computer users multitasked before graphical interfaces came along, now you have the answer in the Unix and Linux worlds. And being able to suspend and resume programs can be very useful, especially when you’re still getting familiar with the command line and want to reference documentation or check files or running programs.

Diagnose a Connection to a Server

Network connectivity can be one of the most difficult problems to troubleshoot, but two command-line tools can quickly give you information about your network pathway to another computer. Simple to use and understand, one is the first thing that network professionals go to when they can’t connect to a computer, and the other will give you more information about the route your data takes through the network.

The first tool is called ping. This tool sends ICMP ECHO requests to another computer, which will respond to the “echo” request by sending a reply. The ping command listens for these replies and can measure the round trip delay. Thus, ping is fancifully named after sonar tracking like you see in movies about submarines. Despite the cute name, this is the simplest way to confirm that you have a working network connection to another computer. You run ping by giving it the hostname or IP address of the system you want to connect to. Then, ping sends one echo request every second and listens for the response. It prints a message for every reply it receives. It continues until you press Ctrl+C, which sends a “break” signal to the running program. Then it summarizes the network test results and quits. It looks like this:

nathan@ubuntu-book:∼$ ping www.ubuntu.com

PING www.ubuntu.com (91.189.89.110) 56(84) bytes of data.

64 bytes from www-ubuntu-com.nuno.canonical.com (91.189.89.110): icmp_seq=1 ttl=49 time=156 ms

64 bytes from www-ubuntu-com.nuno.canonical.com (91.189.89.110): icmp_seq=2 ttl=49 time=155 ms

64 bytes from www-ubuntu-com.nuno.canonical.com (91.189.89.110): icmp_seq=3 ttl=49 time=155 ms

64 bytes from www-ubuntu-com.nuno.canonical.com (91.189.89.110): icmp_seq=4 ttl=49 time=155 ms

64 bytes from www-ubuntu-com.nuno.canonical.com (91.189.89.110): icmp_seq=5 ttl=49 time=155 ms

^C

--- www.ubuntu.com ping statistics ---

5 packets transmitted, 5 received, 0% packet loss, time 4006ms

rtt min/avg/max/mdev = 155.642/155.924/156.546/0.593 ms

For each echo request, it prints the echo size, the reverse domain name and IP address of the target system (many web sites redirect requests to different computers for load balancing, for example), a sequence number, the “time to live” value set on the outgoing request, and the time it took to receive a response. Once it’s finished, it shows the number of echo requests (packets) sent, received, and how many packets were lost, as well as statistics for the round trip time (rtt) measured in milliseconds (ms).

While network troubleshooting is its own book, if you get a response back, you’ll know that network data can flow back and forth between the target computer and you. This means that no matter what else is or isn’t working, the network itself isn’t to blame. You can use the “icmp_seq” number to see if packets are coming in out of order. If random packets are coming in late, that means the network route between the two computers is unstable. This isn’t a problem for web pages or downloads, but it is a problem for voice or video chat. If the response time is long or varies wildly between packets, or if there are a lot of “lost” packets, this can indicate network path or server problems as well.

If you run ping and nothing is displayed, press Ctrl+C after 5 to 10 seconds. If ping displays 100% packet loss then either the remote computer is configured to ignore echo requests, there is no network route between you and the remote computer, or the remote computer is offline. While this is not proof that the remote computer is offline, it’s a great way to check for a connection between your computer and your router or your computer and another computer on your same network at home or work.

The other tool that you can use to gather more detailed information about the path between your computer and another is called “mtr” and it works very much like ping, except it traces the route between your computer and the remote system and pings each of those computers as well. You will need to install the “mtr” package from the Ubuntu Software Center or via the command line (see Chapter 6). Once installed, you can run mtr along with a hostname or IP address the same way you ran ping. For example, if I run “mtr www.ubuntu.com ”, I see the following display update as new packets are continuously sent:

                             My traceroute  [v0.85]

ubuntu-book (0.0.0.0)                                  Fri Apr 10 04:58:04 2015

Keys:  Help   Display mode   Restart statistics   Order of fields   quit

                                       Packets               Pings

Host                                Loss%   Snt   Last   Avg  Best  Wrst StDev

1. 104.236.128.253                   0.0%   100    1.6   0.8   0.3   9.5   1.3

2. 198.199.99.253                    0.0%   100    0.3   1.2   0.3  29.3   4.2

3. sjo-b21-link.telia.net            0.0%   100    2.0   2.2   2.0   5.6   0.4

4. level3-ic-157355-sjo-b21.c.telia  0.0%   100    1.7   6.4   1.6  52.2  11.3

5. ae-234-3610.edge5.london1.Level3  0.0%   100  159.9 160.8 159.8 197.1   5.1

6. ae-234-3610.edge5.london1.Level3  3.0%   100  159.9 160.5 159.8 184.4   3.5

7. SOURCE-MANA.edge5.London1.Level3  0.0%   100  150.1 151.0 149.9 186.1   4.9

8. eth0.lutin.canonical.com          0.0%   100  148.7 148.9 148.6 154.2   0.6

9. www-ubuntu-com.avocado.canonical  0.0%   100  146.7 149.3 145.5 155.1   3.6

This shows me each router between me and my destination, and gives me information about the network health of each. The two most important columns are the percentage of lost echo requests (Loss%) and the average response time in milliseconds (Avg). From this I can see if there are any problem points along the way. In this example, I can see that the first four hosts are the path my requests take inside the local network, and the fifth host is where the data hits the Internet and travels to London where the Ubuntu web site is hosted. I can tell that the network is very fast on my local network but slows down considerably on the public Internet. I can also see that host 6 is losing packets, but the other hosts do not appear to be. (This isn’t immediate cause for alarm—in general this happens all the time and computers resend important data if it is not received.) If I were having trouble loading the Ubuntu web site, this would suggest that the web server is fine but data is being lost along the way. But if I was not losing packets and had a low response time (under maybe 400 ms) all the way until the last host which had very high packet loss or response times, that would suggest that the web server itself was the problem. When you are done testing the network you can press Q to quit mtr.

Both ping and mtr are both extremely useful tools that are the same ones that network technicians use to help diagnose and troubleshoot network performance on the job, and a full analysis and understanding would take a little bit of study. But even a cursory knowledge of what to look for can verify strong or weak network connections and show you where problems lie.

View Information about the Operating System

There are times when you need specific, detailed information about your computer, and this is another example of where command-line use really excels. On the terminal, you can request certain information, or filter out irrelevant information—all more quickly than you could with a graphical tool.

Determine Your Distribution and Version

Sometimes you have access to a computer, but because you didn’t install the operating system yourself, you aren’t sure exactly what version of Linux is running. You might be able to recognize the distribution by the default wallpaper or the interface, but unfamiliar or heavily modified operating systems will still pose a challenge. One simple command-line tool is common across many different versions of Linux, and can help to answer this question.

The Linux Standard Base (LSB) was a software specification created in 2001 to make software development easier across many different Linux distributions. Not all Ubuntu releases are certified as LSB-compliant, but each version of Ubuntu includes an important tool that can help you identify what version of Ubuntu is running. This command is called “lsb_release.” You can use it to request certain information about the operating system or you can use the option “-a” to display all of the information it will provide. On a standard Ubuntu system, running “lsb_release -a” will display the following output:

nathan@ubuntu-book:∼$ lsb_release -a

No LSB modules are available

Distributor ID:  Ubuntu

Description:     Ubuntu 14.04.3 LTS

Release:         14.04

Codename:        trusty

This information is useful in a lot of ways. For instance, the code name is often used when looking for software compatibility. Above, we see that the codename for Ubuntu 14.04 LTS is “trusty.” You can also ask lsb_release for specific information. For example, if you were running Ubuntu 15.10 and needed to know the release’s code name, you could run “lsb_release -c” and get the following output:

nathan@ubuntu-book:∼$ lsb_release -c

Codename:       wily

With an easy way to determine the code name for your release of Ubuntu, you don’t have to worry about memorizing it, which can be difficult to keep track of after you’ve upgraded. This is a useful way to narrow down solutions to your specific version of Ubuntu when searching the Web, and is often important to know when working on a server. Because the lsb_release command is available on desktops and servers alike, you might log in to a Linux server and run the command and see the following output:

[root@linux-server ∼]# lsb_release -a

LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch

Distributor ID: CentOS

Description:    CentOS Linux release 7.0.1406 (Core)

Release:        7.0.1406

Codename:       Core

While CentOS is a very popular Red Hat-based server operating system with some significant differences from Ubuntu (particularly how to install software and where network settings are stored), you’ll be able to apply your Ubuntu experience in most cases, and you’ll know what to search for on the Web when investigating any puzzling differences.

Determine your Architecture and Kernel Version

Sometimes you need to know whether your installed system is 32-bit or 64-bit. This can be useful when downloading third-party software, for example. You might also want to double-check that you have the proper operating system installed, since it isn’t possible to change the operating system without a full reinstallation. Although it’s simple enough to click the gear menu and choose “About This Computer” and read the value given after “OS type,” this works in all versions of Linux regardless of your choice (or lack of) desktop environment.

The command “uname” stands for “Unix name” and tells you about the operating system kernel that’s running. By itself, it simply tells you the name of the current running operating system, but running “uname -r” will display the kernel version number (the “release”), and “uname -m” will display the machine hardware name. “uname -a” will display all available information, but if you are looking for something specific, it’s easier to read if you only ask for the information you want.

Running “uname -m” will display “i686” if you’re running the 32-bit version of Ubuntu or “x86_64” if you’re running the 64-bit version of Ubuntu. While 64-bit software requires a 64-bit operating system, the 64-bit version of Ubuntu can also run 32-bit applications. So if your computer supports 64-bit software you should probably have 64-bit Ubuntu installed.

If your operating system is 32-bit but you want to know if your computer supports 64-bit software, you can read the information in the file “/proc/cpuinfo.” Typing “cat /proc/cpuinfo” will display the contents of the file and all available information about all processors and cores on your system. However, the information we want is in the “flags” list. Processors that support 64-bit wide instructions and memory addresses have a flag called “lm,” for long mode. But this can be hard to spot in the alphabet soup of features listed by /proc/cpuinfo. To simplify this, we can use the “grep” command to search for “lm.” If the processor does not support 64-bit mode, the “lm” flag won’t be listed and nothing will be displayed. If it does support 64-bit mode, then grep will only show the “flags” line and will highlight “lm” in red. On my 64-bit computer, running “grep -iw lm /proc/cpuinfo” displays the following:

nathan@ubuntu-book:∼$ grep -iw lm /proc/cpuinfo

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt arat cpb hw_pstate npt lbrv svm_lock nrip_save pausefilter

This repeats four times because I have a quad-core processor, and grep returns each line that contains a match. It would take some time for you to find “lm” there on the second line, but here it’s highlighted in red. If you’re running 32-bit Ubuntu and have a 64-bit processor and at least 2 GB of RAM, you might want to consider installing the 64-bit version of Ubuntu instead. But with these commands you’ll understand your computer and software better.

Add New Users via Command Line

Each user on an Ubuntu system has his own username, password, and home folder. This gives each user a little privacy and the ability to customize the system to his own preferences. And while every user can run the software installed by the Ubuntu Software Center, each application stores its settings in the current user’s home folder. Creating a new user account to allow someone to log in is simple to do from the command line with the “adduser” command.

Because this modifies the system, you’ll need to start the command with “sudo”. The sudo command is used to run a command with administrative permissions and it will prompt you for your password. By using sudo to run adduser along with the login name of the new user, Ubuntu will create the new account and home folder, and then prompt you for some optional information. The full name is used for Ubuntu’s login screen, but the rest of the information is a holdover from legacy days and can be left blank. For example, if I wanted to create a user account for my friend Alexander, the setup process would look like this:

nathan@ubuntu-book:∼$ sudo adduser alexander

Adding user 'alexander' ...

Adding new group 'alexander' (1001) ...

Adding new user 'alexander' (1001) with group 'alexander' ...

Creating home directory '/home/alexander' ...

Copying files from '/etc/skel' ...

Enter new UNIX password:

Retype new UNIX password:

passwd: password updated successfully

Changing the user information for alexander

Enter the new value, or press ENTER for the default

        Full Name []: Alexander Brumley

        Room Number []:

        Work Phone []:

        Home Phone []:

        Other []:

Is the information correct? [Y/n]

Now Alexander can log into my system with the password I’ve created for him. If I want to make sure that he has a unique password that he’ll remember, I can tell Ubuntu to require him to change his password the next time he logs in. This is done with the “passwd” command’s -e option to set the password as expired. The next time Alexander logs in, he’ll be forced to change his password before he can complete the login process.

nathan@ubuntu-book:∼$ sudo passwd -e alexander

passwd: password expiry information changed.

On a home computer, I might want to allow Alexander to log in by clicking his name without using a password. I can use the passwd command to do this too, by using the -d option to delete the password for that account. This works the same way as before and prints the same status message. Once the password is deleted, the user can log in without a password in the future.

nathan@ubuntu-book:∼$ sudo passwd -d alexander

passwd: password expiry information changed.

When you first install Ubuntu, you create a user account that is given administrative rights to make system-level changes such as installing new software. Accounts you create with adduser, however, are not able to make these changes by default. To allow users to modify the system, you have to add them to the “sudo” user group. The adduser command can add a user to a user group as well. Simply run the command and specify the user account name first, and the user group name second. This makes the command look a little funny because you have to use “sudo” to run the command, and also specify the group name “sudo” at the end. The entire process is automatic once you press Enter, and looks like this:

nathan@ubuntu-book:∼$ sudo adduser alexander sudo

Adding user 'alexander' to group 'sudo' ...

Adding user alexander to group sudo

Done.

This change takes effect the next time the account logs in, so if Alexander were already logged in, he would have to log out before he could use sudo or confirm administrative tasks.

With the adduser and passwd commands it’s easy to create new user accounts and set up passwords and administrator rights in seconds. If you spend time working on server tasks, you’ll find that these tools make adding users effortless.

Check Your Disk Space

You can use the command line to very quickly find out information about the amount of disk space you have available and how much is being utilized. This is faster than using the Disk Usage Analyzer because the commands are short and you can specify exactly what you want to know.

The best tool for a quick overview of free space on your computer is called “df.” Short for “disk free,” it displays all of the file systems currently in use on your computer and size information for each of them. By default, the df command displays its sizes in 1,024-byte blocks, but by adding the -H option, the display uses a more human-readable format for the numbers.

nathan@ubuntu-book:∼$ df -H

Filesystem      Size  Used Avail Use% Mounted on

/dev/sda1        15G   11G  3.5G  76% /

none            4.1k     0  4.1k   0% /sys/fs/cgroup

udev            510M  4.1k  510M   1% /dev

tmpfs           105M  1.3M  103M   2% /run

none            5.3M     0  5.3M   0% /run/lock

none            521M  156k  521M   1% /run/shm

none            105M   37k  105M   1% /run/user

/dev/sr1         25M   25M     0 100% /media/nathan/WD Unlocker

/dev/sdb2       606G  524G   83G  87% /media/nathan/My Passport

This is a nice summary of all mounted file systems, including some temporary ones used by the Ubuntu kernel. The system file system is 15 GB, and whether you want to know which device its running on, whether it contains 11 GB of data or has 3.5 GB free, or just a quick percentage utilized, everything’s right here. The last line contains information on the external drive, which has 83 GB available and is mounted at “/media/nathan/My Passport.” This is plenty of space for running backups, and I know where to find those files. The file systems that don’t start with /dev are used by Ubuntu and can be ignored.

A similar tool is “du,” which is short for “disk usage.” This tool prints an estimate of disk usage for the current directory and any directories it contains. Like df, the sizes are shown in 1024-byte block sizes, but you can use the “-si” option to make du print sizes in human-readable format. Running the du command shows all folders, even hidden folders and folders inside folders, so the output can be very long. Running the command in the Pictures folder shows the following output:

nathan@ubuntu-book:∼/Pictures$ du --si

550M    ./Cabrillo Beach

128M    ./2012/06/10

128M    ./2012/06

128M    ./2012

677M    .

The period (.) represents the current folder, which is “/home/nathan/Pictures.” The summary at the bottom shows that the current folder uses 677 MB, but adding up each of the totals comes to 934 MB. This seems wrong, until you notice that “/home/nathan/Pictures/2012” is empty except for the “06” folder inside it, which is again empty except for the “10” folder inside that contains the actual photos. The size of each folder includes the contents of the folders inside, but the summary at the bottom is correct.

You can also specify a folder path to point du to a different folder than the current location, or specify a file pattern, such as “*.jpg” to get file size information for files that match that pattern. Giving a file pattern shows space information on a per-file basis, and it might be useful to add “-c” to the options to ask du to show the total space used for all files. The display looks like this, with some lines removed for space considerations:

nathan@ubuntu-book:∼/Pictures/2012/06/10$ du --si -c *.jpg

295k    CRW_5777_CRW_embedded.jpg

279k    CRW_5778_CRW_embedded.jpg

...

377k    CRW_5800_CRW_embedded.jpg

7.7M    total

Note

“df -H” and “du --si” display decimal storage units that match Ubuntu’s graphical applications that work with storage sizes. But if you prefer binary storage units such as KiB, MiB, and GiB, you can use “df -h” and “du -h” instead.

These two commands give you a quick look at how your computer’s storage space is being used, both at the overview level and the specific level as well. These are also tools that are helpful not only on a desktop system, but when working with servers.

Edit Text Files

When spending time in a text-based interface, it makes sense to talk about editing text files. Traditionally, Unix and Linux programs have used text files to store their configuration settings. This allowed the file to be human readable and easy to set up, plus easy to change using text manipulation tools and input redirection using scripts. Today, many programs still store their settings as text files for the same reasons. Many documents were written in text files as well. With certain well-known exceptions, they are compatible with practically every operating system and easily shared with others. Formatting can be added with special markup such as TeX, HTML, and Markdown. There are many different text editors, and each has its own fans, but the easiest to start out with is definitely nano.

Note

Text editors choice tends to be contentious because people can spend a lot of time working with them. So it’s important to pick one that works best for your needs. This is so subjective, however, that countless debates have been fought (and still rage on) over the legendary One True Text Editor. Emacs and vi have steep learning curves but are rewarding. Just know that comparisons online tend to be charged!

To start nano, you can run “nano” along with the name of a file to open. If you do not specify a file, nano will keep your text in memory until you save it to a file. Running nano will display the basic text editing interface (see Figure 5-2). The top line gives you information about the file you are editing (called a “buffer”) in the center and whether the file has been modified on the right. The bottom three lines display a status bar that is normally blank, followed by two lines displaying commonly used shortcut keys. On this display, the caret (^) represents the Ctrl key, so ^G for the “Get Help” command represents Ctrl+G. You will also see references to M, which stands for the Meta key. You can use the Alt key as a stand-in for Meta. For example, where the help file specifies M-D as the shortcut to count the number of words, lines, and characters in the current file, you can press Alt+D.

Figure 5-2.

nano is an easy way to edit text files, with onscreen shortcut guides

Using nano is straightforward. You type and your text appears on the screen. To move the cursor and scroll through help files, the arrow keys and Page Up and Page Down keys work in addition to the shortcuts listed on the screen. You can use Ctrl+C to print the current position of your cursor in the file on the status line. This can help you orient yourself in a large file.

If you are using nano to edit a configuration file, you will note that it doesn’t wrap lines at the end of the screen but instead uses a dollar sign ($) to show that a line continues to the right of the screen. Placing your cursor on such a line allows you to scroll to the right with the right arrow or End key. The first character on the line will change to $ to indicate that the line extends to the left side of the screen. Configuration file entries must be on one line, so this helps ensure that they are being displayed properly.

If you are writing a document, however, you may want the display to wrap. You can press Alt+$ to turn on “soft” line wrapping. This allows you to see an entire line at once by displaying it on multiple lines without using actual end-of-line characters. This is useful when you are writing in text mode but will import your text to a word processor or other format when you are done.

One other useful feature about nano is that it understands some common text and configuration file formats, such as HTML, Python code, TeX documents, and many more. If you edit a file with an extension of “.html” or “.py,” for instance, nano will color code the text to help you identify keywords, variables, string literals, and notice other formatting issues that help protect against missing quotation marks or brackets. This can greatly enhance your editing experience without getting in your way.

When you are ready to save a file, press Ctrl+O to write the file out to disk. If you specified a file on the command line, nano will suggest the same file name and pressing Enter will overwrite it. The bottom two lines of the screen display several options as well. Entering a file name and pressing Alt+B will create a backup file, which will copy the original contents of the file to a new file with a tilde(∼) at the end before saving your changes to the original file name. By default, Files will not display backup files ending in tilde, but ls on the command line will. Pressing Ctrl+X will exit nano, which will prompt you to save a file if you have made any changes.

Editing text files is an important task on the command line, and there are dozens of different text editors designed to make this easy and efficient. Starting out, nano is a pleasant tool to use and is present by default on Ubuntu. You can use it to write anything, and it is a lightweight editor that loads instantly. Whether it’s your first command-line text editor or your favorite, nano will serve you well.

Read Email

Email has changed dramatically over the years. While Internet email as we know it today emerged in the early 1970s, early electronic mail messages were text-only messages that were passed from user mail folder to user mail folder on the same machine. Reading email in a text-only client can be a fun peek back in time that also delivers a unique perspective. Reading email in a text-only mail client is a much more focused experience than you might expect. However, one thing that has not aged very well is the setup process. While the setup on this is not for the faint of heart, the results are pretty fun. There are two popular terminal-based email clients today: Alpine and Mutt. I’m going to focus on Alpine, and you will need to install the “alpine” package from the Ubuntu Software Center or via the command line (see Chapter 6).

One legacy of Alpine is that while it is extremely configurable, it also expects certain information to be entered using specific formatting. The sheer number of configurations can be intimidating as well. The first thing you will need to know is your mail server details. This can be as simple as looking in Thunderbird or Evolution. You’ll need your IMAP server and username to receive email, and your SMTP server and username to send email. You can always set up incoming mail and set up outgoing mail later.

To run Alpine, simply type the command “alpine” and press Enter. A welcome message will be displayed on the first run only, and you can press E or Enter to show the main menu. At the top of the menu it will show you the current folder—INBOX by default—and the number of unread messages. Each command can be activated by its shortcut key or by using the arrow keys to highlight a command and pressing Enter. The bottom two lines in the terminal show other commands that can be activated. First, you’ll want to press S to enter setup. Then press C to enter the configuration settings.

The two settings you need to change are “SMTP Server” and “Inbox Path.” Both of these need to be formatted in a way that provides all relevant login information. Let’s assume that your IMAP server is “imap.example.com,” your SMTP server is “smtp.example.com,” and your username is the same for both servers. Each connection setting is built in the same style:

imap.example.com/user=username

If you are using anything but the standard port, you add a colon (:) after the server name, and you can add /ssl or /tls after your username if you are using encryption. So if you were using SSL to encrypt your mail server connection, the “Inbox Path” setting would be:

imap.example.com:465/user=username/ssl

Highlight the setting you wish to change, and press Enter to edit the field. Press Enter again to save the value. When you first set the “Inbox Path,” you will be prompted for the inbox folder. Press Enter to use the default of “inbox, and you’ll see that the path was changed to read:

{imap.example.com/user=username}inbox

This is the standard format for specifying IMAP folders, and you can use it to point to folders for your sent mail folder (referred to in Alpine as “Fcc” or “file carbon copy”).

Once you have set up your mail servers, press E to exit setup. Alpine will ask you whether you want to save your configuration changes. None of the changes you have made will take effect until you choose “Commit changes” by pressing Y or pressing Enter.

When you exit setup, Alpine will attempt to connect to your mail server and will ask you for your password. Type it and press Enter, and after a few seconds you should see a status messages that your inbox folder is opened along with the total number of messages and the number of new messages. Press I to load the message index. It will display all messages in your current folder (see Figure 5-3).

Figure 5-3.

Email without distractions, the way it was in the mid-1990s. Only now with Unicode support!

You can use the arrow keys to move the cursor up and down, and press Enter to read a message. The spacebar scrolls down one page and the minus (-) key scrolls back up one page. Note that messages are listed in order from the oldest at the top to the newest at the bottom. In addition to the Enter key, you can also use the greater than sign (>) to access an email or item and the less than sign (<) to go up one level again. Press C to create a new email or R to reply to the highlighted message. The bottom two lines of the screen show you a full list of commands, and you can cycle between the displayed commands by pressing the O key. Typing a question mark (?) will bring up the help file and will automatically jump to help on the highlighted object. This is especially useful in the settings screens.

When composing email messages, Alpine uses the pico text editor, and this is the program that inspired the GNU nano editor that you may already be familiar with. Commands are listed at the bottom of the screen and Ctrl+X will send your email once you are finished writing it. Ctrl+C will cancel the email. The bottom of the screen will prompt you to confirm your actions.

Another interesting way that workflow differed in the past is that actions require extra confirmation. From the message index you can press D to delete a message, but they are marked as deleted and remain in your inbox. This gives you time to change your mind and press U to undelete them. It is not until you press X to “expunge” your folder that the deleted messages are actually removed. On any of the menus or folder or message lists, you can press Q to be prompted to quite Alpine.

The full-screen text-based email interface in Alpine gives a classic, retro feel that evokes the standard behaviors of mainframes and terminals. What’s best of all is that it remains a very classic, efficient way to work with email today. The straightforward presentation and the text-based interface is more than able to stand in for more popular graphical email clients today.

Browse the Web

Some 25 years later, it’s hard to remember just how much the World Wide Web changed the Internet and the world at large. Online information retrieval systems used to be built to work with only specific software, and the information retrieved was often only accessible on the same computer architecture with the same authoring software. The Web changed all of that, with a flexible document language that allowed hypertext links to other documents. Because everything was primarily text-based, the documents could be displayed on any computer. These unique properties caused the Web to overtake other potential systems (particularly gopher) and grow into the phenomenon it is today.

A year before Mosaic arrived and two years before Netscape Navigator and Microsoft Internet Explorer appeared, a text-based web browser called links was created. It was a very popular alternative to the first graphical web browsers, since not all computer users had access to graphical terminals. Plus, it was fast and efficient and the early Web was mostly text-based as well. Links has been reimplemented several times, and today an enhanced version called ELinks is one of the most powerful and friendly text browsers around. Not only can it be used to experience the Web from the command line, but its menu system and mouse support make it a simple yet refreshing change from slow, graphics-laden web sites. You will need to install the “elinks” package from the Ubuntu Software Center or via the command line (see Chapter 6).

With its default settings, ELinks is very plain. The first time you run the command “elinks”, it lets you know that you can access the menus with the Escape key, and where to find documentation under the “Help” menu. Once you press Enter to dismiss that dialog, you are prompted for a URL. Just type in a web address and press Enter. Typing in “ www.google.com ” will take you to the Google home page, for example (see Figure 5-4). This might seem a bit underwhelming at first, but the minimalistic presentation can grow on you, especially if you’re looking up information in a hurry. You can also access a Web page immediately by supplying it on the command line, for example, typing “elinks http://www.ubuntu.com/ ” would open the Ubuntu web site by default.

Figure 5-4.

Google wasn’t around before 1998, but the Yahoo! and Alta Vista search engines looked much like this

The top line of the display is the title bar, and displays the title of the web page you are viewing as well as your current position, which is shown in screens full of text. You can press Escape or click on the top line with your mouse to display the menu bar. Clicking on the menu options will open each menu, or you can use the arrow keys to navigate the menus. In all menus and dialog boxes, the highlighted letter of each option can be used to activate that option, and most menu items will display a shortcut key on the right that can be pressed without entering the menus.

The monochrome, plain interface of ELinks cuts out distractions, and most commands are accessible with a single press of the keyboard. But it’s possible to make ELinks much more attractive as well. Open the menu by pressing Escape, type S to open the “Setup” menu, then type T to open the “Terminal Options” window. Then you can use the mouse or keyboard to enable color mode. If you are using ELinks in Ubuntu while using GNOME Terminal or Console, you should enable “256 colors” mode. If you are using ELinks using a virtual terminal, only 16 colors are supported. You can move the cursor with the arrow keys and activate a selection by pressing Enter, and activate the changes by typing O for “OK.” Or you can click directly on each option to activate it. Once you test the settings out you can go back to the Terminal Options menu and click “Save” or type V to save your changes. ELinks will load saved settings the next time it is run.

Actually navigating web sites is simple. You can use the up and down arrows to move from link to link, and the PageUp and PageDown keys to scroll the web page. The active link will be highlighted, and the Enter key will follow a link. The status bar on the bottom of the terminal will display the link destination or information about the current image or text field. You can select radio buttons or text boxes by highlighting them and pressing the Enter key. Some web sites can be awkward to navigate because most navigation menus are implemented as HTML list elements, which show up as bulleted lists in ELinks, but after a little bit of practice, scrolling through to actual content and moving around becomes easy. And even though sites will look different, most well-designed web pages are still readable. The Ubuntu web site is a good example of a site that is accessible even in text format (see Figure 5-5).

Figure 5-5.

Carefully designed Web pages like the Ubuntu site are usable even in text-only form

Once you’ve mastered the basics, ELinks has most of the features you’d expect in a modern web browser. The bookmark manager can be accessed by typing S and bookmarks can be visited, added, deleted, and more. Choosing “Add” will bring up a dialog box with the current page’s title and address filled in. The main surprise is that the move feature requires individual bookmarks to be selected before they can be moved. Bookmarks can be selected by highlighting them with the arrow keys and pressing the Insert key. Selected bookmarks will be marked with an asterisk (*).

ELinks also has tab support. Typing T opens a new tab and asks for a web address. Typing T while a link is selected will open that link in a background tab. Once more than one tab is visible, the tab bar appears above the status bar. It lists all open tabs and highlights the current tab. Clicking on a tab name with the mouse switches to that tab, and the less than (<) and greater than (>) keys can be used to display the previous and next tab, respectively. Typing C closes the current tab. Documents will load in the background, so tabs are a great way to load a new page while you are still reading the current page.

The download manager appears when you click on a downloadable link and chose the “Save” option. After setting a download location and filename and choosing “OK,” the download progress is displayed in a window over the page (see Figure 5-6). The file download can be moved to the background, where it can be checked through the download manager later. Choosing “Background with notify” will cause a dialog box to be displayed once the download is finished. The download manager can be accessed via the “Tools” menu or by typing D and will manage multiple downloads while ELinks is running. Notably, the “Abort” option will stop the download without deleting the file. The download can be resumed again later.

Figure 5-6.

Elinks has a built-in download manager to handle saving large files

While this covers most of the common features of ELinks, the documentation is easy to read and section 3 gives an overview of the user interface along with details on everyday usage, followed by detailed descriptions of the bookmark and tabs features in sections 4 and 5. You can read the Elinks manual online at http://elinks.or.cz/documentation/html/manual.html-chunked/index.html.

Browsing the Web has come a very long way in the last 25 years, and ELinks is an enhancement of the early text-based browser interfaces. Not only is it useful for testing web sites for accessibility and screen reader compatibility, but its speed and bookmark manager make it an interesting way to do research without distracting graphics. Mouse support and a powerful download manager help make it even more approachable for new users.

IRC

Internet Relay Chat is a real-time chat network that brings people together from around the globe. The protocol has been around since 1988 and has been used for socialization as well as coordination. Not only do Canonical employees and Ubuntu members use IRC to coordinate work and communicate during their workdays (see Figure 5-7), but the Ubuntu community also uses IRC to offer technical support, plan events, and simply relax and socialize. IRC support is included with Empathy on the desktop, but to use IRC on the command line you will need to install the “irssi” package from the Ubuntu Software Center or via the command line (see Chapter 6).

Figure 5-7.

Ubuntu developers using IRC on the desktop to discuss how to integrate an IRC client with phones

IRC servers allow users to log in and join other users in “channels” to discuss various topics. Each IRC server has its own administrators and rules of conduct. Servers can be linked together to form an IRC network. Connecting to any server on a network allows you to communicate with others users on the same network. Ubuntu uses the Freenode network for official channel hosting, and connecting to irc.ubuntu.com will cause your IRC client to connect to a random Freenode server around the world.

IRC clients display server messages in a live window at the top of the screen, and the bottom line is an input area where commands and messages can be edited before being sent with the Enter key. Commands begin with a slash (/) character on the first line, and any command not used by the client is sent to the server for processing. Any line not beginning with a slash is sent to the active IRC channel for others to read.

Connecting to a Server

The “irssi” command starts the irssi IRC client. The first time irssi is run, it will display a message that points you to http://www.irssi.org/ to find the “startup-HOWTO” under the site’s “Documentation” section. This file assumes the user is already familiar with other IRC clients but also gives some useful advice about configuring the software. Irssi also lists the two commands necessary to connect to Freenode (/connect irc.ubuntu.com) and join the official support channel (/join #ubuntu).

The first step is to connect to Freenode. Once you are connected, you will be able to join channels and talk to other people. By default, irssi will set your nickname (nick) to your username. If this name is already in use on Freenode, you will receive a message from NickServ, an automated Freenode service:

18:29 - NickServ (NickServ@services.)- This nickname is registered. Please choose  a different nickname, or identify via /msg NickServ identify <password> .

If this appears, you can change your nick by using the “/nick” command. Simply type “/nick” followed by a space, and then a new nickname containing no spaces. The server will confirm the change.

18:30 -!- You’re now known as nhaines

Or, it will let you know that the nick is not available.

18:30 -!- Nick nhaines is already in use

If your Ubuntu login is in use on Freenode or you want to use a different nick, you can change the nick setting in irssi by typing “/set nick” followed by a space and the new nick. Irssi will remember this setting in the future when you connect to a server.

Once you have set up your nick, you can join a channel. If you are new to IRC, you can find a list of Ubuntu-related channels at https://wiki.ubuntu.com/IRC/ChannelList . The Ubuntu support channels are good ways of getting technical support, but are busy and messages scroll by very quickly. The Ubuntu discussion channels are good places to chat with others on various Ubuntu and non-Ubuntu related topics, and the Ubuntu team channels are places where work is actively done on Ubuntu, usually during Western European business hours. The local Ubuntu channels are run by Local Community teams, and are a good way to meet other Ubuntu users near you.

IRC channel names begin with a hash sign (#) and you can join a channel by typing “/join” followed by a space and then typing the channel name. For example, typing “/join #ubuntu-offtopic” will join the #ubuntu-offtopic channel. A new “window” will open in irssi and you will see the channel topic and a list of users currently in the channel. Once you have joined the channel, you will see messages from other users. You can type a message and press Enter to send it to the channel. You can leave a channel by typing “/part” and pressing Enter.

Messages are sent to the entire channel at once, but there are several ways of directing messages to a certain user. When you use someone’s nick in a message, most IRC clients highlight your message for that user. In a busy room, this can be a good way to clarify that you are asking a question of or responding to a specific person. You can also send messages directly to other IRC users who are logged into the same network with the “query” command. For instance, to send a private message (PM) to me on Freenode, you would type:

/query nhaines Hello, this is a private message

This will appear in a new irssi window. To close a non-channel window, you can type the “/win close” command.

Irssi uses separate windows to manage each channel. Window 1 is the status window and displays miscellaneous messages from the IRC server. The other windows display messages from channels or other users. You can switch windows by holding the Alt key while typing the number of the window. If this does not work, you can press and release the Escape key and then type the number of the window.

Ending your time on IRC is simple. “/part” can be used to close any channel, but “/disconnect” will close your connection with the IRC server. You can exit irssi with the “/quit” command.

IRC Etiquette

Every IRC network is independent and has its own rules, but IRC has been around for a very long time, and there are certain conventions that unique to communicating this way. They can catch you by surprise at times, but here are some pointers that will help you while using the Ubuntu channels on Freenode.

The most important thing to remember is that most channels are run independently from the IRC network they are on. An IRC network might have certain guidelines—for example, Freenode exists to support Free and Open Source software development. Individual channels may have additional guidelines. In particular, IRC is known for being very irreverent, snarky, and sometimes hostile. The official Ubuntu channels all enforce the Ubuntu Code of Conduct and welcome new users.

IRC is an asynchronous communication method. That means that while real-time conversation isn’t uncommon, a lot of IRC users will keep their client connected while they are away and check in periodically. This is called “idling” in channel and means that not all of the users shown are actually paying attention to the channel. If you have a support question, but see no other messages, you can leave your IRC client running and check in later to see if there are responses. It may even take hours, but if someone knows an answer they will see your message when they return to their computer. It may seem counterintuitive, but it’s better to ask a question in the public channel instead of sending a private message to an active user. He or she may be busy or may not have an answer, but the public message will be seen by more users.

A side effect of this is that other users generally won’t tell you if they don’t know an answer to a question. This doesn’t mean you are being ignored, but it does mean that they are being “polite” by staying quiet and allowing others to answer. Asking the same question repeatedly is seen as quite rude. On the other hand, many questions are very common. Sometimes asking a question will cause another user to type a “bot command” that causes an automated response, such as a pointer to another channel. This isn’t meant to be dismissive, but is a way to quickly provide you with standard information.

Many IRC users consider it rude to send a private message someone you don’t know. While the /query command is useful and is a good way to continue off-topic conversations outside of a channel, it’s best to ask permission before using it to contact someone new.

Some channels are workplaces. Ubuntu developers live all over the world and while the #ubuntu-touch channel is a very friendly place that is exciting to watch, sometimes developers are hard at work discussing the tasks they are working on. Sometimes when an active conversation is in progress, off-topic chatter can be a distraction. #ubuntu-offtopic is a channel that is always safe for random topics.

No matter the IRC channel, it’s helpful to read the channel topic and spend time observing the local “culture” and seeing how members treat each other. This will help you fit in and can prevent misunderstandings. For more information about the conduct expected while in official Ubuntu IRC channels and interacting with the community, please see https://wiki.ubuntu.com/IRC/Guidelines . It covers a lot of specific Ubuntu etiquette in detail.

Play Text-Based Games

While the other sections in this chapter show how you can get a lot of work done on the command line, there were also a lot of games written for a text environment, too. Many actually became classics that were expected to be found on any standard Unix system. Ubuntu contains a package called “bsdgames” that you can install from the Ubuntu Software Center or via the command line (see Chapter 6). It contains forty text games or toys that you can enjoy.

While there are too many games to go over in detail, I would like to highlight a few of them. You can see the list of games installed by running the command “ls /usr/games” in a terminal after you have installed the bsdgames package. You can view the manual pages by typing “man” followed by a space and the name of the game. For example, running “man rain” describes rain as an animated raindrops display. This was used as a screen saver when text terminals were connected to mainframes. Running “rain -d 120” does display an entirely useless yet fairly hypnotic simulation of raindrops landing in a puddle. It’s easy to imagine a university student connected to a terminal, writing notes while the display updated (see Figure 5-8). Incidentally, the man page says the optimal speed is a terminal at 9600 baud. I first ran this program dialed into a Linux shell with a 2400 baud modem and couldn’t quit it. I had to hang up and dial back in again. You can use Ctrl+C to stop the animation and return to the command prompt, and you won’t have to wait four minutes while your modem catches up, either. The command “worms” is similarly a screensaver and is slightly more interesting. It’s also best used with “worms -d 120” but the man page, which is read by running “man worms” has other options as well.

Figure 5-8.

This is not what “rain” looked like on a real terminal, but it’s fun to pretend it did

There are many other curious utilities as well. All of them can be ended immediately with Ctrl+C. The “bcd,” “ppt,” and “morse” commands translates typed input into computer punch cards, older paper tape, or morse code. You can create large banners that could be printed on an old line printer or dot matrix printer using continuous feed paper with “printerbanner”. “arithmetic” and “quiz” are memory tests. The command “pom” prints the current phase of the moon.

Other programs are full-fledged games. The “backgammon” game simulates the famous board game, and even contains rules and a tutorial you can use to learn to play. The game “monop” is very similar to a certain real estate board game, with the same rules, and can be played with multiple players. “canfield”, “cribbage”, and “go-fish” are the popular card games of the same name, and “hangman” and “worm” are other famous games. Notably, “worm” is the famous growing snake game made popular on early cell phones, but it moves much more slowly and is less stressful.

Other games are more elaborate. “tetris-bsd” is a falling block game, and used to require a fast modem to play. In the mid-1990s, some Linux installers would take an hour to install the operating system once it started copying packages. Some of them provided a running copy of this game on a second virtual terminal which could be played while you waited.

One of the most interesting games is Adventure, which is famous as the first interactive text adventure game to use natural language input. Running “adventure” places you on a path in the woods, between a brick shed and a stream. By typing in movement directions such as “north” or “go building”, the computer describes your surroundings. You can pick up and use items, and by following the stream south, you reach a grated entrance to Colossal Cave, filled with treasure, mystery, and danger. By exploring and solving puzzles, you progress through the game. It’s worth playing, because it is the direct ancestor of later graphical adventure games such as Beneath A Steel Sky featured in Chapter 4. A later text adventure game is also included, called “battlestar.” It has a very distinct feel from Adventure and is interesting in its own right.

Adventure’s cave is very closely based on Bedquilt Cave in Kentucky, but another very popular style of game became popular in 1980. A game called “Rogue” allowed you to explore a series of dungeon levels that were randomly generated with each game. Others wrote copies of this game, adding features or taking inspiration from other sources. The most widespread clone or “rogue-like” game was called Hack. Running “hack” drops you into a dungeon with a pet. Together you must explore to the bottom of the dungeon to find a mysterious amulet, and survive the climb back to the top. The game prints a map of your surroundings represented by text characters, and you are only aware of objects in your line of sight, causing the game to expand and unfold as you explore. You’ll need to use the “?” key to access the in-game help to teach you the movement keys and other actions available.

Hack was released as an open source game, and another set of developers began to create a version that was named Nethack because the developers mostly communicated over the Internet. This version expanded on Hack to become legendary as a game with hundreds of monsters and items, and even more options. Where Hack is a difficult game to win, Nethack expanded on the formula in untold subtle ways, and is worth installing and playing too. You can you can install the package “nethack-console” from the Ubuntu Software Center or via the command line (see Chapter 6). The game can then be run with the command “nethack,” and the help file and options available are much more detailed (see Figure 5-9).

Figure 5-9.

Nethack dungeons are revealed as you explore—as are the true natures of the items you find

Hack and Nethack use symbols to stand in for many different objects. You can use the slash (/) key to display a prompt where you can type a symbol and see what it stands for. In Nethack, you can use the cursor to highlight and identify an object on the map instead of typing the symbol. As you explore, you’ll find many items that you can use. Armor can be worn, weapons can be wielded. And as you move you’ll need to eat and drink. Food can be eaten and water drank, but your supplies will wear thin. Sometimes you’ll find shops where you can buy items. Most of the time your adventurer will die suddenly. But each new game promises a unique experience, and plenty of surprises.

The bsdgames package fits a lot of entertainment into 2.5 MB of disk space. Some games stand the test of time, and others are more interesting as peeks into an earlier time. But they shaped the free time and culture of the early Unix users that predated Linux and Ubuntu. And they are fun rewards for learning to use the command line.

Summary

The Linux command line isn’t as difficult or scary as it’s made out to be. While full mastery takes time and patience, there are many tasks that are easier or faster when performed with a text interface. Many commands offer easy-to-read output, and the results can be copied and saved or sent to a file or another program for further processing. And you can use the command line to tell the computer exactly what you want it to do, saving you time and frustration. When you’re comfortable on the command line, you have the ability to take advantage of a new way to interact with your computer whenever it is more convenient.

© Nathan Haines 2015

Nathan HainesBeginning Ubuntu for Windows and Mac Users10.1007/978-1-4842-0608-9_6

6. Power User Tools

Nathan Haines1 

(1)

CA, US

You’ll find that your daily use of Ubuntu is pretty straightforward and simple. You’ll run applications, get work done, relax with games, movies, or other entertainment, and generally be productive. And as you become more comfortable with Ubuntu you’ll explore the Ubuntu Software Center and expand what you can do with your computer. The possibilities are truly endless.

As you settle in with Ubuntu, there are a lot of more advanced or technical tasks that will help you experience the full potential of your computing experience. When you search the Internet for answers to questions, these solutions will often direct you to install software from the command line. Occasionally you’ll want to use software that is built for Ubuntu but not included in the default repositories. Having become familiar with the Unity interface, you might want to try other desktop environments without actually reinstalling the entire operating system on your computer. This chapter will cover various ways to take control of your computing experience. You won’t need to perform these tasks every day, but knowing about them can save you a lot of time when you need them.

Managing Running Processes

As you work with multiple applications, you’ll find that Ubuntu handles multitasking very well in general. When your system slows down or a single application begins to freeze, you may need to look at what processes are running and how much of your computer’s resources they are taking up. While you saw a useful command-line tool called top in the previous chapter, GNOME System Monitor provides a powerful, easy-to-use graphical version, and it offers additional information about your system resources.

A process is an application (program) or part of a program. When you run an application, Ubuntu loads the program data into memory, and begins scheduling it to run. Ubuntu will manage how much time and memory each application receives so that many programs running at once are able to share the available resources. GNOME System Monitor summarizes how your computer is being utilized. You can launch it from the Dash.

When System Monitor appears, it will show the “Processes” tab, which operates much the same way as top does. At the top of the window, the average system load for the last 1, 5, and 15 minutes are displayed (this was removed in Ubuntu 14.10 and later). This gives you an overview of how hard your CPU has been working recently. CPU load is the number of processes that are using or waiting to use the CPU. For a computer with one single-core processor, the load number is like a percentage. A load number of 1.00 means the CPU was working 100% of the time. Most computers have multi-core processors, so a load of 1.00 on a quad-core processor would mean the CPU was being utilized to 25% of its capacity and 4.00 would represent 100% of its capacity. Anything over 100% means that programs were waiting for the CPU to finish before they could run.

Under the load averages, a list of running processes is displayed. They are identified by name, icon when available, and the user that started them, the amount of CPU time they are using, their process ID (or PID), the memory they are utilizing, and their priority (see Figure 6-1). By default, System Monitor will only display the processes that are being run by the currently logged-in user. The column headers can be used to sort the list, for example, clicking on the “% CPU” header will sort the list to show which processes are using the most CPU. Clicking a header will toggle between sorting by ascending or descending order. You can also use the View button (this is a hamburger menu in Ubuntu 15.04 and later) to switch between “Active Processes,” which shows only processes which are not sleeping or suspended; “All Processes,” which shows all processes running on the system regardless of which user is running them; or “My Processes,” which shows processes that are being run by the current user. Because an application can be split into several processes or utilize other programs, the “Dependencies” option is a toggle that sorts related processes by the master process that owns them and can give further insight into CPU or memory use.

Figure 6-1.

System Monitor shows you what’s running and how it affects your computer

Right-clicking on a process brings up several different options related to process management. Most of these mirror the operations we discussed in Chapter 5. Stopping a process suspends it so that it stops running until it receives a signal to continue. Ending a process sends a request to the process to finish up and exit cleanly whereas killing a process causes Ubuntu to stop executing the process and clear its memory for other use. As before, it’s better to end a process unless it’s completely unresponsive and doesn’t react to end requests, because killing a running process can lead to lost data. Changing a process’s priority will instruct Ubuntu to schedule more or less CPU time for it when system resources are limited. You can use this to make a process run faster, or to ensure a long-running process such as a video conversion doesn’t slow down the rest of the system if you don’t mind the time it takes to finish a task.

The “Resources” tab gives you a graphical overview of how your system has been performing over the past 60 seconds (see Figure 6-2). The CPU History graph is nice because it shows you how each CPU is being utilized. Ubuntu will try to schedule different applications to run on separate CPUs to maximize your system’s resources. It also shows how your memory has been used over time. Memory is physical RAM used to keep programs running smoothly, and swap memory shows disk space that is used to temporarily store memory data on disk when a program isn’t actively running and other running programs can benefit by using extra RAM. In general, the more memory being used is better, and less swap being used is better, since Ubuntu will use spare memory to speed up access to recently accessed programs and files but will stop using it when it’s needed by a running program. You can use this graph to see how opening and closing programs affects your computer’s memory resources. Network history likewise gives you an overview of recent bandwidth usage. You can use it to judge how all running programs are using your network if you suspect slower than usual transfer speeds. Sometimes several applications uploading or downloading at once can add up very quickly. This only shows network traffic that is coming to and from the computer, however, so it can’t account for heavy network usage by other computers and devices on the same network.

Figure 6-2.

The Resources tab shows your computer usage over the last 60 seconds

The “File Systems” tab shows you a quick overview of the file systems that are mounted and in use. From their device name and mount point to their size and a breakdown of available and used capacity, this can be a quick look at what disks and partitions are being used and how much space you have available.

GNOME System Monitor gives you an up-to-the-second look at how your computer is being used and how your resources are being utilized. You can use this information to close programs you aren’t using to speed up your system, change the priority of running programs, or decide whether you need to buy extra memory or storage space for your computer. This system utility will keep you in the know for when you want a comprehensive overview of your computer’s performance.

Managing Disks and Thumb Drives

You will be able to use Ubuntu to read and write to most disks you use with your computer, but sometimes you will need to set up a blank disk or repartition or reformat a disk. Ubuntu makes this easy with Disks utility. This utility provides a way to view the layout of each drive in your computer, manage file systems and formats, and view the status and health information of each drive.

You can launch “Disks” from the Dash. When it appears, it will list all connected drives on the left side of the window, and will show specific information about the selected drive on the right side of the window (see Figure 6-3). The gear button in the top right of the window has various features that can be performed on the entire disk. You can use this to perform a full disk format that replaces the drive’s partition table, to create or restore full disk images, or to run a benchmark test that determines the speed of the drive. If an optical drive or external drive is selected, an “Eject” or “Power off” button will appear beside the Gear button, respectively.

Figure 6-3.

Disks provides a quick overview of drive details and data allocation

This menu also lets you see SMART data that shows the current health of the drive and start the drive’s internal self-tests. The Drive Settings option lets you change power saving preferences that can affect the energy usage of your drive as well as performance. You should not change these settings from the defaults unless you understand each option and its effects clearly. The “Power Off...” option saves all pending data and disconnects the drive, telling it to power itself off. You can safely remove an external drive once it disappears from the Devices list on the left.

Partitions are displayed as rectangles proportionate to their size, but very small partitions are not shown to scale. Any partition that is mounted (in use) will have a small “play” icon that looks like a triangle in the bottom right-hand corner. System boot partitions will also have a small star icon in the corner. You should not unmount or edit these partitions while the system is running. If you do need to change or resize these partitions, you can boot from your Ubuntu install media and use Disks to make any necessary changes.

Underneath the partition map, you may see a “Mount the filesystem” (triangle) or “Unmount the filesystem” (square) icon, a “Create partition” (plus) or “Delete partition” (minus) icon, and a “More actions” (double gear) icon. Select a partition by clicking on it. If the partition contains a filesystem, you can use the mount and unmount icon to change whether the filesystem is available to use. If the filesystem is not in use, you can delete the partition or use the “More actions” button to edit the file system or format the partition. Formatting allows you to choose between four file system formats. FAT is compatible with practically all devices and operating systems, but no single file can be over 4.3 GB. NTFS is used by Windows and lacks the file size limitation of FAT but cannot be written to by OS X without additional software. Ext4 is compatible with most Linux systems, and the “Encrypted” option creates an Ext4 filesystem inside a LUKS container. Ubuntu will prompt you for the decryption password each time you mount the encrypted filesystem. You can use the “Custom” option to specify a specific filesystem type if you need something different for a special purpose.

Disks displays your computer’s attached disks and enables the most common disk operations as well as a large number of very technical options, such as complex formatting, changing filesystem mount parameters, and adjusting performance characteristics. While caution should be used when working with drives containing important data, Disks is a powerful tool that can be used for anything from simple formatting to working on a computer while booted from the Ubuntu install media.

Using Multiple Workspaces

Monitors feature much higher resolutions than in days gone by. The advent of high-definition television has made a resolution of 1,920 by 1,080 pixels fairly standard. Just 20 years ago 640 x 480 and 800 x 600 were far more common. Special features, such as “virtual desktops” were developed to help deal with limited screen space. In Ubuntu, this feature is also called “workspaces,” and is an optional feature that can be enabled.

When you run graphical applications, they display in one or more windows. As you arrange windows on the screen, they fill up your computer’s desktop. You can set up a desktop to work for a specific task, but when you switch to a different task, you need to rearrange your windows again. This can be inefficient if you are constantly rotating between tasks. Using workspaces gives you four virtual desktops that you can assign each window to and arrange independently of the others.

To enable workspaces, click the Gear Menu ➤ System Settings, then click on the Appearance applet. On the Behavior tab, you’ll see various settings that change the behavior of the Unity interface. Check “Enable workspaces” to add a workspace switcher icon to the Unity Launcher and enable multiple workspaces (see Figure 6-4.)

Figure 6-4.

The Workspace Switcher icon is the last icon on the Launcher before the Trash

Once enabled, you will have four workspaces that you can arrange windows on. Everyone has a favorite way to use multiple workspaces, but one popular use is to use each workspace to perform different tasks. For example, if you’re planning a day of working at the computer, you might set up one workspace with your word processor and web browser, a second workspace with your email and instant messaging windows, a third workspace with Rhythmbox for background music, and the last workspace with Solitaire or Mines for your periodic breaks. With each workspace focused on a different activity, you can take a break by switching to one workspace, and when you’re ready to resume another task, all your applications are running and arranged just the way you had them when you switch back. This can greatly increase your productivity—as long as you’re honest about the time you spend on your “work break” desktop! Don’t forget that there’s no need to use every workspace just because they’re there. You can use only two or three if you like.

Using workspaces is fairly simple. When you launch an application, it appears on your current workspace, and you can switch to a different workspace whenever you like. The easiest way to switch is to click the “Workspace Switcher” icon on the Unity Launcher or use the shortcut key Super+S. Your view will zoom out and show all four workspaces. The current workspace is highlighted in orange and the others are dimmed (see Figure 6-5). You can select a new workspace by clicking it with the mouse, or by using the arrow keys and pressing Enter. Your view will zoom back into your new workspace and you’ll be able to work with those windows.

Figure 6-5.

Workspaces make it very easy to stay focused on different tasks

Tip

The “Workspace Switcher” icon also shows you which workspace is active. The darker quadrant with two window icons is your current workspace.

The Unity Launcher will show all running applications, but the Alt+Tab application switcher and Super+W window spread features will only show applications on your current workspace. You can identify which applications are running on a different workspace because the pips are hollow (see Figure 6-6). Clicking on the Launcher icon for an application on another workspace will automatically switch you to its active workspace, with an animation that indicates which workspace you are now on. This gives you a nice balance: workspaces simplify Alt+Tab switching as you focus on a task, while the Launcher gives you instant access to everything running on your computer.

Figure 6-6.

Files is not running, Firefox is open on another workspace, and LibreOffice Writer is open on the current workspace and is focused

You can also move an application to other workspaces. There are several ways of doing this. When you click on the “Workspace Switcher” or press Super+W, you can drag individual application windows from any workspace to another. You can also right-click on the title bar of any window and choose from several options. “Always on Visible Workspace” will place the window in the same location on all workspaces. “Only on This Workspace” is the default setting. “Move to Another Workspace” lets you specify a specific workspace to move a window to. This is a good way of setting up workspaces when you’ve alreadybeen working in a single workspace for a while but want to s change your workflow to start using the others.

Once you get accustomed to working with multiple workspaces, you can switch between them even faster by holding Ctrl and Alt and pressing an arrow key. Ubuntu will show a small thumbnail of your workspaces as your view slides to the new one. You can switch to any workspace instantly, even pressing two arrow keys at once to move diagonally. Once you let go of Ctrl and Alt, you will be on your new workspace. Holding Shift while you press Ctrl and Alt will slide the active window with you to the new workspace. This keyboard shortcut is a little more obscure but can be useful when moving a window around after your workspaces are set up. When workspaces are enabled, holding the Super key will show these shortcut keys under the “Workspaces” section.

Workspaces are an advanced feature that you can use for even greater productivity on Ubuntu. Not only do they simply application switching and multitasking, but they can help you optimize your workflow as you move from task to task—making you more efficient as you focus on work and reducing your downtime between tasks.

Installing Alternate Desktop Environments

One of the most compelling things about Ubuntu and Linux in general is the amount of customization that is available. By installing different software on top of the kernel, you can create an operating system that suits your needs perfectly. Even the default Ubuntu graphical interface is just one option out of dozens that you can change to suit your personal preferences. Ubuntu is available in the form of several “flavors” that share a core Ubuntu system but have different desktop environments built on top. Each desktop flavor has a different interface and default application selection suited for various preferences or tasks. While a brief overview of the officially supported desktop flavors is available in Chapter 1, you can use the Ubuntu Software Center to add this software to any Ubuntu system. All applications run in all desktop environments, and each user can choose a different desktop environment.

Installing a new desktop environment is as easy as selecting the software package in the Ubuntu Software Center and clicking the “Install” button. Ubuntu will download and configure the additional software and you can choose which desktop you wish to run on the login screen. Because Ubuntu flavors are made up of a lot of packages, it’s best to search for the main package for that flavor. The main package names for each flavor are listed in Table 6-1.

Table 6-1.

Desktop environments from Ubuntu flavors can be installed by package name

Ubuntu Flavor

Desktop Environment

Package name

Ubuntu

GNOME with Unity

ubuntu-desktop

Kubuntu

KDE Plasma Workspace

kubuntu-desktop

Xubuntu

XFCE

xubuntu-desktop

Lubuntu

LXDE

lubuntu-desktop

Ubuntu GNOME

GNOME with GNOME Shell

ubuntu-gnome-desktop

Edubuntu

GNOME with Unity and educational apps

edubuntu-desktop

Ubuntu Studio

XFCE with media creation tools

ubuntu-studio-desktop

For example, to add the KDE desktop environment to any Ubuntu system, you can install the “kubuntu-desktop” package. The Ubuntu Software Center will download and install all additional programs that were included on the Kubuntu install media (see Figure 6-7). Only 400 MB of additional software is needed on top of an Ubuntu system.

Figure 6-7.

Kubuntu and KDE can be installed like any other application

Once additional desktop environments have been installed, they can be selected on a per-user basis at Ubuntu’s login screen. To the right of the user name is an Ubuntu logo. Clicking on this brings up a menu that displays all installed desktop environments (see Figure 6-8). Clicking on “KDE Plasma workspace” will choose that new desktop environment and return you to the user and password entry prompts. The Ubuntu logo will be replaced with a stylized KDE logo to indicate your desktop environment. Once you enter your password and log in, the KDE Plasma Workspace will be your active desktop environment. Ubuntu will remember your choice until you change it again.

Figure 6-8.

You can choose between installed desktop environments before you log in

All installed software is available regardless of which desktop environment you run, so you can experiment to see which interfaces you prefer. You may even want to install several desktop environments, evaluate them, and then perform a clean install of that Ubuntu flavor on your system. Regardless, changing your desktop interface and the entire look and feel of your Ubuntu system is as simple and straightforward as installing any other software.

Installing Software from the Command Line

One of the best things about Ubuntu is that it includes thousands and thousands of software packages. Even software that isn’t included in a default install can be quickly and easily added to an existing system and receive updates through Ubuntu’s Software Updater utility. This is one of Ubuntu’s greatest strengths, because a default installation can be customized, yet easily kept up to date. It’s been shown that many programs leverage the strengths and capabilities of other programs, and the Ubuntu Software Center is no different. Ubuntu is built using a software packaging system that was created for Debian long ago. And while all of the software in the Ubuntu archives has been compiled specifically for Ubuntu, the tools used to install and manage the installed software on an Ubuntu system are the same: dpkg and apt.

Understanding Ubuntu’s Software Collection

The Debian package tool (dpkg) is used to install and uninstall Debian packages on a Debian-based operating system like Ubuntu. However, the Advanced Package Tool (apt) also manages keeping track of what packages are installed on the system, checking for updated packages, downloading newer packages and any additional packages they need to run, and downloading them from the Internet and making sure they haven’t been tampered with. Then it runs dpkg to do the actual installation. The end result is that we can learn how to use apt instead of working with dpkg directly.

We would normally use the Ubuntu Software Center to install software in the Ubuntu archives. But installing software on the command line is especially efficient. While the end result is identical, it is much easier to explain how to install software on the command line For that reason, it is extremely common to see command-line instructions given in online tutorials. That makes it important to understand what is happening when an article or online solution asks you to open a terminal window and run commands to install software.

Ubuntu software is contained in a variety of software repositories. A repository is a list of available software packages and their relationship to other packages, along with the packages themselves. Ubuntu can use this list to download and install new software packages as well as determine when installed packages have been updated. Ubuntu software is separated into various groups: main, restricted, universe, and multiverse. The “main” group contains the core Ubuntu software that is directly supported by Canonical. This includes the default desktop as well as the most important server software. The “restricted” group has firmware and other software that isn’t Free Software or Open Source and is distributed by Ubuntu and Canonical to help ensure that Ubuntu can run on a variety of hardware. The “universe” group is filled with community-supported software, and “multiverse” is software that may not be fully redistributable because of software license or patent issues.

Each Ubuntu release has three repositories. One uses the release’s short codename (for example, “trusty” for 14.04 LTS), which is an archive of Ubuntu as it existed at the moment of that release. The matching repository, “trusty-updates,” contains any packages that have been updated since 14.04 LTS was released. The last repository, “trusty-security,” contains updated packages that have been updated because of security issues. Each repository contains software from all four groups. Because apt combines these lists of software packages into one database, you can use apt to install and upgrade any software that is included in Ubuntu regardless of where it comes from.

Tip

While most online instructions use the apt-get, this book prefers the apt command—new to Ubuntu 14.04 LTS—because it has color-coded output and a progress bar that is easier to read for command-line newcomers. The two commands produce the same end result although apt-get has more options.

Keeping Software Up to Date

Before you search for or install a software package, you should ensure Ubuntu’s software index is up to date. By default, Ubuntu updates its software list once per day, but you can manually update the index by running “apt update”. This will download the current list of packages from the Ubuntu repositories. Because this modifies system files, you must run it with sudo and type your password, followed by pressing Enter:

sudo apt update

Ubuntu will check each of its repositories and only download package lists that have changed since the last time the command was run. Once this is finished, you can upgrade or install new software. The Ubuntu updates repository only keeps the lastest couple of updates to any single package, so if an upgrade or install fails with a “Package not found” error on a computer that hasn’t been turned on in a while, running apt update before repeating the upgrade or install command will often succeed.

With an updated package list, Ubuntu knows which packages are available and can replace older software on your system. The command to do this is “apt upgrade”. If you run this with sudo, apt will list all updated and new packages and ask whether you wish to proceed with the upgrade. Here is an example of an upgrade where Ubuntu’s Linux kernel will be updated:

nathan@ubuntu-book:∼$ sudo apt upgrade

Reading package lists... Done

Building dependency tree

Reading state information... Done

Calculating upgrade... Done

The following NEW packages will be installed:

  linux-headers-3.13.0-61 linux-headers-3.13.0-61-generic

  linux-image-3.13.0-61-generic linux-image-extra-3.13.0-61-generic

The following packages will be upgraded:

  linux-generic linux-headers-generic linux-image-generic linux-libc-dev

4 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.

Need to get 62.3 MB of archives.

After this operation, 271 MB of additional disk space will be used.

Do you want to continue? [Y/n]

“Y” is the default option, so pressing Enter will begin the upgrade. Ubuntu will download all of the listed packages from its software repositories, and install them, with a progress bar printed at the bottom of the screen. Once it is complete, your system will be up to date.

Occasionally, apt will say that certain packages are being held back. This happens when certain packages must be removed and replaced with newer versions with new names. This isn’t common but occasionally happens with certain system libraries. You can run “apt full-upgrade” or “apt-get dist-upgrade” to install the held-back packages.

Searching for Software

There are over 70,000 software packages in Ubuntu 14.04 LTS, and finding new software to install can be difficult. Sometimes a package name is the same as the application title, such as “firefox” or “inkscape”. But sometimes a package name is different, such as “nethack-console”. Using the command line to install an application is the quickest method when you know the exact package name, but apt can also be used to find software as well.

Every package has a name and a short and long description, which is part of the information stored in the Ubuntu repositories. Using the commands “apt search” or “apt-cache search” will search the names and descriptions in the package database on your computer and will print a list of package names and their short descriptions. For more information on any package, you can run “apt show” followed by a package name. This displays a lot of information, including the installed size and the package’s long description. This allows you to narrow down a package name for software you wish to install. Using the command line to search for applications is more bare-bones, but is much faster than using the Ubuntu Software Center.

You can also use “apt-cache policy” to find out more information about the installation status and availability of a package. If I run “apt-cache policy firefox”, for instance, I see the following:

nathan@ubuntu-book:∼$ apt-cache policy firefox

firefox:

 Installed: 39.0+build5-0ubuntu0.14.04.1

 Candidate: 39.0+build5-0ubuntu0.14.04.1

 Version table:

*** 39.0+build5-0ubuntu0.14.04.1 0

       500 http://mirrors.us.kernel.org/ubuntu/ trusty-updates/main amd64 Packages

       500 http://mirrors.us.kernel.org/ubuntu/ trusty-security/main amd64 Packages

       100 /var/lib/dpkg/status

    28.0+build2-0ubuntu2 0

       500 http://mirrors.us.kernel.org/ubuntu/ trusty/main amd64 Packages

I can clearly see from the “Installed” field that Firefox 39.0 is installed. The “Candidate” field tells me the latest version that Ubuntu wants to install. Because it’s the same as the installed version, I know that my browser is the latest available in the Ubuntu repository. The version table shows me that Firefox 39.0 was included in trusty-updates and trusty-security. Because it is in trusty-security, I know it has fixed security issues since the release of Ubuntu 14.04 LTS and I should install it unless I have a good reason not to. And I can also see from the last line that Ubuntu 14.04 LTS originally shipped with Firefox 28.0.

Even when a package is not installed, apt-cache policy provides the same information. Using the Chromium browser as an example shows the following:

nathan@ubuntu-book:∼$ apt-cache policy chromium-browser

chromium-browser:

  Installed: (none)

  Candidate: 43.0.2357.130-0ubuntu0.14.04.1.1092

  Version table:

     43.0.2357.130-0ubuntu0.14.04.1.1092 0

        500 http://mirrors.us.kernel.org/ubuntu/ trusty-updates/universe amd64 Packages

        500 http://mirrors.us.kernel.org/ubuntu/ trusty-security/universe amd64 Packages

     34.0.1847.116-0ubuntu2 0

        500 http://mirrors.us.kernel.org/ubuntu/ trusty/universe amd64 Packages

The “Installed” field clearly indicates with “(none)” that Chromium is not installed on the computer, and that using apt or the Ubuntu Software Center to install it will result in Chromium 43.0.2357.130 being installed.

Installing New Software

Installing software from the Ubuntu repository is simple on the command line. If you know exactly what you want to install, you can start the process in mere seconds. The command “apt install” will automatically download the latest version of a package along with any additional packages it requires, and install them in the most efficient order.

Because it modifies system files, “apt install” must be run with “sudo”, along with the name of the package you wish to install. Then apt will determine what needs to be installed and if the package can be installed by itself, it will begin the download and installation immediately. If the package requires additional packages that you did not specify, it will pause after printing a summary and wait for your response. Pressing Enter will begin the install. Installing Chromium browser looks like this:

nathan@ubuntu-book:∼$ sudo apt install chromium-browser

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following extra packages will be installed:

  chromium-browser-l10n

Suggested packages:

  webaccounts-chromium-extension unity-chromium-extension adobe-flashplugin

The following NEW packages will be installed:

  chromium-browser chromium-browser-l10n

0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.

Need to get 55.0 MB of archives.

After this operation, 218 MB of additional disk space will be used.

Do you want to continue? [Y/n]

This tells us that the extra package “chromium-browser-l10n” will be installed. Pressing Enter will begin the download and installation. If you wanted to know more about the additional package, you could type “n” and press Enter, then run “apt show chromium-browser-l10n”. Using “apt show” reveals that this is the language data for the browser. apt also listed three other suggested packages that work with Chromium or offer additional functionality. Suggested packages are not installed by default, but they can offer additional functionality and you can install them manually. If installing a package would require the removal of software, those package names would also be listed. Altogether, apt will download 55 MB of packages, and once they are uncompressed, installed, and configured, they will use 218 MB of disk space. This also takes into account any software that may be upgraded or replaced by apt.

Installing more than one package at a time is as easy as listing more than one package on the command line. When I install Ubuntu on a new computer, one of the first things I do is run “sudo apt-get install gimp inkscape vlc ubuntu-restricted-extras”. By directly asking Ubuntu to install these packages, I save a lot of time over opening the Ubuntu Software Center, searching for each one by name, and clicking “Install”.

Occasionally you may want to download packages now but not install them until later. You can do this by running “apt-get -d install [packagename]” or “apt-get -d upgrade”. The “-d” option tells apt-get to download the packages but skip installing them. The next time you run a command to upgrade or install those packages, they will not be downloaded again unless a newer version has been released.

Removing Software

Removing software is just as simple as installing it. The command “apt remove” uninstalls software packages and frees up disk space. When you run this command, it deletes the application and associated system files. It doesn’t typically delete any configuration data in your home folder. This means that you can still back up this information, and should you reinstall the software again in the future, your old settings will still be used. If you want to completely remove a package and its configuration files, you can use the command “apt-get purge [packagename]”. This will leave no trace of the specified software on your computer.

Ubuntu’s basic software management tool apt is an easy-to-use and powerful way of managing your computer’s software at all steps: searching, downloading, installing, upgrading, and removing. This technology lays a foundation for Ubuntu’s ease of use and reliably security and bug fixes. By working with these tools directly, you can save yourself time and quickly install and remove software so that you can get to work.

Expand Your Software Options

Ubuntu comes with a wide array of software—over 70,000 packages at your disposal thanks to large software repositories. Sometimes, it’s not enough. Ubuntu’s update policy means that major versions of software are locked in a couple of months before release and the Ubuntu repositories only see minor maintenance or security updates to ensure stability. LibreOffice 4.2.3 was included in Ubuntu 14.04 LTS and received updates up to 4.2.8. Ubuntu won’t receive further updates of LibreOffice even though the current version is 5.0. Other software was not able to be packaged for Ubuntu for various reasons. Some wasn’t available or stable enough to include during Ubuntu 14.04 LTS’s development cycle. Others are released directly by third-party software manufacturers. When an application makes an Ubuntu repository available, you can add the repository to your system and gain access to the included software.

A third-party Ubuntu repository will have two components. The first is a link to the repository, and the other is a GPG encryption key to sign the packages and ensure a package hasn’t been corrupted or tampered with. With this information you can add the repository to your software sources and interact with it using the Ubuntu Software Center and apt. Ubuntu’s Launchpad project also offers a features called “Personal Package Archives”. This service allows developers to create Ubuntu packages for testing or updates outside of the Ubuntu release process and is slightly easier to add because Ubuntu can import the signing key automatically.

Some software, such as Google’s Chrome installer and Valve Software’s Steam installer add themselves to the software list during the install, allowing Ubuntu to automatically detect and download updates. To manually add a repository, launch “Software & Updates” from the Dash and click on the “Other Software” tab. You will see any optional repositories that have been added to your system, as well as a checkbox indicating whether each source is enabled or disabled (see Figure 6-9).

Figure 6-9.

Software sources can be added automatically or by hand

To add a repository, click the “Add...” button. Ubuntu will ask you for the “APT” line that describes the repository. This usually begins with the word “deb”. To use Oracle’s VirtualBox repository as an example, Oracle provides repository information on its web site in the VirtualBox downloads page at https://www.virtualbox.org/wiki/Linux_Downloads . Following the instructions on that page, in the “APT line:” field you would enter:

deb http://download.virtualbox.org/virtualbox/debian trusty contrib

Once you’ve entered that into the field, click “Add Source”. Ubuntu will ask you to enter your password to confirm your request. Once you click the “Authenticate” button, Ubuntu will add the repository to your system. Next, you will need to add the repository’s signing key. If the repository maintainer uses one, it should be available in the same place as the repository information. For example, Oracle provides a link to the signing key on the Linux download page as part of repository setup instructions. Download this key with your web browser and go back to the Software & Updates window and click the “Authentication” tab. Click the “Import Key File...,” select the .asc file you downloaded and click “OK”. Ubuntu will add the key and when you click “Close,” you will receive a prompt that says “The information about available software is out-of-date”. Click the “Reload” button and Ubuntu will update its software list, including the new source you just added.

Once the Software & Updates window closes, you can install packages in the new repository using the Ubuntu Software Center, Software Updater, or apt just like any other package. VirtualBox is now available in an additional “virtualbox-5.0” package that can be installed. If Ubuntu 14.04 LTS’s older “virtualbox” package containing version 4.3.10 was installed before, virtualbox-5.0 will replace the older software so that they do not conflict.

You can follow the same steps to add a Personal Package Archive (PPA), except Ubuntu recognizes a shorthand reference to the repository because they are hosted at Ubuntu’s Launchpad web service. The Ubuntu Touch Core Apps Drivers team on Launchpad hosts a PPA where the “core” apps for the Ubuntu phones are compiled every day. This PPA is called “daily”. Information about this is located at https://launchpad.net/∼ubuntu-touch-coreapps-drivers/+archive/ubuntu/daily, but to add this to your software sources, you can simply enter the following APT line:

ppa:ubuntu-touch-coreapps-drivers/daily

Ubuntu will expand the full URI to the Ubuntu repository that stores the software and add the signing key automatically. Once the software list has been updated, you will be able to install early versions of the core apps designed for the Ubuntu phone. This is a safe PPA to add to your system on Ubuntu 14.04 LTS for demonstration purposes, but Ubuntu for phones and tablets uses the latest version of Ubuntu, so this will only install early versions of the core apps on Ubuntu 14.04 LTS. It does, however, demonstrate that a PPA can support multiple versions of Ubuntu. If you add this PPA to the latest release of Ubuntu, you’ll see the latest versions of the core apps on your desktop computer.

Caution

When you add a software source to Ubuntu, you are giving the source maintainer full control of your computer because the setup scripts in the packaging run with superuser rights and malicious software could be masquerading as something useful. Make sure you trust the source before adding it to Ubuntu.

When you upgrade to a new major release of Ubuntu, these additional software sources are automatically disabled because there is no guarantee that they are compatible with the newer version of Ubuntu. You can contact the repository maintainer or carefully test the software on the newer version of Ubuntu and reenable each source on an individual basis. Sometimes you can use the “Edit” button to update the release name, from “vivid” to “wily,” for instance, if you were upgrading to Ubuntu 15.10. If the new source is not available for the newer version of Ubuntu, the currently installed packages will remain but will not update until the availability changes.

Ubuntu is able to receive updates to the software it provides, but is also flexible enough to receive updates from other sources as well. Used with caution, this is the perfect way to keep up with updates to Chrome, Steam, VirtualBox, and many other software projects.

Creating Application Launchers for Programs

Sometimes you might have written a script or found an interactive command-line application that you want to be able to launch using the Unity Dash or pin to the Launcher. While some command-line applications (such as Elinks) are available in the Dash after installation, the vast majority of command-line applications do not show up in the Unity Dash. Other software that isn’t available through Ubuntu’s package management, such as Minecraft, run in-place but without a desktop launcher. Most software without a launcher will never be missed, but if you want to set up a custom icon, you can do so by creating a “.desktop” file.

A .desktop file is a text configuration file that describes a program to a desktop environment. Most modern desktop environments automatically detect .desktop files in either a system folder or a per-user folder. To demonstrate, let’s create a script named “spacedrive” that generates a pulsing white noise similar to a starship engine. Then, we’ll create an application launcher file so we can run it using Unity instead of the command line.

First, install the package “sox”. This small sound file utility can convert sound files but can also be used to generate sound effects. You can install SoX from the Ubuntu Software Center or using the following command line:

sudo apt install sox

Next, click on Files in the Launcher and create a new folder named “bin” in your home folder if it does not already exist. If you just created “bin,” you should log out and log back in. Ubuntu will automatically add “∼/bin” to your system path if it exists, but only when you log in. Then, launch Text Editor from the Dash and enter the following into a new file:

#!/bin/sh

echo -n "\033]0;spacedrive\007"

/usr/bin/play -n -c1 synth whitenoise lowpass -1 120 lowpass -1 120 lowpass -1 120 gain +14

Save that in your ∼/bin folder with the name “spacedrive”. In Files, open the “bin” folder and right-click on “spacedrive,” then choose Properties from the pop-up menu. Click on the “Permissions” tab, and click the “Allow executing file as program” check box until it has a dash or a check mark in it, then close the “spacedrive Properties” window. If you have created this script correctly, you can launch Terminal from the Dash and type “spacedrive” and press Enter. You should hear gently pulsing white noise with a status and volume indicator. This will continue to play until you press Ctrl+C in the Terminal window.

Once this works, go back to Text Editor and click the “Create a new document” icon in the toolbar. In the new text file, enter the following with no blank lines at the top:

[Desktop Entry]

Version=1.0

Name=spacedrive

Comment=Engages your starship’s engines for relaxing background noise.

Exec=spacedrive

Icon=/usr/share/pixmaps/faces/launch.jpg

Terminal=true

Type=Application

Categories=AudioVideo;Audio;Music;

Save this to your Desktop folder with the name “spacedrive.desktop”. On your desktop, you will see the file appear. If you try to run it, you will receive an error that says the application launcher has not been marked as trusted. Right-click the file and choose “Properties,” and go to the “Permissions” tab and allow the file to be executed as a program as you did with the “spacedrive” script. The icon file the file will change to an image of a NASA space shuttle, and the label will change from “spacedrive.desktop” to “spacedrive”. The file name has not actually changed, but its appearance on the desktop has. You have now created an application launcher.

To make the file available in the Unity Dash, you can move it to the ∼/.local/share/applications folder. It will immediately be available in the Dash, and you can even drag it to your Launcher at the left side of the screen. Once the script is running, pressing Ctrl+C or closing the terminal window will end the sound effect.

The .desktop file follows a specific format, but you should be able to modify the spacedrive.desktop file to suit your own needs. The “Name” line will be the way your application appears in the Dash and Launcher, and the “Comment” line is used for extra search keywords by Unity and often shows up as a tooltip when hovering your mouse over a menu item in other desktop environments. The “Exec” line should be the exact path and filename you use to run the script or command from a command prompt. If the application is in your path (such as applications installed by the package manager or items in your “bin” folder), you can specify just the name, but if they are outside your path you must give the full path, for example, “/home/nathan/bin/spacedrive”.

The “Icon” line is optional, and can point to any file. If no path or file extension is given, Ubuntu looks in /usr/share/pixmaps for a matching file and adds the right extension. The “Terminal” line indicates whether or not to display a terminal window, and can be either “true” or “false”. If the application is graphical or runs without interaction, you will probably make this “false”. If you need to interact with the script or command, you will want to make this “true”.

The line “Type” needs to be “Application” in order to function as a launcher, and “Categories” should be one of the main categories in the specification. You can use semicolons (;) to separate additional categories on the same line as in the example. A list of valid categories to use on this line are available at:

http://standards.freedesktop.org/menu-spec/1.0/apa.html

There are some additional sections you can add, both advanced features of the application launcher and Unity-specific features as well. If you are interested in adding right-click actions to application launchers that are in the Launcher, for example, you can read more details and examples at the following online documentation:

https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles

Having a shortcut for a favorite command or script can be a huge convenience. Using simple .desktop files can allow for custom launchers that range from the simple to the complex, and come in handy—especially when you are working between with software that doesn’t use Ubuntu’s software management.

Working with Virtual Machines

Finding the best software to suit your workflow can be fun but challenging. And in the end, you might find that you enjoy software that is only available on other operating systems. You may also want to experiment with different operating systems or software changes while keeping your primary computer usable. Dedicating a computer to one operating system or dual booting a single system is one option, but moving between computers or stopping work to reboot into another operating system is inconvenient. Other times you may just want to test something temporarily. The best way to do this is to create a virtual machine where your changes don’t affect your primary computer. There are many virtualization technologies, and Ubuntu supports many of them. VirtualBox is very popular, as is the VMware family of commercial products. KVM support is used in a lot of cloud computing solutions, and in fact there are many commercial virtual server providers such as DigitalOcean and ChunkHost. All of these solutions have their uses, but VirtualBox is one of the most user-friendly ways for a beginner to work with virtual machines (see Figure 6-10).

Figure 6-10.

This Ubuntu 14.04 LTS virtual machine was the model for this book

A virtual machine is a simulated computer that runs like a program. Once created, it behaves just like a real computer. You can define how much memory it has, create virtual disks and define their size, and connect virtual and real hardware to the virtual machine. While a virtual machine uses your computer’s CPU, memory, and disk space, it is isolated from the rest of your computer. In fact, the first thing you do after you turn on a new virtual machine for the first time is install an operating system—just like a new physical machine. Because of the way they share resources, the computer running VirtualBox is called the “host” computer and the virtual machine inside VirtualBox is called the “guest” machine.

To work with VirtualBox, you can install it from the Ubuntu Software Center, or use apt to install the package “virtualbox”. If you want to use the latest version available from Oracle, you can use the earlier section “Expand your software options” as a guide to adding Oracle’s VirtualBox repository to your system. When this book was written, “virtualbox-5.0” becomes the latest version of VirtualBox, but check the official web site at http://www.virtualbox.org/ for updated instructions. Only members of the “virtualbox” group on your system will be able to run VirtualBox. The install process will automatically add your user account to the group, but you will need to manually add other users to this group before they can run VirtualBox, too. The first time you install VirtualBox on an Ubuntu computer, you will need to log out of Ubuntu and log back in so that the “virtualbox” group permissions take effect. Then you will be able to launch VirtualBox through the Dash.

Creating a Virtual Machine

The first time you run VirtualBox, you’ll see a welcome screen (see Figure 6-11). This screen gives instructions for creating your first virtual machine. Click the “New” button on the toolbar and the “Create Virtual Machine” wizard will appear. The wizard explains each step in detail. On the first page, you can give your machine a friendly name that will appear in the machine list, and select your target operating system from the drop-down menus. When you hit “Next,” you’ll be prompted for the amount of memory installed in the virtual machine. The important thing to remember is that when the virtual machine is running, it takes all of the allocated memory from the host operating system. The recommended memory size is based on the minimum requirements for the operating machine you specified, but you can choose any size you like Smaller sizes can cause poor guest performance, and larger sizes can cause poor host performance that affects the entire computer and running virtual machines. When the virtual machine is powered down, it doesn’t use any memory.

Figure 6-11.

Virtualbox guides you through each step of the creation process

Next, you can create a virtual hard drive for the machine. The recommended size is once again based on the minimum requirements of the virtual machine. Once you choose whether to create a new virtual hard drive, a “Create Virtual Hard Drive” wizard appears and guides you through the process. Unless you have a specific need, you can create a VDI (VirtualBox Disk Image) format disk. If you create a “dynamically allocated” drive, then the drive file size will start at 2.1 MB regardless of the virtual capacity and will only grow when written to. A “fixed size” virtual drive file will be as large as the capacity you choose on the next screen. It can be useful if you are working with a virtual machine that will save a lot of data, because it can be faster to write to. Once you create the disk drive, the wizard will close and you will be back at the main VirtualBox window with the details of your new virtual machine displayed on the right of the window.

Some operating systems rely on 3D acceleration to display their user interface. Both Windows Vista and later along with Ubuntu 12.10 and later will be much faster with 3D acceleration enabled. You can select a virtual machine and click the “Display” settings header, then enable the “Enable 3D Acceleration” feature. If you will install Windows on the virtual machine, you can also select “Enable 2D Acceleration”. Once you install the VirtualBox Guest Additions, your virtual machine will function much more smoothly. See the dedicated section for more details.

Running Your Virtual Machine

Selecting a virtual machine and clicking the “Start” button on the toolbar will virtually power on the machine. A display window will appear to server as the virtual machine’s monitor. You can type and use the mouse inside the window. Both the Ubuntu and Windows installer recognizes the virtual mouse, so you’ll be able to click inside the display window at any time. If you are not running an operating system that supports the virtual mouse, the virtual machine will “capture” the mouse when you click inside the window. This can also happen with the keyboard. To free both the mouse and the keyboard, press the Right Ctrl key.

A new virtual machine will have a blank hard drive. The first time you start a virtual machine, VirtualBox will ask you to select the location of your operating system install media (see Figure 6-12). You can choose an optical drive on the host machine or an ISO disc image if you have it in your files. Clicking “Start” will insert the disk into the guest’s virtual optical drive and power on the virtual machine. At that point, you will proceed to install your guest operating system as you would on a physical computer.

Figure 6-12.

Just like a real computer, you have to install an operating system on a virtual machine

Once you have installed an operating system, a virtual machine is almost identical to using a physical machine. You can close the virtual machine window to power off the virtual machine, although if the guest operating system allows for an automatic shutdown, you should always use it instead of forcing a power off. Your virtual machine has audio, video, and network, and storage hardware, and if the guest operating system supports USB, you can connect USB devices plugged into your host machine directly to the guest machine’s USB ports by using the Devices ➤ USB Devices menu and clicking on the desired device. Once your guest machine is finished with the device, you can detach the device from your virtual machine the same way. It automatically reattaches to your host machine.

VirtualBox has a dizzying array of options and features, and if you are used to building computers, you can customize much of the virtual hardware. In the main VirtualBox window, you can right-click on a virtual machine and choose “Settings” from the pop-up menu. Most settings have a tooltip that appears when you hover your mouse them. These tips not only explain the option but often offer advice on avoiding configuration problems.

The VirtualBox manual is comprehensive and explains all of the settings, considerations when installing specific guest operating systems, and will help you get the most out of this highly complex software. Clicking on the “Help ➤ Contents” menu item will bring up the manual.

Installing Guest Additions

The guest operating system in a virtual machine is isolated from the host operating system and runs completely independently. This is both a great advantage and a disadvantage. Only virtualized hardware and devices can be used on the guest machine, and features like 3D acceleration and the clipboard and folders cannot be shared. VirtualBox comes with a set of guest additions that can be installed on the guest operating system to add virtualized hardware drivers that allow the guest machine to communicate with the host machine and better share resources.

Once you have installed a guest operating system in your virtual machine, you can insert the Virtual Guest Additions CD into the virtual machine. This is not a physical CD but can be inserted with the “Devices ➤ Insert Guest Additions CD image...” menu item when the operating system is running. The guest operating system should ask if you want to run the software on the CD. Choose yes, authorize the system changes, and the installer will appear. On Windows guests, this will look like a typical program installer and you will be able to choose whether to install 3D acceleration. Follow the on-screen prompts to install the guest additions. On Ubuntu and other Linux operating systems, a terminal window will appear and show the installation progress. Once installation has completed, you can eject the CD and restart the guest machine to fully enable the guest additions. More detailed and up-to-date instructions for installation and guest operating system compatibility are available in the VirtualBox manual. When VirtualBox is upgraded, the guest additions should be updated, too. Your guest operating system will notify you if a newer update is available, and you can simply repeat the installation process. The installer will remove the old additions and replace them with the new ones.

Guest additions offer many benefits. The keyboard and mouse will no longer be “captured” by the virtual machine, and your virtual machine will have access to more graphics modes, including the ability to automatically adjust to the virtual machine window being resized. On Windows and Linux, you can also enable “Seamless Mode,” which removes the guest operating system’s desktop background. This allows you to work with the guest application windows as though they were running on your host system. While this has some restrictions, it can greatly simplify switching between applications on the host and guest machines. Guest additions even allow for the sharing of clipboard data and folders between the host and guest, and VirtualBox 5.0 adds direct drag-and-drop support for small- to medium-sized files. Once again, the VirtualBox manual will have more details as well as the latest updates on functionality.

For operating systems that rely on 3D acceleration to display their user interface, you should ensure that 3D acceleration enabled in the virtual machine settings. While the virtual machine is powered off, select the virtual machine and click the “Display” settings header, then enable the “Enable 3D Acceleration” feature. for Windows guest machines, you can also select “Enable 2D Acceleration”. This will also allow you to play many 3D accelerated games inside the virtual machine.

VirtualBox allows you to work in multiple operating systems at the same time. With the installation of guest additions, you can expand those operating systems to provide better access to your physical hardware and offer extra convenience features that make working with wildly different software much more pleasant.

Recommended Uses

VirtualBox gives you a computer in a window. In fact, you can run as many virtual machines as your physical computer’s hardware resources can accommodate. The possibilities are truly endless.

You can try different operating systems. If you wanted to work with Windows, or a different flavor of Ubuntu, you can safely test the install process and user experience by trying it in a virtual machine first. If you love Ubuntu but have one or two Windows applications that won’t run under Wine, you can run them in Windows with a virtual machine without having to dual boot.

You can run older or newer operating systems. Do you have old DOS games or are just feeling nostalgic? You can create a virtual machine and install MS-DOS or FreeDOS. Do you want to see what Ubuntu looked like a decade ago? You can install Ubuntu 5.04 as a guest operating system. The computer this book was written on always ran the latest versions of Ubuntu during writing, but two virtual machines running Ubuntu 14.04.3 LTS and Windows 10 respectively helped ensure that all screenshots and instructions were taken from a clean, freshly installed operating system that will match your experiences (see Figure 6-10).

You can experiment. Snapshots save your machine’s state so you can revert if things go wrong. Test upgrades or recovery processes. You can build a virtual machine with extra storage, or floppy drives, or two network cards.

You can learn. Ever wanted to run an Ubuntu server? You can use a virtual machine to install Ubuntu Server and use your host operating system’s web browser to look up learning and reference material. You can run two virtual machines side-by-side to communicate. You can write programs and run commands and upgrade operating systems without risking your data or your computer’s stability.

Being able to create and destroy virtual computers in seconds is the ultimate power user tool. Whether you set up different virtual machines to handle various tasks or you occasionally create machines to test something before deleting them, the only limit is your imagination.

Summary

There are always tips, tricks, and shortcuts that perform tasks faster or in more specific manners. Being a power user isn’t about knowing every secret, but learning these features and using them when they help (and ignoring them when they don’t!) is part of the process of becoming a power user. Not everyone will use every single feature or program in this chapter, but choosing the ones that work for you will help you accomplish more with Ubuntu, be more efficient, and achieve more with your computer.

© Nathan Haines 2015

Nathan HainesBeginning Ubuntu for Windows and Mac Users10.1007/978-1-4842-0608-9_7

Ubuntu Releases

Nathan Haines1 

(1)

CA, US

Ubuntu is the result of tens of thousands of software projects coming together and receiving polish and integration. From the incredible work done by the Debian project to the focused effort by the Ubuntu community, this takes time and care. Canonical drives much of the design for the Unity interface and the foundational work done to support cloud, server, phone, and embedded platforms. But the bulk of the actual development and coding is done by the greater Free Software community.

Release Schedule

Every six months, Ubuntu syncs its software repositories with Debian and works to polish and improve the software, sending general fixes back “upstream” to Debian whenever possible. After another couple of months, the software has improved and a new Ubuntu release is made.

When the Ubuntu project officially launched in 2004, it promised a new release every 6 months, with security and maintenance support for 18 months. Each release was given a version number matching the year and month of its release, so the first version of Ubuntu which was released in October 2004 was called Ubuntu 4.10.

After only six months of development, the release was very promising but still had some rough edges. The developers jokingly gave it the code name “warty warthog.” The software repository was named “warty.” Ubuntu 5.04 followed six months later in April and was a marked improvement. To celebrate the extra maturity of the software, it was codenamed “hoary hedgehog.”

Ubuntu releases are typically referred to by their release number or the adjective part of the code name. Thus, Ubuntu 14.04 LTS, the “Trusty Tahr” release, is referred to as both “14.04” and “trusty.” Each release code name is alliterative and chosen to reflect the goals for the release. For example, LTS names are chosen to evoke their extended lifetime support. “Dapper” received extra polish, “hardy” saw greater adoption on servers, “lucid,” “precise,” and “trusty” all speak to the Ubuntu’s clear focus and direction as it continues to evolve.

Long-Term Support

As Ubuntu began to grow in popularity as a desktop system, there was a desire to start running it on servers as well. Servers require a more reliable platform because performing a major software upgrade on a server every 6 months takes a lot of planning and downtime, and third-party hardware and software developers found it hard to target Ubuntu because of the rapid release schedule. It was decided that a long-term support release was required, and that Ubuntu 6.04 would be supported for 3 years instead of 18 months, and that the server components would be supported for a total of 5 years. Weeks before the release, the developers decided to delay the release for 6 more weeks to allow for final polishing. The planned Ubuntu 6.04 was released as Ubuntu 6.06 LTS. Additional releases came every 6 months as planned; and 2 years later, Ubuntu 8.04 LTS was released, which allowed Ubuntu 6.06 LTS users to upgrade directly, skipping the intermediate releases.

In April 2014, Ubuntu 12.04 LTS was released with the promise of 5 years of support for the desktop as well as the server, and the non-LTS releases saw their support lifetime drop from 18 months to 9 instead. Ubuntu 14.04 LTS continues with 5 years of support on both the desktop and the server, and a reliable foundation for computing everywhere.

List of Ubuntu Releases

Here is a list of Ubuntu releases from Ubuntu 4.10 to Ubuntu 16.04, along with their code names, release cycles, and release and end-of-support dates (see Table A-1). It is very important to use a supported version of Ubuntu on any computer with a network or Internet connection.

Table A-1.

Each Ubuntu release has a version number, a code name, and support lifetime

Release

Code name

Released on

Supported until

4.10

Warty Warthog

October 26, 2004

April 30, 2006

5.04

Hoary Hedgehog

April 8, 2005

October 31, 2006

5.10

Breezy Badger

October 12, 2005

April 13, 2007

6.06 LTS

Dapper Drake

June 1, 2006

(Desktop) July 14, 2009

(Server) June 1, 2011

6.10

Edgy Eft

October 26, 2008

April 26, 2008

7.04

Feisty Fawn

April 19, 2007

October 19, 2008

7.10

Gutsy Gibbon

October 18, 2007

April 18, 2009

8.04 LTS

Hardy Heron

April 24, 2009

(Desktop) May 12, 2011

(Server) May 9, 2013

8.10

Intrepid Ibex

October 30, 2008

April 30, 2010

9.04

Jaunty Jackalope

April 23, 2009

October 23, 2010

9.10

Karmic Koala

October 29, 2009

April 30, 2011

10.04 LTS

Lucid Lynx

April 29, 2010

(Desktop) May 9, 2013

(Server) April 30, 2015

10.10

Maverick Meerkat

October 10, 2010

April 10, 2012

11.04

Natty Narwhal

April 28, 2011

October 28, 1012

11.10

Oneiric Ocelot

October 13, 2011

May 9, 2013

12.04 LTS

Precise Pangolin

April 26, 2012

April 2017

12.10

Quantal Quetzal

October 18, 2012

May 9, 2013

13.04

Raring Ringtail

April 25, 2013

January 27, 2014

13.10

Saucy Salamander

October 17, 2013

July 17, 2014

14.04 LTS

Trusty Tahr

April 17, 2014

April 2019

14.10

Utopic Unicorn

October 23, 2014

July 23, 1015

15.04

Vivid Vervet

April 23, 2015

January 2016

15.10

Wily Werewolf

October 22, 2015

July 2016

16.04 LTS

“X”

April 2016

April 2021

© Nathan Haines 2015

Nathan HainesBeginning Ubuntu for Windows and Mac Users10.1007/978-1-4842-0608-9_8

The Future of Ubuntu

Nathan Haines1 

(1)

CA, US

Ubuntu 14.04 LTS was released in April 2014 and was a milestone for the Ubuntu community. It came in the middle of dedicated work for extending Ubuntu to phones and tablets. Since then, Ubuntu has continued to innovate and evolve on the path toward Ubuntu 16.04 LTS. The first retail phones were based on Ubuntu 14.10 and then Ubuntu 15.04, and the infrastructure created for the phones has also laid the way for Snappy Ubuntu Core, which is a small, reliable platform that can be built upon to power the Internet of Things—small network devices such as network routers, home automation systems, Internet appliances and more—while still allowing the base system to receive security updates independently of the features that are built on top. Soon this technology will be used to power Ubuntu phones and tablets, and eventually even Ubuntu desktops for end users who will benefit from more reliable updates and fresher desktop software on each Ubuntu release.

This section is necessarily more technical than the rest of the book because it’s a look at what Ubuntu developers are focusing on right now. But it should still give you an idea of where Ubuntu is headed through 2016. Just remember that receiving the benefit of these changes once they are complete is as easy as installing regular Ubuntu updates.

Phones

Ubuntu phones have been slowly arriving through retail channels and are becoming more and more polished with each update—currently one update every six weeks. Ubuntu for phones was first announced in January 2013, and the project has evolved continuously since then. In late 2015, Ubuntu is still very much a phone for early adopters, but for those developers and early adopters it is an exciting platform with a revolutionary interface.

Phones are the first Ubuntu devices to ship with Unity 8, the next-generation interface. This allowed Unity 8 development to focus on translating the Unity experience to a small touch-enabled screen. And it was an unparalleled success (see Figure B-1). The Ubuntu phone is controlled by a variety of edge swipes, and this gesture-based interface is a perfect match for the phone, leaving the entire screen available for app content. Swiping from the left edge of the screen shows the Launcher, swiping from the top shows various indicator menus, and swiping from the right lets you switch to other running apps. The bottom edge is available for individual applications to take advantage of.

Figure B-1.

Ubuntu’s phone interface is clean and perfect for small phone touch screens

The Unity Dash has seen another evolution in Unity 8, where scopes are given a more prominent role. The default scope on the retail phones is the Today scope, which provides a quick glance at weather, recent calls, appointments, messages, and news. The Apps scope lists all applications on the phone and provides quick access to the Ubuntu App Store, which is also a scope and will eventually replace the Ubuntu Software Center on the desktop. Scopes provide an instant look at local and online information and are often more useful than apps for quick reference, or they provide ways to jump directly to the information you need when opening an app. Swiping from the bottom edge of any scope allows you to pin favorite scopes or rearrange your favorites—including the default scope that appears when you do a long left-edge swipe.

Ubuntu apps written for the phone are unique in that they also run without modification on the desktop. Minor additional work can help to make the app’s interface better suited for desktop use, and Ubuntu will automatically display the best interface based on where an app is running. This gives the same app a mobile-friendly interface on the phone and a desktop-friendly interface when using a desktop or laptop computer, without compromising either experience.

What makes Ubuntu really exciting as a phone operating system is that it’s running the same core software as Ubuntu on the desktop. This leads to a very interesting situation where an Ubuntu phone is largely capable of running the same software as an Ubuntu desktop. With Unity 8’s mobile interface complete, developers have been working to expand the interface to provide a desktop mode very similar to the Unity 7 desktop you see in Ubuntu 14.04 LTS. Work is ongoing, and Ubuntu phones already switch to a simple windowed interface very reminiscent of desktop Ubuntu when a mouse is connected via USB On-The-Go or Bluetooth (see Figure B-2). While Unity 8’s desktop design is still a work in progress, we can see the first beginnings of desktop support. When finished, Unity 8 will look much closer to Ubuntu today.

Figure B-2.

Connecting a mouse to an Ubuntu phone triggers a windowed interface

Spanish manufacturer BQ has announced that they are planning to release a phone designed specifically for Ubuntu by the end of 2015, which will be capable of providing a desktop experience. While this will probably provide a limited desktop experience at first, it should be able to run any Ubuntu application with a software update coming shortly after Ubuntu 16.04 LTS is released in April 2016. At that point, the Ubuntu phone will transition to Ubuntu Core and snap packages as its base, but to phone users this will arrive as a simple, over-the-air update. You can read the latest about Ubuntu on phones at http://www.ubuntu.com/phone .

Snappy

Ubuntu Core and “snap” packages are the eventual future of Ubuntu. Phone development required software images that contained a complete, read-only Ubuntu system. These images could be tested and certified so that phones could be updated to a newer image without risk of failure. This also meant that user-installed software had to be separate from the system image. Ubuntu developers worked to further confine (or “sandbox”) each application from each other and the system to increase security and speed installation.

The tools and technology designed for the phone were useful enough that Ubuntu decided to make it more general. Ubuntu Core already existed as a minimal Ubuntu system that could be built on, and the application confinement designed on the phones meant that applications could be built into click packages that were self-contained, but also secure. Ubuntu began developing a new set of technologies that improved upon the phone development and called this set of tools “Snappy.”

Snappy tools allow several interesting things from a developer perspective. Snappy Ubuntu Core is a single read-only image of Ubuntu Core that can be updated in a guaranteed manner—if an update fails or doesn’t boot after updating, the system will automatically go back to the previous working version when it restarts. Because the system can’t be changed, updates can download only the changes, making them smaller. For small hardware devices, the Ubuntu kernel and hardware-specific changes come in a separate “snap” package (based on but improved from the phone’s “click” packages), and applications are self-contained in snaps, too. They can be installed, upgraded, and easily downgraded again, independent of the Ubuntu Core system underneath.

The impact is very technically subtle, but what it means is that Snappy Ubuntu Core can be installed on a device, and applications can be developed for Ubuntu and distributed through the Ubuntu Snap Store, all managed in a web browser (see Figure B-3), since most small devices don’t have a display or keyboard. Any Snappy Ubuntu device can then install any snap, just as easily as installing an app on a phone.

Figure B-3.

Installing snap packages can be done in a web browser with a single click

Snappy Ubuntu Core is currently being used for the “Internet of Things,” or small computing devices that need to have network connectivity. It can be found on network routers, home automation systems, consumer robots, and drones, and the list is likely to grow.

Snappy makes these devices more secure. Before Snappy, device firmware was one giant image. Routers, for example, often didn’t receive timely security updates due to the time it takes to integrate the Linux system and the settings interface into a single firmware image. With Snappy, a router’s web interface and network configuration settings would all exist in a special snap created by the manufacturer, and updates to the router’s functionality could be updated with newer snaps. Meanwhile, the Ubuntu Core image could be independently upgraded to fix security issues without affecting the routing functionality. Devices will be up to date and secure, and developers and tinkerers are able to take advantage of up-to-date system images as they build their own devices and share their code with others. Snappy Ubuntu Core is already available for the Raspberry Pi 2 and BeagleBone Black as well as 32- and 64-bit PCs, and Microsoft and Amazon have published software to allow developers to use Ubuntu Core to integrate with cloud technology.

Snappy Ubuntu Core is a very new technology that is rapidly evolving. You can find the latest news at http://www.ubuntu.com/internet-of-things .

Ubuntu Personal

Snappy Ubuntu was an improvement on the technologies designed for running Ubuntu on phones, and in early 2016, Ubuntu developers will begin work to bring its phone technology over to Snappy instead. Once this work is complete—probably around the end of May 2016 after the release of Ubuntu 16.04 LTS—Ubuntu phones will be able to run any package available in Ubuntu. This will bring the graphical interface from the phone to Snappy Ubuntu, which means that all devices running Snappy with built-in displays will be able to run Ubuntu apps on the phone. Thanks to the convergence work being done for Unity 8, this also means that the phone will be able to run desktop applications. In fact, Ubuntu Personal will be installable on desktop computers and tablets as well, and will be able to run any phone or desktop application available for Ubuntu.

One single Ubuntu codebase will be able to power all personal Ubuntu devices and the same applications will run anywhere. This will allow phones to be docked with monitors and keyboards and provide a desktop interface. Business travelers will no longer have to carry around laptops. Writers will be able to take an Ubuntu tablet to the library or coffee shop, pull out a Bluetooth mouse and keyboard and write, or blog without a laptop. Developers will be able to create device software on their desktop or laptop and push it to their devices without modification. The possibilities will be endless.

Traditional Ubuntu won’t be going away, but Ubuntu Personal images will be very useful for office machines, phones, and devices, and the biggest change is that software developers will be able to publish self-contained snaps for Ubuntu. This means that Ubuntu systems will be able to upgrade to newer versions of software between Ubuntu releases without risking system instability.

Summary

The computing world is always changing, and at incredible speeds. Ubuntu’s future is brighter than ever, and the years of hard work spent building one single Ubuntu platform that runs on desktops, servers, clouds, phones, tablets, and things is almost complete. Over the next year, Ubuntu is going to make all of these devices more powerful. Thanks to the hard work of developers, all you have to do is keep your Ubuntu device updated and keep an eye out for the exciting new features in 2016.

Index

A

Advanced Package Tool (apt)

apt-cache search

apt install

apt remove

apt show

apt update

sudo apt update

AMD graphics drivers

downloading

installation

Radeon line of

Application launchers

convenience

eText Editor

online documentation

package management

script/command

SoX

spacedrive

Audacity

audio editing

audio selection

editing techniques

multitrack editor

podcasts

recording audio

B

Brasero

burn preferences

CD-TEXT information

convenient formats

data disc

disc image

format compatibility

megabytes

music CD

optical media

C

Chatting online

link-local XMPP

messaging client

messaging indicator

operating system

Pidgin

Salut

Unity interface

Web browser

CIFS. Common Internet File System (CIFS)

Command-line

adduser command

adventure

alpine package

apropos

apt-get

argument

backgammon game

bash command

battlestar

bsdgames

buffer

configuration

disk space

email interface

executable commands

files and directories

formatting

graphical interface

grep command

highlighted message

hostname

human perception

IMAP server

Inbox Path

init system

kill command

memory utilization

multitaskers

nano

nethack-console

noise generator command

passwd command

pom command

ps command

redirecting output

SMTP server

soft line wrapping

software

See(Software installation)

spacedrive

system path

teletype machine

terminal window

text-based interface

text editing interface

TTY

Unix and Linux programs

Unix shell program

user interface

virtual console

worms command

Common Internet File System (CIFS)

D, E

Dash privacy

Canonical search servers

search scope

system setting’s security & privacy applet

Desktop environments

desktop interface

graphical interface

plasma workspace

software package

Ubuntu Software Center

DeVeDe

adjust disc usage

default format

disc type selection

disc usage section

force subtitles

video files

video options tab

video streaming

Dual-boot with Ubuntu and OS X

disk utility

Intel-based Macs

system preferences

Ubuntu detection

upgrades

F

FocusWriter

distraction-free environment

interface

LibreOffice

Pomodoro technique

scene selector

text editors

text formatting

typewriter sounds

Ubuntu Software Center

word processors

G, H

Graphical partitioning tool

“Ext4 journaling file system”

partitioner

typical dual-boot partitioning scheme

I, J

Internet Relay Chat (IRC)

etiquette

irssi command

real-time network

rules of conduct

server connection

server messages

socialization

K

Kubuntu

advanced users, desktop environment

default applications

desktop folder widget

GNOME with KDE

KDE customizability

KDE Plasma Desktop

preparation for installation

system requirements

L

Language support

computer interface

computer software

fonts

global community

keyboard layouts

keyboard settings

LibreOffice

localization

regional formats tab

software packages

text entry settings

text input

Legacy PC games

DOSBox

emulation software

GOG.com

retro gaming

ScummVM

shareware

Linux Standard Base (LSB)

Lubuntu

classic Windows desktop

LXDE desktop environment

preparation for installation

Sylpheed e-mail client and PCManFM file manager

system requirements

M

Media and entertainment

blu-ray playback

codec pack

commercial games

compatible format

compression formats

decryption software

default applications

DeVeDe

Kerbal Space Program

legacy PC games

MIDI files

productivity tools

Rhythmbox

shotwell

software package

stellarium

sudo

terminal window

Ubuntu computer

VLC media player

Minimal Ubuntu system

description

esoteric uses

installation

security updates and software packages

system requirements

Multiple operating systems

bootloader

custom partitioning

dual-boot with Ubuntu and Windows

graphical partitioning tool

Windows reinstall ability

Multitasking operating system

fg command

glxgears

graphical user interfaces

jobs command

resume programs

N

Nvidia graphics drivers

downloading

GeForce line of

installation

O

Online accounts

data integration

data server

Facebook account

Google Docs

Photo Lens

working online

Operating system

Kernel version

LSB

lsb_release

software compatibility

P, Q

Personal files

application settings

backup settings

configuration options

default settings

duplicity

external hard drive

incremental backup

restore operation

scheduling

storage location

Unity Dash

Personal finances

asset/liability

bank balance

budget expectations

financial management programs

home accounting program

reconciliation

transactions

vehicle cost report

Personal package archive (PPA)

Personal time management

convenient customization

Hamster time tracker

overview window

server maintenance activity

switch activities

task management programs

Power user tools

bandwidth usage

computing experience

CPU

default repositories

dependencies option

file systems tab

GNOME System Monitor

logged-in user

multi-core processors

process management

resources tab

storage space

system monitor

thumb drives

Productivity

calendar display

chatting online

commercial templates

contact view lists

Ebook library

e-mail discussions

evolution-mapi

FocusWriter

gLabels

information management

language support

library management

lightning

memo view

Merge Properties window

mind-mapping software

online accounts

organizing collections

personal files

personal information

screenshots

server settings

software repositories

task view

thumbnail calendar

trim area

Ubuntu Software Center

wiki note software

Proprietary graphics and network drivers

AMD graphics card

CD-ROM and USB drives

free software/open source license

Linux kernel

R

Rhythmbox

audio CDs

digital realm

music manager

podcasts

progress indicator

sound indicator

S

Screenshots

desktop background

GNOME

Kazam

screencasting

Server connection

echo request

mtr package

network connectivity

ping command

public Internet

response time

Server Message Block (SMB)

Shotwell

color adjustments

cropping

digital photography

filter photos

GIMP and darktable

importing photos

managing events

mundane adjustment

nondestructive editor

photo library

red-eye effect

sharing photos

straighten tool

SMB. Server Message Block (SMB)

Snappy

Software installation

apt

See(Advanced Package Tool (apt))

authentication

chromium-browser-l10n

Debian package tool

download updates

LTS

personal package archives

repositories

server software

terminal window

trusty-security

updater utility

virtualbox-5.0

Stellarium

configuration window

display settings

landscape tab

light pollution

location window

lunar libration

markings tab

ocular view

planetarium

stargazing

starlore tab

T

Thumb drives

benchmark test

data allocation

disk operations

disks utility

Ext4 filesystem

formatting

partitions

SMART data

system boot partitions

U

Ubuntu community

Ubuntu GNOME

description

desktop

preparation for installation

shell’s activities overview

system requirements

top panel

workspaces

Ubuntu (operating system)

AMD graphics drivers

See(AMD graphics drivers)

applications

automatic detection, computers

booting

BIOS/UEFI configuration

Ubuntu bootloader screen

configuration

Dash privacy

Debian package file

default desktop, web browser

formatting disks

guest access

guidelines

installation

in automated, advanced formatting

disk space

“download updates while installing”

Internet connection

primary user account

regional settings

settings

softwares

Ubuntu 14.04 LTS

“use this third-party software”

Welcome screen, system language

installation media

long-term support

methods

new versions

Nvidia graphics drivers

See(Nvidia graphics drivers)

office documents sharing

photos and graphics sharing

preparation for installation

bootable USB drive creation

DVD creation

OS X

“Startup Disk Creator”

system requirements

Windows

release schedule

remote Windows Desktop

sharing printers between computers

Super key in Linux

typical Mac OS X desktop

typical Windows 10 desktop

Ubuntu Software Center

Unity HUD

Unity Launcher

Unity menu bar and indicators

updation

upgradation

user accounts management

version number, code name and lifetime support

windows management

Ubuntu personal

Ubuntu phones

core and snap packages

mobile-friendly interface

operating system

revolutionary interface

touch screens

Ubuntu Software Center

Unity 8 development

Unity Dash

windowed interface

Ubuntu server

installation

new server via command line

server administration

system requirements

Unity Dash

App lens

recent applications, files and folders and online results

typical Home display

Unity HUD

application’s menu system

description

Unity Launcherl

applications

“auto-hide the launcher” feature

quick menu

Super key (Windows Logo/Command key)

Unity menu bar and indicators

application and system indicators

global application menu

sound indicator

V

VirtualBox disk image (VDI)

Virtual machines

3D acceleration

automatic shutdown

commercial products

computer’s stability

guest additions

guest machine

hardware resources

host computer

host machine

LTS

memory allocation

operating system

real computer

repository

safely test

VDI

virtual hard drive

Windows installer

W

Web browser

bookmark manager

download manager

elinks package

microsoft internet explorer

monochrome

navigation menus

online information retrieval systems

terminal options window

Windows shared folders and printers

CIFS

local folder

sharing resources

SMB

system settings

Workspaces

computer’s desktop

default setting

firefox

productivity

Rhythmbox

switcher icon

tasks

Unity interface

Unity Launcher

visible workspace

X, Y, Z

Xubuntu

default web browser and mail client

default desktop

preparation for installation

system requirements

video playback

Whisker Menu

Xfce desktop environment