Vous êtes sur la page 1sur 100

UBUNTU UBUNTU 9.

04 JAUNTY JACKALOPE 32-BIT & 64-BIT

user
DOUBLE-SIDED DVD VERSIONS

UBUNTU
user
EXPLORING THE WORLD OF UBUNTU

JUMP TO
JAUNTY
Ubuntu 9.04 “Jaunty Jackalope”
Faster boot and better tools
Run Windows programs on Ubuntu
Security tricks
Virtualization with VirtualBox

10 COOL GAMES!
Jono Bacon: Welcome to
the diverse Ubuntu community
Exclusive interview with
Ubuntu kernel manager
Pete Graner

£7.99
A$19.99

DISCOVERY GUIDE Issue 01


9 772040 808007

Our handy guide helps you


get started with Ubuntu
“Linux for human beings” p61
01

WWW.UBUNTU-USER.COM
W S S T A N D !
T YO U R N E
ILA B L E A E .CO M /S P ECIAL
AVARDER ONLINE AT WWW.L I N UX- M AGAZIN
OR O
UBUNTU 9.04 JAUNTY JACKALOPE

Your Ubuntu 9.04 DVD


This Ubuntu “Jaunty Jackalope” DVD
includes 32-bit, 64-bit, and Live versions
of Ubuntu 9.04.
If you are planning on installing
Ubuntu, use the 32-bit version unless
you are sure your hardware supports
64-bit operations (see your hardware
vendor documentation).
The Live version lets you boot your sys-
tem from the DVD without disturbing
the contents of your hard drive. You can
use the Live boot option to check the
compatibility of your system before you
commit to a full installation. Be sure to
back up any essential data before you
install.
This DVD supports most modern Intel,
or equivalent, PCs. To install Ubuntu, in-
sert the the disc and restart your sys-
tem. Note that this DVD is a double-
E DVD?
DEFECTIVVDs will be replaced
. sided disc. This DVD is labeled like a
D normal DVD – the label you see as you
Defective il to
ase se nd an ema place the disc in the tray applies to the
Ple com .
tu-user. data on the opposite side.
cs@ubun
If your system will not boot to the DVD,
you might need to reconfigure the boot
order in your computer’s BIOS menu.
See the the Discovery Guide (starting
on page 61) for more on installing and
exploring Ubuntu.

Exploring the world of Ubuntu

JUMP TO JAUNTY
Welcome to Ubuntu User Magazine – your independent games, show how to set
UBUNuTseUr
guide to the Ubuntu experience. Inside you’ll find help- up a firewall, and de-
ful tools, great ideas, and plenty of good advice on con- scribe how to build custom software packages.
figuring and troubleshooting your Ubuntu system. We also tour some exciting desktop tools that are freely
If you’re new to Ubuntu, this issue provides you with all available for all Ubuntu users, such as the FreeMind
you need to get started. The DVD opposite this page in- mind mapper and the Celtx authoring application.
cludes 32-bit and 64-bit versions of Ubuntu 9.04 “Jaunty If you’re an Ubuntu user, we want to hear from you. Visit
Jackalope,” and our exclusive Discovery Guide (starting our website to learn more about what’s coming in future
on page 61) shows you how to get your Ubuntu system issues of Ubuntu User: ubuntu-user.com
up and running.
Ubuntu veterans will also find much to learn in this Additional Resources
issue, with insightful articles from experts such as Mar-
[1] Ubuntu: http://www.ubuntu.com/
cel Gagné and Klaus Knopper, as well as tips from
Ubuntu insiders Mike Basinger and Jono Bacon. [2] Ubuntu Forums: http://ubuntuforums.org/
Our lead-off articles examine graphics in Ubuntu and [3] Ubuntu wiki: https://wiki.ubuntu.com/
how to run Windows as a virtual system – but that’s just
[4] Ubuntu Support overview: http://www.ubuntu.com/support
the beginning. Later articles explore popular Ubuntu

UBUNTU USER ISSUE 01 3


UBUNTU
user

Jaunty Jackalope: Ubuntu User is your Ubuntu 9.04 “Jaunty Jackalope.” Read on 10 Great Games: All work and no play? We
companion for exploring the world of for expert tools and techniques at the cen- show you how to get your game on with
Ubuntu. This issue celebrates the arrival of ter of the Ubuntu experience. 6 10 cool game applications. 16

News Know-How Desktop


6 New Features 22 Graphics Cards 48 Gnome Do
Jaunty Jackalope offers faster Learn how to configure accelerated Search engines meet the application
boot times, notifications, desktop graphics cards in Ubuntu. launcher with the handy Gnome Do
improvements, and more. tool.
10 Who We All Are
50 FreeMind
Jono Bacon welcomes you to the
diverse universe of Ubuntu. Looking for inspiration? We
show you how to visualize your
Features best ideas with this useful mind-
mapping app.
11 Virtualization
We show you how to operate virtual 26 UFW Firewall
environments from your Ubuntu Secure your system and keep intrud-
desktop. ers out with a personal firewall.
16 10 Great Games 30 Wine
Relax! You work too hard! We tour Maybe you don‘t have to give up
some top picks for great gaming in Windows programs afterall. Learn
Ubuntu. how to run Windows applications
on Ubuntu with Wine.
20 Interview: Pete Graner
Ubuntu‘s Kernel Manager talks 36 Building a Website 53 Celtx Authoring Software
about development and community. Learn about some tools for building This easy authoring tool is the
and publishing web pages. perfect companion for a dark and
42 Integrating Debian Packages stormy night. We show you how to
We show you how to create custom compose comics, movie scripts, and
Ubuntu software novels with Celtx.
packages using
Debian package 56 Synergy
format. Control multiple PCs with a single
keyboard and mouse, even across
46 Answer Man
operating system boundaries.
SERVICE Get answers to
questions about 58 Environment Variables
3 Ubuntu 9.04 DVD
playing DVDs, setting up email, We show you some terminal tricks
97 About Us
installing from a USB stick, fixing for working with environment
98 Preview the Ubuntu boot menu, and more. variables.

4 ISSUE 01 Ubuntu User


Doues b32-bleit, -64s-bid edveDveVrsioDns
it, and Li
Includ

UBUNTU 9.04
UFW Firewall: Don’t miss the chance to Celtx: Got an idea for a novel or play? Get
lock out intruders with Ubuntu’s built-in your creative juices going with this handy
firewall application. 26 authoring tool. 53
JAUNTY JACKALOPE

■ Full Ubuntu 9.04 on

Discovery
a double-sided DVD
■ Hard-disk install +
Live versions

Guide
■ 10GB Ubuntu DVD
■ Includes 32-bit, 64-bit,
and Live versions
Peek inside for a practical
introduction to Ubuntu,
See p3 for full details
including tips on installing,
configuring, and exploring your new Ubuntu
system.
Installating Ubuntu ..................62 Configuring Email ....................84
Exploring......................................64 Taking Notes ..............................88
Networking .................................67 OpenOffice ................................90
Security.........................................71
Printing ......................................... 74
Multimedia .................................76
Burning CDs................................78
Managing Photos ....................80
Installing Software ...................82

UbUnTU UseR ISSUE 01 5


NEWS New in Ubuntu 9.04

What’s new in Ubuntu 9.04 Jaunty Jackalope

Announcing
the RAbbit
Speed was the theme for the latest Ubuntu development effort, so what could be a better symbol than a

mythical creature that is half antelope and half jackrabbit? Jaunty Jackalope offers faster boot times and lots

of other improvements. BY KRISTIAN KISSLING, NICK ALI, AND JOE CASAD

O
n April 23, 2009, the final release of Ubuntu 9.04 rolls out to the public [1].
Download links light up around the world as the version known as
“Jaunty Jackalope” hops to center stage. The update has been in
the works for months, and Ubuntu insiders are already working
with pre-release versions – alphas, betas, release candidates –
but the moment of the final release is still a special time for
any software development team.
Sister distributions Kubuntu and Xubuntu appear nearly
simultaneously, and other projects such as the Edubuntu,
Ubuntu Studio, and the Netbook Remix edition make their
way to the public. Another Ubuntu is out in the world.
If you follow the fortunes of Ubuntu, or if you are
new to this stylish Linux system that has become
a favorite with users around the world, you
might be wondering what’s new in the
latest release. Following is a brief look
at some of the newest features. But
beyond all the tools and options,
you’ll also find new art, better perfor-
mance, and more comprehensive
hardware support. Ubuntu just keeps
getting better.

Booting
When Canonical CEO Mark Shuttle-
worth introduced Ubuntu version
9.04, he highlighted the need for faster
boot times. The noticeably improved
boot performance under Ubuntu 9.04 is
not because of any particular software.
Instead, the developers used
Bootchart (see Figure 2) to identify
hangers and stoppers in the boot
process and remove the culprits.
The hardware detection phase was
traditionally fairly slow, and Udev
parallelization saves a couple of
valuable seconds.

6 ISSUE 01 UBUNTU USER


New in Ubuntu 9.04 NEWS

Phoronix, which does extensive per- tu’s notification system, in-


formance tests on Linux distributions, cluding Network Manager,
compared Ubuntu 8.10 boot times with a Pidgin, and Evolution. Popular
development release, Ubuntu 9.04 Alpha applications such as Firefox
4. Testing on a netbook, Ubuntu 8.10 still need to integrate notifica-
took 29 seconds to start, and the Jaunty tion support.
Alpha 4 took just 21 seconds. For more
details on the Ubuntu 9.04 boot perfor- New Kernel
mance, see the blueprint at the Launch- One of the most obvious
pad site [2]. changes with Ubuntu 9.04 is
the new Linux kernel version,
Cloud Computing which includes numerous new
Many commercial cloud computing ser- drivers (for Ethernet and
vices are available today (for example, WLAN cards, filesystems, and
the well-known Amazon EC2 service), webcams), and also many
but third-party cloud vendors introduce other updates.
risks. Issues such as security are impor- At the top of the list for
tant when considering a third-party ven- 2.6.28 kernel innovations is
dor for such critical business needs. support for the new Ext4 file-
This problem begs for an open source system, the heir to the previ-
solution. Ubuntu 9.04 supports Eucalyp- ous Ext3. Ext4 is faster and
tus [3], a set of tools designed to help can handle more files than
you build your own cloud. Eucalyptus is Ext3. A file can be as big as
interface-compatible with Amazon EC2, the whole filesystem; parti-
meaning anything you do on EC2 you tions and volumes of up to 1
can do with Eucalyptus. exabyte (equivalent of one mil-
lion terabytes) are supported.
Notifications If you want to update your
The most hotly discussed feature of legacy Ext 2 and Ext 3 filesys-
Ubuntu 9.04 is notifications. Ubuntu’s tems to Ext 4, you will need to
new notification system is similar to run the grub-install command
Growls in Mac OS and the Mumbles to let the grub boot manager
Projects for Gnome. A notification is not correctly identify the kernel.
associated with an action, and you don’t Also note that you won’t be
need to click anything to make it go able to mount Ext 4 partitions
away. A message appears on the desktop in environments with kernel
(Figure 3), and then, after the informa- versions prior to 2.6.28.
tion is presented, it simply disappears. Ext4 is not without contro-
At least 35 applications support Ubun- versy. Testers have found is-

Figure 2: Bootchart lets Linux users measure the time


Figure 1: Members Ubuntu team gather in London to celebrate the Jaunty release. required by active component during the boot process.

UBUNTU USER ISSUE 01 7


NEWS New in Ubuntu 9.04

Figure 3: A notification from the microblog-


ging service identi.ca.

sues with the way applications update


files and how Ext4 writes to the disk.
Discussions are ongoing in the commu-
nity. In the meantime, Ubuntu 9.04 does
not use Ext4 as the default filesystem for
fresh installs, but it is an option if you
want to partition a drive manually when
installing from the Live CD. Figure 5: The new 3.0 version of OpenOffice with PDF import and other features.
The new audio drivers provided by
the kernel now support “jack sensing” – The software has a questionable stability sion to add its functionality to the office
that is, they auto-detect microphones record, and anybody interested in using software. Thanks to improved support
and loudspeakers. Various code changes it will need to install the gnome-volume- for OOXML – Microsoft’s XML file for-
also improve Linux’s handling of DVB control-pulse package via the package mat – the software now does a much
hardware, webcams, and various other manager. After restarting, you will see better job of importing documents from
devices. two small loudspeaker icons in the Office 2007, but OpenOffice still fails to
panel. You need to remove the one with import highly complex OOXML docu-
Desktop the vertical slider. To do so, right click ments.
Many of the improved applications in the icon, and select Remove from panel.
Ubuntu 9.04 result from improvements Right clicking the remaining icon and se- Janitor Tool
to the Gnome 2.26 desktop, which offers lecting Preferences in the drop-down Ubuntu 9.04 also introduces a janitor
simpler file sharing and better multiple- takes you to the PulseAudio configura- tool. This helpful garbage collection ser-
monitor support. tion dialog. You can now set the volume vice disposes of files and packages that
for individual programs in the Applica- you no longer need (Figure 6). You
PulseAudio tions tab (see Figure 4). might need to install 10 independent li-
PulseAudio brings a new sound server to braries just to add a single application
Ubuntu that lets users individually set OpenOffice package. If you delete the application,
the volume for each sound application. Version 3 of OpenOffice (Figure 5) has the Synaptic package manager will still
been around since Octo- keep the other library packages on the
ber 2008, but it was re- hard drive. The Janitor can identify and
leased too late to make resolve this kind of problem. But there
the Ubuntu 8.10 freeze. has been some criticism of the tool – at
The major Version 3 re- least in the early alpha versions of
lease included with Ubuntu 9.04. The janitor reportedly de-
Ubuntu 9.04 introduces leted some software that users had in-
a number of changes. stalled manually. A cautious approach is
For example, OpenOf- your best bet.
fice now supports PDF
import, thus giving Ekiga
users (restricted) PDF Ekiga 3.0 comes with a free video tele-
editing ability. The de- phony tool for Linux. Although Ekiga is
velopers point to the ex- not compatible with the popular Skype,
tensibility of the office it is a useful replacement if the people
suite via extensions that you want to contact all have Linux. The
work in a similar way to developers have completely reworked
Figure 4: Thanks to PulseAudio, you can individually set the Firefox add-ons. Users the program’s interface, at the same time
volume for applications. can download an exten- improving the video quality. Ekiga 3.0

8 ISSUE 01 UBUNTU USER


New in Ubuntu 9.04 NEWS

collaborates with Evolution and will projects have their own IRC
even import Evolution address books. channels.) What makes
Quassel interesting is that it
Pidgin can run in a distributed
The Pidgin Instant Messenger tool, for- manner. The core compo-
merly Gaim, is a useful choice for occa- nent of Quassel can run
sional Internet chatting. Pidgin lets you continuously on a server
talk to users with messengers such as and stay connected to vari-
AIM, Google Talk, ICQ, MSN, IRC, and ous IRC networks. Client
Yahoo, although the Pidgin client will Quassel components can
not necessarily support video functional- then connect to the core
ity for all these providers. and use IRC normally.
When the client discon-
Kubuntu and Xubuntu nects and reattaches later,
KDE users who congregate on the the IRC sessions will con-
Kubuntu side of the landscape will also tinue just as if the client
find many changes with the latest re- had never disconnected.
lease. Kubuntu 9.04 [4] comes with KDE Not to be left out,
4.2.2. Amarok has always been one of Xubuntu [5] also arrives
the most popular apps for KDE, and with some promising new
many people consider it the best media features. Ubuntu’s Xubuntu
player available. Kubuntu 9.04 includes variant is a favorite of users
Amarok 2, a complete overhaul of previ- who want a streamlined Figure 6: The new Ubuntu Janitor is designed to handle
ous versions. The user interface lets you desktop. Xubuntu 9.04 in- orphaned files, but its approach might be too aggressive at
view lyrics and albums from the same cludes the latest Xfce 4.6 times.
artist together. Much of the work for desktop environment,
Amarok 2 went into integrating online which offers better desktop integration. check out the LoCo team list in the
services such as Last.fm, Jamendo, Mag- Thunar, the file manager, now has con- Ubuntu wiki [7].
natune, and SHOUTcast. text menus that let you open applica-
Quassel is now the default IRC appli- tions, exit user sessions, or access help Read On
cation in Kubuntu. IRC is a great way to documentation. The mixer now works Welcome to Ubuntu User magazine.
get support and connect with the rest of with GStreamer, which means that it Read on for news, views, and informa-
the Ubuntu community. (Most Ubuntu supports multiple sound systems. Other tive discussions of some of the best
features include a new session manager tools of the Ubuntu environment. You’ll
Don’t Zap and a new settings manager. learn about virtualization, firewalls,
Windows integration, and the steps for
Long-standing Ubuntu users will proba-
bly notice the “Don’t-Zap” option.
Support and Community building your own website.
Whereas previous versions let users If you’re looking for advice online, the If you are new to Ubuntu, you might
quit the desktop by pressing Ubuntu Forums [6] offer a first level of want to start with our exclusive Discov-
Ctrl+Alt+Backspace as a short-cut to the support for many Ubuntu newcomers. ery Guide section, which shows you how
Gnome login window, this option is no The forum system even includes a sub- to set up your Ubuntu system and helps
longer available. Many users will proba- forum for new users: Absolute Beginner you put Ubuntu to work on some com-
bly consider this change a disadvantage. Talk. Other forums range from gaming to mon tasks. n
The new approach is to use the Alt + networking and wireless. Threads are
PrtScr + K keyboard shortcut, which the monitored continuously by volunteer INFO
kernel has supported for many a moon,
moderators to make sure no one is post- [1] Ubuntu: http://www.ubuntu.com/
to handle the job. This shortcut also re-
ing malicious commands.
starts sleeping desktops. [2] Boot time details: https://blueprints.
One aspect of Ubuntu that is different launchpad.net/ubuntu/+spec/
To reestablish the previous shortcut, you
from other distributions is the presence jaunty-boot-performance
need to reinstate the original /etc/X11/
of local communities (LoCos). Similar to
xorg.conf configuration file status. To do [3] Eucalyptus: https://help.ubuntu.com/
LUGs (Linux user groups), LoCos advo- community/Eucalyptus
so, press Alt+F2 and type gksu gedit to
launch and editor with administrative cate, promote, translate, develop, and
[4] Kubuntu: http://www.kubuntu.org/
privileges. Open the file and add the fol- otherwise try to improve Ubuntu. LoCos
[5] Xubuntu: http://www.xubuntu.org/
lowing lines to xorg.conf: are not meant to replace LUGs but, in-
jaunty/countdown
Section "ServerFlags" stead, they work with existing LUGs to
evangelize and support users. Almost [6] Ubuntu Forums:
Option "DontZap" "False"
http://ubuntuforums.org/
EndSection
200 LoCos have formed all over the
world. If you are looking for a way to [7] Ubuntu LoCo Teams:
Then restart your system. https://wiki.ubuntu.com/LoCoTeams
connect with Ubuntu users in your area,

UBUNTU USER ISSUE 01 9


NEWS Who We All Are

Meet Ubuntu’s Community Manager

DIVERSE UBUNTU
UNIVERSE
Ladies and gents, boys and girls, I would like to give you a very warm

welcome to my brand spanking new column.

BY JONO BACON

today, it limited the scope of who could ware developers love mailing lists, but
get involved. generally don’t get on very well with fo-
Today the story is far different. Every rums. Although there is nothing specific
day we hear wonderful tales and experi- that excludes developers from forums,
ences across the free software world many tend to prefer mailing lists because
about the diverse range of people joining the content is delivered directly to them.
us. We hear of people exercising their Forums are the antithesis of this ethos
passions, whether it be in documenta- and instead require you to hammer that
tion, translations, advocacy, design, test- refresh button until you see new con-
ing and other areas we have not thought tent. Knowing these nuances helps us to

W
hen I was first offered the op- about. As we have become more accept- build better communities because we
portunity to write a column, I ing of this diverse range of contributions don’t force contributors into boxes that
scratched my head and won- (and some beards), it has been fascinat- they don’t naturally belong in.
dered what on earth I should cover. The ing learning how people work together So far, in the Ubuntu community we
problem was certainly not a lack of to make different contributions wel- have tended to some of these roles pretty
ideas, but quite the opposite: There is so come. This has become a really interest- well. We have a thriving community en-
much going on in the Ubuntu commu- ing focus of my work: understanding gaged in packaging, testing, documenta-
nity that I wanted to use my column as how people collaborate and optimize for tion, translations, and advocacy, but I
a means to showcase many of the great the nuances in that collaboration. am particularly interested to inspire new
stories that happen each and every day. I have always been a firm believer avenues of participation. In my most im-
I have the pleasure of being exposed to that different brains naturally gravitate mediate radar I see design and user in-
oodles of these stories, and I can guar- toward different things. As an example, terface testing as particularly interesting
antee you that this is no help when nar- in the programming sense, I naturally targets. Design is a very visual art-form,
rowing something down for my column. gravitate (my quite awful programming and designers collaborate using visual
Fortunately, it seems the topic was star- abilities) toward Python. My friend Dan gestures and imagery.
ing me in the face all the time, and naturally gravitates towards Perl. While This is just one such example of the
deeply connected to all these stories: our abilities are similar, my brain simply challenges that face us, and through the
Diversity. doesn’t work with Perl, and his won’t following series of columns I am looking
work with Python for a variety of rea- forward to sharing my experiences and
The Future of Participation sons, including expectations, experi- thoughts on how to inspire and enthuse
I first got involved in Open Source 11 ence, technical cultural differences, and this new generation of free software con-
years ago, and back then it was a very workflow. These considerations are im- tributors.
different place. If you wanted to contrib- portant when assessing how communi- Before I run, I just wanted to let you
ute to the community, you were predom- ties are formed. know that I am really keen to hear your
inantly welcomed if you were a program- Part of my work has been in under- feedback, so feel free to get in touch
mer. Filling these shoes had high expec- standing the subtle differences and con- with me at jono@ubuntu.com. ■
tations: the typically bearded individual nections between different groups of
was assumed to know how to program people and figuring out ways to develop INFO
in C and have a strong familiarity with a the potential around our findings. When
[1] Jono Bacon’s homepage:
range of obtuse technical tools. we identify these similarities and pat-
http://www.jonobacon.org/
While these heady days produced terns between different disciplines, it
[2] Art of Community Online: http://www.
some incredible code and laid down the often leads to interesting results. A good
artofcommunityonline.org/
foundations of the Ubuntu we know example of this is communication: Soft-

10 ISSUE 01 UBUNTU USER


Virtualization in Ubuntu Features

Exploring Ubuntu’s virtualization tools

Get Virtual

Marina Strizhak, 123rf.com


network card, real video hardware, and
Why tie yourself to the hardware? We’ll show you how to operate
so on. When you boot that virtual ma-
virtual environments from your Ubuntu desktop. chine, it will appear as though you are
booting a real machine.
By Marcel Gagné
Virtualization Tools

A
fter just loading your copy of the Windows as well as Ubuntu. Wouldn’t it Your Ubuntu system doesn’t have any of
shiny new Linux release Ubuntu be nice if you could run all those things this software installed by default, but
9.04, things are going well. Now on your current computer, without hav- getting it is easy. Furthermore, several
that you’ve read the other articles in this ing to reboot or reinstall? You can – with virtualization packages are available.
issue, you’re starting to think you’ve virtualization. These include the command-line pro-
found a pretty good home. But even Virtualization software creates a vir- grams QEMU [1] and KVM [2], as well
when you love your home, once in a tual computer on your computer, on as one my favorites, the powerful graphi-
while you want a holiday – which means which you can install any other operat- cal VirtualBox [3]. To install these pro-
loading up another Linux distribution to ing system, whether it be Ubuntu, Red- grams, select them via Synaptic or the
play with. Hat, Mandriva, or yes, even Windows. apt‑get command:
Of course, it might not be all play. From the perspective of the guest operat-
Sometimes you need to test another op- ing system, the virtual machine is a real apt‑get install qemu kvm U
erating system, or you might need to run machine with real hard drives, a real virtualbox‑ose

Ubuntu User ISSUE 01 11


Features Virtualization in Ubuntu

this first dem- to install a non-Linux OS – like Windows


onstration, I’ll XP, for example.
install a tiny The next step is to install Linux into
distribution this disk image, which I do with the
called Damn qemu command:
Small Linux
(DSL) from an qemu ‑cdrom dsl.iso U
ISO image ‑hda dsl.img ‑m 256 ‑boot d
downloaded
from the project Several interesting things are happening
website [4]. Be- here. For starters, the ‑cdrom parameter
cause DSL is a is the path to the CD-ROM image from
cute little distro which you are installing your distribu-
with minimal tion. If you were using a physical CD-
space require- ROM, that path would likely be some-
ments, I’m thing like /dev/cdrom. The next parame-
going to create ter, ‑hda, defines the path to the disk
Figure 1: QEMU virtual hardware boot. a relatively image I just created; then, it’s followed
small disk by the ‑m switch, which, in this case, al-
Of the three, I prefer VirtualBox, but image (a virtual hard disk) for it to live locates 256MB of RAM to the running
let me show you how easy it is to run a on with the qemu‑img command: session. Finally, ‑boot identifies the boot
virtual machine using QEMU or KVM. drive (the CD image), which is the so-
KVM, the Kernel Virtual Machine, is a qemu‑img create dsl.img 256M called D drive. As soon as I press Enter,
replacement for QEMU. It works by tak- the virtual hardware boots (Figure 1).
ing advantage of processor-based hard- The system returns with the following The disk you created and the CD-ROM
ware virtualization technology. On the reply: are represented as physical devices at
Intel platform, this is known as VT; on boot time, as is the default video card
AMD processors, it is called Pacifica. Formatting 'dsl.img', U and the BIOS. In fact, you can even in-
What it means to you is that you can fmt=raw, size=262144 kB terrupt the boot process and bring up a
take advantage of KVM to run your vir- device boot menu. If you press Enter at
tual machines with substantially better The preceding command creates a raw- this point, the system will go through its
performance than you can with straight formatted disk image by default. A few normal boot process, which, in the case
software virtualization. The catch, as different image formats are available, of a Live CD, usually stops to let you de-
you might expect, is that not every ma- most notably qcow2, which is a portable cide what to do as far as booting or in-
chine out there supports hardware virtu- image format that is useful if you want stalling. DSL is built on Knoppix, so
alization. To find out
whether your system is a
candidate, execute this lit-
tle snippet of code from a
terminal window or shell:

grep ‑E U
'^flags.*(vmx|svm)' U
/proc/cpuinfo

If it returns the string vmx


or svm, your processor is
ready. If not, you have to
stick with the software-
based virtualization of
QEMU. The KVM com-
mands are pretty much
interchangeable with
those of QEMU, as are the
install and operating sys-
tem images. In fact, KVM
is based on QEMU.
Next, I’ll take a look at Figure 2: A Kubuntu Jaunty Jackalope desktop with an instance of Damn Small Linux booted and running on
how QEMU works. For top.

12 ISSUE 01  Ubuntu User


Virtualization in Ubuntu Features

users of the venerable Live CD will find tion module comes into play. The catch
some of this familiar. For everyone else, is that it’s not installed by default, and
just press Enter. you can only install the source for it.
Everything that happens from this step Yes, that means you have to build it.
forward should happen as it would if Luckily, that’s not complicated:
you were running any other Linux distri-
bution from a Live CD. The guest oper- sudo apt‑get install U
ating system will boot, or install, nor- module‑assistant
mally. Depending on the speed of your sudo module‑asssitant U
machine and the amount of memory you prepare
have at your disposal, the process could sudo module‑assistant ‑f U
be peppy or quite slow. Remember that get kqemu‑source
this virtual machine uses whatever por- Figure 4: Your first step is to tell VirtualBox
tion of your host system’s resources you The result is a kernel module that dra- what guest operating system will run on this
alloted. That means less for your host matically speeds up your QEMU ses- VM.
system, both in terms of memory and sions, giving you performance on par
processor resources. Also, if your proces- with KVM. Now, even with QEMU, you
sor allows KVM instead of QEMU, the can run and install more demanding op-
performance will be substantially higher. erating systems, like Ubuntu. For the
A few seconds (or minutes) later, your pure fun of it, I loaded up Ubuntu Jaunty
virtual machine is up and running (Fig- Jackalope (with the Gnome desktop)
ure 2). and ran a full implementation of it on
my Kubuntu desktop (Figure 3).
KQEMU Before I move on, I’ll share a few other
Before, I suggested that running QEMU parameter with you. For starters, you
instead of KVM means you aren’t privy might add ‑no‑acpi to disable this in the
to processor-level acceleration, which virtual machine. Also, you can use the
means you are emulating everything in ‑localtime parameter to tell QEMU to run
memory without the benefit of kernel ac- your session with the local machine time Figure 5: Unless you defined a previous vir-
celeration. When you are running a little as opposed to the default UTC. Remem- tual disk, you’ll need to create one. Because
tiny distribution like DSL, that’s fine, but ber the kernel acceleration? Try ‑ker‑ it is possible to reuse disk images, previous
if you want to try a different Ubuntu, nel‑kqemu. In addition are network pa- images will be listed here.
openSUSE, Fedora, or even Windows, rameters, USB parameters, file-sharing
you will feel the pain pretty quickly. In parameters (SMB), devices parameters, the basics, make sure you check out the
this case, the KQEMU hardware accelera- and more. Because you are only seeing man page for the qemu command. Also
remember that my set-
tings for this example
imply a distro with a very
small footprint.

VirtualBox
Another great piece of
virtualization software is
VirtualBox, an open
source package freely dis-
tributed under the GPL
and distributed by Sun
Microsystems (who, as I
write this, has been pur-
chased by Oracle Corpo-
ration). VirtualBox is a
program I use every day
and one I recommend
highly. With VirtualBox, I
can load an operating sys-
tem that you might still
want access to: Windows
XP. Of course, you do
Figure 3: The best of both worlds: Ubuntu’s Jaunty Jackalope 9.04 running in QEMU under Kubuntu. need a licensed copy of

Ubuntu User ISSUE 01 13


Features Virtualization in Ubuntu

Microsoft Windows location. The location, by de-


to proceed. fault, is your machine name (my
When you start WinXP in Figure 4). In effect,
VirtualBox for the this is a folder on your disk in
first time – assuming which the machine resides.
you already have Next, you allocate the space ei-
Virtualbox installed ther by typing it into the text
via either Synaptic window or with the slider. A size
or apt-get – no ma- for this disk will be suggested
chines will be run- according to the operating sys-
ning in it. Think of it tem you are loading. On the
as a blank slate or, basis of your expected needs, ac-
better yet, a new cept the default or choose a size.
computer with a After you click Next, you can re-
blank hard drive view your selections. If you are
waiting for your fa- happy with the choices you’ve
vorite distribution, made, click Finish.
or, in this case, Win- Figure 6: Your new machine appears, ready to be started. Now you are back to the vir-
dows XP. tual hard disk selection screen
Before you can install Windows, you listed as <no media>. Clicking New you saw in Figure 5, but this time, your
need to create your virtual hardware. To creates a disk image. new disk image is selected for you. All
do this, click New on the VirtualBox Clicking Next in the new welcome you have to do is click Next to continue.
toolbar. A nice welcoming message ex- message for the virtual disk wizard leads This opportunity is the last you’ll have
plains that the wizard will guide you you to the dialog from which you can to review everything you’ve done to
through the various steps. When you choose one of two disk image types: a date. VirtualBox will remind you of your
click Next, you will be asked to decide fixed-size storage medium or a dynami- chosen machine name, the memory allo-
what kind of virtual machine you plan to cally expanding disk image. The foot- cated, the OS type, and the type and size
create (Figure 4). print of a dynamically expanding image of disk you’ve chosen. When you click
To start, give it a name. For example, is minimal to start and expands as Finish, your virtual machine is ready. In
I’ve chosen to call mine the very unorigi- needed. In comparison, the fixed image the main VirtualBox window (Figure 6),
nal WinXP, but you can call it whatever takes up whatever space you give it right your new WinXP machine appears in the
you like. Next, select the operating sys- from the beginning and runs up against list of machines (on the left), ready to be
tem (Microsoft Windows) from the drop- a wall when that space is used. Unless loaded.
down list, then identify the version you have good reason to do otherwise, Remember, this is a clean computer,
(Windows XP). The list of operating sys- select Dynamically expanding storage with nothing installed. To the right of the
tems covers a lot of ground, including and click Next. machine list are the parameters associ-
Windows, Linux, Solaris, BSD, and even Having made your decision on storage ated with the selected machine. Each of
IBM’s old OS/​2, and each of these oper- options, you can now define the size and the blue labels can be clicked to config-
ating systems have many versions. The
Windows support goes right up to the
new, not-yet-released Windows 7. When
you click Next, you will be asked to se-
lect the amount of RAM you want to
dedicate to the VM.

Resources
Deciding how much memory to allocate
is a bit of a balancing act. On one hand,
most modern operating systems have
minimum requirements. On the other
hand, you have to take into consider-
ation how much memory your Ubuntu
host system has. Either enter the amount
into the text box or use the slider.
Next, your new machine needs a hard
drive on which to load XP, so you must
create a virtual hard disk (Figure 5). Be-
cause this is your first time out, the pri- Figure 7: The new virtual machine is live, and Windows XP is installing normally. With Virtual-
mary master (the main disk) will be Box running on my Ubuntu KDE desktop, the XP installation is in the foreground.

14 ISSUE 01  Ubuntu User


Virtualization in Ubuntu Features

ure the resource listed. Notice that you will boot from the Windows install disc.
can even go back and change the virtual What follows is a standard Windows XP
machine specifications, such as memory. installation (Figure 7): You accept the li-
Other labels let you define what physical cense agreement, your virtual disk is for-
resources (on your host machine) the matted, and Windows does its thing.
virtual machine has access to. For in- Somewhere in the process, you’ll need
stance, to give your virtual machine ac- to enter your license code, answer some
cess to the physical DVD-ROM drive in questions, and so on. Eventually, the in-
which the Windows XP install media is stallation will complete and your new
located, click on the CD/​DVD-ROM label. Windows machine will be up and run-
In the resulting dialog box, check the ning. After you attend to standard Win-
Mount CD/​DVD Drive box. If you have dows stuff, such as adjusting screen size
more than one drive, select the one you and making other modifications to your Figure 9: For nearly seamless integration
want from the drop-down list. The radio running machine, you’ll have a full Win- into your Ubuntu desktop, install Virtual-
button labeled ISO Image File is particu- dows XP implementation running on top Box’s Guest Additions into your running XP
larly interesting if you are loading an- of your Ubuntu (or Kubuntu) desktop, machine.
other Linux distribution because you can with access to everything you normally
install it directly from the hard drive, use under Windows (Figure 8). Instead After you’ve followed the instructions
skipping the need for a physical disc (as of emulating Windows, you are running for installing the guest additions and re-
is the case with Windows because free a real, albeit virtual, PC loaded with started your machine, your experience
Live DVDs don’t exist). When you click Windows XP. will be vastly different. Just by clicking
OK, you’ll find yourself back at the main Although this might sound like a on a window inside Windows, you can
VirtualBox window with the CD/​DVD- happy ending, in which the two seem- change the focus from your Ubuntu ap-
ROM label now indicating the host com- ingly irreconcilable operating systems plications to your Windows desktop.
puter’s physical drive. Now you are are working together on the same hard- Your mouse will be able to sail across
ready to install Windows XP. ware, VirtualBox has Guest Additions your desktop from Windows to Ubuntu
that can improve the relationship. Once and back again. Furthermore, you will
Installing the Guest you’ve had to hit the control key a few be able to resize Windows to fit what-
First, make sure the virtual machine is times to recapture your keyboard and ever geometry makes sense to you and
selected, then click the Start button. Vir- mouse or you find that the default your Ubuntu desktop. Finally, you will
tualBox will let you know that the auto- screen sizes provided by Windows just be happy to know that these guest addi-
capture keyboard feature has been acti- don’t work well on your widescreen tions are not specifically a Windows
vated. This includes your mouse as well. notebook, you’ll be happy to learn that thing and are available for other operat-
What this means is that the virtual ma- even these issues can be resolved. To in- ing systems as well.
chine has full access to your mouse and stall the Guest Additions, release your
keyboard. To “uncapture” your mouse keyboard and mouse (right Ctrl key), Conclusion
and keyboard, press the right Ctrl key on then click the Devices menu on the vir- Happily ever after is where this story
your keyboard. To acknowledge the mes- tual machine and select Install Guest Ad‑ ends. By running Ubuntu, you have a
sage, click OK, and your new computer ditions from the menu (Figure 9). superior operating system that is faster,
more reliable, and more secure than
Windows. But you can have your
Ubuntu and your Windows too. Best of
all, you aren’t limited to just Windows.
For example, you can try other Linux
distributions, and even BSD or Solaris,
from the comfort of your existing
Ubuntu installation without reinstalling.
Yes, you can have it all – with a little
virtualization. n

INFO
[1] QEMU:
http://​­www.​­nongnu.​­org/​­qemu/
[2] KVM: http://​­www.​­linux‑kvm.​­org/​
­page/​­Main_Page
[3] VirtualBox:
http://​­www.​­virtualbox.​­org/
[4] DSL: http://​­damnsmalllinux.​­org/
Figure 8: Windows XP running on my Kubuntu desktop – fully integrated and ready for action.

Ubuntu User ISSUE 01 15


FEATURES Ten Great Games

Gaming on Ubuntu

PLAYGROUND

Vasileios Akoinoglou, 123RF


Gaming on Ubuntu is a reality. In this article we introduce 10 games that you

can install without breaking a sweat. BY TIM SCHÜRMANN

Installation
All of the games I will be looking at here

I
are easily installed via Applications |
n contrast to Windows, Ubuntu is not generally regarded as an El Dorado for
Add/Remove. When you get there, set
computer gamers. But this widespread opinion is actually unjustified, as the Syn-
Show to All available applications, then
aptic package manager goes to show with its choice of more than 1,000 packages
browse the Games section. If you can’t
in the Games section. Many games promise hours of fun when your daily chores are
find what you’re looking for, the Search
done, and it’s totally free of charge. On the following pages, I will present a short se-
box might help.
lection of very popular Linux games. But beware, some of them are addictive.

16 ISSUE 01 UBUNTU USER


Ten Great Games FEATURES

 Freeciv
The Freeciv strategy game is a classic Linux game. Just like its
role model, Civilization, the player guides a civilization from
ancient to modern times en route to prosperity. This endeavor
is not just a question of exploring new territory, negotiating
with other tribes, and conducting research, but also of surviv-
ing the odd war or two. The game is related to Civilization II,
but in many cases, you can customize it to suit your needs.

Freeciv: http://www.freeciv.org
Alternative: FreeCol  Freeciv

 Lincity and LinCity-NG


If you have always fancied a term in office as the mayor of a
city, Lincity is just what the doctor ordered. Another Linux
original, the game is modeled on the popular SimCity. As an
urban planner, you are given the task of creating a prosperous
city from a piece of vacant ground. For this to happen, you
have to assign land for construction, build roads, and collect
taxes. Each decision you make has an effect on urban life:
Houses in the suburbs will attract wealthier citizens, whereas
ghettos will develop in the vicinity of heavy industry, requiring
expensive policing. An addition to the fairly frumpy-looking
Lincity is a modern version called LinCity-NG.

Lincity variants: http://lincity.sf.net and http://lincity-ng.


berlios.de  Lincity
Alternative: OpenCity

 Beneath a Steel Sky


If you like solving puzzles and are into science fiction, you will
not want to miss Beneath a Steel Sky. This old-school adventure
lets you direct the protagonist, Robert Foster, through Union City,
a city built on iron and steel. Supported by a little robot, Joey,
you battle the merciless, totalitarian state and in the process dis-
cover a dark spot in your own past. Beneath a Steel Sky started
life in 1993 as a commercial game for MS-DOS, which explains
the slightly pixelated, but atmospheric, graphics. On Ubuntu, it
requires the ScummVM utility, which has given many other clas-
sic adventures a new lease on life on Linux.

ScummVM: http://www.scummvm.org/downloads.php  BASS 5


Alternative: Flight of the Amazon Queen

 FlightGear
The makers of FlightGear were looking to create a realistic and
extensible flight simulator. The graphics can’t compete with the
commercial counterparts, but the flight characteristics and envi-
ronmental conditions are all the more realistic to make up for
this. The sheer number of options and settings are likely to put
off occasional flyers, though. FlightGear does not just simulate
every single on-board instrument, but every single lever on
board your choice of plane. Before you even dream of taking off,
plan a couple of hours practice. A giant, world-wide community
continually turns up with new maps and new flying material.

FlightGear: http://www.flightgear.org
Alternative: ACM Aerial Combat Simulator
 FlightGear

UBUNTU USER ISSUE 01 17


FEATURES Ten Great Games

 Battle for Wesnoth


Battle for Wesnoth is another turn-based strategy game mod-
eled closely on the erstwhile favorites Master of Monster and
Fantasy General. In a fantasy world divided into hexagonal
cells, players move their characters, each with their strengths
and weaknesses, and gain experience in the course of battle
in a fashion similar to role-playing games. Type of attack and
weapon, positioning, time of day, and terrain are all important
to game play. A good introduction helps you take the first
steps, and thanks to the purposely simple rules, newcomers
can come to grips with the game in next to no time. The
graphics never cease to amaze with excellently rendered
manga-style images. Playing against human competitors is
particularly enjoyable, and the map editor included with the
 Battle for Wesnoth 2
game lets you define your own campaigns, which you can
swap with other fans on the Internet.

Battle for Wesnoth: http://www.wesnoth.org


Alternatives: Advanced Strategic Command, Glest

 TORCS
Motor sports fans can hit the virtual throttle in The Open Rac-
ing Car Simulator, or TORCS for short. At the wheel of a mod-
ern race car, such as a McLaren F1 or a Mercedes CLK DTM,
you can race over intelligently laid-out courses. Among the
more than 20 tracks to choose from are high-speed courses on
smooth tarmac, dusty rally courses, and street racing. TORCS
simulates the response of more than 50 different vehicles
based on a number of parameters, such as suspension, aero-
dynamics, and driver error. Attacks by opponents are reflected
by a simple damage model. Because the game does not sup-
 TORCS port multiple players, you will have to make do with racing
the computer.

TORCS: http://torcs.sourceforge.net
Alternatives: SuperTuxKart, Trigger

 FooBillard
FooBillard is another sporting challenge. This pool/billiards/
snooker simulator offers attractive 3D graphics, realistic phys-
ics, and a simple computerized opponent. As an alternative,
you can play human competitors over a network. A selection
of games is available, including 8 ball, 9 ball, carambole, pool,
and snooker. And if you happen to own a pair of 3D glasses,
you can switch to anaglyph mode and experience a fascinat-
ingly real 3D view of the table. Table textures, ball highlights,
and shadows add to the realism of the game.

 FooBillard FooBillard project: http://foobillard.sunsite.dk


Alternative: BillardGL

18 ISSUE 01 UBUNTU USER


Ten Great Games FEATURES

 SuperTux
If you are looking for an existing jump and run side-scrolling
game for the kids, SuperTux is perfect. Instead of an over-
weight plumber, as in Nintendo’s Super Mario series, you help
a small penguin negotiate pitfalls and cuddly monsters. The
latter typically can be knocked out by jumping on their heads.
Bonus articles give the hero super powers. The game cur-
rently has more than 100 levels, to which you can add your
own creations, thanks to the level editor.

SuperTux: http://supertux.lethargik.org
Alternative: Secret Maryo Chronicles

 Vega Strike
 SuperTux
Vega Strike takes you into the realm of outer space. This mix
of action game and simulation sees the player set off as the
owner of a small spaceship, very much in need of a refit. Of
course, a refit is going to cost you money, and to earn it, you
will need to trade with foreign planets, fight with or against
factions, or indulge in a spot of piracy. Just as in its role mod-
els Elite and Freelancer, Vega Strike gives you an open envi-
ronment. The universe, comprising more than 5,000 solar sys-
tems, is populated by 39 factions, all of which are tied up in
alliances – if you are unlucky, you end up in the middle of a
war. A kind of “warp” engine, called a SPEC drive, allows you
to travel quickly throughout the solar system. Jump points
allow you to travel between star systems – if you have a jump
drive, that is. The game generates most of the planets ran-
domly, and it’s a completely new game on each restart. Many
weeks of gaming pleasure are guaranteed en route to fame
and power.
 Vega Strike
Vega Strike: http://vegastrike.sourceforge.net
Alternative: Oolite

 Nexuiz
Ubuntu has no end of classy but free multi-user shooters.
Nexuiz, a three-dimensional deathmatch game, is just one of
them. The idea of the game is to take out the enemy in a team
or on your own, to capture flags, or to secure waypoints. Mu-
tiple game modes are available. Just like the Unreal series,
Nexuiz is designed for fast shoot-outs on the network; single-
player mode, with more than 20 levels, is just for learning the
ropes. The emphasis is on speed and intense action. Numer-
ous, intelligently designed and attractively illuminated levels
promise variety and strategically challenging duels.

Nexuiz: http://www.alientrap.org/nexuiz
 Nexuiz
Alternatives: OpenArena, Sauerbraten, Alien Arena, Tremu-
lous, Warsow

UBUNTU USER ISSUE 01 19


Features Interview

An interview with the Ubuntu Kernel Manager

Juggling Jackalopes
One day before the official release of Ubuntu’s “Jaunty Jackalope,” Ubuntu User magazine interviewed

Ubuntu’s Kernel Manager, Pete Graner. Pete explains how a kernel grows into a Jaunty Jackalope and looks

toward the next release of Ubuntu. BY JOE CASAD

the offices. We work via Public IRC


channels and mailing lists, and of course
phone calls when needed.
The kernel team is broken down into
14 members, including myself. We are
broken down into three focus areas. Sta-
ble Maintenance is responsible for our
fielded supported releases, which in-
clude doing security updates and bug
fixes. New Distro Development is stabi-
lizing the kernel for the next develop-
ment release, identifying and patching
regressions from the previous releases,
and distribution feature integration.
Hardware Enablement is where we work
with our partners, like Dell and HP, to
Figure 1: Pete Graner (Ubuntu Kernel Manager), Mark Shuttleworth (Ubuntu Founder), and make sure Ubuntu works with selected
Jono Bacon (Ubuntu Community Manager) celebrating at the April 23rd Jaunty Release hardware models.
Party in London. Ubuntu has a large community and
during a development cycle we have

W
hat does a busy, globe-trotting while I was in the US Army as part of a public releases, so we don’t really “Beta”
Ubuntu Kernel Manager do Rapid Prototyping Project in about 1994. test in the traditional sense. We begin
one day before Jaunty Jacka- At the time, everything was Sun OS- testing at our very first development re-
lope hops out onto the world stage as based and we needed a lightweight, por- lease – called Alpha 1 – through our Beta
the latest Ubuntu release? He tells table computer that could be used in release and into the Release Candidate
Ubuntu User how the kernel team flight, then jumped via parachute into (RC).
works, how the community contributes, the target area. The contractor selected We are always testing. The time be-
and what the future looks like for the Linux (Slackware) and i386 notebooks. tween the releases is two weeks, so our
user-friendly Ubuntu. users/testers are always getting new
Q I get email from Ubuntu developers software through a rolling stream of
Q How long have you been with the all over the world. How does develop- fixes.
Ubuntu team, and how did you get in- ment work? And I know a lot of volun-
volved with Ubuntu? What is your back- teers are excited about Ubuntu. When it Q So Ubuntu is Linux. People are gen-
ground? comes to kernel development, do you erally aware that you get your code from
work directly with beta testers in the the venerable Linux community project
A I’ve been with Ubuntu just about a community? known as Debian. Does the kernel come
year. This was my second Ubuntu re- from Debian? Or do you work directly
lease. Prior to that, I worked at Red Hat A For the most part, we are one virtual with the Linux kernel project?
in various capacities, which include on- team. The team is made up of two
site SELinux Engineer at the National halves: Canonical engineers and com- A The kernel does not come from De-
Security Agency (NSA) – I managed the munity volunteers. bian due to the need to select a kernel
Level 3 Support team – and my last po- About 95 percent of the Canonical en- version that will provide Ubuntu with
sition was the Base Operating System gineers are remote employees – that is, the features it needs.
Engineering Manger for Red Hat Enter- we all work from home. Canonical has a We have many cases where we will
prise Linux, and by extension, Fedora. I few offices – London, Boston, and Taipei need a newer kernel due to our hard-
started using and developing in Linux – but for the most part, we don’t work in ware enablement goals or particular fea-

20 ISSUE 01 UBUNTU USER


Interview Features

tures that can’t easily be back-ported to A Most end users should never even Q What’s up ahead? Are you already
an older kernel. know the kernel is there. We try to pick working on the next release? Can you
At the Ubuntu Developer Summit the right kernel configs and driver de- give us a hint about what the emphasis
(UDS), we make the decision on what faults so that the user’s experience is a will be?
kernel version we will use based on the good one.
feedback we receive from the other de- We receive feedback all the time A We’ve been working hard on reduc-
velopment teams. So, for example, at the about what hardware does or does not ing the amount of non-upstream code
Jaunty UDS we decided on 2.6.28. At work and where we can find drivers if that we ship and have been investing
that point, we import the kernel from the they exist for new hardware, so I would time and energy into making upstream
upstream Linux kernel and we begin to say feedback isn’t an issue. We try to vanilla kernel builds available for inter-
track the development there. This allows provide the best hardware support pos- ested users. We have opened the 2.6.30
us to provide the current upstream de- sible. The feedback is discussed on our kernel tree and are doing the usual patch
velopment testing and, in the best case, public mailing list and, depending on scrub and trying to eliminate as many
bug fixes. what it is, we may implement it in the out-of-tree patches as possible. And
next kernel update or it might get de- smoke testing. We won’t really start de-
Q Do you start with specific goals for ferred to UDS, where we need a broader velopment in earnest until after the ker-
each release? If so, where do the goals discussion. nel version is selected at UDS. Until
come from? Do you all sit down together then, it’s all prep work and things that
and talk about a vision? Q I know there is a vision to bring are kernel-version independent.
Ubuntu into the server and corporate en- For 9.10, we have a large number of
A Before each release we hold a meet- vironment. Can you talk a little about re- items on the plate. We will be looking at
ing where we get all the Canonical engi- cent work on that path? the 2.6.30 or .31 kernel. Some of the
neers, community developers, and inter- items for discussion at UDS will be mov-
ested parties together and discuss what A I would have to say Ubuntu Server ing off of grub to grub2 for boot loading,
the needs are. This is called UDS has moved out of the vision phase. Also, improving power management, improv-
(Ubuntu Developers Summit). The ses- I’d like to caveat this by saying I’m not ing Suspend/Resume/Hibernate, en-
sions at UDS are normally at the individ- tied deeply into the server team plans. crypted swapfiles, improving WiFi and
ual development team level, except With that said, Ubuntu Server is a very 3G support, and much, much more. n
when you have things that cross subsys- solid product, deployed in numerous en-
tems in Ubuntu. The goals and features vironments today. INFO
with working plans come out of this As far as recent work, much of the
[1] Ubuntu development: https://wiki.
meeting. This year’s UDS is being held focus has been on making the default
ubuntu.com/UbuntuDevelopment
in Barcelona, Spain, during the week of server applications come out of the box
[2] Ubuntu testing:
May 25-29. with sane defaults for the average use
https://wiki.ubuntu.com/Testing
case.
Q How does the process work? Can
you walk us through the time line of an
average release cycle?

A We develop to a 6-month-time-
based release, with a release every April
and October. Once we start active devel-
opment, we have Alpha, Beta, and RC
releases every two weeks. So it would
look like: (Alpha) Release Candidate 1
(RC1), UDS, then RC2, RC3, RC4, RC5,
RC6, Beta, RC, Final Release.
This of course means we have numer-
ous milestones we have to meet in the
cycle. You can view the 9.10 Karmic
Koala schedule online (https://wiki.
ubuntu.com/KarmicReleaseSchedule).

Q Ubuntu has a reputation for focus-


ing on the end user – making Linux
seamless and accessible to the beginner.
How do you solicit feedback from users?
And how to you integrate that feedback
into the kernel?

UBUNTU USER ISSUE 01 21


KNOW-HOW Graphics Cards

open source business models are end-


Configuring accelerated graphics cards in Linux

CARD TRICKS
less, so I’ll just say I’m strongly biased in
favor of open technical specifications
and open source, even as I write this ar-
ticle about installing proprietary drivers
for graphics cards through the use of
general Linux techniques.
If you’re troubleshooting a graphics
Some graphics card vendors offer limited support for card in Ubuntu, you might also
be interested in this
open source systems like Ubuntu. If you’re look- month’s “Answer
Man” column (pg.
ing for high-end effects, you might need to 46), which in-
cludes an an-
get involved. BY KLAUS KNOPPER swer on install-
ing an nVidia
graphics card.

Graphics
Under GNU/
Linux
Most GNU/Linux
distributions for
desktop and note-
book computers use
Igor

the Xorg graphics sub-


Korio

system, which is an
n
ov, 12

open source implementa-


3

tion of the X11 API used by


rf.co

almost all programs that


m

have graphical elements.


Xorg handles communi-
cations with graphical
programs, and it also in-
terfaces with hardware
drivers to make access to
one or more graphics cards
stable in a multiuser/mul-
titasking environment,
providing a wide range
of configuration op-
Igor

tions: transparency,
Korio

tion for writing drivers – to any third hardware-based shad-


nov,

parties except those bound by non-dis- ing and rendering,


123

closure agreements. This secrecy makes


rf.co

it very difficult to write open source


m

drivers for such hardware. These ven-


dors argue that this policy en-
sures a market advantage;
yet, other vendors who
provide open specifica-
tions and good support

L
inux probably has the best overall for Linux compete well,
hardware support because of its often gaining a reputation for
wide application on a variety of well-supported hardware that
devices. However, some hardware ven- is easy to use and widely de-
dors make a strategic choice to avoid re- ployed on a range of electronic de-
vealing their specifications – including vices. Philosophical and political
example code and technical documenta- discussions about proprietary vs.

22 ISSUE 01 UBUNTU USER


Graphics Cards KNow-How

resolution reaches about 1,100 frames


per second in glxgears with the open
source radeon Xorg driver module [3],
whereas on an EeePC 701 (900MHz,
Intel 915GM graphics chipset), the intel
Xorg driver reaches at least 500 frames
per second.

Composite and 3D Support


Composite is the “transparency” exten-
sion that lets the graphics system over-
lap multiple layers, creating an “invisi-
ble” appearance (Figure 2).
Both the ATI Radeon 9800 and Intel
cards I tested ran fine with Compiz, once
Figure 1: Glxgears measures the drawing speed of the graphics system. the necessary AIGLX and Composite ex-
tensions were configured in the Xorg
support for multiple monitors, and direct chipset is fully documented. But a good configuration file /etc/X11/xorg.conf.
communication between the program hint for Compiz Fusion, the well-known Listing 2 shows some of the most com-
and the hardware using a kernel-pro- 3D window manager that features trans- mon options for different graphics cards
vided direct hardware access feature. parent windows, magnification, and needed to get Compiz (and other pro-
This direct and unfiltered access to fancy desktop effects, is the output of grams that use composite effects) to
hardware through Xorg explains why the glxinfo utility (Listing 1), which you work properly. Not all of them are neces-
careful programming of the hardware- can find by installing the mesa-utils sary for each and every card; some of
dependent components, especially the package. these options are now even the defaults
driver modules for various chipsets, is In Listing 1, the line with Direct Ren- on newer Xorg versions and don’t have
crucial for stability of the entire system. dering: Yes is the most significant hint to be present anymore (although their
Locking up the graphics card can result that the card is supported in accelerated presence usually doesn’t hurt).
in an unusable system or even a total mode. After adding these changes, you have
freeze of the operating system. Open Some GLX_ARB... extensions listed in to restart the X server, which will termi-
Source chipset drivers that come with the full output are needed by Compiz, so nate any currently running local graphi-
Xorg are therefore carefully reviewed for direct rendering (DRI) [2] is not suffi- cal desktop sessions and most likely
potential problems by developers, and cient in all cases. However, with DRI, show the login screen again. Before kill-
every now and then, updates are re- chances are good that games that use ing your X server with Ctrl+Alt+Back-
leased that provide new features or im- OpenGL/Mesa will run fine on this card space (without knowing whether your
prove performance. (e.g., tuxracer, neverball, and egoboo). new configuration will work), you can
For measuring the drawing speed of test the changes by starting a second
Acceleration your system, glxgears is a nice tool that’s server on a different console.
Many modern graphics cards provide on- also present in mesa-utils (Figure 1). As root, type
board processing capabilities for graph- Once you start glxgears, it shows an ani-
ics-intensive applications such as 3D mation sequence of gears while it tries to X :1
computer games. Instead of letting the refresh the animation and count the
CPU perform the calculations and trans- frame rate reached in each five-second in a terminal window, which will start a
fer pixels between memory locations, interval. new Xorg session on the next free con-
the graphics card does this independent An ATI Radeon 9800 card on a Pen- sole – you should see a gray grid and the
of the main system with the use of spe- tium II running at a 16-bit 1280x1024 X-shaped mouse cursor. If that works,
cial command sets. This feature is often
called “accelerated graphics.” Listing 1: glxinfo Output
Each chipset has its own command set 01 name of display: :0.0
and access method for acceleration. For 02 display: :0 screen: 0
cards for which vendors provide suffi- 03 direct rendering: Yes
cient information, accelerated open 04 server glx vendor string: SGI
source drivers are available at Xorg, such 05 server glx version string: 1.2
as some of the older ATI Radeon cards
06 server glx extensions:
[1], as well as many Intel-based chipsets
07 GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap,
(especially those that are present in
08 GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
many notebooks and netbooks).
09 GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGI_swap_control,
The degree of available acceleration
10 GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_visual_select_group
varies because not every feature of every

UBUNTU USER ISSUE 01 23


KNow-How Graphics Cards

tion), which is very slow but still better


than nothing.
If you want to run these cards with
support for all their features, your only
option might be to install proprietary
drivers for Linux, downloaded directly
from the hardware vendor’s homepage.
Policies and licenses for these drivers
make it hard if not impossible to directly
integrate them into Linux, and the work
and risk of properly installing them falls
on the user.

Installing nVidia
Proprietary Drivers
Before starting the installer, make sure
no X server is running, which you can
Figure 2: The transparency extension produces some interesting effects. do by switching to runlevel 2 or 3 in
most distributions. Just switching to the
chances are good that your configuration which will give you a 1024x768, 16-bit text console with Ctrl+Alt+F1 is not
is OK. With Ctrl+Alt+Backspace, you framebuffer resolution that will be used sufficient because Xorg running on a dif-
can kill the new X server and do the by the fbdev Xorg driver. On startup, you ferent console is still accessing the
same (for restarting the X login process) will see the Linux penguin logo with a graphics hardware. First you need to
on your first X session; better yet, logout glowing border if highcolor framebuffer stop all login managers (xdm, gdm,
and kill X in the login screen. mode is on. Although this mode works kdm) that might keep Xorg running,
A more Unix-like way to achieve the well with most graphics cards, it is never then you can log in on the console. In-
same effect is to go to runlevel 2 or 3 by accelerated, and the previously men- stalling the nVidia driver with its sup-
typing tioned options for Compiz just won’t plied script requires root permissions,
work. even though not all parts of the configu-
init 2 Try changing the Driver option in the ration process have to run as root.
Device section of xorg.conf to the best The nVidia installer is a self-unpack-
(which is a text console–only runlevel in matching chipset driver, like ati, intel, or ing and self-installing archive that you
most distros) and restart the graphical mga, corresponding to what the lspci can get from the nVidia support home-
session with: command shows as the vendor for the page [4]. If you don’t know the exact
graphics chipset. name of the card, the lspci command
init 5 For nVidia cards, nv would be the free might help. If the card is very new, and
driver, but currently that one will not it just appears as an unknown/unlisted
Also, you need to do this when configur- work in accelerated mode, and it could graphics card, you might look at the Xorg
ing a different chipset driver. cause awful effects like stripes or arti- log file in /var/log/Xorg.log to find out
facts on the screen when the Composite what it is.
Choosing a Different option is enabled. Sometimes these ef- After download, you should have a file
Chipset Driver fects seem to stay forever, unless you called NVIDIA-Linux-x86- … .run, which
If glxinfo reports Direct Rendering: No, completely disconnect the computer you can make executable and run (as
the wrong chipset driver might be con- from the power supply and wait for a root) with:
figured, so check /etc/X11/xorg.conf in while, which seems to reset the internal
the Driver subsection: memory state of nVidia cards. chmod a+x NVIDIA*.run
If you leave out the Driver option, ./NVIDIA*.run
Section "Device" Xorg tries to autodetect the correct chip-
... set on startup, and you get a pretty ver- The installer is self-explanatory. nVidia’s
Driver "fbdev" bose protocol of Xorg initialization in driver installation consists of a kernel
EndSection /var/log/Xorg.0.log, which also tells you module, which has to exactly match the
about supported compared with found installed kernel version and binary ob-
The framebuffer driver for Xorg, fbdev, chipsets. jects for Xorg and library functions.
is the one that always works if every- If you have a relatively new ATI or The kernel module is the most break-
thing else fails, as long as framebuffer nVidia card, the free drivers that come able part of the installation. For some
mode is enabled in your Linux kernel with Xorg might not give you the best kernels, pre-compiled modules are pres-
and possibly activated at startup. performance or support for all resolu- ent in the installer, but chances are that
To enable framebuffer mode, add op- tions. Some cards run only in generic they won’t match your installation, so
tion vga=891 to the kernel boot options, vesa mode (driver vesa in the Device sec- the installer will try to compile a module

24 ISSUE 01 UBUNTU USER


Graphics Cards KNow-How

for your installed kernel during the in- After going back to runlevel 5 (init 5), working C compiler must be installed to
stallation. For this procedure to succeed, or restarting the graphical login/session build the kernel module.
a working C compiler and development manager, the new driver module should (The ATI installer is also capable of
tools like the binutils package must be be active. (To verify this, look for the building a Debian-based package such
present on your system, and the kernel nVidia logo shown shortly before your as those used by Ubuntu, which might
sources matching your installed kernel desktop session starts.) glxinfo should be an easier way of installing the driver
version must also be installed. If this is now show Direct Rendering: Yes. than the file-based method.) After instal-
not the case, the installation will fail. If lation, you can run the command aticon-
the necessary tools are available, a new Installing ATI/AMD fig to reconfigure xorg.conf.
nVidia kernel module is compiled and Proprietary Drivers
loaded. The installer might also add a Like the nVidia driver, the ATI/AMD More Tuning
configuration option to /etc/modules to driver requires a proprietary kernel mod- Depending on the kind of graphical ap-
make sure the module is also loaded at ule that matches your own kernel’s ver- plications you use, different options in
the next startup. sion; however, the ATI installer has a /etc/X11/xorg.conf might provide better
A new nvidia Xorg driver is added to graphical GUI for installation, so you performance, more colors, or sharper
Xorg’s driver module directory and con- won’t need to shut down a running X pictures. Some of the options affect all
figured in /etc/X11/xorg.conf. Check for session. drivers, and others only work with a spe-
the Driver option in the Device section to Start by downloading an installer cific chipset driver. Options that are not
see if the installer has actually activated matching your card from the AMD known to a driver are ignored with a
the new driver. A backup of xorg.conf is homepage; make it executable and run it warning in newer Xorg versions, which
created (it cannot hurt if you have made from the command line as root: is convenient because you don’t have to
a backup on your own before running be extra careful not to break your X
the installer). Although you cannot do chmod a+x ati-driver-U server by mistyping an option.
much here, wait until installation is com- installer-*-x86.x86_64.run Most options are described in detail in
plete. nVidia provides a small utility ./ati-driver-installer-*-U the online manual pages of Xorg or in
called nvidia-xconfig for later reconfigu- x86.x86_64.run Xorg’s driver-specific pages. However,
ration, but the xorg.conf file entries for pay attention to the recommendations
Compiz should also work with the pro- The graphical installer will perfom all on configuring options and parameters
prietary driver (just not with the free nv the necessary steps. Kernel source code because some graphics cards can break
driver). matching your running kernel and a or overheat when “overclocked” beyond
their specifications. It has been a long
Listing 2: xorg.conf Options time since I tried a monitor with a badly
01 Section "Device" chosen resolution. Most LCD displays
02 ... should just cut off signals they cannot
03 Option "DamageEvents" "true"
handle, but playing too much with Xorg
04 Option "DisableGLXRootClipping" "true"
acceleration settings might not gain
enough in performance to justify the
05 Option "XaaNoOffscreenPixmaps" "true"
risk. Naturally, some good hints about
06 Option "AllowGLXWithComposite" "true"
performance tuning come from the game
07 Option "TripleBuffer" "true"
community, so look for useful tips and
08 EndSection
links at websites supported by Linux
09
gamers [5]. n
10 Section "Extensions"

11 ?
INFO
12 # Please do NOT enable this with the "nv" driver, it may
[1] Proprietary drivers for ATI/AMD
13 # put your NVIDIA card in a confused state.
cards for GNU/Linux:
14 Option "Composite" "Enable"
http://ati.amd.com/support/drivers/
15 EndSection
linux/linux-radeon.html
16
[2] Direct Rendering Infrastructure
17 Section "Screen" (DRI): http://dri.freedesktop.org/wiki/
18 ...
[3] Xorg homepage: http://www.x.org/
19 Option "AddARGBGLXVisuals" "true"
[4] Proprietary drivers for nVidia cards
20 EndSection
for GNU/Linux: http://www.nvidia.
21 com/object/unix.html
22 Section "ServerLayout" [5] linuX-gamers.net (with tips for
23 ... Wine/Xorg configuration for various
24 Option "AIGLX" "true" games):
25 EndSection http://www.linux-gamers.net/

UBUNTU USER ISSUE 01 25


KnoW-HoW Ubuntu’s UFW Firewall

Protecting your system with the UFW firewall

Locked down

Stephen Bonk, 123rf.com


Careful users keep an eye on security. Ubuntu’s firewall tools will help you keep intruders off your system.

BY JAMES STANGER

W
hen it comes to security, ently secure – not even Ubuntu. An at- mand-based UFW works quite well as a
Ubuntu offers several advan- tacker might try to scan your system to front end for the powerful set of Linux
tages over a system like Win- identify an open port, and the applica- firewall utilities known as iptables [3].
dows. For instance, Ubuntu’s code is tion listening on a port might have its Although UFW appears to the user as a
open source, which means hundreds own security issues that could lead to complete firewall system, all it really
and even thousands of developers re- compromise. does is provide a slightly easier syntax
view and improve the code. Also, unlike But regardless of how systems or ap- for using the iptables.
Windows, Linux systems don’t have a plications might compare in an abstract The iptables utilities, in turn, operate
registry, a feature that has caused Win- sense, the specific reasons really don’t the Netfilter framework found in any
dows systems to succumb to worms, vi- even matter: Configuring a personal fire- Linux implementation. Netfilter and ipt-
ruses, and various other attacks over the wall is important, and practicing safe ables are complicated enough to scare
years. Linux systems are also loosely in- computing helps you understand your off many end users, so UFW (and its GUI
tegrated, which means just because one system and brings you a bit more peace counterpart GUFW) were created to
subsystem goes bad, the rest of the sys- of mind. bring the benefits of firewalls to the ev-
tem doesn't have to crash or become eryday Ubuntu desktop user.
unstable. Introducing UFW
Although Linux is often considered UFW, which stands for “Uncomplicated Getting Started with UFW
safer than other comparable desktop Firewall,” is Ubuntu’s official firewall To start UFW from any standard Jaunty
systems, no operating system is inher- configuration utility [1][2]. The com- installation, open a terminal window

26 ISSUE 01 UBUNTU USER


Ubuntu’s UFW Firewall KnoW-HoW

and type ufw. As with many of Ubuntu’s


administrative tools, you need to specify
What Is a Personal Firewall?
the root password in order to use UFW: The term firewall usually refers to a device located between an internal network (such as
a home or corporate network) and a larger, less controlled network such as the Internet.
$ sudo ufw enable Although modern firewalls come with a wide range of capabilities, the most basic role of
Firewall is active and U a firewall is to restrict access to the internal network by filtering incoming traffic. A per-
sonal firewall acts much like a network firewall, except that a personal firewall is typi-
enabled on system startup
cally a software-based component residing on a single system.

The result of the preceding command is A personal firewall can block (or, conversely, allow) traffic based on parameters such as
the source IP address, the destination address, or the port number. Services running on
that UFW will run each time your system
your Ubuntu system listen for incoming connections to a specific TCP or UDP port, so
starts.
the port number provides an indication of the an outside connection is attempting to
After issuing this command, you can
reach. See Table 1 for a summary of some common service ports.
then set a default policy:
Many personal firewall can also block or allow traffic based on the network protocol, and
several firewall systems also support logging so that you can keep a record of traffic sta-
$ sudo ufw default deny
tistics and outside access attempts.
Default policy changed to 'deny'
(be sure to update your rules U
accordingly) $ sudo ufw status sudo ufw allow 80/tcp
Rule added
This command tells UFW to deny all The output for this command is shown
ICMP packets, as well as the protocols in Listing 1. The previous examples add rules for all
listed in Table 1, automatically. Then IP addresses. You can get much more
you can proceed to create exceptions to Allowing Specific Ports, specific about which addresses you want
this default closed policy. For example, Addresses, and Ranges to associate with your rules. For example,
the following commands allow connec- So far, the commands have only speci- suppose you have a default closed policy
tions to the SSH, web, and VNC servers fied a port number, not an actual proto- enabled on your personal firewall and
running your system: col. Filtering for the TCP or UDP proto- you want to allow the system at
col is also quite easy: 19.82.44.45 to connect to all ports on
$ sudo ufw allow 22 your local system. To make this possible,
Rule added sudo ufw allow 53/udp you would issue the following command:
$ sudo ufw allow 80 Rule added
Rule added sudo ufw allow from 19.82.44.45
$ sudo ufw allow 5900 The preceding command allows connec- Rule added
Rule added tions to your system’s DNS server, which
listens to UDP port 53 by default. Also, it is possible to specify a range of
You can verify UFW’s status by issuing To allow users to connect to only TCP IP addresses. For example, ICANN, the
the following command: port 80, issue the following command: body that allocates IP addresses on the

Table 1: Common Service Ports


Service Name Description Port Number
FTP File Transfer Protocol server. TCP 20 and 21 (mostly listed as 21)
POP3 The most popular email mailbox protocol. The POP3 server TCP 110
allows you to log in and download your messages.
IMAP Internet Message Access Protocol – A newer, more TCP 143
sophisticated mailbox protocol that is still not as popular as POP3.
SMTP Simple Mail Transfer Protocol – Email protocol used for sending and TCP 25
forwarding outgoing messages
NFS Network File System – Used in Linux and Unix systems to share files TCP and UDP port 2049; also relies on the
and mount remote directories. Portmapper service, which uses UDP port
111
SSH A relatively secure way to access and control a system, usually TCP 22
via the command line. Uses encryption and public-key-based
authentication. You can also use SSH to tunnel unencrypted
protocols.
Telnet An older protocol (mostly replaced by SSH) used to control remote Server listens on TCP 23; you can use a
systems. Telnet client to connect to any port
VNC Virtual Network Computing – Protocol that allows you to log in TCP 5900, by default
to a remote computer and view the remote X Window session as
if you were sitting in front of it.
IPP Internet Printing Protocol – Used to connect printers across networks. UDP and TCP 631.

UBUNTU USER ISSUE 01 27


KnoW-HoW Ubuntu’s UFW Firewall

Default Policy Listing 1: ufw Status Output


You can configure a personal firewall to take one of the following default 01 Status: active

configurations: 02

• Default open 03

04
• Default closed
05 To Action From
UFW allows you to choose the default stance. I follow conventional wis-
06
dom and choose the default closed configuration, because it’s generally
07 -- ------ ----
better to disallow everything and then permit only specific traffic. The
advantage to this policy is that you have granular control over the types 08

of connections your system allows. 09 22 ALLOW Anywhere

10
The disadvantage is that you might inadvertently block connections to
your system and will have to spend time creating exceptions to this de- 11 80 ALLOW Anywhere

fault policy. But as you will learn in this article, creating these exceptions 12

is relatively easy. 13 5900 ALLOW Anywhere

Internet, created some ranges of private For instance, you can specify that your ple, to remove the rule allowing SSH,
IP addresses that can’t be routed on the UFW personal firewall system will allow issue the following command:
Internet. These addresses are often as- no more than six connection attempts
signed by DHCP servers operating be- over a period of 30 seconds. $sudo ufw delete allow 22
hind a firewall. Limiting the number of connection at- Rule deleted
To allow all of the RFC 1918 “private tempts can help you thwart the follow-
IP” addresses to access your system, you ing types of attacks: If you want to change the default stance
would issue the following commands: •฀ Scanning:฀If฀connections฀are฀limited,฀ of your firewall, simply issue the follow-
scans are less accurate. ing command:
$ sudo ufw allow from 10.0.0.0/8 •฀ Denial฀of฀service:฀A฀denial฀of฀service฀
rule added attack involves sending floods of pack- $ sudo ufw default allow
$ sudo ufw allow from U ets or malformed packets to a host in
172.16.0.0/12 the attempt to either crash the system However, understand that all of the ex-
rule added or overwhelm it. Limiting connections isting rules you have created will still
$ sudo ufw allow from U can help the system ignore flooding at- exist, so it is best if you stick with a de-
192.168.0.0/16 tempts. fault deny policy, then create rules to
rule added •฀ Brute฀force:฀A฀brute฀force฀attack฀is฀ allow specific traffic.
where an attacker repeatedly tries to
Of course, you can specify any IP ad- guess a user name or password combi- GUFW
dress range you like. nation. Limiting connections causes a Operating your firewall from the com-
reset to occur, causing the attacker to mand line gives you the most control
Limiting Connections take far longer to find a successful over your personal firewall, but you
One of the more powerful features of username/password combination. don’t have to use the command line if
UFW is the ability to limit connections. To enable connection lim-
iting, use the following syn-
Won’t It Block All Access? tax:
Many users won’t enable a personal
ufw limit service_name/ U฀
firewall because they’re afraid they then
protocol
won’t be able to visit their favorite video
site or download programs. That’s really
not going to happen. The developers For example, to limit connec-
who create personal firewall software tions for your web server,
are very smart; they know that you want you could issue the following
to get out to all the good stuff on the In- command:
ternet. They also know there are plenty
of bad guys who are trying to get into $ sudo ufw limit www/tcp
your computer.
rule added
The personal firewall software generally
blocks incoming access to your system;
it won’t hamper your ability to go out Removing a Rule
and find what you want. Unless, of
If you want to remove a rule,
course, you specifically tell it to.
specify the port. For exam- Figure 1: UFW, showing a simple firewall configuration.

28 ISSUE 01 UBUNTU USER


Ubuntu’s UFW Firewall KnoW-HoW

GUFW, go to Edit | Preferences, start GUFW, then go to Edit | Preferences


and then select the Enable ufw to open the Preferences dialog box,
logging checkbox. shown in Figure 3.
To enable logging from the Under the System Settings section, se-
command line, enter: lect all three checkboxes, as shown. Next
time, when you boot your system and
ufw logging level log in, GUFW will be running automati-
cally, nicely tucked way in your status
If you use the GUFW or the bar.
ufw command to turn logging Once you have created a rule set that
on without any arguments, the you like, you might want to save a
logging level will automatically backup. To do so, go to File | Export
be set to low. To set the level rules, and then save the configuration as
to full (the highest level of log- a simple text file. Then you can load this
ging), issue the following com- configuration back into your system – or
mand: onto another system – by going to File |
Import rules.
Figure 2: Specifying advanced port features in GUFW. $ sudo ufw logging full
logging enabled Conclusion
you don’t want to. Jaunty provides a My advice to you is to play around with
fairly robust GUI application known as Specifying the full or even the high set- this firewall a bit. One person’s perfect
GUFW (Figure 1). To access GUFW, go to ting will cause your system to firewall is another’s per-
System | Administration in the Ubuntu log an enormous amount of fect nightmare. I guess
main window, then select Firewall con- connections, which might fill that’s why they call it a
figuration. Just as with UFW, you will up your hard drive. I recom- “personal firewall.”
need to provide your root password to mend specifying low logging, If I could propose a
launch GUFW. which is the default. one-size-fits-all solution,
Logging isn’t just an all or I'd offer up a text file you
Getting Started with GUFW nothing proposition. You could just import into the
Once you’ve launched GUFW, you will might want to log only spe- firewall, and you'd be
see that three tabs are available: cific connections. The follow- Figure 3: Setting up finished.
•฀ Simple:฀Allows฀you฀to฀add฀a฀particular฀ ing command tells ufw to log GUFW to run automati- But it really doesn’t
port number or service quickly. connections to your VNC cally in Jaunty. work that way for a cou-
•฀ Preconfigured:฀Instead฀of฀requiring฀ server (port 5900): ple of reasons. First of all,
you to specify a service, GUFW pro- your needs are different than mine. Sec-
vides a ready-made list for you. ufw allow log 5900/tcp ond, it’s important for you to take re-
•฀ Advanced:฀Allows฀the฀creation฀of฀more฀ sponsibility over your computer and
sophisticated rules, including source The following command disables all log- customize it for your needs. If you work
and destination ports and IP ad- ging: on learning these settings, we’ll all be
dresses. one step closer to a safer Internet. ■
Figure 2 shows how you can add an ad- $ sudo ufw logging off
vanced rule that denies both TCP and logging disabled INFO
UDP traffic from the system at IP address [1] The Ubuntu UFW Wiki: https://wiki.
10.168.1.8 to the local system. Some Final Tips ubuntu.com/UbuntuFirewall
Most users configure GUFW to start [2] The Ubuntu UFW Forum:
Logging when they log on to the GUI desktop http://ubuntuforums.org/
Logging is a vital function of any per- system. To ensure that this happens, showthread.php?t=823741
sonal firewall. To enable logging in [3] Netfilter/iptables:
Other Firewalls http://www.netfilter.org/
Sidebar: Installing UFW If you don’t want to use UFW, you don’t [4] The GUFW home page:
and GUFW have to. Other firewall creation utilities http://gufw.tuxfamily.org/index.html
have existed for years, including IPCop [5] IPCop: http://www.ipcop.org
If, for some reason, UFW and GUFW
[4], SmoothWall [5], Endian [6], or Arno-
aren’t installed on your Ubuntu system [6] SmoothWall:
iptables [7]. Some of these products are
by default, make sure that the Universe http://www.smoothwall.org
pretty robust and provide more features
repository is enabled, and then issue the [7] Endian: http://www.endian.com
than a typical end user really needs.
following commands:
Still, it’s good to know about these tools [8] Arno-iptables:
sudo apt-get install ufw in case you ever need to use them in the http://freshmeat.net/projects/
sudo apt-get install gufw future. iptables-firewall/?topic_id=151

UBUNTU USER ISSUE 01 29


KNoW-HoW Wine

Running Windows programs on Ubuntu with Wine

Wine importer

Shanna Korby, Fotolia


Users who move from Windows to Ubuntu often miss some of their favorite programs and games. Wouldn’t

it be practical to run Windows applications on the free Ubuntu operating system? Time for a little taste of

Wine. BY TIM SCHÜRMANN

M
any Ubuntu migrants miss to develop something similar for Linux. Box or VMware, Wine does not emulate
games and graphics programs A short while later, the first version of a whole PC and thus cannot be consid-
such as CorelDRAW or prod- Wine was released. Today, more than ered a real emulator. This also explains
ucts such as Adobe Photoshop. The only 300 volunteer programmers from all over the name Wine, which means Wine Is
solution is to install Windows parallel to the world continue to contribute to the Not an Emulator.
Ubuntu – or try Wine, which tricks ap- Wine project. Because of the way Wine works, it of-
plications into believing they are run- fers a number of advantages. Chiefly,
ning on a Windows system. What’s in a Name? you do not need an expensive Windows
The history of Wine goes back to the To run Windows programs on Ubuntu, license. Programs will run almost as fast
year 1993. At the time, Sun developed a Wine uses a fairly complex trick: It sits as on the Redmond operating system,
small tool to run Windows applications between the Windows application and and windows behave as if they belong
on its own Solaris operating system, Ubuntu like a simultaneous interpreter. to a native Ubuntu program.
without the need for a Windows license If the Windows application says: “Draw An interpreter can only be as good as
or other interaction. This software in- a button,” Wine passes this command its knowledge of the two languages, and
spired Bob Amstadt and Eric Youngdale directly to Ubuntu. In contrast to Virtual- therein lies the problem: Because Micro-

30 ISSUE 01 UBUNTU USER


Wine KNoW-HoW

program fared in tests per-


formed by Wine users. The
Platinum rating is only
awarded if a program runs
without errors and without
any impairment to func-
tionality on Wine. A cou-
ple of older CorelDRAW
versions have made Gold
status; the current X4 ver-
sion refuses to cooperate
entirely (Garbage). Adobe
Photoshop CS2 will run
more or less as the makers
intended, whereas the cur-
rent CS3 version has
reached only Bronze status.
Things are even worse in
the case of Adobe Illustra-
tor. As a rule of thumb, the
older a program is, the bet-
ter your chances are of get-
ting it to work.

Figure 1: The Wine database lists numerous applications that run on Wine – for example, the CorelDRAW A Wrench in the
graphics package. Works
Clicking on a program ver-
soft refused to release details of its oper- cannot revitalize hardware with Win- sion tells you exactly what the trouble is.
ating system until just recently, Wine de- dows-only driver support. A new window appears with details of
velopers were forced to adopt a trial and what does and doesn’t perform as ex-
error approach. Such a method involves Preparation pected. In addition, user reports at the
time-consuming, painstaking work, and Before you fire up your package manager bottom and tips for talking the program
considering the multiple-gigabyte operat- and launch into the Wine install, you into cooperating can be very useful. The
ing system monster they were facing, it might want to take a look at the appli- steps this requires, some of which are
was very much a labor of Sisyphus. On cation database on the Wine homepage very complex, are something you should
top of this, some software manufacturers [1]. This database summarizes the level not attempt unless you are an experi-
use some pretty nasty programming of support for various Windows
tricks, and if you want to talk these ap- programs: whether or not they run
plications into running on Ubuntu, Wine on Wine and, if so, how well be-
needs to know these tricks. Unfortu- haved they are. To access the data-
nately, most software vendors keep this base, go to the Wine homepage
kind of information safely under lock and, from among the tabs at the
and key. top, click AppDB. In the AppDB
Despite years of work, then, Wine is area on the left, select Browse
still officially under development, and Apps, go through the drop-down
most of the work taking place now is list labeled Category until you find
going into the fields of multimedia, the category and application you
video, and 3D graphics. This said, Wine are interested in, and click on
does support DirectX 8 and 9 quite well Update filter. CorelDRAW and
by now. The developers started work on Photoshop are hidden below Mul-
the tenth incarnation of this critical timedia | Graphics | Graphics Edit-
graphics interface for games last year. ing, for example. Alternatively,
An additional limitation is that Wine can use the search function to find
only handle very simple 32-bit Windows your application in the database.
applications, although improved support If you decide to investigate
for 64-bit software is being worked on CorelDRAW, you are taken to the
even now. page shown in Figure 1, where
Wine has another disadvantage: It can you will find ratings for different Figure 2: This window shows you the current Wine
only handle Windows applications; it versions that tell you how well the settings.

UBUNTU USER ISSUE 01 31


KNoW-HoW Wine

Figure 3: Start the Windows application installation file using Wine. Figure 5: Installing WinRAR with Wine.

enced Ubuntu user. In some cases, pro- Launch System | Administration | Synap- The Wine Configuration tool will then
grams refuse to work because Internet tic Package Manager, enter your pass- go on to create a hidden .wine directory
Explorer is missing; for example, Lex- word in the resulting dialog, then type below your home directory. The soft-
ware accounting software relies on Inter- wine in the search box and click Search. ware uses this directory to store the
net Explorer for some operations. In the list of results, mark the wine entry basic configuration, which you can see
If your application is still listed as bro- for installation. Synaptic will present a in Figure 2. Right now, do not modify
ken in the database, you should check list of additionally required changes. anything here, but click Cancel to close
the test date (in Test Results). If the test Now confirm these with Mark and start the tool.
was a while back, you might want to ex- the installation by clicking Apply.
periment yourself. Wine continues to Installing a Windows
mature, and it is conceivable that your Preparations Program
application has been taken care of. Wine integrates with the desktop start To take Wine for a test run, download
Once you have established that your menu. To launch Wine, click on Applica- the WinRAR packer [2], then open the
Windows application is likely to run on tions | Wine | Configure Wine. file manager. Next, locate the file and
Wine, you need an installation disc for
the Windows application. Although
Wine is free of charge, you need a valid
license for the Windows application.

Installation
Wine is included with Ubuntu and you
can retrieve it from a repository. First,

Figure 4: Choose "Open With" and select


"Wine Windows Program Loader" for Win-
dows applications. Figure 6: The Windows application WinRAR running on the Ubuntu desktop.

32 ISSUE 01 UBUNTU USER


Wine KNoW-HoW

start the installer by double-clicking on


it. Alternatively, choose Open with
"Wine Windows Program Loader" from
the context menu, which opens after a
right-click on any file (Figure 3).
In WinRAR’s case, the self-extracting
file wrar380.exe automatically executes
the installer. In other cases, you might
need to look for the installer for the Win-
dows application in an archive file: It
will typically be setup.exe, or autorun.
exe.
If Wine does not launch automatically Figure 8: Wine has a graceful approach to uninstalling Windows programs.
after double-clicking on the installer, you
should choose Open with Other Applica- entries as a convenient method for around: Each drive letter maps to an
tion... (Figure 3), then choose Wine launching the Windows program. Ubuntu directory. Although a Windows
Windows Program Loader in the window program running on Wine thinks it is
shown in Figure 4. Now you just need to Tell Me Your Name storing data on drive C:, it is writing to a
click Open. By default, Wine stores Windows pro- subdirectory called .wine/drive_c below
Wine takes over in the background grams that think they are installing on the home directory. The Wine control
and launches the Windows program. drive C: in a hidden subdirectory below center shows which letter maps to which
Just follow the normal steps to install your home directory. To display the hid- directory. First choose Applications |
the program. Although I talk about Win- den files, select View | Show Hidden Files Wine | Configure Wine or type winecfg
dows drive letters in the next section, for in the Nautilus file browser, then change in a quick launcher (Alt+F2). Then visit
now, confirm the default installation di- directory to .wine in your home direc- the Drives tab (Figure 7). The list at the
rectory suggested by the application tory. One level below is a drive_c subdi- top shows you which drive letter maps
(Figure 5). If any installer asks you to re- rectory and below this, Program Files to which Ubuntu directory. Normally, C:
boot Windows, press Alt+F2, type wine- and Windows. The former contains the maps to .wine/drive_c, and Z: lets the
boot, and click Run. This tells Wine to application you just installed. After the Windows application access the whole
simulate a Windows reboot. Figure 6 WinRAR installation, it will contain a directory tree because it maps to the root
shows how a Windows program looks folder with this name with all the appli- directory. Here, you can Add mappings
running in Wine. If Wine does not cation files. To start WinRAR, double- by defining new virtual drive letters and
launch the Windows program, check out click the file WinRAR.exe in its folder. typing the Path to which the letter
the “Dead as a Dodo” box. Also, you can run Windows applications should point.
If the installation program creates one from a terminal window by entering
or multiple entries in the start menu, wine and the executable’s file name. VistaXP 98
Ubuntu places them below Applications Some Windows programs require the
| Wine | Programs. If so, you can use the Directory Jungle characteristics of a specific version of
Unlike Windows, Ubuntu does not use Windows. The Applications tab can help
drive letters, so Wine must use a work- you cater to this.

Dead as a Dodo
If a Windows program fails to launch when need (in WinRAR’s case, this is /programs/
you click it, some manual attention might other/winrar). When you get there, type
make it see reason. To start, open a termi-
wine file
nal window. Then, select Application | Ac-
cessories | Terminal in the start menu. Now replacing file with the name of the appli-
type cation you want to run, say, setup.exe.
cd directory
Make sure you stick to the exact spelling,
remembering that upper- and lowercase
where directory represents the full path to
letters are vital. To tell Wine to run the
your installation program. If the setup.exe
Windows program, press Enter again.
file is on a DVD, you can access the DVD
via the /media/ path. The command line If you experience difficulty launching
looks like this: the program, check the terminal window
cd /media/DVD_name
for error messages – you should not
close the terminal window or you will
In this command, replace DVD_name with
terminate the Windows program running
the entry in your media directory, then
in it. If the Windows program crashes,
climb down the directory tree until you
Figure 7: The Drives tab lets you map Linux you can try relaunching it.
find the directory with the .exe file you
directories to drive letters.

UBUNTU USER ISSUE 01 33


KNoW-HoW Wine

tions | Wine | Uninstall Wine Software


or press Alt+F2 and type uninstaller.
Now you should see the window in Fig-
ure 8. When you get there, select the
software you want to delete and click
Uninstall.

Conclusions
Wine is not a panacea, and many major
programs still refuse to cooperate. Your
best chances are with games (see Fig-
ures 9 and 10), but you might need to do
without popular accounting packages,
CorelDRAW, the latest version of Photo-
shop, or iTunes, for example.
A better alternative might be to look
around for an Ubuntu program that pro-
vides similar functionality. In the case of
Photoshop, why not try GIMP or Krita?
And OpenOffice has long been a more
than adequate replacement for Micro-
soft’s Office suite. If you check out the
list of packages in your distribution’s
Figure 9: Some Windows games, such as Adventure Runaway, … package manager, you might be sur-
prised at the number of comparable pro-
For each application, you can individ- applications, unless you define an grams, or even programs with superior
ually define the Windows version that exception. features, that Ubuntu offers. n
Wine should emulate. To do so, click
Add application and look for the execut- Garbage Collection Apps Gone Bad
able for your application (in .wine/ To get rid of a Windows application you The Wine MIT license gives users many
drive_c). have installed on Ubuntu, you might privileges, a fact that has helped Trans-
Now click Open, select the application think it would suffice to delete the corre- Gaming generate huge profits. Trans-
in the list, and then select the required sponding directory below .wine/drive_c/ Gaming just grabbed the package,
version of Windows in the Windows Ver- Program Files. added DirectX capabilities, which are
sion drop-down list. The configuration in However, Wine will still list the appli- required for gaming, and started to sell
Default Settings is valid for all Windows cation as installed. Instead, run Applica- the results as Cedega [3] (formerly
WineX). The Wine developers were un-
happy about this, and thus changed the
licensing terms to the LGPL in March
2002. The LGPL ensures that you can
continue to use Wine for commercial
purposes, but that changes and addi-
tions must be given back to the project.
CodeWeavers is exemplary in this re-
spect; the company bundled Wine with
its own commercial components to
create the CrossOver [4] package, while
actively promoting the ongoing devel-
opment of Wine.

INFO
[1] Wine Project homepage:
http://www.winehq.org
[2] WinRAR archiver homepage:
http://www.rarsoft.com
[3] Cedega website:
http://www.cedega.com
[4] CrossOver Linux: http://www.
codeweavers.com/products/cxlinux/
Figure 10: … run on Linux thanks to Wine.

34 ISSUE 01 UBUNTU USER


Expert Touch
Linux professionals stay productive at the Bash command line – and you can too. The Linux
Shell special edition provides hands-on, how-to discussions of more than 300 command-line
utilities for networking, troubleshooting, configuring, and managing Linux systems. Let this
comprehensive reference be your guide for building a deeper understanding of the Linux
shell environment.

You‘ll learn how to:


■ Filter and isolate text
■ Install software from the
command line
■ Monitor and manage processes
■ Configure devices, disks,
filesystems, and user accounts
■ Troubleshoot network
connections
■ Schedule recurring tasks
■ Create simple Bash scripts to
save time and extend your
environment

The best way to stay in touch with


your system is through the fast,
versatile, and powerful Bash shell.
Keep this handy command refe-
rence close to your desk, and learn
Sergey Galushko, 123RF

to work like the experts.

S S T A N D !
Y OU R NE W
IL A B L E A T LINUXPROMAGAZI N E . C O M / SPECIAL
AVA
RDER O N L I N E AT WWW.
OR O
Know-How Building a Website

Tools and techniques for building a website

New Pages
Mi
ka
el D
am
k
ier
, Fo
tol
a i

With readily available Ubuntu tools, you can create and post your personal websites to a server. We’ll show
you how to get started. BY JAMES STANGER

S
ophisticated corporate sites in- want to start building your own website, and all of the other elements of a solid
clude content management tools, the free tools available through the website.
server-side scripting, and back- Ubuntu repositories provide all you need Even if you’re a beginner, Ubuntu’s
end database systems, but if you just to create web pages, podcasts, graphics, Jaunty Jackalope supports the applica-

HTML Editors
Cream elements, conducts validation, and per- uploads, link validation, and other sophisti-
Cream is a terrific little text editor. Based forms many other functions. cated features in addition to basic HTML
on vim, Cream is an X Window application • YSlow [3]: Shows you exactly how long editing. The user-friendly Quanta Plus or-
that makes it easier for people who want to your page will take to download. ganizes HTML code in an intuitive way. For
get right into the code. If you can use any • SenSEO [4]: Gives you hints and tips for instance, you can select tags from a conve-
standard Windows application, you can making sure the pages you create are op- nient drop-down menu.
use Cream. timized for the search engines . Kompozer
To install it, make sure you have the stan- If you use Firebug, you get the best of both If you just want a WYSIWYG editor that op-
dard Jaunty Universe repositories enabled worlds: a strong text editor and a quasi- erates more or less like a word processor,
and type the following: WYSIWYG editor. Also, you really don’t the best option might be Kompozer [7].
sudo apt-get install cream need to install any other applications. Formerly known as NVU, Kompozer is
Bluefish easy to use, and it sports some relatively
Cream only takes up about 2.5MB of disk
If you find that using a straight text editor sophisticated features, such as a CSS edi-
space on my standard Jaunty system.
such as Cream is too technical, Bluefish [5] tor and JavaScript console.
Firefox Add-ons is a nice alternative. Bluefish (Figure 2) is a Also, you can put Kompozer into “code
The Firefox web browser can serve as a so- full-featured HTML editor that provides mode,” wherein the application appears
phisticated development environment, as features such as spell checking, linking to much like a text editor. An intermediate
long as you install the correct add-ons. style sheets, and automatically launching “tag mode” is also available. Tag mode is
Some of my favorites are: various browser types for validation. helpful because it shows you where each
• Firebug [1]: Turns Firefox into an HTML Quanta Plus of the HTML tags occur on a page. Double-
editor. Quanta Plus (Figure 3) [6] is a KDE-based clicking on a tag allows you to edit the
• Web Developer [2]: Inspects all web page application that offers image maps, CVS code.

36 ISSUE 01 UBUNTU USER


Building a Website Know-How

Figure 1: The directory structure of a typical


web development environment.

tions you need to be creative and build a


personal web presence.

The Big Picture


The task of developing a website gener-
ally includes the following steps: Figure 2: Editing an HTML file in Bluefish.
1. Create the HTML from a template.
2. Add images. specify a font, a link, an image, or an in- see the article on package management
3. Test, review, and validate your work. struction related to the page layout. in the Discovery guide.
4. Post your work on a staging server, A full tutorial just on HTML would re-
and then on the production server. quire a whole book. Several excellent Establishing a Development
The web page that appears in your HTML tutorials can be found online. For Environment
browser as a single, unified image might the purposes of this article, though, As you begin building your website, it is
actually consist of several files, including keep in mind that you no longer have to a good idea to create separate directories
digital images, scripts, and Hypertext hand-code HTML tags into text files. for your HTML pages, images, and
Markup Language (HTML) files. Ubuntu supports several web editing scripts (Figure 1). Organizing your files
As you probably know, HTML is the tools that let you work with the page as into a discrete, well-defined directory
markup language at the center of the it will appear to the viewer – without structure helps ensure that your pages
World Wide Web. An HTML file is a text getting hung up in the details of HTML. will render properly in a web browser
file with a set of additional codes called The box titled “HTML Editors” de- after they’ve been transferred to a web
tags that define how the file will appear scribes some editing tools available for server system.
in a browser window. An HTML tag can the Ubuntu environment. These tools Rather than working on a live Internet
serve the role commonly associated site, most developers do their web devel-
Listing 1: HTML Template with tools such as Adobe DreamWeaver opment and testing on a staging server
01 <!DOCTYPE html
in Windows and Macintosh environ- that is as close as possible to the final
02 PUBLIC "-//W3C//DTD XHTML
ments, except most of Ubuntu’s tools web server environment. Working on the
1.0 Transitional//EN" are available for free through the staging server lets you review and debut
03 "http://www.w3.org/TR/ Ubuntu repositories. For more on find- code in a nearly real environment, but if
xhtml1/DTD/xhtml1-transitional. ing and installing software in Ubuntu, you make a mistake, the general public
dtd">

04 <html xmlns="http://www.
w3.org/1999/xhtml" xml:lang="en">

05 <head>

06 <meta name="Keywords" content="CIW,


Foundations, Example"/>

07 <meta name="Description"
content="For the CIW Foundations
Course"/>

08 <meta http-equiv="Content-Type"
content="text/html;
charset=utf-8"/>

09 <title>XHTML Template</title>

10 </head>

11 <body>

12 This is an XHTML file. It validates


to the XHTML 1.0 Transitional
standard.

13 </body>

14 </html>
Figure 3: Editing an XHTML page in Quanta Plus.

UBUNTU USER ISSUE 01 37


Know-How Building a Website

Figure 4: Entering a repository in Synaptic.


If the APT line is too long for the box, just
keep typing.

won’t see it. Once you are satisfied with


the web pages, you can upload the direc-
tories to a production server.

Templates and HTML


Whenever I create a web page, I always
start with a standard template file. The Figure 5: Kompozer opens in WYSIWYG mode.
template file contains standard informa-
tion that allows me to create a consistent including good old HTML 4.01. Just pick face, so you’ll have to add it. If you’re
set of pages. Listing 1 shows a bare- a standard and use it consistently. comfortable working from the command
bones HTML template. As you can see, Because an HTML file is essentially a line, you can use the apt-get utility. If
the template provides a standard form text file, you can create and edit HTML not, you can add Kompozer through the
for calling out parameters such as the files with an ordinary text editor, such as Synaptic package manager.
HTML version, the language, and the vim, emacs, or the gedit editor available To open Synaptic, choose System | Ad-
character set. Other statements let you through Ubuntu’s user interface (Acces- ministration | Synaptic Package Manager
designate keywords and descriptive text sories | Text Editor). A pure text editor, in the Ubuntu main window. To access
that will be associated with the site. however, doesn’t check your code or Synaptic, you’ll need to enter the admin-
The very simple template shown in provide any particular coding advice. istrative password (the password you de-
Listing 1 provides only a fraction of the An HTML editor is specifically de- fined when you installed the system).
possible options, but it is a good begin- signed for the task of creating web In the Synaptic main window, choose
ning. If you are looking for a more so- pages. HTML editors inform you about Settings | Repositories and select the tab
phisticated alternative, try the Open the quality of the code you’re entering. labeled Third-Party Software. In the Soft-
Source Web Design [8] or Open Source An HTML editor will also make it easy ware Sources dialog box, click the Add
Templates [9] websites. for you to insert standard HTML tags. button. Synaptic will prompt you to
The !DOCTYPE statement, which Several HTML editors are available for enter the APT line. Enter the following
specifies the HTML standard, is an im- Ubuntu, and the ideal choice is often a (as shown in Figure 4):
portant element of the template. Often matter of personal taste (refer to the box
I’m asked which version of HTML or labeled “Choosing an Editor”). deb http://ppa.launchpad.net/ &
XHTML people should use. Although I giuseppe-iuculano/ppa/ &
prefer XHTML 1.0 Transitional – it is Kompozer ubuntu jaunty main
supported by the majority of web brows- For this article, I’ll focus on setting up a
ers, is perfect for data-oriented social page using Kompozer. The other editors Next, click the Add Source button to add
networking applications, and is rela- are similar – see the documentation for the repository, then close the Software
tively current – to be honest, you can your own editing tool. Kompozer doesn’t Sources dialog box and click Reload in
choose any version of HTML you want, appear in the default Ubuntu user inter- the Synaptic main window. Synaptic will

Choosing an Editor
A few important qualities to look for in an editing tool include:
• Standards compliance: An HTML editor should support open stan-
dards and make it easy to choose a standard, from HTML 4.01 to
XHTML 1.0 Strict and beyond.
• Cascading Style Sheets (CSS) support: CSS is a method for adding
style elements to web pages. As you advance to more sophisticated
web development assignments, your job will be much easier if
you’re using an editor that supports CSS.
• File publishing: A good HTML editor should provide a means for up-
loading web pages to the server with a minimum of fuss.
• Ease of use: An application that gets you up and running quickly
might be worth the sacrifice of multiple feature sets. Figure 6: Creating a new document in Kompozer.

38 ISSUE 01 UBUNTU USER


Building a Website Know-How

in some text, you can also apply format-


ting, including bullet points, headers,
and so forth. To add bullets, create three
new lines of text, then highlight them
and go to Format | List | Bulleted.
The list you’ve just created is now bul-
leted, as shown in Figure 7.
As you explore the Kompozer menus,
you will find other options for aligning,
resizing, and italicizing text.

Adding an Image
Most web pages include graphic images
as well as plain text. With the use of an
image processing tool, you can add a
photo image or create a graphic element
for the site. GIMP is a popular graphics
tool that is accessible through the
Ubuntu Applications menu (Applica-
tions | Graphics | GIMP Image Editor).
For a quick look at how to build a sim-
ple graphic header for your website, see
Figure 7: Creating a bulleted list in Kompozer. the sidebar titled “Creating a Simple
Header Bar.”
add the contents of the repository to the cleared up by the time you read this, but To add an image in Kompozer, place
package list. the Ubuntu forum has posted some in- your cursor in the document where you
If the reload is successful, enter kom- formation for early adopters [10]. want the image to reside. For example,
pozer in the Quick Search box. When place the cursor near the top of the page.
kompozer appears in the package list, se- Creating a Document and Then, choose Insert | Image, and browse
lect the checkbox to add the package Formatting Text to an image you have previously created
and click the Apply button. Synaptic will To begin a new document in Kompozer, and saved.
add Kompozer to your Ubuntu system. choose File | New. Now you’ll be pre- Now enter the location of the image
(For more information on adding new sented with the Create a new document and some alternative text that describes
applications to your Ubuntu system, see or template box. To create an XHTML 1.0 it. The alternative text helps search en-
the article on adding packages in the Transitional document, edit the dialog gine bots organize the information on
Discovery guide.) box so that it looks similar to the box the site, which could increase the search
shown in Figure 6. rank for the page. Also, screen reading
Lauching Once you click Create, you’ll then be tools use the alternative text to describe
On standard Ubuntu systems, Kompozer presented with a blank document. Just the contents of the image to visually im-
will not appear automatically in the start typing inside the document as you paired users. Once you have inserted the
menu once you add it. To start Kom- would any word processor. As you type image, it will appear in the Kompozer
pozer, launch a terminal window by se-
lecting Applications | Accessories | Termi-
nal in the Ubuntu main window and
type kompozer (all lowercase – remem-
ber that Ubuntu is case sensitive) at the
command prompt. Kompozer starts with
the user-friendly interface shown in Fig-
ure 5. Note: Some early versions of
Jaunty have experienced issues with
Kompozer. These issues will likely be

Spell Checking
Right now, Kompozer doesn’t have a
good spell checking feature. If you’re
stumped for decent spell checking in
Kompozer, consider copying and past-
ing text from Kompozer into OpenOf-
fice. Figure 8: A web page in Kompozer after inserting an image.

UBUNTU USER ISSUE 01 39


Know-How Building a Website

troubleshooting ben- If your code has any compliance is-


efits of validation, sues (and often it does), you will see a
validated pages ren- list of errors. Troubleshooting these er-
der better in more rors takes quite a bit of time because the
browsers, and search W3C service is not particularly intuitive
engines tend to give with its hints and directions. Neverthe-
validated pages a less, validation is an important step in
higher rank. ensuring that your web page will load
Various applica- properly in a variety of browsers.
tions and services are But don’t be happy just because your
available to help you pages validate: It is also important to
get your code to pass check the pages directly by opening
W3C muster, includ- them in a variety of web browsers.
ing The W3C Markup
Validation Service Getting to the Server
[11], Weblint [12], Once you have created and tested your
Figure 9: Inserting a link in Kompozer. and Firefox add-ons web page, it is time to post it on the stag-
such as Relaxed [13] ing server. In most cases, you won’t be
window, as shown in Figure 8. If the and Total Validator [14]. building your own whole new server but
image doesn’t appear, try viewing the To validate your web page with the instead will be uploading files to an ex-
code in a browser by clicking on the W3C Markup Validation page, point your isting server system. Many Internet pro-
Browse button. web browser to http://validator.w3.org. viders offer a small amount of web
The Validation page gives you the server space for subscribers, and most
Hyperlinks choice of entering a URL to a website or companies have access to servers that
Hyperlinks are the live links familiar to uploading a file. Because you haven’t support a permanent web presence.
all web users. If you click on a link, the published this page yet, I’ll assume that If you want to use the Apache web
browser jumps to another web page or you’re going to upload a file. As shown server included with Ubuntu to test and
marker. To insert a hyperlink in Kom- in Figure 10, click on the Validate by File experiment with your HTML files, issue
pozer, first highlight the text you want to Upload tab, then click on the Browse the following command to start Apache:
turn into a link, then either click on the button.
Link button or go to Insert | Link to To check a file, highlight it, click Open sudo /etc/init.d/apache2 start
bring up the Link Properties window. to return to the W3C page, then select
Next, click on the Advanced Edit button Check. If your page was created with The /var/www/ directory is the default
to bring up the Advanced Property Edi- proper HTML or XHTML code, you will location for all files on the web server.
tor window, shown in Figure 9. see a screen similar to that shown in Fig- All you have to do is place any file you
In the Attribute field in the lower-left ure 11. want the server to render in this direc-
portion of the window,
use the drop-down box to
select href (the attribute
associated with a hyper-
link). Then, in the Value
field, enter the URL you
want to link to.
To return to the page to
see that the text you’ve
highlighted is now a hy-
perlink, click the OK but-
ton twice.

HTML Validation
After you finish creating
your web page, you’re
still not ready to post it.
First you need to prove
that the code you gener-
ated is compliant with
the World Wide Web
Consortium (W3C) stan-
dards. In addition to the Figure 10: Choosing a file for validation.

40 ISSUE 01 UBUNTU USER


Building a Website Know-How

tory. To place files in


this directory, you need
root privileges.
The default document
is index.html. The
server will automati-
cally present this file to
anyone who points
their web browser at
the server instance, so
web developers typi-
cally give this name to
the file that will serve
as the homepage.
One popular way to
copy the web files to the
server is by entering the
cp command in a termi-
nal window:

sudo cp -r U฀ Figure 11: HTML code that has passed validation.


projects/* /var/www
sary information in the Publish Page ings out there about web design. Sites
Because the root account owns the /var/ window, you are on your way to pub- such as ciwcertified.com, how-to-build-
www/ directory, you need to use the lishing the site. websites.com, and others can provide
sudo command. you with excellent ways to further your
If you need to send the files across the Conclusion skills. n
Internet, you can use ftp or even email Ubuntu provides a powerful, free devel-
to deliver the pages to the server. opment platform for building websites. INFO
Most HTML editors have a feature that In today’s economy, the tools described [1] F
irebug: https://addons.mozilla.org/
lets you publish your site directly to the in this article are more than enough for en-US/firefox/addon/1843
web server from within the editor. This even a seasoned developer to create com-
[2] W
eb Developer: https://addons.
feature is basically nothing more than an pelling, industry-standard web pages. mozilla.org/en-US/firefox/addon/60
ftp client that you can configure to pub- The next step for you to take is to fin-
[3] Y
Slow: https://addons.mozilla.org/
lish pages with one click. In Kompozer, ish establishing your development envi- en-US/firefox/addon/5369
for example, all you have to do is hit the ronment. Experiment with the tools that
[4] S
enSEO: https://addons.mozilla.org/
Publish button on the taskbar or go to I've introduced here. Then, take a look en-US/firefox/addon/9403
File | Publish. When you enter the neces- at the myriad sites and education offer-
[5] B
luefish:
http://bluefish.openoffice.nl
Creating a Simple Header Bar [6] Q
uanta Plus:
GIMP is the de facto open source standard resolution, the image might be clearer, http://quanta.kdewebdev.org/
for creating standard RGB (Red Green but the page will take more time to
[7] Kompozer: http://www.kompozer.net
Blue) files. GIMP is not exactly Adobe Pho- download and render. Even in these
toshop, but it’s just about good enough. days of increased bandwidth, a slight [8] O
pen Source Web Design:
GIMP supports several image file formats, increase in download time could still http://www.oswd.org
including JPEG, GIF, and PNG. make users impatient. [9] O
pen Source Templates: http://www.
The steps I used for creating the simple 3. T
o specify a background color, choose opensourcetemplates.org
header bar shown in Figure 8 are as fol- the “bucket fill” tool and a color. [10] Kompozer issues:
lows: 4. F
or the header, select the text feature http://ubuntuforums.org/
1. I n the GIMP File menu, choose New and a color. Here, I will use white. showthread.php?t=1094500
and then specify the pixel dimensions. 5. A
second, already-existing image can [11] T
he W3C Markup Validation Service:
The size for this header is 1257x124 be added to the image you are creat- http://validator.w3.org
pixels. ing. For this example, I will drag a
[12] Weblint: http://www.w3.org/Tools/
2. Click on Advanced Options and then transparent GIF photo image onto the
weblint.html
specify the X and Y resolution. Here, I bar. “Transparent” means that the
will use 72 by 72 dots per inch (dpi) for background of this new image will be [13] Relaxed: https://addons.mozilla.org/
the header, which is not ideal for im- the same color as the image behind it. en-US/firefox/addon/3939
ages containing faces but is suitable 6. N
ow save the image as a JPEG by sim- [14] Total Validator: https://addons.
for basic images used for navigation or ply adding the .jpg ending to the file mozilla.org/en-US/firefox/search?
background. If you specify a higher name. q=html+validator&cat=all

UBUNTU USER ISSUE 01 41


Know-How Integrating Debian Packages

Arc
hMe
n, F
otol
ia
Rolling your own Debian packages

GIFT WRAPPED
Just a couple of steps are all it takes to convert a source code archive into a full-fledged Debian package.

BY CARSTEN SCHNOBER

T
he compiler was once regarded to convert a program into the Debian ready. All the required information must
as an exotic tool for hard-core de- package format. be located in the debian subdirectory of
velopers, but building programs the source code directory. If the distribu-
is now a common task for average Linux CheckInstall tion has a prebuilt DEB package with the
users. The three classic commands con- The CheckInstall [1] program (Figure 1) software you want to compile, the infor-
figure, make, and sudo make install will offers the easiest approach to creating mation is probably already available. To
help you convert the source code down- the DEB packages used with Ubuntu, as recompile this version – for example,
loaded from a promising project website well as RPM packages used with other with support for additional features –
into a binary application ready to exe- Linux variants. CheckInstall is easy to first download the matching source code
cute on your own system. use, although it tends to fail with pack- using apt-get source Packagename (with-
The problem is, if you build a program ages that extend the operating system out sudo). You might need to enable the
yourself, you won’t be able to manage, functionality by adding kernel modules. Source code package source in Synaptic.
track, and update the application If you prefer DEB packages that will run After you download the files to a di-
through Ubuntu’s handy package man- on systems other than Debian, you need rectory, you will need to change to this
agement system. more than the basic packages created by directory to run the command. You
If you can’t find an Ubuntu package CheckInstall. Debian-based distros offer should have three new files and a direc-
for the program you want to install, but a collection of tools, mainly found in the tory. The filenames comprise the soft-
you still want the chance to manage the dpkg-dev package, that facilitate the task ware name, the package version number,
program using Ubuntu’s package man- of packaging an application. and possibly an internal revision num-
agement tools, you can always convert ber, such as ubuntu2. One of the three
the program into the Debian package original Beats Imitations files is the original archive with the
format used with Ubuntu. In this article, Debian packages are quite easy to build .orig.tar.gz suffix. The file with the
I'll walk you through the steps required as long as the source code directory is .diff.gz suffix contains the changes the

42 ISSUE 01 UBUNTU USER


Integrating Debian Packages Know-How

distributor has made to the original source code directory and


source code to adapt the package to its parent directory.
match the system. Then there is a .dsc First, the program
file containing a description with details checks to see whether the
of the supported processor architectures tools and libraries it needs
and the package maintainer. The direc- for building the package
tory created by apt-get source also con- exist on the system. If not,
tains the debian directory. it issues a list of missing
In the simplest case, you could now packages you need to in-
just make any changes you need; for ex- stall. Otherwise, the script
ample, adding a program library to the will call configure and then
software to extend its functionality. You make before finally creat-
can add more features to the source code ing a DEB package that it
or install patches with changes. To cre- stores in the parent direc-
ate a new Debian package, issue the tory. To install the package,
dpkg-buildpackage command in the you need to launch the
source code directory (the command is package manager; at the Figure 1: CheckInstall collects information about the pro-
part of the dpkg-dev package). command line, the follow- gram, but it does not define any dependencies.
To build a package using this ap- ing command handles this:
proach, you actually need administrative but make sure you stick to the required
privileges; however, if you install the $ sudo dpkg -i U format; otherwise, your package-build-
fakeroot package, dpkg-buildpackage will package_name.deb ing activities are doomed to failure.
automatically use it if you try to run the
program without administrative privi- Documenting the details is a good idea. Updates
leges. Fakeroot lets you build Debian The changelog file in the debian direc- In real life, program packages included
packages with write privileges for the tory is the place to document your work, by distributors often do not come with

Table 1: Files in the debian Directory


Filename Filename and Path after Installation Function
README.Debian /usr/share/doc/package_name/README.Debian Documents differences between the original source
code and the “debianized” version
changelog /usr/share/doc/package_name/changelog.Debian.gz Logs the changes made to the package
copyright /usr/share/doc/package_name/changelog.Debian.gz License under which the software in the package is
released
control – Information for the package: name, version, dependen-
cies, description, etc.
rules – Rules for creating the package
conffiles.ex – Configuration files contained in the package
cron.d.ex /etc/cron.d/package_name Actions and programs that the program tells cron to
execute regularly (in cron format)
dirs – List of directories required by the program, without
leading slashes; as in usr/bin
docs – List of files to be copied to the /usr/share/doc/package_
name/ directory
emacsen-install.ex – Emacs-specific (optional)
emacsen-remove.ex – Emacs-specific (optional)
emacsen-startup.ex – Emacs-specific (optional)
init.d.ex /etc/init.d/package_name The init script for starting and ending any system
services contained in the package
manpage.1.ex /usr/share/man/man1/program_name.1.gz Man page for the program
menu.ex /usr/share/menu/package_name Information for a program entry in the start menu
watch.ex – Configuration file to update the package using uscan
and uupdate
preinst.ex – Contains the commands the package manager
executes before installing the package
postinst.ex – Contains the commands the package manager
executes after installing the package
prerm.ex – Contains the commands the package manager
executes before removing the package
postrm.ex – Contains the commands the package manager exe-
cutes after removing the package

UBUNTU USER ISSUE 01 43


Know-How Integrating Debian Packages

Figure 2: The uupdate command unpacks a source code archive and Figure 3: The dh_make command Debianizes a source code directory,
creates a debian subdirectory based on the content of the existing creating a debian subdirectory where it creates and generically popu-
package. lates files.

the latest version; you need a new DEB .gz file and attempts to add them to the $ dh_make -e mail@address.com -f
package based on the source code for new version. This approach will only ../program-version.tar.gz
the updated program version. The uup- work if the modified files are not much
date command from the Devscripts pack- different from their counterparts in the Next, you must decide what type of
age helps you update the source code. previous version. If just a couple of the package you are building (Figure 3). In
To use uupdate, download the tarball patches fail, the update process will the easiest case, you enter s for a single
with the new archive, but do not unpack carry on without them. uupdate also binary package. The other options are m
it. Then run apt-get source program transfers information, such as the pack- for multiple binary, l for library, and k
(again without sudo) to download your age description and dependencies, from for kernel module.
distributor’s version of the same pack- the original package to the new version. The CDBS (b, Common Debian Build
age. This will give you both a complete The call to uupdate unpacks the tar- System, [2][3]) option is useful mainly
debian directory with information you ball with the updated program version, for more complex packages that you will
can recycle, as well as (typically) the which contains a new source code direc- want to use and update over an ex-
changes made by the distributor to mod- tory, including a debian subdirectory tended period of time; however, this op-
ify the system for your distribution. with the package information gleaned tion does require a deeper understanding
Now change to the program version di- from the original package. Next, run of the DEB package system.
rectory created by apt-get source and run dpkg-buildpackage in the new source
the uupdate -u command, adding the code directory, as described previously. debian Directory
filename of the archive containing the This step starts the build, which gives After you run dh_make, take a look at
new version of the program (Figure 2): you a full-fledged DEB package. Again, the files in the debian directory (Table
the package management tool is re- 1). The files created here contain the
$ uupdate -u U quired to install the package: placeholders and generic information
path/program-NewVersion.tar.gz you will need to modify to match the
dpkg -i package_name.deb package.
The command reads the changes made The control file plays a fundamental
by the distributor from the program.diff- role because it contains all the critical
new Buildings package information. You can enter the
Table 2: Software If you do not have a previous version of software category in the Section: line;
Categories for “Section:” the program to build on, your only op- Table 2 shows your options.
tion is a completely new DEB package. In many cases, an additional Priority:
Designation Purpose
To start, unpack the source code archive, line is useful. The Priority: line describes
admin System management
which will not contain any distribution- how important the software is for the
programs
specific information. To “Debianize” the
base Basic packages
devel Packages for software
source code, you must first install the INFO
developers dh-make package. Then run dh_make
[1] CheckInstall: http://asic-linux.com.
doc Documentation with the -f parameter in the source code mx/~izto/checkinstall
libs Program libraries directory, passing in the path to the orig-
[2] CDBS: http://build-common.alioth.
mail Email software inal source code archive. So that other
debian.org
net Network software
users can contact you, you also need to
[3] Debian packages via CDBS:
enter an email address for the package,
x11 Other graphical programs http://www.ngolde.de/cdbs.html
which is defined with the -e parameter:

44 ISSUE 01 UBUNTU USER


License Free
system; in the case of packages you build yourself, the priority
will typically be optional or extra. The dependencies are spec-
Virtualisation
ified in the Depends: line, where dh_make has already created
an entry:

${shlibs:Depends}, U
${misc:Depends}

These variables save you some work; when you compile, the
dh_shlibdeps program automatically replaces the variables
with the required packages.
If you want to add recommended packages, insert a Sug-
gests: line into the control file;

Suggests: libqt0-ruby1.8

The packaged program will not strictly require the programs


and libraries stated in the Suggests: line, but in many cases,
At Digital Networks, we build, test, sell and
the recommended packages will enable features that users support virtualisation platforms. Our platforms
would otherwise have to do without. focus on technical solutions and are designed
All that remains is to fill out the program Description: field. to reduce your costs and simplify management.
The first line should contain a short description of no more We ve been building Linux systems since
than 60 characters; below it, there is enough space for more
details. Indent each line with a blank so that the package
1998 and we offer standards-based platforms
builder will know that the lines belong to the Description: that integrate with Linux, Windows, Unix and
field. Mac networks.
We offer KVM, OpenVZ, Xen and VirtualBox
Home Straight technologies. We focus on license free
The rules file is another important inhabitant of the debian di-
rectory. The dpkg-buildpackage command, which finally trig-
virtualisation using open source software. We
gers the package build, takes its instructions from the rules can provide load balanced high availability
file. For simple programs, the rules generated by dh_make will solutions without the huge licensing costs of
work without modification. If you are packaging more com- proprietary virtualisation platforms.
plex software or program libraries, you can add parameters,
For more information, visit www.dnuk.com
such as compiler options, to the rules file.
The copyright file contains the names and email addresses
of the programmers and copyright owners, and the license

Premium
under which the software package is published. Indent the
text with four blanks. If you are using GPL licensing, you
don’t need to add the whole text, since it is available on any

Ubuntu PCs
Debian-based system in the /usr/share/common-licenses/GPL
directory. In this case, you can simply add a reference to the
license text in copyright.
Checking the changelog file for any new package is a good
idea. The first time you build a package, you normally won’t We also sell high-end Ubuntu
need to change the log and can just delete the file. In all other PCs. Visit our site to have a
cases, you will need to edit the file. The README.Debian file look at our new AMD
is where you add instructions that relate to the DEB package
in general and not to the software it contains.
Phenom II X4 and Intel Core
i7 machines.
Small Steps These are pre-installed
If you build software yourself, the small effort of building with Ubuntu 9.04.
matching packages will give you enormous convenience ben-
efits. The uupdate utility updates on the basis of an existing
package, and dh_make creates the debian directory. With just
a little practice, a final call to dpkg-buildpackage quickly be-
comes routine.
Seeing your first home-grown package install is a really
great feeling! n

www.dnuk.com sales@dnuk.com 0161 366 6600


KNOw-HOw Answer Man

Q&A with Ubuntu Forums admin Mike Basinger

ANSWER MAN
sudo apt-get install U and your flash drive in the bottom selec-
evolution-mapi tion box and click on Make Startup Disk
(Figure 1). You can also run this same
This will only work if your Exchange program by typing usb-creator at the
2007 server has MAPI enabled on it. command line on any existing Ubuntu
8.10 or newer machine.
Installing from USB
I have an Asus Eee PC 901 and Fixing Ubuntu Boot Menu
want to install Ubuntu on it, but I still dual boot my machine be-
it has no CD/DVD drive. How tween Windows XP and Ubuntu.
can I copy the Ubuntu Live CD ISO I recently had to reinstall Win-
Mike Basinger is an administra- [image] to a USB flash drive? dows XP on my computer. After reinstall-
ing Windows, my Ubuntu boot menu
tor on the Ubuntu Forums, where
The ability to create a bootable was gone, and I could no longer boot
he helps users with Ubuntu ques- Ubuntu USB installer has been into Ubuntu. How can I recover my
tions every day. He works for the included on the Ubuntu Live CD Ubuntu boot menu so I can dual boot be-
Ubuntu community by serving since the release of Ubuntu 8.10. All you tween Ubuntu and Windows XP again?
on the Ubuntu Community and need to make a USB installer is a USB
Forum Councils. Mike works at the flash drive with at least 700MB of free When you reinstalled Windows,
space, an Ubuntu 8.10 or newer Live CD, the Ubuntu bootloader, grub got
University of Utah Marriott Library
and a computer that you can boot into overwritten. Fixing this is easy –
in Salt Lake City, Utah, as an IT man- the Ubuntu Live CD. you just need an Ubuntu install CD or
ager. Send your Ubuntu questions Place the Ubuntu Live CD in your Live CD. Once the Ubuntu Live session
to: QandA@ubuntu-user.com computer CD/DVD drive and boot from boots, you should see an Ubuntu basic
the Live CD. At the prompt, choose Try desktop.
Ubuntu without installing. Once the Now open a terminal window, Appli-
Ubuntu Live session boots, you should cations | Accessories | Terminal and type
Corporate Email see an Ubuntu basic desktop. the following:
My company uses Microsoft Ex- Now plug your flash drive into your
change server for email. Does computer and go to the top menubar sudo grub
Ubuntu have any mail clients and choose System | Administration |
that work with an Exchange server? Create a USB startup disk. Next, select This will open the grub command-line
your Live CD in the top selection box interface. At the grub prompt, enter the
If you don’t need calendaring, following commands:
you can use almost any IMAP
(Internet Mail Access Protocol) find /boot/grub/stage1
mail client, such as Thunderbird, Mutt,
Evolution, or KMail, to connect to your This will tell you what hard drive and
mailbox. Ask your admin whether your partition grub is on. For this example, I
Exchange server is set up to work with will use (hd0,0), the first partition on
IMAP. If you do need calendaring, you the first hard drive, which is a very com-
can try using the Exchange connectors mon setup.
included with the Evolution mail client. Now you want to repair the grub boot-
Ubuntu automatically installs the Ex- loader:
change connector needed for Microsoft
Exchange 2003 or earlier. If your work- root (hd0,0)
place has a Exchange 2007 server, you setup (hd0)
need to install the MAPI (Messaging Ap- exit
plication Programming Interface) plugin
for Evolution, which is a new feature in The root command points to the proper
Evolution 2.26: Figure 1: Creating a USB startup disk. area of the hard drive, and the setup

46 ISSUE 01 UBUNTU USER


Answer Man KNOw-HOw

command installs grub to the MBR sudo apt-get install fusion-icon and for Kubuntu, enter:
(Master Boot Record).
To get your Ubuntu boot menu back, Now you can launch fusion-icon at login sudo /etc/init.d/kdm stop
close down your Ubuntu Live CD ses- by creating a new startup program in
sion, remove the CD, and reboot your System | Preferences | Startup Applica- Now log in to your machine at the termi-
computer normally. tions. Be sure to use fusion-icon -n so nal window and go to the directory in
that it does not change the window man- which you downloaded the NVIDIA
Playing DVDs ager when it starts. driver. The chmod command will make
I would like to play DVDs on my the file executable:
Ubuntu laptop when I’m on a NVIDIA Graphics Card
flight, but it does not work I bought a new NVIDIA card sudo chmod +x NVIDIA*
when I insert a DVD. Is there anyway to and it is not supported by the
make DVD playback work in Ubuntu? NVIDIA drivers that come with Then, run the driver installer, follow the
Ubuntu. How do I install the latest driver instructions, and reboot your computer
Most store-bought DVDs are en- from the NVIDIA website on Ubuntu? after you finish.
crypted with CSS (Content If all goes well, your computer reloads
Scrambling System), which at- Installing NVIDIA drivers manu- X Window with full 3D support:
tempts to restrict the software that can ally is a little different on
play a DVD. The ability to decrypt DVDs Ubuntu than on other Linux dis- sudo sh NVIDIA*
in not included by default on Ubuntu be- tributions. First you need to download
cause of legal restrictions in some coun- the latest NVIDIA driver from their web- Bug Out
tries. To enable DVD playback (assuming site that supports your card. To compile I’m having problems with Fire-
it is legal in your area and you have a the driver, you need some extra software fox. It does not behave as it
legal right to access the recording), you installed in Ubuntu: should and crashes on me occa-
need to install the libdvdcss library. sionally. How do I report problems back
From Synaptic or a terminal, install libd- sudo apt-get install U to Ubuntu?
vdread4/ to get libdvdcss: build-essential linux-headers-U
`uname -r` If you are having a problem
sudo apt-get install libdvdread4 with Ubuntu that you think the
Then you need to install the 3D NVIDIA developers should know about,
Then from a terminal, execute the fol- driver that Ubuntu installs: submit a bug report to Launchpad
lowing command to install libdvdcss: (http://launchpad.net). Launchpad pro-
sudo apt-get remove U vides the bug tracker, among other ser-
sudo /usr/share/doc/U nvidia-glx nvidia-glx-legacy U vices, used by the Ubuntu community.
libdvdread4/install-css.sh nvidia-glx-new nvidia-settings Before you summit a bug to Launchpad,
you will need to create an account at
Games and Compiz The Ubuntu Linux kernel includes the https://launchpad.net/distros/ubuntu/
I really like the visual effects in 2D NVIDIA driver, which must be dis- +bugs/+login. After you have created
Compiz, but it causes slow- abled at boot-up. Just edit the /etc/ your account, you can use two auto-
downs and screen corruption default/linux-restricted-modules-common matic procedures to create your bug re-
when I play games in Ubuntu. Is there a file: port. In most programs included in
quick and easy way to turn off Compiz Ubuntu, go to Help | Report a Problem.
temporarily when I play games on my gksudo gedit U This will automatically create a bug re-
computer? /etc/default/linux-restricted-U port with the necessary information that
modules-common Ubuntu developers will need.
Compiz can be turned off with All you need to do is fill in a descrip-
the Appearance control panel, and change the line DISABLED_ tion of what is happening. At the com-
System | Preferences | Appear- MODULES=" to "DISABLED_ mand prompt, you can do the same
ance, by clicking on the Visual Effects MODULES="nv nvidia_new". thing with the ubuntu-bug command:
tab and selecting None. The problem Be sure to back up your xorg.conf file
with this method is that any special set- and exit the X Window System com- ubuntu-bug firefox
tings that were changed in Compiz will pletely.
be lost when you re-enable it. Before submitting a bug report, I would
A better way to turn Compiz off and sudo cp /etc/X11/xorg.conf U suggest searching Google, the Ubuntu
on is to use the fusion-icon program. The /etc/X11/xorg.conf.backup Forums, and Launchpad to see whether
fusion-icon program sits in the notifica- this is a known issue. Hunting down a
tion area in your Gnome panel and con- For Ubuntu, type previous answer will help keep the de-
trols Compiz. Install fusion-icon with velopers from being overwhelmed by
Synaptic or apt-get: sudo /etc/init.d/gdm stop duplicate bug reports. n

UBUNTU USER ISSUE 01 47


Desktop Gnome Do

Launching programs and actions with Gnome Do

Central
launCher
Redrex, Fotolia

Information at your fingertips with actions to match – Gnome Do tact in Pidgin. The tool also supports file
operations and much more. Various
merges search engine and application launcher functionality to create plugins give users a convenient ap-
proach to extending functionality.
a new and convenient tool. BY CHRISTOPH LANGNER
Installation

D
ocuments, applications, mes- Gnome Do can do more than just Gnome Do is easy to install because
sages, and bookmarks tend to launch programs – it will find music in Ubuntu includes all the necessary pack-
spread all over a system. Gnome Rhythmbox (see Figure 2), Amarok, or ages [3]. Simply run Applications | Add/
Do [1] gives users a new launcher for Banshee databases or contacts in Evolu- Remove… and enter gnome-do into the
Gnome and other desktops that not only tion, Gmail, or the Pidgin instant mes- Search box. Then mark the resulting
finds information but also triggers ac- senger. If you want, you can tell Gnome entry GNOME Do for installation and
tions on the basis of the results. Do to set up a chat session with the con- click on Apply Changes.
The flexible Gnome Do [1] application After you finish the install, Applica-
launcher is similar to the Quicksilver [2] tions | Accessories | GNOME Do takes
launch tool for Mac OS X. Users press a
keyboard shortcut to pop up a window
in which they enter the name of the pro-
gram they need.
Because Gnome Do auto-completes
the entry, entering just part of the name
is sufficient (Figure 1). For example,
typing text will launch your text editor. Figure 1: Gnome Do auto-completes the
Gnome Do bases its auto-complete entry. (Screenshots courtesy of David
suggestions on start menu entries. Siegel) Figure 2: Gnome Do even finds your music.

48 ISSUE 01 UBUNTU USER


Gnome Do Desktop

the Visual Effects tab, you can choose file extension of .dll, which is fairly sur-
Normal or Extra. prising for Linux users. Simply drop the
plugin into the .local/share/gnome-do/
triple Functionality plugins directory below your home di-
The Gnome Do main window has three rectory and relaunch the program to
sections, two of which are visible on allow Gnome Do to detect the plugin.
launching the tool. When you enter a This gives users a simple approach to
search key, an action to match the adding a variety of functions.
search automatically appears in the sec- Gnome Do 0.5 introduced a new pref-
ond section. For example, if you enter erences window and plugin manager
text, Gnome Do automatically selects (Figure 3), which helps you browse,
Run to execute a program. If you then download, install, and enable or disable
confirm the action by pressing Enter, the plugins from within the tool. Additional
Gnome text editor launches. plugin information is available on a wiki
Because Gnome Do uses the names in page, and you can do plugin-specific
the start menu to identify applications, it configuration.
can cause some confusion. The Gnome Gnome Do will search Firefox or
Figure 3: Plugins extend Gnome Do’s func- text editor binary is called gedit. If you Epiphany bookmarks and open links in
tionality. enter the name in Gnome Do, the pro- your browser, and it will also search for
gram fails to find a match. To be on the music in your Rhythmbox, Amarok, or
you to a program launcher. First you will safe side, stick to the names in the appli- Banshee database and add this to a play-
see the application window. If you click cation menus. list (see Figure 4). Also, you can add
on the desktop or perform some other If you enter the name of a file or direc- Pidgin or Evolution contacts to the
action, Gnome Do disappears into the tory in your home directory and press launcher.
background. Tab to move to the action area, you can
To move the tool to the foreground, then press the Down arrow key to select Community Contributions
you just press its configured keyboard other actions, such as moving or copy- New plugins are released almost daily.
shortcut – by default, that’s Windows ing. After selecting an action, a third sec- Gnome Do provides a community plugin
+ Spacebar. tion appears and you can choose a target category with plugins from a variety of
for the action. contributors. New community contribu-
session These controls are typical of Gnome tions include Skype, Twitter, Flickr, and
After installation, Ubuntu automatically Do: You start by typing a search key and Google Calendar plugins, as well as the
launches Gnome Do in the background then press Tab to move on to the next WindowManager plugin that lets you ar-
at every start of the desktop. With the section, where you press the Down range windows on your desktop. Devel-
session management feature, you can arrow key to select an action. opers who enjoy working with Mono
undo and later reactivate this behavior if can also refer to the detailed documenta-
you want. plugins tion to implement their own ideas [5]. n
To remove Gnome Do from the list of The recent Plugin improvements have
programs that are started automatically, made Gnome Do a flexibly extendable INFO
press System | Preferences | Startup Ap- tool [4]. Each plugin has a library with a
[1] Gnome Do: http://do.davebsd.com/
plications and search for the
[2] Quicksilver: http://docs.blacktree.
GNOME Do entry. Now you
com/quicksilver/what_is_quicksilver
want to deactivate the
checkbox next to it and click [3] Installation: http://do.davebsd.com/
wiki/index.php?title=Installing_Do
on Close. In the same way,
you can later configure the [4] Gnome Do plugins: http://
do.davebsd.com/wiki/index.
desktop to run Gnome Do at
php?title=Category:Plugins
startup again.
Gnome Do does not use a [5] Developing plugins: http://
do.davebsd.com/wiki/index.
traditional application win-
php?title=Getting_started_with_writ-
dow. Assuming you have
ing_plugins
desktop effects enabled,
Gnome Do does without a
frame and the window is Christoph Langner works in test
AUTHOR

transparent. management for PTV in Karlsruhe,


To enable the desktop ef- Germany, and has played an active
fects, click on the Appear- Figure 4: Gnome Do searches the Rhythmbox music
role in the open source software
ance entry in the System | database for artists and albums and offers actions rele-
community for many years.
Preferences menu. Now, in vant to the current context.

UBUNTU USER ISSUE 01 49


DeSktop FreeMind

Antonis Papantoniou, Fotolia


Getting the most out of FreeMind

MIND TRICKS

Learn how to master the advanced features of the FreeMind mind-mapping application to get the most out of
this useful tool. BY DMITRI POPOV

A
lthough you might think that Linux and download the file free- velopment version of FreeMind (cur-
FreeMind [1] is just a mind- mind_0.8.1-2_all.deb. A double-click on rently, it’s 0.9.0) and unpack it.
mapping application designed to it starts the installer for external pack- In the terminal, switch to the freemind
help creative professionals organize their ages. The plugin packages provide addi- directory and run the sh freemind.sh
thoughts and ideas, in reality, it sports so tional features but are not necessary. command to launch the application.
many nifty features that it could prove to The package installer automatically
be an indispensable productivity tool no takes care of the additional necessary Using Shortcuts
matter what you do for a living. files. The FreeMind developers recom- Because it is a graphical application,
Because FreeMind is a rather straight- mend Sun Java instead of the free GCJ. FreeMind lets you work with mind maps
forward application, you can learn how To get it, install the sun-java6-jre pack- by the point-and-click method. It also
to use its basic features in a couple of age with the Synaptic package manager supports keyboard shortcuts, which
hours. But if you want to get the most or run the sudo apt-get install allow you to perform virtually any oper-
out of this excellent application, you sun-java6-jre command in the terminal. ation without touching the mouse.
might want to master its more advanced Once the package is installed, use the The main advantage of keyboard
features. sudo update-alternatives --config java shortcuts is speed: Hitting a key combi-
command to set Sun JRE as the default nation is much faster than finding and
Basics environment on your system. moving the mouse. It might take you
The Ubuntu 9.04 package manager only If you don’t mind living on the bleed- some time to learn FreeMind’s shortcuts,
contains FreeMind version 0.7. To install ing edge, you might want to opt for the but once you’ve mastered them, you can
it, use the Applications | Add/Remove... latest test release of FreeMind that create and navigate mind maps with
dialog. comes with a few nifty features not consummate ease and speed.
On the FreeMind homepage you will found in the stable version of the appli- These keyboard skills can come in
find the most recent program version, cation. No official distribution packages particularly handy when you are brain-
currently 0.8.1, which brings a number are ready yet, so you have to download storming a problem or taking notes dur-
of new features. Just click on Debian the zip archive containing the latest de- ing a lecture and you don’t have time to

50 ISSUE 01 UBUNTU USER


FreeMind DeSktop

Because Free- In a similar manner, you can create a


Mind supports filter that shows only tasks in the Urgent
drag-and-drop, category by creating the Node – Contains
you can move – Urgent rule; just remember to tick the
your tasks be- Show Descendants checkbox to display
tween categories the tasks in the Urgent category.
with the mouse. Attributes is another powerful feature
For example, if you can use to keep tabs on your tasks.
you don’t have With it, you can add the Done attribute
time to do the with values of Yes and No, which you
dishes today, you can use to mark finished and unfinished
can move the task tasks (Figure 3). Just choose Tools | At-
to tomorrow by tribute Manager, and press the Edit but-
dragging it onto ton in the All Attributes row. Next, type
the Tomorrow the name of the attribute (i.e., Done) and
Figure 1: Simple task mind map. node. Also, you press the Add button. Then press the
can use the avail- Edit button next to the Done attribute
able icons to as- and add the Yes and No values to it. To
sign priorities to assign the defined attribute, select the
the tasks quickly; desired฀task฀and฀press฀Alt+F9฀(or฀right-
right-click on the click on the task and choose Edit Attri-
task and choose butes). Add the Done attribute and set its
the desired prior- value.
ity icon from the Thanks to the inclusion of a rich text
icons list. editor that lets you add notes to the
The Filter fea- nodes, FreeMind makes a powerful and
ture can help you flexible note-taking tool. For example, if
Figure 2: Defining filters. manage complex you are attending a conference, you can
task lists (see Fig- create a mind map containing separate
fumble with the mouse or the trackpad ure฀2).฀Say฀you฀want฀to฀display฀only฀the฀ nodes for each conference track, and
on your laptop. The full list of FreeMind tasks with Priority 1. Just press the Edit you can specify different attributes that
keyboard shortcuts is rather long, but button (it looks like a pencil) in the Fil- allow you to identify each track quickly
you can start by learning the most essen- ter toolbar, and use the available drop- (e.g., “Development,” “Marketing,”
tial ones: down lists to define the following rule: “Birds of a Feather,” etc.). Then, to add
•฀Enter:฀Add฀sibling฀node Icon – Contains – 1. Press the Add but- richly formatted notes to each node, you
•฀Insert:฀Add฀child฀node ton to add the rule to the list, then press can use the text editor at the bottom of
•฀F2:฀Edit฀selected฀node Apply to enable it. the main window.
•฀Alt+Enter:฀Edit฀selected฀node฀with฀
the rich text editor
•฀Space:฀Fold/฀unfold฀the฀selected฀node
•฀Ctrl+Up฀arrow:฀Move฀node฀up
•฀Ctrl+Down฀arrow:฀Move฀node฀down
•฀Ctrl+Shift+K:฀Add฀link฀with฀the฀file฀
chooser
•฀Ctrl+K:฀Add฀link฀by฀entering฀it฀manu-
ally

Usage Scenarios
FreeMind is not only good for mapping
your ideas, with a bit of creativity, you
can use FreeMind for pretty much any-
thing. For example, FreeMind has all the
features you need to create a task man-
ager. To start, create a mind map that
represents the overall structure of a task
manager.
The exact structure depends on how
you usually manage your tasks, but it
could look like the example in Figure 1. Figure 3: Using attributes to keep tabs on tasks.

UBUNTU USER ISSUE 01 51


DeSktop FreeMind

ciousmind.sh bookmarks.xml book-


marks.mm command. This converts the
XML file into a mind map, which you
can open in FreeMind (Figure 4).

Getting physical
To provide a more efficient way of ap-
plying formatting to nodes in a mind
map, FreeMind sports so-called physical
styles, which you can use to specify
styles and their properties, such as node
color, type, font, borders, and so on. To
do this, choose Format | Physical Style |
Manage Patterns. This opens the Pat-
terns dialog window (Figure 5), where
you can tweak the existing styles. To
apply a physical style to a node, right-
click on it and select the desired style
from the Physical Style list.

exporting Mind Maps


Figure 4: Displaying your Delicious bookmarks as a mind map. FreeMind can export mind maps in a
wide range of formats, including PDF,
FreeMind can also encrypt individual less conventional uses, too. If the way ODT, PNG, SVG, and interactive HTML
nodes and entire mind maps, making it Delicious displays bookmarks doesn’t pages, as well as Java and Flash applets,
suitable for storing private information. tickle your fancy, you can add a whole and it can even export your mind maps
With this feature, you can turn a mind new dimension to your bookmark col- as TWiki pages and TaskJuggler tasks.
map into a password and account man- lection by turning it into a mind map But that’s not all.
ager. Say you want to use a mind map to with a clever utility called Delicious- The฀mm2odp฀[3]฀and฀mm2s5฀[4]฀utili-
store your account information for dif- Mind฀[2].฀Just฀download฀the฀delicious- ties, for example, let you turn FreeMind
ferent websites. Just choose Tools | mind.zip archive and unpack it into mind maps into OpenOffice.org Impress
Insert Encrypted Node and specify a your home directory. and S5 presentations, whereas the
password. Next, you have to export bookmarks mm2notes฀[5]฀tool฀can฀transform฀a฀mind฀
Once the encrypted node is added, from your Delicious account. To do this, map into hierarchical notes. All three
you can add child nodes to it for each point your browser to http://del.icio.us/ utilities are written in Python, and they
website account. Then, you can use the api/posts/recent?count=10000, enter are easy to install and use. n
text editor to add notes containing login your username and password when
and other important information. Next prompted, then save the page as book- INFO
time you open the mind map, you must marks.xml in the deliciousmind direc- [1] FreeMind: freemind.sourceforge.
enter the specified password to access tory (in Firefox, choose File | Save Page net/wiki/index.php/Main_Page
the encrypted node and its children. The As). In the terminal, switch to the deli- [2] DeliciousMind: www.blainekendall.
ability to encrypt individual nodes can ciousmind directory and run the sh deli- com/deliciousmind
come in handy [3] mm2odp:
when you want to code.google.com/p/mm2odp
create a mind map [4] mm2s5: code.google.com/p/mm2s5
containing both [5] mm2notes:
public and private code.google.com/p/mm2notes
information.
If you prefer to Dmitri Popov holds
keep all confiden- a degree in Russian
THE AUTHOR

tial data in a sepa- language and com-


rate file, you can puter linguistics. He
create an en- has been working
crypted map with as a technical trans-
File | Create En- lator and freelance
crypted Map. contributor for sev-
With third-party eral years. He has published over 500
articles in Danish, British, US, and
tools, you can put
Russian magazines and websites.
FreeMind to some Figure 5: Working with physical styles.

52 ISSUE 01 UBUNTU USER


Authoring Software DeskTop

Creative prose writing with Celtx

WRITERS
UNBLOCKED

Sandor Jackal, Fotoliaa


Whether you plan to publish a comic or a manuscript, you need to manage a volume of material. Enter Celtx,
which combines a database and text editor into a comprehensive tool. BY ANDREAS KNEIB

W
hen you are ready to sit down as text, movie, theater, comic, and radio The editor might seem spartan, but it
and write that book you al- play. The right side of the splash screen works in an intelligent way with the use
ways think about, you might offers a selection of classical works pre- of conventions and indenting that distin-
want some help getting organized. Here, pared as examples – such as the H. G. guish a play or other literary scripts in
I will examine Celtx [1], a tool that helps Wells’ radio play War of the Worlds [5] printed format. This feature distin-
you compose comics, radio dramas, or Oscar Wilde’s The Importance of guishes Celtx from Emacs or other word
movie scripts, novels, or plays. (See also Being Earnest [6] – that will give you an processing software. For example, the
the “Alternatives to Celtx” box.) excellent overview of what Celtx offers. software attempts to identify the format
After selecting Wilde’s play, you will of any text you type as a Dialog, Head-
Installation see a number of tabs in the left-hand ing, or Figure. If the editor fails to iden-
Installing Celtx is easy, and it works sidebar. The tabs give you a clear over- tify the format, you can choose the cor-
right out of the box. In the download view of the wide range of concerns in- rect format from a pull-down menu on
section of the Celtx project page [2], pro- volved in producing a play. For example, the left-hand side. Also, the editor has
gram packages are available for the Stageplay tab contains the literary a function for converting the complete
Windows, Mac, and Linux. work with acts, setting descriptions, and script, including the cover, to PDF for-
After downloading Celtx, you can un- dialogs in a text editor. mat (see Figure 3).
pack the tarball in the shell by typing tar
xvzf Celtx.tar.gz, then type cd celtx to Alternatives to Celtx
change to the newly create directory. Besides Celtx, a number of other programs take a similar approach to facilitating the
When you get there, type ./celtx to writer’s daily grind. If you prefer a more spartan approach, StorYBook [3] – a Java pro-
launch the writing tool. gram – is a good choice, providing a good database that offers views and options to suit
your individual requirements.
Getting started Amateur writers with serious ambitions might want to check out Writer’s Café [4]. Instal-
On launch, Celtx comes up with a clear- lation is simple, and the software integrates seamlessly with the Gnome desktop. Writ-
cut splash screen (Figure 2) that gives er’s Café works with OpenOffice, is just as feature rich as Celtx, and offers many helpers
you a couple of options. On the left side and rules for users who are interested in learning the writer’s trade from scratch. In con-
of the window, Celtx offers a selection of trast to its competitor, only the demo version is free; the full version of Writer’s Café will
project templates that cover topics such set you back about US$ 65 (EUR 41, UK£ 33).

UBUNTU USER ISSUE 01 53


DeskTop Authoring Software

if you click the production equipment in


Tea Images, you will see the play’s Se-
quences in the lower half of the sidebar.
The Stageplay view breaks the play
down into acts and scenes. The lower
part of the sidebar helps you navigate
quickly through the acts and scenes via
the view shown in the right pane.
Of course, you do not need to keep the
tab names and descriptions – you can
name the project library, the files, and
the tabs to suit your own needs.

Authoring Time
Not every piece of work will be as large
as this sample. Although Celtx is used
mainly for drafting theater plays; scripts
for radio, movies, and TV; and comics,
the program can also help you structure
a longer piece of prose, such as a novella
or novel. As a simple example, imagine
Figure 1: If you need help, check out the wiki on the Celtx website. you are planning a novel titled “The
Magic Mountain” [7]. First you would
At first, the Tea Images tab, with its play, you will see the Project Library in choose the Text template on the Celtx
pictures of teacups and sandwiches, the top half. This contains a filesystem welcome window. Celtx would then
might seem slightly strange. In fact, this tree with the root of the project named come up with the Text and Main catalog
is a suggestion for the set in scene 1 Importance of Being Earnest containing tabs, which you would see in the sidebar
(Figure 4). With this option, you can add various entries. The entries include tabs below Project Library.
sketches or photos to a project, scene by such as Master Catalog, Stageplay, The next step would be to assign a
scene, and access this data whenever Character Catalog, Synopsis and Sum- name to your project. To do so, just
needed. The Production Schedule tab mary, and Oscar Bio, a short biography right-click the root directory of the proj-
takes you to a calendar that lets you plan of Oscar Wilde (see Figure 5). ect tree in the side bar, which is origi-
the production down to the minute. Fi- The second part of the sidebar nally titled Unnamed. In the context
nally, the Master Catalog gives you a da- changes its appearance or is hidden – menu, select Rename and enter “The
tabase with resources such as photos depending on the context of the project Magic Mountain” in the dialog that then
and addresses of actors involved, loca- element you are accessing. For example, appears.
tions, and set designs – all of which are
organized in a clear-cut way, scene by
scene. The next section tells you how to
work with these resources.
The sidebar on the left of the window
offers a further option for breaking down
your material. In the case of Wilde’s

Figure 2: Celtx displays a splash screen that


offers a selection of project templates and Figure 3: The program’s text editor offers a number of extras, such as automatic format
examples. identification and a PDF converter.

54 ISSUE 01 UBUNTU USER


Authoring Software DeskTop

Figure 4: If you are planning a play, you can collect the set design Figure 5: The sample Oscar Wilde play in Celtx includes a biography
elements in the Tea Images folder.. of the Irish author.

Clicking the Main Catalog tab opens a To complete the Characteristics, you or authors, you can upload your co-pro-
list with the headings Name, Category, also need to consider the character’s duction to a Celtx server. The program
Description, Tags, and Media. The + main role in your story: this could be the offers a wizard to guide you through the
Add button lets you add elements to the Protagonist, Antagonist, Best Friend, or formalities of logging on. To reach the
empty list, such as Characters, Scene something completely different. service, click the Web Services button in
Details, or Location. The element list At this point, you can add one charac- the tool’s taskbar. In addition, Celtx of-
contains all kinds of entries, but you ter after another to your narrative, as fers a wiki, a forum, and a video tutorial.
might be able to do without fields like well as multiple Locations; however, if To access these resources, launch the
Costumes or Stunts for a novel. you click Map of scene in the Address matching options with your web
Because a good story depends greatly section, the program launches your web browser in the Help menu.
on powerful characters, you will want to browser and takes you to Google Maps.
select Characters and think of a name, Adding a Scene details element lets Conclusions
which you then type into the text box in you define precisely what happens in Celtx is a feature-rich program, but de-
the element window – say Hans Castorp. which scene, who the protagonists and spite this, the learning curve is not too
The right window now tiles horizontally antagonists are, what their motivations steep: Computer newcomers should
with the tab Character: Hans Castorp. In are, and whether they reach these objec- have no trouble navigating around the
the fields, you can enter this character’s tives in the scene. This element is impor- program, thanks to the intuitive inter-
characteristics. tant to a story, in that good material al- face. Of course, Celtx can’t take one re-
The field labels are self-explanatory. ways has scope for conflict. sponsibility off your shoulders – that of
Here you can add an image to the Media To create a storyboard, including a being creative and brave enough to put
field – a portrait of the character per- short description of all its sequences, your own ideas down on paper. n
haps. The Detailed description of body, click the plus sign (+) in the sidebar or
Motivation, and Background to character click the Add icon in the taskbar. Again, INFO
fields round off the image of your novel you can choose from a list of elements
[1] Celtx project homepage:
character. that you might recognize from your first http://celtx.com/
steps with the Oscar Wilde example. In
[2] Celtx download page:
this case, you need the Storyboard. Press
http://celtx.com/download.html
the Sequence button to add one se-
[3] StorYBook website:
quence after another (Figure 6). For ex-
http://storybook.intertec.ch/
ample, 1. Hans Castorp takes the train
[4] Writer’s Café:
from Hamburg to Davos, 2. Hans Castorp
http://www.writerscafe.co.uk/
arrives in the sanatorium in Davos, and
so on, until your story unfolds in front of [5] War of the Worlds: http://en.wiki-
pedia.org/wiki/The_War_of_the_
your eyes – all you need to do now is
Worlds_(radio)
write it.
[6] The Importance of Being Earnest:
But That’s Not All, Folks … http://en.wikipedia.org/wiki/The_Im-
portance_of_Being_Earnest
To take a break from your work, select
Save Project in the File menu at the top [7] Mann, Thomas. The Magic Moun-
tain. 1929. http://en.wikipedia.org/
of the Celtx window. If you are collabo-
wiki/The_Magic_Mountain
Figure 6: Compiling the story scene by scene. rating on the project with various artists

UBUNTU USER ISSUE 01 55


DeSktop Synergy

Controlling multiple systems simultaneously with Synergy

LATERAL CONTROL

Fran
ck Boston,
Synergy lets you combine multiple PCs into a

Fot
ol i
a.c
single virtual desktop.
BY FLORIAN EFFENBERGER om

S
ynergy is a small but powerful desktop running on Ubuntu and a small administrator will be using the keyboard
tool that lets the user control notebook running on Vista next to it. To and mouse attached to it. In line with
multiple PCs with a single key- remove the need to keep swapping be- this, all other devices are clients.
board and mouse – even across operat- tween keyboards, the administrator de-
ing system boundaries. To run Synergy, cides to install Synergy. Most of the work Configuration
you’ll need at least two PCs, each with will be done on the desktop, the Ubuntu Before you start using Synergy, you need
its own operating system, monitor, and system. In Synergy-speak this master to configure the program by editing the
working network adapter. The software system is known as the server, and the /etc/synergy.conf or ~/.synergy.conf text
supports Windows from 95 through file. The program relies on the concept of
Vista, Mac OS X version 10.2 or newer, Enabling Universe screens: Every computer in the group,
and not only Ubuntu but other Linux Ubuntu organizes its software packages
whether it is a server or a client, is a
distributions with the latest X server. in numerous repositories. Universe is a screen with a precisely defined position
Prebuilt packages for Windows and Mac hold-all for packages that are not as – just like assigning positions to applica-
OS X are available from the Synergy comprehensively supported and main- tions on a multi-display setup. There-
homepage [1]. Ubuntu offers a Synergy tained as some others. To use Universe, fore, you must add the screen name, its
package in its Universe repository. For you first need to enable the entry in the aliases, and the position relative to the
RPM-based Linux systems, an RPM /etc/apt/sources.list by removing the other devices to the configuration file. It
package is also available. pound sign. Then, after running apt-get is important to define the position in
First imagine a typical network admin- update, you can install various new both directions, left and right. The setup
packages, including Synergy.
istrator’s workplace with a professional for the case study here, and comments

56 ISSUE 01 UBUNTU USER


Synergy DeSktop

on it, are given in Listing 1. Many more tem – the difference is that you
options are available, all of which are are using two operating system
documented on the Synergy configura- platforms. Keyboard input will
tion page [2]. also reach the client while the
A word of warning is appropriate here: focus is on it (i.e., the mouse
Make sure you enter all the options in cursor is on the client screen). In
the configuration file in lowercase. In ad- addition, Synergy synchronizes
dition, pay attention to line breaks be- the clipboards between the two
cause Synergy is finicky and will not systems; according to the devel-
load the file if you make a mistake. After opers, this feature automatically
you complete the setup, launch the Syn- sets the correct character set and
ergy server on Ubuntu as a normal user converts line breaks between op-
by typing synergys. Adding -f prevents erating systems – a perfect way
Synergy from running in the background to copy longer texts and configu- Figure 1: Synergy as a client on Windows Vista.
as a service. ration files centrally. Pressing
Scroll disables Synergy temporarily if According to the homepage, the Mac
QuickSynergy needed. OS X variant of the program in particular
QuickSynergy provides an even more Many more options are available for is not as mature as the Linux and Win-
convenient approach to configuring the you to set the configuration file. Among dows versions.
tool. On Ubuntu, you can download the other things, Synergy supports keyboard
QuickSynergy package from the Universe mapping between the server and the cli- Conclusions
repository and install it, then launch it ents, lets you configure screen areas Synergy offers an interesting approach
via Applications | Tools | QuickSynergy. where no screen paging will take place, to managing multiple computers cen-
Unfortunately, the program failed to and lets you run certain actions with the trally without investing in additional
launch a working server when I tried it press of a button. hardware. In contrast to legacy solu-
in our lab. Of course, nobody’s perfect, and Sy- tions, every machine keeps its own dis-
The Vista client – that is, the PC I will nergy failed on a couple of counts in our play. The program is definitely a boon
be controlling via the Ubuntu system – is lab. For example, it failed to synchronize for anybody who needs to run several
easier to configure. After completing the the screensavers and centrally lock all machines, and Synergy’s cross-operating
install, you can launch Synergy directly the screens. system clipboard support is a really use-
via the Start menu, which takes you to a ful feature that removes the need to
neat-looking graphical interface (Figure Listing 1: Case Study copy text files. However, if I had three
1). To connect to the server, select the 01 # Define screens wishes, one of them would be easier
Use another computer’s shared keyboard 02 section: screens configuration on Linux. n
and mouse option and enter the name of 03 ubuntu:
the server machine. Professionals might 04 vista:
INFO
also be interested in setting additional
05 end [1] Synergy homepage:
options, such as the logging level, auto-
06 http://synergy2.sourceforge.net
start, and network details.
07 # Alternative names [2] Configuration options:
Linking Screens 08 section: aliases http://synergy2.sourceforge.net/
configuration.html
09 # ubuntu -> desktop
After configuring your clients, just type
10 ubuntu: [3] Security notes: http://synergy2.
synergyc server IP (or click Start if you
11 desktop
sourceforge.net/security.html
are working on Windows) to connect the
screens. At first, this is all fairly unspec- 12 # vista -> notebook

tacular – you can use both systems in 13 vista: Florian Effenberger has been a free
the normal way. 14 notebook software evangelist for many years.
But if you move the mouse cursor over 15 end
He is the Co-Lead of OpenOffice.
org’s international marketing project
the right-hand border of the screen on 16
THE AUTHOR

and a member of the board of Open-


the Ubuntu desktop, it shifts to the Vista 17 # Screen positions
Office.org Deutschland e.V., a Ger-
desktop, just as on a multi-display sys- 18 section: left man NGO. His work mainly focuses
19 # vista: right of ubuntu on designing enterprise and school
Security Note 20 ubuntu: networks and software distribution
As Synergy’s authors point out on their 21 right = vista
solutions based on free software.
homepage, Synergy does not possess Florian is a regular contributor to
22 # ubuntu: left of vista
anything in the line of authentication or various German and English lan-
23 vista:
encryption [3]. To be on the safe side, guage publications, in which he in-
24 left = ubuntu vestigates, among other topics,
you might want to set up an SSH tunnel
and encrypt all your data. 25 end legal issues.

UBUNTU USER ISSUE 01 57


Desktop Environment Variables

Make yourself at home

ENVIRONMENTAL

Galyna Andrushko, 123rf.com


Experienced users on Unix/Linux-based systems such as Ubuntu sometimes prefer to work in text mode from

a terminal window. We’ll show you some terminal tricks with environment variables. BY HEIKE JURZIK

U
buntu’s Terminal accessory To access the terminal window, select the user’s home directory, and many
opens a text-based command Accessories | Terminal in the Ubuntu other things.
window that uses a command main window. An environment variable has three
system called Bash (Bourne Again If you enter a command like ls in the parts: the name, an assignment operator
SHell). shell, the shell knows you want to call (=), and a value:
the /bin/ls program. Bash knows where
Listing 1: env Example to look for executables, so you don’t variable=value

01 huhn@asteroid:~$ env
need to type in the full path. This path is
defined in what is known as an environ- The name can include upper- and lower-
02 TERM=xterm
ment variable. Variables of this kind are case letters, underlines, and numbers.
03 SHELL=/bin/bash
also used to modify the appearance of The only restriction is that a table can’t
04 USER=huhn
the shell prompt, set the time zone and start with a number. If the value of the
05 LS_COLORS=no=00:fi=00:...

06 PATH=/usr/local/bin:/usr/bin:/bin:/
usr/bin/X11:/usr/games:/home/huhn/
Tip GLOSSARY
bin
Instead of using two separate com- builtin: an abbreviation for “built-in
07 IRCSERVER=irc.freenode.net mands (e.g., LESS="-X"; export LESS), command.” Commands like this are
08 LANG=de_DE@euro you can define and export all at once: built in to the shell, and you do not need
09 ... export LESS="-X". to run a special program to use them.

58 ISSUE 01 UBUNTU USER


GET YOUR HANDS ON SOME

Listing 2: export Example


HOT NEW BOOKS
01 huhn@asteroid:~$ export

02 declare -x CHARSET="latin1"

03 declare -x LS_COLORS="no=00:fi=00:..."
FROM APRESS
04 declare -x IRCSERVER="irc.freenode.net"

05 ...

06 huhn@asteroid:~$ export -n IRCSERVER

Peter Seebach
variable contains blanks or nonstandard characters, you have 978-1-4302-1043-6
to double-quote your input: | |
$34.99 376 pp November 2008

LESS="-X"

Welcome Home
Ron Peters
Every user on an Ubuntu system has a place he or she can 978-1-4302-1841-8
call home; Bash provides a fully furnished environment for | |
$39.99 330 pp December 2008
every single account. To discover which variables your home
uses, type env (for “environment”).
Listing 1 shows an example. Some of the variables in List-
ing 1 are set by the user. Other shell variables are predefined
but can be modified as necessary. The convention is to use Kirk Bauer and Nathan Campi
uppercase letters. 978-1-4302-1059-7
Table 1 gives an overview of common variables for Bash. | |
$49.99 425 pp December 2008

Looking into Cupboards


The echo command allows you to discover the value of a vari-
able. To display the value of an environment variable, use the Andy Channelle
978-1-4302-1590-5
echo command with a dollar sign in front of the variable
name:
| |
$39.99 500 pp December 2008

huhn@asteroid:echo $LANG
de_DE@euro
huhn@asteroid:echo $PS1
\u@\h:\w\$
Sander van Vugt
978-1-4302-1622-3

The shell replaces the variables $LANG and $PS1 with their
| |
$44.99 400 pp December 2008

respective values and then calls echo to output the text.

Sander van Vugt


978-1-4302-1082-5
| |
$39.99 424 pp September 2008

For more information about Apress titles,


please visit www.apress.com
Don’t want to wait for the printed book?
Order the eBook now at
http://eBookshop.apress.com!

Figure 1: The .bashrc file in your home directory provides informa-


tion on the Bash environment. First, choose Places in the Ubuntu
main window and then Home Folder. If you don’t see .bashrc in the
File Browser, select the View menu and click on Show Hidden Files.
Desktop Environment Variables

Language and Locale and looking for your language with the variables. The -n option deletes a vari-
The LANG command lists the language Search tool. able from the list. Listing 2 gives a cou-
and locale settings for your environ- ple of examples.
ment. To see the locale options available Change
on your system, type: As you have seen, you can easily change Home Improvements
a variable by entering its name, the as- Any variables you export are only effec-
locale -a signment operator, and the value. Vari- tive in the current shell and its child pro-
ables defined in this way are only valid cesses. To set up a variable permanently,
If your Ubuntu system is configured for for the current terminal session. To ex- you need to modify your Bash configura-
US English (the en_US.utf8 locale) but port the settings, you need the aptly tion file and reload your environment.
your preference is for British English, named export command. This command To do so, add your new export com-
you can change the language setting makes the settings accessible to child mands to one of the Bash startup files,
with the following command: processes and subshells. such as ~/.bashrc (Figure 1), then parse
For example, if you are an IRC user, the file once you’ve finished your home
LANG=GB you can set the IRCNICK, IRCNAME, and improvements:
IRCSERVER variables for the current
The shell even lets you define the lan- Bash shell to tell command line--based source ~/.bashrc
guage setting for certain specific applica- IRC clients which nick and name to use
tions: to log on automatically to a specific IRC Listing 3 shows a couple of practical en-
server. If you then launch a second shell vironment variables, including com-
LANG=GB firefox from the first one and try to output the ments, that should make you feel at
values of the new variables, you won’t home. n
Also, you can configure your environ- see a thing. First you need to quit the
ment for different languages: second shell by typing exit (Ctrl+D) and Listing 3: Environment
export the new variables. Now open a Variables
LANG=FR firefox new shell from the first one and you will 01 # prevents "less" from leaving an

see that it has inherited variables, which empty

If the language you want to add are now available in the subshell. 02 # screen at the end of the output:

doesn’t appear with the locale -a com- The export builtin has more tricks up 03

mand, you will need to install it through its sleeve. In combination with the -p op- 04 export LESS="-X"

the Ubuntu repositories. To do so, try tion, or when called without any param- 05
going to the Synaptic package manager eters, it displays a list of all exported 06 # adds a touch of color: user
prompt in

Table 1: Standard Bash Environment Variables 07 # green, root prompt in red:

Variable Meaning 08

CDPATH Search path for the cd command 09 if [ $(id -u) = 0 ] ; then

EDITOR Standard text editor 10 COLOR1='\[\033[00;31m\]'

HISTFILE History file (e.g., ~/.bash_history) 11 else

HISTSIZE Maximum number of commands in history 12 COLOR1='\[\033[01;32m\]'

HOME Home directory for the user account 13 fi

HOSTNAME Hostname 14

LANG Language for program output, such as the date format, etc., assuming 15 COLOR2='\[\033[00;33m\]'
none of the LC_ variables (see below) have been set. With the locale 16 COLOR3='\[\033[00;37m\]'
command, you can output a listing of all defined language variables.
17 PS1=$COLOR1'[\u@\h'$COLOR2'
LC_ALL Country setting, such as C or de; this overrides LANG and any other
\W'$COLOR1']'$COLOR3'\$ '
LC_ variables.
18 PS2=$COLOR1'>'$COLOR3' '
LC_MESSAGES Language for program and error messages
19
LC_TIME Time format
20 # I want the CET time zone on my
LOGNAME Login name of user
server in Canada:
MAIL Path to the user’s mailbox (incoming mail)
21
MANPATH Search path for man pages
22 export TZ=CET
PATH Search path for executables
23
PS1 Default appearance of the shell prompt. For non-privileged users, this
is typically \u@\h:\w\$ (huhn@asteroid:~$ in this example); for the ad- 24 # I want ispell to use the correct
ministrator, this is typically \h:\w\$ (asteroid:~#). character set

PWD Name of the current directory (“print working directory”) 25 # and the correct dictionary:

SHELL Full pathname of the current shell (/bin/bash) 26

TERM Terminal settings, such as xterm or vt100 27 export DICTIONARY=ngerman

TZ Time zone, such as CET or MET 28 export CHARSET=latin1

60 ISSUE 01 UBUNTU USER


Discovery
Guide
Peek inside for a practical introduction to Ubuntu, including tips on
installing, configuring, and exploring your new Ubuntu system.
Installing Ubuntu.................................... 62 Printing .......................................................74 Installing Software ................................ 82
Exploring................................................... 64 Multimedia ...............................................76 Email .......................................................... 84
Networking ...............................................67 Burning CDs............................................. 78 Taking Notes ........................................... 88
Security.......................................................71 Managing Photos ................................. 80 OpenOffice ............................................. 90

All jackalope cartoons in this issue were created by K. Curtis Shontz, www.theagilebadger.com
Installation

Installing
Ubuntu
If your hardware supports Ubuntu, you should have
your new system up and running in less than an hour.
BY CARSTEN SCHNOBER

The Ubuntu DVD enclosed with this issue in- The first item in the
stalls on most contemporary Intel-compatible boot menu, Try Ubuntu
PC systems. The machine you use will need at without any changes to
least 384MB of RAM. Certain graphics cards, your computer, lets you
WLAN chipsets, and other components might boot the system in Live
not be supported by Ubuntu. Included on the mode from the DVD.
DVD is a Live boot option that allows you to As mentioned previ-
boot Ubuntu from the DVD without disturbing ously, you can try a
the contents of your hard disk. To start, you Live boot first before
might want to perform a Live boot from the committing to a hard
DVD to test for any hardware compatibility is- disk install. To navi-
sues before you do a conventional installation. gate the menu, use
If you boot to the Live system, you will find a the arrow keys and
folder called Examples on the desktop with a press Enter to select.
variety of test files for exploring multimedia The Check disc for
and office applications and other Ubuntu fea- defects and Test RAM
tures. options take you to a
If you experience problems with hardware couple of test rou-
support, see Ubuntu’s online help sources for tines. If you have de-
additional information. The Ubuntu Jaunty cided that you just
Jackalope release notes are a good starting want to boot your old
point [1]. Ubuntu also provides forums [2], a system normally and
wiki [3], and other sources for troubleshooting ignore the contents of
information [4]. the DVD, select Boot
from the first hard Figure 1: After booting from the installation DVD, you have a large
Getting Started disk. If you are sure selection of options. Take time to get to know the system before you
First, place the DVD included with this issue in that you want to in- load it onto your hard disk.
your DVD drive and reboot. If all goes well, stall Ubuntu on your
the boot menu shown in Figure 1 will appear hard disk, select Install Ubuntu. technical in nature. The first thing you need to
on your screen. If you don’t see the boot menu, do is specify your preferred desktop language
make sure your BIOS is configured to start the Step by Step and locale.
system from the DVD drive. (See the box titled Most of the prompts from the Ubuntu installer In the next dialog, you need to tell Ubuntu
“Boot Order.”) are just informational and are not necessarily the time zone in which your computer resides.
To set up your clock correctly, choose a city in
Boot Order the list that shares the same time zone as your
machine.
The BIOS (Basic Input/Output System) de- do so, enter the BIOS menu by pressing
The keyboard layout dialog follows. The sys-
cides which drive to use to load the oper- the necessary key (e.g., F2 or Del) when
ating system. you power the system on. (The correct key tem will suggest a keyboard layout that reflects
will depend on your flavor of BIOS. See your choice of language, and it will assume a
If your system doesn’t boot to the DVD by
default, watch for the message displayed the vendor documentation for your moth- standard PC keyboard. If needed, variants such
when you power on, telling you now to erboard. Instructions for reaching the boot as Macintosh keyboards or keyboards with no
change the boot order. Look for something menu often appear in the screen mes- Dead Keys are available; the latter does not un-
like Press X for boot manager, where X sages when you power your system on.) derstand accents or non-standard characters.
represents a key (often the F8 key). In the BIOS menu, look for an item labeled In the input box, you can test your choice of
If your BIOS doesn’t have a boot manager, Boot. Set the options so that the DVD drive keyboard.
you need to change the order manually. To has a higher priority than the hard disk. The next step lets you choose the hard disk
partition on which to install Ubuntu (Figure 2).

62 ISSUE 01 DISCOVERY GUIDE


Installation

Figure 2: In the partitioning phase, you specify the hard disk area in Figure 3: Carefully check the overview before you install your new
which you will be installing Ubuntu. You also get to decide how operating system. Any pre-existing data on the partition to which
much of the disk to use for Ubuntu. you are installing will be lost.

A partition is a section of the hard disk that is from existing Windows and Linux systems on details carefully; once you confirm, the instal-
treated as a single entity by the filesystem. If the hard disk. If you have multiple user ac- lation will start.
the disk is empty, or if you don’t care about counts, select the accounts you want to import,
losing the data and operating systems currently then select the information you want to import. Let the Games Begin
residing on your disk, choose the Use entire The wizard will import bookmarks from Firefox After the installation, you should remove the
disk option to use the whole disk for your and Internet Explorer, along with the wallpaper DVD from the drive, shut down the system,
Ubuntu installation. and files from the My Files directory structure and press Enter to boot your new Ubuntu sys-
The installer is capable of setting up Ubuntu on a Windows system. Note that this will only tem for the first time. The computer will load
to dual-boot with an existing Windows or work if you retain the Windows system on your Ubuntu and present a login window in which
Linux installation. In this case, you will need to disk! you can type your username and password
install Ubuntu on a separate partition. All data Finally, the installer asks you for your name, (unless you enabled the Automatic Login op-
on the partition you use to install Ubuntu will username, and password. To make life more tion earlier).
be lost. Select Specify partitions manually to difficult for potential attackers, the password After you log in, it is a good idea to upgrade
resize, delete, and create partitions. As you can should contain at least eight characters, some your system with any recent bug fixes or secu-
see in Figure 2, this manual configuration op- of which should be numbers and letters. The rity updates that have appeared since this DVD
tion is considered an advanced skill. For addi- system also suggests the hostname, which is was published. New packages are installed
tional background on how to configure parti- used to talk to the machine on the local net- over the Internet, so you’ll need to have a
tions, see the Ubuntu website [5]. Also, don’t work. To finish this part of your installation, working Internet connection to download and
forget to back up any important files on the you can enable the Automatic login option if install the latest packages.
previous system. you want to log in without entering a password To update your system, select System | Ad-
when you boot the machine. ministration | Update Manager to launch the
Migrants Welcome! Before the installation starts, the installer Update Manager. For more on installing soft-
After you decide on a partition configuration, shows you an overview of your configuration ware packages in Ubuntu, see the article on
the installer offers to parse settings and files choices (Figure 3). Just make sure to read the managing packages. ■

Boot Options Info


If your system fails to boot or does not Management Interface (ACPI). Your com- [1] Ubuntu Jaunty Jackalope release
work properly with the defaults, you can puter’s power-saving features will not notes:
set manual boot parameters to resolve the work with this setting, but you might be http://www.ubuntu.com/getubuntu/
issue. In the boot menu, press F1 for an able to convince imperfect hardware to co- releasenotes/904
overview. If needed, you can press F2 and operate with Ubuntu.
[2] Ubuntu forums:
F3 for an alternative language and key- The noapic and nolapic options also are http://ubuntuforums.org
board options. F4 lets you use a safe commonly used for imperfect mother-
graphics mode – a useful workaround for [3] Ubuntu wiki:
boards. These options pass the responsi-
problems caused by missing graphics https://wiki.ubuntu.com
bility for hardware addressing to the oper-
adapter drivers. ating system rather than the motherboard. [4] Official Ubuntu documentation:
Pressing F5 sets up the display for special No simple rule lets you determine which https://help.ubuntu.com/
needs. F6 lets you select options for buggy of these options will help you solve boot [5] How to partition:
motherboards. acpi=off disables the use of issues, but I suggest trying acpi=off, no- https://help.ubuntu.com/community/
the Advanced Configuration and Power apic, and nolapic, in that order. HowtoPartition

DISCOVERY GUIDE ISSUE 01 63


Exploring the Desktop

Exploring the
Desktop
Make yourself at home on the Ubuntu desktop.
BY CARSTEN SCHNOBER

Unlike Windows and Mac OS X, Ubuntu and enable automatic login,


other Linux systems separate the desktop click System | Adminis-
graphical user interface (GUI) from the under- tration and then select
lying system. The standard desktop included Login Window to display
with the main Ubuntu release is Gnome [1]. the Login Window Pref-
This introduction assumes you are using the erences dialog box. The
standard, Gnome-based desktop included on Security tab takes you to
the DVD accompanying this magazine. Other the Enable Automatic
desktops, such as KDE [2] and Xfce [3], are Login function (Figure
also popular. Kubuntu [4] is an attractive KDE- 2); you also need to select your own user ac- move entry lets you search for and install addi-
based variant of the Ubuntu distribution. If count from the list. tional programs or remove existing programs,
your computer does not have much RAM, you by checking or unchecking the boxes next to
might prefer Xubuntu [5], which installs with Menus the entries (Figure 4).
the Xfce desktop. (See the box titled “Desk- Once you have finished logging in, you will The top entries in the Places menu take you
tops.”) find three menus in the top left corner of your to directories in your home directory – that is,
screen (Figure 1). These menus – Applications, to the folders containing files for your account.
Logging In Places, and System – let you launch programs, The Desktop option opens the directory for the
The Ubuntu desktop launches with the login navigate the filesystem and the network, and desktop, where your desktop files are stored.
screen (Figure 3) when you enter your user- configure your system and desktop, respec- All of your personal files and directories are lo-
name and matching password. Clicking on tively. cated below your Home Folder. If you select
Options lets you select a different language or The Applications menu is arranged topically Bookmarks | Add Bookmark in the file
desktop environment. by program type. For example, Universal Ac- browser, you can use the Places menu to ac-
If you don’t share your computer, you can cess contains software to support users with cess the bookmarked folders directly.
avoid the need to log in by enabling Automatic special needs; the Internet option lets you If you need to investigate files outside of
Login. Either enable this option during the in- choose a web browser, as well as Internet tele- your home directory, you can use the Com-
stallation or after logging in to the desktop. To phony, email, and chat programs. The Add/Re- puter option to access the hard disk and other
external media, such as CDs and USB sticks.

Figure 2: If you want to avoid entering your


username and password, choose Enable
Figure 1: The menus in the upper panel give you access to Ubuntu’s desktop applications. Automatic Login.

64 ISSUE 01 DISCOVERY GUIDE


MISSING
LINUX MAGAZINE?

Figure 3: Before you can start working, you need to log in.

The desktop opens USB sticks automatically in a separate window


when you plug them in.
The Network entry takes you onto the local network and shows
you the other machines inside your home or office network, along
with any network shares. Also, you can access Internet servers di-
rectly via the desktop, although this does involve a small work-
around. If you select Connect to Server, a window appears with sup-
port for popular transport protocols (Figure 5). To access an SSH
server via the Internet, select the SSH entry as the Service type, then
type the Server name and your User Name. If you want to access a Ever have problems finding Linux
particular folder after logging in, you can enter a Folder name. Now
you’re ready to click Connect to open the connection to the server Magazine on the newsstand?
and move your files back and forth, just as if they were on the local Just ask your local newsagent to
filesystem. To use the connection on a regular basis, you should
check the Add bookmark option in the Connect to Server dialog box reserve a copy of Linux Magazine
and type an intuitive name for the connection. Then you can use the for you!
bookmark later to open a connection.

Setting Up the System Simply download our Just Ask!


The System menu lets you customize system and desktop settings. order form at www.linux-magazine.
The menu items are organized in two categories Preferences and Ad-
ministration. Preferences gives you options that do not affect the sys-
com/JustAsk, complete it, and
tem globally. On a multiuser system, every user can choose their take it to your local newsagent,
own settings. For example, System | Preferences | Appearance | Visual
Effects lets you enable the 3D desktop (assuming you have 3D accel-
who will reserve your copy of
erator support). Appearance | Display lets you change the screen res- Linux Magazine.
olution. If you use an nVidia graphics card, Ubuntu will automati-
cally call the nVidia tool to handle this task. Some newsagents even offer home
The other item in the System menu, Administration, is for settings
that have a more fundamental effect on the system as a whole. These
delivery, making it even easier
settings are typically available only to the system administrator. Be- to ensure you don’t miss
fore accessing the options in Administration, you will need to pro-
vide a password. (The first user account you set up in Ubuntu has ad-
an issue of Linux
ministrative privileges.) Magazine.
Desktops
The Ubuntu variants Kubuntu and Xubuntu install alternative
desktops by default; however, you don’t need a whole differ-
ent Ubuntu distribution just to experiment with other desktop
options. If you want to try KDE or Xfce, just launch the Synap-
tic package manager, look for kubuntu-desktop or xubuntu-
desktop, and install one or both. However, you will need
some free disk space (about 500MB). After installing the alter- SPECIAL SERVICE
native desktops, boot your PC to the Ubuntu login desktop
and click Options | Select Session (Figure 2). FOR OUR UK READERS!

www.linux-magazine.com/JustAsk
Exploring the Desktop

Figure 4: The Gnome menu lets you install and remove new programs at the click Figure 7: Customizing the Ubuntu panel is done from
of a mouse. the Add to Panel dialog box.

The entries in this menu item let you update Privileges tab lets you modify the details of a charge status. Clicking your name lets you log
your software collection by calling the Synap- user’s account. off, shutdown, or restart the computer. Also,
tic package manager, install proprietary drivers you can switch to another user account with-
(Hardware Drivers), and check your hardware Panels out quitting the current session. A Guest ses-
(System Monitor or Network Tools). The USB Next to the menus, you will see launchers for sion is useful for one-off users because it de-
Startup Disk Creator allows you to install the Firefox web browser, the Evolution email letes any files the guests create in their home
Ubuntu on a USB stick. This option lets you and calendaring application, and the help sys- directory when they log off again.
carry a bootable Ubuntu system, including tem. By right-clicking and selecting Remove At the bottom edge of the screen is another
your files, wherever you go. from panel, you can remove these icons from panel that you can customize to suit your own
Although the system regularly checks for up- the panel. If you prefer a different email pro- needs. By default, it shows you all the program
dates on its own, the Update Manager allows gram, you can add the icon for your own mail windows that are currently open. Clicking on
you to check manually for system updates. If it client, instead of Evolution, by right-clicking a an icon for a window moves the window to the
finds any in automatic mode, it displays a mes- free space in the panel, selecting Add to Panel, foreground. The button on the bottom left
sage in the panel at the top of the screen. and in the dialog that then appears, selecting iconizes all the active windows; the button in
Clicking the icon takes you to a window in Application Launcher (Figure 7). Now you can the bottom right is for the trash can, where any
which you can automatically install the latest locate the program in the menu structure. files you delete are temporarily stored until you
versions of your choice of software. The desktop provides several panel applets empty the trash.
When you create a user account in System | that let you monitor system activity, integrate Next to the trash can in the bottom panel is
Administration | Users and Groups, you can set new functions, or just have fun. For example, the pager, which is a feature that lets you open
a Profile for each user – for example, Adminis- you can add a Fish that will swim around on any number of independent screens and switch
trator, Desktop user, or Unprivileged (Figure your desktop, make notes of events on yellow back and forth between them by clicking the
6). Administrators are allowed to change sys- Sticky notes, or check the Weather report. boxes. This setup is a useful way of separating
tem settings, whereas Desktop users are not. Applets are preconfigured panel elements tasks, in that you can access a fresh workspace
Unprivileged users are given a fairly restricted that appear top right on your screen; they will without closing the windows on the current
workspace that even prevents access to exter- differ slightly depending on your system. Be- desktop. If the default of two workspaces is not
nal media and multimedia devices. The User sides the clock, you will see the network man- sufficient, right-click the pager, select Prefer-
ager, and, if you have a laptop, the battery ences, and enter the number of Columns and
Rows under the Workspaces field.

Newbie-Friendly
Ubuntu and the Gnome desktop offer a flexi-
ble, versatile working environment for begin-
ners and advanced users. Other articles in this
Discovery Guide provide a closer look at
some tools of the Ubuntu environment. ■

Info
[1] Gnome: http://www.gnome.org
[2] KDE: http://www.kde.org
[3] Xfce: http://www.xfce.org
[4] Kubuntu: http://www.kubuntu.org
Figure 5: Choose Connect to Server in the
[5] Xubuntu: http://www.xubuntu.org
Places menu to access an Internet server. Figure 6: Setting privileges for a new user.

66 ISSUE 01 DISCOVERY GUIDE


Networking

Networking
Ubuntu will connect automatically if your
network uses DHCP. Configuring a static
connection takes a little more time. If
you’re going wireless, you might need to
install a driver.
BY KRISTIAN KISSLING AND MARCEL HILZINGER

Access Control (MAC) addresses. In that case,


you’ll need to add your computers’ MAC ad-
dress to the DHCP server. To find out, contact
your ISP or consult your DHCP server docu-
mentation.
The MAC address is a permanent address
that is associated with your network adapter.
To determine the MAC address for your system,
open a Terminal window – Applications | Ac-
cessories | Terminal – and enter ifconfig. Now
look for the setting labeled HWaddr (outlined
Ubuntu sets up networking automatically on your ISP’s DHCP server. Your Ubuntu system is in Figure 1). Also, you can right-click on the
most systems, but, depending on your configu- set up to receive a configuration automatically Network Manager applet in the upper-right
ration, you might occasionally prefer to define through DHCP. As long as your system is con- corner of the Ubuntu panel and select Edit
your settings manually. In this article, we take a nected to a network and has access to a DHCP Connections.
look at TCP/IP networking on conventional server, Ubuntu will configure TCP/IP network-
(wired) networks as well as wireless LANs. ing for you. Configuring a Static IP Address
If your system does not successfully receive Before you assign a static IP address, you will
DHCP an automatic connection through DHCP, make need to know the address you plan to use, the
On most modern PC networks, the IP address sure your computer is properly connected to subnet mask, the gateway address of the router,
and other network configuration settings are the network and the DHCP server is online. and the address of the DNS server. To set up a
assigned through a Dynamic Host Configura- Some DHCP servers assign IP addresses only to static IP address, right-click the Network Man-
tion Protocol (DHCP) server. If you are working computers on a pre-authorized list of Media ager icon on the upper-right side of the panel
on a home network, your home router/firewall
device is probably acting as a DHCP server. If
you connect directly to your ISP’s network,
your computer will receive an address through

IPv4 vs. IPv6


Because “only” four billion possible IPv4
addresses exist worldwide, the plan is to
replace these addresses in the future
with IPv6 addresses, which comprise
eight blocks of 16 bits and thus support
up to 2128 addresses. However, in real life,
IPv4 addresses are still more common.

Tip
To manually request a DHCP address
from the DHCP server, open a terminal
and type sudo dhclient (Figure 2). The
server will then assign you a new IP ad-
dress. This option is useful if the Net-
work Manager isn’t running or isn’t co-
Figure 1: The ifconfig command provides a summary of network configuration information.
operating.
The HWaddr setting refers to the MAC address.

DISCOVERY GUIDE ISSUE 01 67


Networking

Figure 2: The dhclient lets you manually request a private IP address from the Figure 4: The Network Tools application provides a GUI
DHCP server. interface for classic Unix network utilities.

and select Edit Connections. In the network nection Information for a summary of network such as 80.237.227.149 for Linux Magazine
connections window, click on the Wired tab settings. Online.
and press the Add button. Start by typing a If you can’t access the Internet, start by ping- If the website responds to the ping, the prob-
name for the connection (say, static), then go to ing the router and its gateway address: lem might be due to DNS name resolution
the IPv4 Settings tab (Figure 3) and select the rather than IP networking. Try pinging the same
Manual entry in the drop-down menu. Now ping 10.0.2.2 address by its domain name:
click Add and type a static IP address for the
computer (10.0.2.253 in Figure 3), followed by (Type Ctrl+C to stop the output and return to ping www.linux-magazine.com
the netmask (255.255.255.0) and the gateway the command prompt.) If this does not work,
(i.e., router) address (10.0.2.2). Because the the router might not be working or the cable If you can reach the address by its IP address
router on a small network typically is also the between the router and your computer might but not by its domain name, the problem is
DNS server, the server address in Figure 3 is be damaged. Also, you can ping the “loopback probably with DNS.
also 10.0.2.2. Clicking Apply saves the address” 127.0.0.1, which gives an indication
changes. To enable the new settings, left-click of whether your networking software is suc- Network Tools
the Network Manager icon and select the static cessfully connected to your the networking Ubuntu provides a number of classic Unix/
connection. hardware. Linux configuration and troubleshooting utili-
If your connection to the router is working, ties via a convenient GUI interface. To reach
Network Problems you can try pinging an IP address that you are the Network Tools application, select System |
The ifconfig command provides a summary of familiar with of a website beyond the router, Administration | Network Tools (Figure 4).
the IP configuration. Also, you can right-click
the Network Manager icon and choose Con-
Adding a Static Address Manually
Of course, Linux wouldn’t be Linux if you couldn’t delve deeper and add the IP address
manually to the /etc/network/interfaces file. To start, stop the existing network by typing
sudo /etc/init.d/networking stop. Then press Alt+F2 and type gksu gedit to launch the
Gedit editor with administrative privileges. Add the parameters from the Static IP box to
the /etc/network/interfaces file:
auto eth0

iface eth0 inet static

address 10.0.2.253

netmask 255.255.255.0

gateway 10.0.2.2

The first two lines auto-enable the network interface (auto eth0) and tell the computer to
set up a static IP address (static). If the computer has multiple network adapters, you
need to specify the name of the adapter (eth1, eth2, etc.). The third line specifies the value
for the static IP address. The fourth line contains the subnet mask (255.255.255.0), and the
last line contains your router’s gateway address, which you discovered previously. Now
save the file and then open the /etc/resolv.conf file. This file is very important because it
contains the address of the name server that converts IP addresses to domain names.
Next, add the line nameserver 10.0.2.2, save the file, then type sudo /etc/init.d/networking
start to restart the network. When you type /sbin/ifconfig in the terminal window, you
Figure 3: Setting up a network connection should see your static IP address.
with a static IP address.

68 ISSUE 01 DISCOVERY GUIDE


Networking

Advanced networking tech-


nologies, such as virtual pri-
vate networks, mobile broad-
band, and DSL, are also man-
aged through the Network
Manager. If you are looking for
information on a network con-
nection, select the connection
in the Network Manager and
click the Edit button.
Figure 6: Left-clicking Network Manager dis-
Wireless plays the names of the WLANs within range.
Networking
Assuming the kernel supports
your WLAN card, Ubuntu 9.04
will automatically launch Net-
work Manager or a corre-
sponding Gnome applet. In
Figure 5: Studying the network with the Network Tools the panel, you will see a com-
Netstat tab. puter icon or – while the con-
nection is opening – two gray
The Devices tab (shown in Figure 4) pro- dots that turn green if the connection attempt
vides statistics on network devices. To review is successful.
transmission statistics, choose a network inter- If wireless support is configured correctly, Figure 7: Network Manager has identified a
face in the drop-down menu. The Ping, Netstat, clicking on the Network Manager icon reveals network with the highly insecure WEP
and Traceroute tabs offer a GUI approach to a list of available WLAN networks (Figure 6). encryption and is now displaying the corre-
these classic tools. Traceroute shows the path When you select an entry, the applet attempts sponding interface.
through a chain of routers to a specific network to associate with the access point for the net-
address. The Netstat utility provides some use- work. If the WLAN uses encryption, a pass- with Ubuntu. The Linux kernel has built-in sup-
ful network statistics (Figure 5). To update the word dialog appears (Figure 7), from which port for many wireless drivers, such as drivers
display, choose a radio button and click the you can choose the encryption type: WEP or for Intel wireless cards. However, certain de-
Netstat button. WPA. Here, you type the password and click vices can cause complications. If your WLAN
Connect. After a couple of seconds (assuming system isn’t working, one common cause is the
Network Manager all goes well), the WLAN connection opens: WLAN driver.
The Network Manager application in the up- The icon changes into a bar chart that shows Most USB devices use a Ralink chipset, and
per-right side of the panel is a central interface the reception strength. If things work perfectly, the current Ubuntu has the necessary Rt73
for viewing and editing the network configura- the whole process should take no longer than a support (see the box titled “Installing the Rt73
tion on your computer. Network Manager al- couple of seconds, and it will not cost you Driver”).
lows you to set up your network, check on the more than a couple of mouse clicks. Linux drivers are available for most of the
network status, and view various network sta- current crop of “Draft N” USB sticks, which
tistics. Wireless Drivers use the 802.11n standard, because these sticks
Even if you don’t have a cutting edge device, typically rely on the Ralink RT2870 chip, for
chances are your WLAN adapter will work which the manufacturer offers Linux drivers.
Installing the Rt73 Driver
If you use one of the very popular
Rt73 chipsets on Ubuntu 9.04, the in-
The Router
stallation is very simple. Start by Home and office wireless networks typically operate through some form of wireless ac-
checking which chipset you have by cess point device that acts as a router. Wireless router setup normally involves accessing
typing tail -f /var/log/messages in a a web interface in a browser by typing the router’s IP address. Different routers provide a
terminal to read the system log, and range of configuration options. See the documentation for your wireless WLAN device
for more on setting up your wireless router.
then plug in the stick. The output
should look something like Figure 8; You should set up a name (or ESSID) for your wireless network. You might also have an
the usbcore: registered new interface option to set the frequency on which the router transmits; however, you should not
line should give you the driver name change the frequency unless you are working in an environment with a large number of
used by the WLAN card. If this name wireless networks that have experienced problems.
is rt73usb, as in the figure, you can go When opening a connection, Ubuntu automatically uses the channel offered to it by the
on to install the rt73-common pack- access point. Depending on what country you are in, some frequencies might be re-
age with the firmware for the chip. stricted for private use.
Then use Network Manager to associ- Another important consideration for your wireless network is encryption. An unen-
ate with the access point. If you need crypted WLAN network can be used for Internet access by any computer in a range of
a different driver, search for the name about 100 meters (depending on the router’s transmitter power), which means that an in-
of the driver in Synaptic, or check the truder in a nearby house or car can easily snoop on your unencrypted communication.
excellent Ubuntu community help Many routers offer the option of WEP or WPA encryption. WEP is generally regarded as
page [1]. totally insecure, and thus it typically isn’t used. WPA offers much better protection.

DISCOVERY GUIDE ISSUE 01 69


Networking

Info
[1] Ubuntu wiki:
https://help.ubuntu.com/community
[2] Ralink drivers for Draft N cards:
http://www.ralinktech.com/ralink/
Home/Support/Linux.html

Figure 8: From the system log, you can discover the name of the driver for your WLAN card. Table 1 gives you an overview of well-sup-
ported USB sticks. Note that the manufacturers
However, these drivers have not (yet) been in- pliance with your local requirements. (If you frequently change the hardware without re-
tegrated with the kernel, so you need to install chose a different driver from the Ralink home- naming the models.
them manually. page, replace RT2870STA with the name asso-
Unlike the official Linux kernel, Ubuntu ciated with your driver.) Legacy Burdens
supports WLAN cards and USB sticks with the Take care of the following entries Normally, Network Manager provides the easi-
RT2860 and RT2870 chipsets. If you have a de- est approach to setting up a WLAN device.
vice with an RT3070 chipset, you need to CountryRegion=0 However, Network Manager does not support
build the Linux drivers manually. CountryRegionABand=2 certain legacy WLAN sticks and cards. If Net-
To build the drivers, start by using the Synap- CountryCode=US work Manager is not cooperating, Ubuntu of-
tic package manager to install the linux-head- WirelessMode=5 fers a manual configuration option. Start by
ers-kernelversion and build-essential packages. clicking on the Network Manager icon and se-
(Replace kernelversion with your kernel ver- and see the README_STA file for a detailed lecting Edit Connections. Now go to the Wire-
sion.) After downloading the drivers from the description of the configuration. less tab, select the first entry, and click Edit to
Ralink homepage [2], right-click the archive in Now reboot your machine and check to see change the settings. In the new dialog box, first
the file manager to unpack in your home direc- whether the driver is working by first typing choose the Wireless tab, then uncheck Con-
tory. The archive includes a README_STA file; iwconfig in a terminal (Figure 9) and then typ- nect automatically and enter the required pa-
the Build Instructions section describes how to ing iwlist chan. In the final section of rameters.
modify the config.mk file in your favorite editor README_STA, you will find out how to load
before compiling the software. In order for the the module automatically when you boot your Conclusions
driver to cooperate with the Network Manager, machine. Once you have taken the time to set up the
the config.mk file, which is found in the subdi- If you have a USB stick with a chipset that adapter, opening a WLAN connection be-
rectory os/linux/config.mk, must contain the the driver does not know, you will need to comes easy. If you often work at different loca-
following lines: enter the USB ID in a file. First, launch an edi- tions, Network Manager remembers individual
tor and open the os/linux/usb_main_dev.c file connections and logs in automatically wher-
HAS_WPA_SUPPLICANT=y in the directory with the downloaded driver. ever possible. ■
HAS_NATIVE_WPA_SUPPLICANT_U Now you need to
SUPPORT=y scroll down to about
line 100, where the
After adding (or editing) these lines, change to list begins for the
the driver directory with Makefile, and type supported sticks and
make. This command will build the module, matching USB manu-
which could take up to 30 minutes depending facturers and device
on your CPU. The sudo make install command IDs. This is where you
then installs the module. enter your stick’s ID.
If this process completes without errors To discover your
(warnings are okay and can be ignored), the stick’s ID, plug in the
driver should work. Copy the file RT2870STA. stick and type lsusb
dat in the source directory to the /etc/Wireless/ in a terminal. After
RT2870STA directory. Again using a text editor completing these
and armed with administrative privileges changes, build the
(Alt+F2 and gksu gedit), you should now edit driver by typing make
the /etc/Wireless/RT2870STA/RT2870STA.dat and sudo make in- Figure 9: The iwconfig command displays information on wireless
file to modify the transmission range for com- stall. connections.

Table 1: Representative USB Devices


Manufacturer Belkin Buffalo Conceptronic D-Link Hama Hama Hama Linksys Linksys Sitecom
Model F5D8053 WLI-UC-G300N C54RU DWA-140 39749 62778 62744 WUSB600N WUSB54GC WL-302 v1 001
Modes b/g/n b/g/n b/g b/g/n b/g b/g/n b/g a/b/g/n b/g b/g/n
Chipset Ralink Ralink Ralink Ralink Ralink Ralink Ralink Ralink Ralink Ralink
Driver rt2870sta rt2870sta rt73 rt2870 rt73 rt2870sta rt73 rt2870sta rt73 rt2870sta
Interface ra0 ra0 wlan0 ra0 wlan0 ra0 wlan0 ra0 wlan0 ra0
Price (approx.) US$ 55 US$ 55 n.a. US$ 50 EUR 20 EUR 20 EUR 20 US$ 65 US$ 51 n.a.
n.a. means the device is no longer available.

70 ISSUE 01 DISCOVERY GUIDE


Ubuntu Linux Security

Safety First
Linux is a very secure system, but it still pays to be cautious.
BY ACHIM LEITNER AND CARSTEN SCHNOBER

Security is one reason many users switch to lete every file, remove every directory, and cre-
Linux from Windows. With the rising impor- ate new directories wherever you want.
tance of computers in daily life, more and
more private data are stored on desktop sys- Risky Business
tems. The hunt for bank account access keys Windows users who do their daily work as Ad-
has become big business, and many users also ministrator to avoid annoying privilege restric-
store private messages, business plans, and tions are taking a serious security risk. This
other sensitive information on home PCs. warning also applies to the root user account
A fresh installation of Ubuntu is much less in Linux. The root account should only be used
vulnerable than a comparable Windows sys- for administrative work when it is required.
tem. Spyware, trojans, viruses, and other attack Even if you are charged with the task of admin- new software, or adding or removing software,
vectors have not settled in the world of Linux istering the computer and are given the root Ubuntu asks for the user’s normal password.
as they have with other systems, but it is im- password, you should still give yourself an or- In one sense, this approach has the effect of
portant to understand some basic security if dinary user account for daily user tasks. reducing security for greater convenience be-
you want to keep your Linux system safe. The traditional way to use the root account cause an intruder only needs to know your
is to work as a normal user and, when neces- user password to gain full access to the system.
Linux Security Basics sary, switch to root during single administrative Therefore, it is especially important that every
Every discussion of computer administration actions. Ubuntu further reduces the temptation person using the computer has a separate ac-
revolves around finding the balance between to permanently work with superuser privileges count. On the other hand, this approach forces
convenience and security. If you’re careful, you by completely deactivating the root account by the intruder to guess both a username and a
can have a system that is both convenient and default. That means you will be able neither to password, whereas the classic root account al-
secure. The best approach is to let each user do log in as root nor to switch to the root account ways has the same name: root.
what is needed, and nothing more. during your session.
This basic idea is most obvious in the mul- Managing Users
tiuser system, which includes Linux and recent Sudo When you create a new account, you can
Windows and Mac OS systems. Every user Of course, Ubuntu does not bar you from per- choose whether the new user is a normal desk-
stores documents, email, and other personal forming administrative tasks. Instead, the user top user or an administrator who is qualified to
data in a private area. In Linux, this area is account created during installation can gain perform system configuration tasks.
known as the user’s home folder. If a user acci- superuser privileges with the command-line To create a new user, open the Users and
dentally chooses something like Delete all, program sudo. Groups dialog from System | Administration to
other users’ data are not affected. The operat- An advantages of sudo is that you do not see a list of existing users. First, click the Un-
ing system itself is in a place where an individ- have to remember another password. Before lock button and enter your password; if you
ual user can’t delete or edit the files. an administrator can execute an operation that have administrative rights, you may now add
Not only are misbehaving users dangerous, requires privileged permissions, such as chang- and delete users and manage groups.
but malfunctioning software or an outside in- ing network settings, setting the time, installing If you choose Add User, a New User dialog
truder who has breached security can cause (Figure 1) pops up. In the Account tab, enter
considerable damage.

Root
Users can take care of their daily work with-
out the need for write access to critical system
files. Sooner or later, though, you’ll need to
make changes to the system. For instance,
new software or hardware might require
changes to the system configuration.
Every operating system has a special user
account with the elevated privileges needed
to change the system; in Linux, this special ac-
count is called root. The root account, which
is also sometimes called the superuser ac-
count, corresponds to what Windows users
call the Administrator account.
When you log into a Linux system as the
root user, you are allowed to do virtually ev- Figure 2: Use the Permissions tab to set file
erything: You may read every document, de- Figure 1: Adding a new user account. permissions.

DISCOVERY GUIDE ISSUE 01 71


Ubuntu Linux Security

checkbox in the user proper- For normal files, the first position is a dash;
ties. otherwise, d points to a directory. Device files
and other special files show c, for example.
Read, Write, and The nine symbols that follow relate to permis-
Execute sions. These symbols are interpreted in three
User permissions are imple- sections of three letters each. The first section
mented as a system of access refers to the file owner, the next to the group,
levels. This even applies to and the last three to the remaining users. Each
the access control on hard- of these nine positions can show either a dash
ware devices because Linux or one of the letters r (readable), w (writable),
manages these devices or x (executable).
through special files residing
in the /dev directory. Viruses in Linux
File permissions are di- Theoretically, viruses could threaten Linux, but
vided into three sections that in practical terms, this hardly ever happens.
specify what the owner, the The reasons are mainly rooted in the technol-
Figure 3: Make sure you know how your mail client is process- members of the owner ogy. To propagate, the virus needs to affect
ing HTML email. group, and all other users are other programs it locates on the filesystem.
allowed to do with the file. Older Windows versions give viruses a free
the Username, Real name, and optional Con- The basic access categories are read, write, hand, whereas Linux slams the door shut. As
tact Information (e.g., telephone numbers). and execute. long as the program has a normal user ac-
In the Password section, you can either enter When you right-click on any file in the file count, rather than one with root privileges, it is
a temporary password yourself or make the browser and choose Properties, the Permis- not permitted to overwrite other program files,
system generate one. The new user is expected sions tab provides a view of access permissions leaving the virus without a propagation vector.
to change the password after the first login. (Figure 2). The upper section shows the file On top of this, Linux users rarely send each
owner and the owner’s access level: Read and other pre-compiled binaries. Because any soft-
Granting Rights write, Read-only, or None. Execution permis- ware you need is available for free, users are
In the Profile drop-down list, you can grant sions are handled separately with the check- more likely to obtain the program from a web-
rights according to three levels of access. If you box labeled Allow executing file as program. site or distribution DVD.
choose Administrator, the new user is allowed Whether you are able to change these settings Several vendors provide virus scanners for
to gain superuser privileges and thereby can depends on your access permissions. Linux [1], but the primary purpose of these
operate on the system without limits; other- tools is to protect email messages or files on
wise, choose Desktop user. This lets the new Directories file servers that might one day find their way to
user work in a home folder and gives full ac- Directories are handled like files except for ex- a Windows system.
cess to external media but forbids tasks that re- ecution. (Folders can have execution access as
sult in changes to the system settings. Unprivi- well, which means that users are allowed to Email Worms
leged creates a user with minimal rights. A pos- browse the directory content.) The Properties In contrast to viruses, worms do not need a
sible use for this kind of account would be to dialog of a directory looks like that of a file, but host program but run autonomously. A typical
support users who log in via a network and with a button labeled Apply
therefore do not need access to local devices. permissions to enclosed files. If
The User Privileges tab reveals more details you click this button, the per-
about the chosen profile. Here, you’ll find a list mission settings affect files and
of specific actions, such as Administer the sys- subdirectories in this folder.
tem, Access local storage devices automati- Filesystem settings can over-
cally, or Use audio devices. All of these actions ride file permissions. Ubuntu
can be activated separately. makes use of this feature for ex-
If you choose the Administrator profile, ternal storage devices. By de-
you’ll see a check mark next to every entry. By fault, external storage devices
clicking the checkboxes, you can adjust each are mounted with the noexec
new user’s privileges individually. Be aware flag, which means that en-
that users who are allowed to administer the closed programs cannot be exe-
system can change their own permissions. cuted. This protects the system
Linux employs the concept of groups to from uncontrollable software
manage access to files and other resources. In brought in by CDs or other ex-
Unix and Linux, a group is a collection of users ternal sources.
with certain common permissions. Linux In a terminal window, the
grants different write and read permissions to command ls -l gives file permis-
the owner of the file and to the members of the sions information, showing
group. every entry in the current direc-
In the User Settings main window, the Man- tory in a single line:
age Groups button shows a list of all groups in
your system. Double-click an entry to see the -rw-r--r-- 1 carsten U
group’s current members. If you want, you can users 43142 2008-04-28 U
add users to the group manually, which has 20:17 data.txt Figure 4: The Update Manager helps you keep your system
the same effect as activating the corresponding up to date.

72 ISSUE 01 DISCOVERY GUIDE


Ubuntu Linux Security

email worm sends itself to all the contacts in parts: One contains an HTML version, and the
an address book. However, it only causes dam- other contains pure text. If you prefer HTML,
age to the receiving machine if the recipient select Show HTML if present.
carelessly opens the attachment or if the worm HTML email also provides the possibility of
can exploit a vulnerability in the mailer. embedding direct links to Internet images. Be-
HTML-based email is also a risk. Many cause it is generally better not to load files
email clients ignore HTML attachments or de- from the Internet unless you know what they
ploy secure program modules to display HTML are, the default setting is Never load images
code. Be sure you know how your web from the Internet. If you indeed want to see
browser treats HTML-based email. In Linux – images from a known secure source, change
just as in any other operating system – don’t this option in the HTML preferences to Load
open attachments with untrusted messages images in messages from contacts or even to
and, above all, never launch any programs sent Always load images from the Internet.
to you unexpectedly. Your own mail is written in plain text by de-
fault. For HTML, go to the Composer Prefer-
Evolution ences section in the Preferences window. To Figure 5: The ufw firewall configuration util-
Ubuntu’s default mailer Evolution does display enable HTML formatting, activate the check- ity is useful if you are comfortable at the
HTML mail by default. If you prefer to avoid box next to Format messages in HTML. Alter- command line.
this, use Edit | Preferences. In the Mail Prefer- natively, you can enable it for a specific mes-
ences section, you will find the HTML Mes- sage in the composing window. allow data packets to pass if they comply with
sages tab (Figure 3). When you are writing a message, the Format specific criteria. A firewall can only give you
In the Plain Text Mode section, you can dis- menu provides the option HTML, which you limited protection: If you permit a connection,
able HTML by choosing Only ever show can check or uncheck depending on current you are leaving it up to the client and server
PLAIN. Some email messages consist of two needs. Be aware that the receiver’s mail soft- programs to defend themselves. In other
ware also has to be able to display HTML, so if words, the best protection is to install and
in doubt, you should stay with plain text. launch only those services you really need.
Secure Passwords In addition to server programs, which must
Even Linux is powerless if users inadver- Don’t Forget to Update be available to outside access and, therefore,
tently or negligently endanger its secu- When a vulnerability is discovered, the correct are vulnerable to attack, some client programs
rity. Passwords play a key role in the se-
response is to fix the program, preferably by are also endangered. A client application theo-
curity of a system. If you want a safe sys-
updating the vulnerable program package. The retically opens itself up to attacks by servers.
tem, don’t use passwords that are easy
Ubuntu Update Manager automatically locates For example, a web browser surfing the web
to guess. Using a friend’s birthday or
patches for installed packages. exposes itself to the dangers of spoofing or
your pet’s name is definitely not a good
idea. An attacker who is looking to break Vulnerabilities in server programs are partic- phishing attacks.
passwords will deploy programs to au- ularly critical. The server just waits for a client As a protection against outside attack,
tomate the guesswork. These programs to connect, and, of course, an attacker who Ubuntu installs no server software in the de-
use comprehensive dictionaries in multi- gets inside can hitch up a server to the Internet fault configuration. However, many users
ple languages and possess rules on how and wait for victims. In fact, an attacker doesn’t might want to explore the possibility of run-
to compile words and replace letters even need to know a victim’s address: The in- ning network services in Ubuntu.
with figures or nonstandard characters. truder can simply search large sections of the If you are looking for some additional con-
To make the guesswork as difficult as network looking for low-hanging fruit. What trol, Ubuntu 9.04 comes with a firewall config-
possible, a password should not be too makes this even worse is that servers often run uration tool called Uncomplicated Firewall
short. Unix and Linux systems often de- with root privileges – following an attack, the (ufw). To configure ufw at the command line,
mand eight-character passwords. These attacker assumes the privileges of the victim, enter the command sudo ufw followed by
length restrictions are no longer valid for thus controlling the whole computer. some arguments. The prepending of sudo is
systems that use MD5-based password By default, Ubuntu checks for available up- necessary because controlling network traffic
encryption techniques. dates every day. Ubuntu will indicate the pres- requires administrator privileges. Complete
The number of different characters is ence of a new software package for your sys- documentation for ufw can be found on the
particularly important: A mixture of up- tem with a message and put the Update Man- Ubuntu wiki [2].
percase and lowercase letters, numbers, ager icon into the upper panel.
and nonstandard characters, such as # < If you left-click the icon, the Update Man- Solid Security
> _ = ( ), makes a password more effec- ager window opens (Figure 4). Different update Linux does a good job of protecting itself
tive. types might be available; when security up- against attackers, but you need to be careful
Despite all the versatility and random- dates are listed, you should install them. and always install the updates. Although a little
ness, a user needs to be able to remem- Recommended updates usually fix bugs in attention is warranted, the natural defenses of
ber the password. Mnemonic aids can applications that could cause application Linux are extremely successful at keeping in-
help, but they have to be just as secret crashes but are not considered to be related to truders away. ■
as the password itself. Also of impor- security.
tance is that each password be used for After you click on the Install Updates button,
one task only. For example, you should
Info
the system asks for your password then down-
never use your login password for a web [1] ClamAV open source antivirus tool:
loads and installs the updates.
forum as your password for the root ac- http://www.clamav.org
count on another computer. And you Firewalls [2] Uncomplicated Firewall documenta-
should change your password at regular tion: https://wiki.ubuntu.com/
Many networks deploy firewalls to protect
intervals. UbuntuFirewall
against outside attack (Figure 5). Firewalls only

DISCOVERY GUIDE ISSUE 01 73


Printing

Printing
Before you set up a printer on Ubuntu, take
a moment to learn about the Linux printing
system. BY KRISTIAN KISSLING

If you have a fairly new printer, you can just


plug it in, and it is likely to work. Before doing
so, select System | Administration | Printing,
which lists the printers the system supports.
Then, connect your printer and check to see
whether Ubuntu autodetects it and whether it
appears in the list. If your computer is con-
nected to a network and you are trying to find able file and printer sharing on the Windows for the right driver, and it will tell you whether
your office printer, click New and the system computer and share the printer on the network. and how well Linux supports your printer.
will check local connections, as well as your (Consult your Win-
home or office network, for usable printers. dows documentation.) Theory
(Make sure the printer is turned on.) If the printer con- PostScript is a page description lan-
A summary of printers appears (Figure 1), nected to the Windows guage originally invented by Adobe
hopefully containing the printer you are trying system is properly to provide a uniform set of instruc-
to configure. The five items at the bottom let shared on the network, tions for all printers. PostScript Ver-
you change the search parameters – depending it is typically sufficient sion 3 is the latest version, and it is
on whether you are looking for an HP printer to click Windows mostly compatible with versions 1
with driver support from the HPLIP project, an Printer via SAMBA in and 3. If you have a PostScript
IPP printer that uses the Internet Printing Prot- the Devices box and printer, it will definitely run on
col, or an LPD/LPR server (Line Printer Dae- then click Browse to Figure 2: Clicking the printer Linux.
mon/Line Printer Remote) that uses TCP/IP to display a list of avail- configuration menu is all it Before the advent of PostScript,
transfer data. On the right, you can enter the IP able Samba printers takes to find printers that every printer needed its own driver.
address of the computer to which the required (Figure 2). Samba shares on the local Developers of graphics packages
printer is connected. If you use a network with If the printer does network. had to program, say, 20 printer driv-
static IPs, the printing system might be unable not appear in the list, ers to support 20 different models.
to find your printer. check the Linux Foundation [1] printer data- PostScript solved this problem (Figure 3):
If your printer is attached to a Windows base for your printer. This well-maintained on- Developers only needed to ensure that their
computer on the network, you will need to en- line database is a big help if you are looking applications created correct, readable Post-

Figure 1: The Ubuntu printer dialog will automatically locate printers Figure 3: PostScript is a human-readable page description language
on your network or directly attached to your computer. for printers.

74 ISSUE 01 DISCOVERY GUIDE


Printing

Script. The printer manufacturers did the rest


by making sure their printers spoke PostScript.
The Print Control Language (PCL) by Hewlett-
Packard, the Graphical Device Interface (GDI)
by Microsoft, and Epson’s ESC/P were attempts
by other manufacturers to develop alternatives
to PostScript.
Before printing, a printer converts the Post-
Script input file into raster graphics – this pro-
cedure is known as Raster Image Processing
(RIP). PostScript printers have their own intelli-
gence when it comes to converting PostScript
files into raster graphics. The cheaper models
will have a cheaper chip on board, whereas
the more expensive ones will have an embed-
ded operating system that uses software to
convert the input.

Printing Without PostScript


If your home printer does not support Post-
Script, the PostScript files created by your ap-
plications are sent to the conversion program
first. The converter creates a raster graphics
document that the attached printer can under-
stand. The name of the Linux program that
does this is GhostScript. GhostScript provides
filters that have mainly been programmed in Figure 4: CUPS can be managed via a web interface by typing http://localhost:631 in the
the course of a complex reverse engineering browser address box.
process, without any cooperation from the
printer manufacturers. number of printers on the market is just too printing on Linux. It has a huge collection of
This fairly complex process of analyzing the big: So, if you’re shopping for a printer, it’s al- documents on the subject – and the CUPS
software structure makes it possible to install ways a good idea to check whether or not the project itself also has information pages [4].
the software, even though the source code and printer you are interested in has Linux support ESP PrintPro is the name of the now-defunct
documentation are missing. The results are not before you buy it. commercial variant of CUPS that supported
always perfect, but some filters – for example, The OpenPrinting.org Foomatic system [3] thousands of printers. Work on this tool was
the filters provided by the Gutenprint project lets you convert legacy GhostScript filters into discontinued when its main developer, Mi-
[2] – now actually provide better quality than PPD files. The use of this approach will not chael Sweet, moved to Apple.
their Microsoft counterparts. necessarily improve the printing quality, but If you search the Linux Foundation pages for
CUPS offers the benefit of easier printer man- your printer, you might be taken to one of the
Enter CUPS agement, and it works better with printer man- numerous minor sites that offer printer drivers.
The Common Unix Printing System (CUPS) is agement GUIs. For example, the Gimp-Print project, in collab-
regarded as the software tool for setting up To use the Foomatic filters, you need to in- oration with Gutenprint [1], supports around
printers on Linux (Figure 4). CUPS was origi- stall the packages on Ubuntu with foomatic in 700 printers, including HP Laserjets and Desk-
nally based on GhostScript; however, at an their names. As a general rule, before you start jets, Epson Stylus and Photo Color models, and
early stage, it already had its own, highly func- building from the source code, you need to some Canon and Lexmark devices. In addition,
tional filters. As of version 1.1.15, CUPS check first to see whether you can find a CUPS Ubuntu has its own Gutenprint package
moved to ESP GhostScript 7.05, a commercial package with the required PPD files for your (foomatic-db-gutenprint) with the drivers
variant based on the GPL’d GhostScript. In Au- printer. needed by CUPS. ■
gust 2007, the two GhostScript projects joined If you are not satisfied with the print quality,
forces to become GPL GhostScript 8.60, which it is a good idea to check OpenPrinting.org to
Info
now supports many non-PostScript printers on see whether an alternative PPD file for your
Linux. printer exists. The website should be your first [1] Finding printer drivers: http://
The special thing about CUPS is that it can stop if you are shopping for information on openprinting.org/printer_list.cgi
evaluate PPD files for printers. (See the box ti- [2] The Gutenprint/Gimp-Print project:
tled “PPD Files.”) The descriptions are often in- PPD Files http://gimp-print.sourceforge.net
tegrated in Windows drivers and were origi- [3] Foomatic project: http://www.
The printer driver evaluates the Post-
nally only readable on Windows and Mac OS linuxfoundation.org/en/OpenPrinting/
Script Printer Description (PPD) file to
systems. Many Windows PPD files for Post- Database/CUPSDocumentation
discover the printer’s capabilities. (For
Script printers will work natively on Linux
example, the file describes whether the [4] Background for PostScript, Ghost-
thanks to CUPS, and CUPS even uses PPD files
printer supports features such as duplex Script, and CUPS: http://www.
for non-PostScript printers.
printing.) Printer management GUIs also linuxprinting.org/kpfeifle/
LinuxKongress2002/Tutorial/III.
Printer Resources reference these files to glean information
PostScript-and-PPDs/III.
on what buttons, widgets, and options to
Despite the long list of working printers, cer-
show the user. PostScript-and-PPDs.html
tain printers still do not work with Linux. The

DISCOVERY GUIDE ISSUE 01 75


Multimedia

Multimedia
Codecs
To experience the full spectrum of multimedia
file formats available online, you might need
to install some codecs. BY TIM SCHÜRMANN

Ubuntu offers a range of options for playing For both


and creating multimedia files. The Rhythmbox legal and practical
music player (Figure 1) is installed with the de- reasons, the number of
fault desktop. To play and organize your music audiovisual file formats sup-
collection with Rhythmbox, choose Applica- ported in Ubuntu’s default con-
tions | Sound & Video | Rhythmbox Music figuration is quite limited. If the file file formats from the world of Windows are
Player in the Ubuntu main window. you want to play isn’t supported, you might likely to cause problems.
Totem is Ubuntu’s default video player. To need to add a codec for the file format. In this The best way to understand this problem is
reach Totem, select Applications | Sound & article, I look at how Ubuntu handles codecs to consider that the program known as Totem is
Video | Movie Player. See the respective Help for multimedia. actually just a graphical user interface for the
menus for more on how to get started with similarly modular GStreamer multimedia soft-
Rhythmbox and Totem. Both apps come with In the Codec Jungle ware. GStreamer in turn references plugins to
friendly and useful documentation. When you see a video file on your desktop, learn about various file formats. Each plugin
Other multimedia tools are available from you can normally launch the matching player contains what is known as a codec. As the ac-
the Ubuntu repositories. See the Ubuntu wiki by double-clicking. On Ubuntu 9.04, Totem is ronym for COder / DECoder suggests, a codec
for more on the multimedia tools available for the application of choice for this job – but is a piece of software that converts audio or
Ubuntu, or click the Sections button in the don’t be surprised if this doesn’t work on a sys- video data from one format to another.
Synaptic package manager and scroll to the tem that you have just installed from scratch. For example, if Totem wants to play an MP3
Multimedia, Multimedia (multiverse), and Mul- By default, Ubuntu only plays free file formats, file, it passes the data on to GStreamer, which
timedia (universe) package sections. such as the MP3 competitor Ogg/Vorbis. Exotic checks its repository for a plugin that can han-
dle MP3s. With this codec’s
plugin, GStreamer converts the
file to audible material, which
Totem picks up and outputs via
the loudspeakers. To teach Totem
new file formats, you simply need
to install matching plugins (Figure
2). The question is: Which ones?

Onion Skins
File formats from the world of
Windows, typically with suffixes
such as .avi, .wmv, or .asf, are re-
ally just containers for the video
and audio data. In fact, you can’t
tell whether the file contains an
MPEG4 video or a file in the de-
funct Indeo format. Incidentally,
the same thing applies to Quick-
Time files (.mov suffix), as pro-
duced by Apple computers.
When Totem finds an unrecog-
nizable file format, it will usually
search for a matching GStreamer
plugin before installing the corre-
sponding Ubuntu packages (Fig-
Figure 1: Manage your sounds with the Rythmbox music player. ure 3). Totem and Rhythmbox

76 ISSUE 01 DISCOVERY GUIDE


Multimedia

Dangerous Liaisons
If you want to view commercial DVDs on
Linux, you currently need a special li-
brary (libdvdcss2) which removes the
CSS (Content Scrambling System) pro-
tection. In many countries of the world,
the use of copy protection removal sys-
tems is illegal and could constitute a
copyright offense. The only legal way to
play CSS-protected disks right now is
LinDVD by Corel [1], which costs around
EUR 40.
Besides the copy protection issues, there
are a number of unresolved patenting is-
sues, relating first and foremost to com-
pression methods such as MPEG2, or
MP3, a format popular with music lov-
Figure 2: Play videos with Totem. ers. The players and libraries were devel-
oped without the explicit approval of the
(which also relies on GStreamer) need to install follow the steps outlined just now. In that case, patent and/or license owners, and they
the packages gstreamer0.10-plugins-ugly and you can retrieve the required codecs from an are thus on uncertain ground from a
gstreamer0.10-ffmpeg to play MP3 files. existing Windows installation, although this legal point of view. Therefore, you have
To avoid these questions in the future, you can be tantamount to the labors of Sisyphus. to install the packages manually – and at
can apply a liberal dose of plugins by telling Fortunately, the external Medibuntu repository your own risk.
Synaptic to install the ubuntu-restricted-extras offers a package that bundles the major Win-
package. (This helps Ubuntu fetch numerous, dows codecs. To load the package, go to Sys-
frequently needed plugins for tools, such as tem | Administration | Software Sources, click Pitfdll – do not work properly on Ubuntu 9.04
Sun Java, or various Windows fonts, which can the Third-party software tab, and then click as of this writing.
be quite bulky.) Add. Now type the following, slightly cryptic To work around the problem, you can install
A package called gstreamer0.10-plugins- line in the input box an alternative version of Totem that uses the
ugly includes codecs for files with some legal Xine media player library instead of GStreamer.
restrictions. Many file formats are subject to deb http://packages.U To do so, launch Synaptic, search for the to-
patents and licenses (for more information on medibuntu.org/ jaunty U tem-xine package, and install the package.
this issue, see the “Dangerous Liaisons” box). free non-free Now you have two versions of Totem on your
To identify plugins with a dubious legal status, disk.
the developers called them just plain ugly. If to add the software package source (pay atten- The main menu will still take you to the
Totem offers to install an “ugly” package, you tion to the spaces in this command line). When GStreamer version, so to launch a movie with
have to decide whether to install it and thus you leave the window by clicking Close, you the Xine version, go to Applications | Accesso-
enter the legal gray zone. are taken to the main window, where you can ries | Terminal, type totem-xine&, and press
click on Reload. This action tells Ubuntu to Enter. The video player does not look any dif-
Multimedia with Medibuntu pick up a list of available Medibuntu packages ferent, but if you check Help | Xine, you will
Some exotic file formats from the world of off the Internet. If you are warned about miss- see that a different engine is under the hood.
Windows remain closed to Ubuntu even if you ing signatures, just click Close and try again a To play a video file directly with Totem Xine,
couple of minutes later. right-click the file, select Open with other ap-
When you are done, you plication, and then select Video Player (Xine)
need to install the w32co- from the list. ■
decs package.
Fluendo GStreamer Plugins
The Pitfdll
Dilemma Fluendo [2] has licensed GStreamer
plugins for sale on its website. In addi-
Sad to say, this is not the
tion to the MP3 codec, you will find eve-
end of the story: You also
rything you need to play Windows
need Totem support for
media files (WMV, WMA, ASF) and
Windows codecs. The
MPEG2 videos, although a full set of co-
Pitfdll plugin was devel-
decs costs EUR 28.
oped for GStreamer as a
kind of adapter that runs
the Windows codecs on Info
Linux. Synaptic calls the
[1] LinDVD player:
package gstreamer0.10-
http://www.intervideo.com/jsp/
pitfdll. Unfortunately, in-
Product_Profile.jsp?p=LinDVD
Figure 3: After a short pause for thought, GStreamer-based stalling it will not get you
programs like Totem and Rhythmbox offer to install any miss- very far: The gang of three – [2] Commercial GStreamer plugins:
ing codecs. Totem, GStreamer, and http://www.fluendo.com/

DISCOVERY GUIDE ISSUE 01 77


Brasero

Burning CDs
and DVDs
Burn your own CDs and DVDs with
Brasero. BY MATTHEW SACKS

Ubuntu includes the latest release of Gnome’s


CD/DVD burning tool, Brasero [1]. This appli-
cation is similar to Roxio’s disc burning suite,
but it is simpler and much easier to use.
To access Brasero, click on Applications |
Sound & Video | Brasero Disc Burner (Figure
1). The main Brasero project window appears
with the following project types: audio discs,
disc copy, data disc creation, and disc image
burning.

Burning MP3s
Brasero allows the user to drag and drop MP3s
and most other audio file formats into a project
to be burned to an audio CD for play in any shows the progress of the burn as the audio for Disc Insertion dialog disappears once a
standard CD/DVD player. The quality of the files write to disc. valid blank disc is inserted into the drive tray
blank CD/DVDs you use can have a great ef- and the tray is closed. As soon as the disc is fin-
fect on the system’s ability to make a good Disc Copying ished copying, a message will display CD suc-
burn – so try to avoid the discount blanks. Brasero has a disc copy feature that is useful cessfully copied. To view the contents of the
To begin creating an audio CD, click on the when exact copies of the same disc are CD or DVD, you need to remount it by simply
Audio Project button in the main Brasero menu needed, whether it is a data disc, a DVD opening and closing the drive tray.
or click on Project | New Project | New Audio movie, or an audio CD. Because Brasero stores To make copies of DVD movies (legal cop-
project. Now drag the desired MP3 (or other a temporary image of your CD or DVD on the ies, of course), you need libdvdcss2 [2]. This li-
supported audio format) to the main window local hard disk and then prompts you to insert brary can be installed in Ubuntu by opening a
or click the Add button and locate the audio a blank CD, just one drive is necessary. terminal window and typing sudo /usr/share/
files on the local hard drive (see Figure 2). At To copy a disc, insert the source disc and doc/libdvdread3/install-css.sh. Totem, Ubun-
the bottom of the application you will see how have a blank CD/DVD handy. After clicking on tu’s default video player, also requires the lib-
much space the added files consume. Disc Copy, select a source drive to copy from dvdcss2 library to play DVD movies.
In the Name text field, you need to enter the and a destination drive to write to (Figure 3),
title before you click Burn. A Disc Burning then click the Copy button. A status bar indi- Burning a Disc Image from an
Setup dialog box appears, prompting you to cates its progress. The program opens the disc ISO
use the burning device. To begin burning the tray and displays a dialog box prompting the Brasero supports burning from an ISO image
audio project, click Burn again. A status bar user to insert a blank CD or DVD. The Waiting [3] to a CD or DVD. Disc images are a conve-

Figure 1: Starting the Brasero application. Figure 2: Adding music to an audio disc project.

78 ISSUE 01 DISCOVERY GUIDE


Brasero

Now select the drive to use for writing the speed, use the Properties button (Figure 5).
image to disc and click on Click here to select When finished, click OK and then Burn again.
an image to locate the image on the local hard The progress bar will show the status of the
drive. The Select Image File dialog box will ap- burn. Unless you have changed the corre-
pear. Here, select the ISO image to be burned sponding option, the disc should automatically
to disc, click Open, then click Burn. Brasero eject from the tray once the burn is complete.
creates an image checksum and shows the
Figure 3: The CD/DVD Copy Options dialog. progress of the image as it is burned to disc. If Conclusion
Brasero throws errors, try lowering the burn Brasero makes the process of burning CDs and
nient way to transport the contents of CDs and speed and then re-burning. DVDs extremely simple. The plugin capability
DVDs acquired from the Internet. For example, of Brasero offers a means for integrating addi-
you could download the latest copy of a new Creating a Data Disc tional features. ■
operating system, such as Ubuntu, and burn it Brasero easily allows the user to create data
to a disc, or you could transfer audio files as an discs to back up and transport files. Creating a
image and burn a copy to a physical disc for data disc in Brasero is simple. Click on the
use in a DVD player. New Data Project button or click on Project |
In the main Brasero menu, click on the Burn New Project | New Data Project. Now add
Image button or click Project | New Project | your documents to the Files pane and click the
Burn Image. The Image Burning Setup dialog Burn button in the bottom right-hand corner.
box will appear (Figure 4). The Disc Burning Setup dialog box will ap-
pear. To change properties, like the burning

Info
[1] Brasero: http://www.gnome.org/
projects/brasero/
[2] libdvdcss2: http://en.wikipedia.org/
wiki/Libdvdcss
[3] ISO image: http://en.wikipedia.org/
wiki/ISO_disk_image Figure 5: In the Properties of CD-ROM box,
Figure 4: Burning a disc image. define the burning speed and other options.

DON’T MISS A SINGLE ISSUE!


The first print magazine created specifically for Ubuntu users! Ease into Ubuntu with the helpful
Discovery Guide, or advance your skills with in-depth technical articles, HOW-TOs, reviews,
tutorials, and much, much more.

S C R I B E N O W!
SUB r for only
yea
4 issues per
E U R 2 9 .9 0 / US$ 39.95
£ 24.90 /

✔ Don’t miss a single issue!


✔ Huge savings – Save more than 35%
off the cover price!
✔ Free DVD – Each issue includes
a Free DVD!

www.ubuntu-user.com
DISCOVERY GUIDE
F-Spot Image Manager

Managing Photos
Chaos is inevitable when your hard disk fills up
with digital photos. The F-Spot image manage-
ment program helps you manage your photo
archives. BY MATTHIAS WARKUS

With the recent popularity of digital photogra- When first


phy, hard disks tend to get swamped with pho- launched, F-Spot
tos. The problem with storing images on a displays a com-
computer is finding the photo you need in a pletely empty
reasonably short time. image catalog.
F-Spot [1] can bring order to your personal However, the pro-
photo collection. The project was launched in gram does pop up
2003 by Gnome developer Ettore Perazzoli, a dialog from
who unfortunately passed away in December which you can import new photos. Then you in the Metadata Browser dialog box, which is
of that same year. Now, Larry Ewing (who de- can select a drive, an attached storage me- in the View menu.
signed Tux the penguin) has taken over. dium, or any folder as your import source. At The jumble of images can be organized in
In recent Ubuntu versions, F-Spot is part of the same time, you can define categories for two ways. First, you can use the tags in the list
the default installation. Because the software is the imported images. When you click OK, F- shown at the top left of the F-Spot window. Be-
written in C#, it requires the Mono environ- Spot will search the specified folder and cata- sides the special tags Favorites and Hidden,
ment [2] and the matching program interpreter, log the image files it contains. Any time later, three categories are predefined: People, Places,
mono, along with a few Gnome packages, var- you can open the import window from the File and Events.
ious databases, and some graphics libraries. menu. To specify a new category or to add new
Because Mono has become a part of the tags, you can use either the context menu or
Gnome desktop, these packages would be in- Search and Find the Tags entry. Dragging a tag or category to
cluded in a default Ubuntu installation any- After importing a few images, F-Spot should be the thumbnail assigns the image to the tag.
way, so integrating F-Spot was a logical next slightly more colorful. When you click an Also, you can use the context menu for tag
step. image, details such as the name, size, or date management by selecting either Add tag or Re-
are displayed (Figure 1). move tag.
Getting Started F-Spot retrieves data, such as the exposure When you enable a checkbox in the cate-
To start F-Spot, click on the Ubuntu Applica- time or orientation, from the image files gory list, F-Spot displays the images from that
tions menu and choose Graphics | F-Spot through Exif, a standard for transferring image- category in the index. Enabling multiple check-
Photo Manager. specific metadata. The Exif fields are displayed boxes tells F-Spot to display images with one
of the tags, but not the intersection of the se-
lections. Selecting Edit tag in the context
menu (or Tags | Edit selected tag) pops up a
window in which you can change the cate-
gory assignment of a tag.
The second organization method, a slide
control, gives quicker access to images with-
out requiring the user to tag the images first
(Figure 2). This tool, which is quite puzzling at
first sight, shows a time index with markings
for years and months. To scroll the visible seg-
ment, click on the arrows.
A bar above the segment for a specific
month tells you that images from that month
exist in the current catalog, and the number of
images is reflected by the size of the bar. If you

Info
[1] F-Spot homepage: http://f-spot.org/
[2] Mono download: http://www.
mono-project.com/Downloads
[3] Flickr: http://www.flickr.com/
Figure 1: F-Spot shows an overview of stored images.

80 ISSUE 01 DISCOVERY GUIDE


F-Spot Image Manager

the Flickr [3] photo sharing


service, Picasa Web Albums,
SmugMug, and 23HQ, as well
Figure 2: Time sliding. as allowing users to create
and upload HTML galleries.
then push the slider to a specific point in time, automatic horizon straightening. Also, you can Users can burn their image collections onto
the index jumps to the image closest to that use the powerful sharpening tool by pressing S CDs or DVDs with the Gnome burning inter-
point. Also, you can use the handles to move or selecting Edit | Sharpen. face.
the lower and upper date thresholds so that When you choose to edit an image, F-Spot
you restrict the index to a specific period. always creates a new version of it to prevent Conclusions
If you select the folder view (View | Arrange damage to the original. If things go wrong, you F-Spot might be just what you need to bring
by | Folder), F-Spot changes the timescale into can select Original in the Version menu to re- order to the chaos of your photo collection. If
a directory scale. This option can be very use- store the original image. your collection has grown over the years, you
ful if you sort your images into folders before The program also has tools that you can use will like the timescale feature. ■
importing them. to select the current
image as wallpaper. A
Getting There? full-screen view mode
After you have found the image you are look- and a slideshow feature
ing for, you need to double-click it to display it are also available. A
in a scrollable, zoomed view (Figure 3). The printing function that
buttons for typical features – such as rotate left, uses the Gnome-print
rotate right, or flip portrait images to landscape API to create hard cop-
images – are available in the index view. In ies gives users the abil-
zoom mode, you can additionally use the ity to print their images
frame tool to select a detail or remove red eye if needed.
from portraits. The Export menu pro-
Also present is a list of aspect ratios that al- vides more functions for
lows you to crop images to fit a specific page sorting and editing im-
format. The palette is rounded out by a color ages. Besides copying
histogram, a soft-focus tool, color adjustment, images to a different di-
sepia tones, black and white conversion, and rectory, it also supports Figure 3: Zoomed view.

DISCOVERY GUIDE ISSUE 01 81


Installing Software

Installing Software
Ubuntu lets you install and manage software at the click of a
mouse. BY JAMES MOHR

Thousands of open source software applica- two commands with a utility called
tions are available for Linux systems, and be- apt-get.
cause these tools are mostly free, the software In this article, I look briefly at
usually isn’t distributed in shrink-wrapped managing packages with Synaptic
boxes. A Linux user who wants a program sim- and apt-get, but you’ll have to de-
ply downloads it. In the old days, this meant cide for yourself which applications
finding and compiling the source code. Some to install. The economies of open
Linux users still like to work with source code, source don’t leave room for a lot of
and in some cases, your only choice might be vendor advertising. Most Linux
to compile the program yourself. However, users find interesting tools by word of mouth. Often, some of the package have to be down-
most users install software with package sys- You might learn of a promising application in loaded. Synaptic can find the necessary pack-
tems. A package system is a collection of tools an online forum or from a magazine like this. If ages in different repositories and servers on the
and services that lets you download and install the app is available as an Ubuntu package, a Internet. When you click Apply, Synaptic
an application in just a few mouse clicks. user can quickly add it to the system with the downloads the files and performs the installa-
Major Linux vendors make packages avail- use of Ubuntu’s package management tools. tion, including creating directories and copy-
able in large online repositories. A program on ing the files to the appropriate locations.
the client computer simply calls for a package Installing Software
in the repository, and the installation occurs The Synaptic package manager is a graphic
nearly automatically. Best of all, the package tool for installing, updating, and managing
system also resolves dependencies associated software packages. To start, select System | Ad-
with the application. A dependency is a back- ministration | Synaptic Package Manager, then
ground application or component that must be enter your administrator password.
present for the program to run. For instance, an The Synaptic main window (Figure 1) is
application might require the correct version of where you tell Synaptic to display packages by
a specific Linux library. A good package system subject, status (installed or not), or origin
installs all the necessary background software (which repository). Also, you can define your
along with the application you want. search criteria. As shown, I have already
Ubuntu and other Debian derivatives use clicked the Sections button to display the
the Advanced Packaging Tool (APT) system. The packages in predefined groups. In this case, I
Ubuntu project has a large repository of pack- have selected the Science section because I Figure 2: Synaptic summarizes the changes
ages you can install on your Ubuntu computer. want to install the KStars planetarium program. necessary for installing an application.
Several tools can serve as a front end for ac- After I select the KStars package, a new win-
cessing these APT-based repositories. From a dow pops up showing a list of changes the sys- The time needed for installation depends on
graphic desktop, Ubuntu provides the Synaptic tem needs to make for the program to run (Fig- the number of packages, the speed of the Inter-
package manager. Working from the command ure 2). This list displays the dependencies asso- net connection, and the extent of the necessary
line, you can install a new package in one or ciated with the program; if you want to remove preparations. In this example, it took just a
a particular package, couple of minutes. When it’s done, KStars ap-
you might see a list pears under Applications | Education.
of packages you Keep in mind that Synaptic displays not only
need to remove to direct dependencies, but also the packages on
keep the system con- which these dependencies depend.
sistent. If you click Occasionally, you might not know the pack-
Mark, Synaptic will age name or even which group the package is
mark all of the in. Synaptic includes a search feature that
necessary packages helps you locate a package if you don’t know
for installation. the name. For example, you can search for a
Clicking Apply in string of characters that appear in the package
the toolbar at the top name or search by dependency or maintainer
of the Synaptic main (the person who manages the package).
window pops up a
Summary box show- Other Features
ing all of the pack- Synaptic provides a number of other interest-
ages Synaptic is to ing features. For example, you can examine the
Figure 1: The Synaptic main window. install (Figure 3). details of each package by right-clicking on it

82 ISSUE 01 DISCOVERY GUIDE


Installing Software

• Universe – community-maintained
software that is not officially sup-
ported.
• Multiverse – unsupported software
under a non-free license.
Synaptic also lets you add repositories
located on the Internet or on a local
network. In Settings | Repositories, you
have a wide range of options for con-
figuring repositories. For example, you
can download only officially sup-
ported software or only community
software, or you can add personal re-
positories that others can’t access.
Figure 3: Study the list of changes before
you click Apply to begin the installation. At the Command Line Figure 4: Synaptic displays package dependencies
Sometimes users need to install soft- in the Properties dialog.
and selecting Properties (Figure 4), which ware directly from the command line,
shows several useful settings. The Dependen- such as when connecting remotely or when Debian packages also can be installed di-
cies tab is useful for troubleshooting failed in- using a system without a graphic desktop. rectly from the command line with the dpkg
stallations. Note that the final two entries in Some system administrators prefer to work at command:
Figure 4 are labeled Suggests. These packages the command line because they find it faster
are recommended but not required for the pro- and more intuitive. Ubuntu uses apt-get to in- dpkg -i PACKAGE_NAME.deb
gram to run successfully. One common exam- stall software at the terminal prompt.
ple of a suggested package is documentation To install KStars from the command line, you One disadvantage of this approach is that you
for the program. must invoke the sudo utility, which is used need to resolve the dependencies yourself, but
Synaptic also lets you track the history of with commands that require administrative this technique is sometimes useful if you are
what has been installed. To view the history, privileges. In a terminal session, enter: installing software remotely.
If a native .deb package is not available, you
sudo apt-get install kstars might find the program in an alternative Linux
package format, such as an RPM. If you want
Note that kstars needs to be lower- to install a package in a foreign or “alien” for-
case. The output in Figure 6 is simi- mat, try the alien command:
lar to what you should see.
To initiate the installation, press sudo alien -i PACKAGE_NAME.rpm
Enter. Apt-get runs through the
same steps as Synaptic. Installing If the alien utility is not present on your system,
software with apt-get is usually find and install it using the techniques de-
very easy. As you might guess, you scribed in this article.
can also use apt-get to perform
other tasks, such as uninstalling Conclusion
packages and displaying depen- To familiarize yourself with the applications
Figure 5: A view of the installation history. dencies. For more on working with available for Ubuntu, browse the Ubuntu re-
apt-get, type man apt-get to view pository – and keep surfing and reading to
select File | History, then select a specific entry, the apt-get man page. learn about new and interesting Linux tools. ■
as shown in Figure 5.
Manually
Adding Repositories Sometimes the package you want to
After you finish installing Ubuntu, the system install is not available in a reposi-
adds the installation CD to the list of reposito- tory, so you need to take an extra
ries, along with the official repository Ubuntu step to install the package “manu-
maintains on the Internet. Under the Edit menu ally.” Ubuntu uses the Debian pack-
is an entry called Add CD-ROM, which adds a age format. Debian packages typi-
CD-ROM to the system. When you select this cally have a .deb ending. If you
option, you are prompted to insert the CD, want to install a Debian package,
which is then scanned. The packages Synaptic simply double-click on the file in
finds are added to the list of known packages. the Nautilus file manager, and a
Later, when you attempt to install a package window will pop up allowing you
that is present on the CD, Synaptic will prompt to install the package. Your system
you to insert the CD. will attempt to resolve any depen-
The official Ubuntu repository is divided dencies through your configured re-
into four components: positories. If the supporting pack-
• Main – free software supported by Ubuntu. ages are not available, you will
• Restricted – Ubuntu-supported software that need to search for the missing pack- Figure 6: Installing from the command line with the
is not available under a free license. ages, which could be a tedious task. apt-get command.

DISCOVERY GUIDE ISSUE 01 83


Evolution Email Client

Email with
Evolution
Access your email accounts, contacts, calendars, tasks, and
notes with Evolution. BY MATTHEW SACKS

The Evolution email client allows a user to ac- into Gmail and clicking
cess email accounts, contacts, calendars, tasks, Settings | Forwarding and
and notes all in a single location. Evolution POP/IMAP | Enable IMAP
mail is the de facto Linux email client bundled (or Settings | Forwarding
with Ubuntu 9.04. Simple to set up and config- and POP/IMAP | Enable
ure, it can be expanded and customized for the POP for all mail). Or you can enable both for Evolution from the IMAP account, the message
advanced user. Evolution has been developed all mail. The most difficult part of configuring also will be deleted from the email server. On
on one simple premise: simplicity without Evolution is getting the settings you need to a POP server, the message would only be de-
compromise of functionality. enter into the client that allow you to connect leted from the Evolution in box. The message
to the mail server of choice. For information would still remain on the server or be deleted
Creating Email Accounts such as SMTP servers and POP or IMAP server from the server the first time the message is
The 2.26 release, which is shipped with addresses, check the email provider’s website downloaded to Evolution. The difference be-
Ubuntu 9.04, includes intelligent spam filter- or call their tech support line. Typically, this in- tween the use of one protocol over the other
ing and supports Google Contacts. To start Evo- formation is listed on the ISP’s website. boils down to the user’s preferences and what
lution, click on the mail icon in the top left A prompt appears for identity information. the email provider supports. The general rec-
navigation menu or go to Applications| Inter- First fill in the Full Name field with the name ommendation is to use IMAP when it is avail-
net and click on Evolution mail. that will display when recipients receive mes- able.
For an unconfigured system, the welcome sages, the Email Address of the account, and, In the next dialog, Receiving Email (Figure
screen will appear. Clicking Forward advances optionally, the Reply-To address (Figure 1). 2), select the Server Type in the drop-down
to the Restore from the Backup window. If a box. In this example, the IMAP protocol is
previous Evolution archive exists that needs to POP Email Server vs. IMAP used to connect to a Gmail account. The con-
be restored, check the Restore Evolution from IMAP is chosen for the example here over POP, figuration parameters for the mail server will
the backup file box and select the archive to be although most commercial and free email pro- vary between providers. Generally, IMAP, POP,
restored. If no previous email accounts exist, viders support both platforms. Evolution allows or Exchange Server (for corporate users) will be
leave this box unchecked and click Forward. the user to access either one or both. The main used. The configuration settings should be
In this example, Gmail is the free mail ser- difference between POP and IMAP is that, with typed as follows for Gmail:
vice of choice. Gmail is just one of many email the use of IMAP, actions executed within Evo-
providers that Evolution can access to send lution also are reflected on the email server. Server Type: IMAP
and receive email. To access Gmail from Evo- For example, if the IMAP protocol is being Server: imap.gmail.com
lution, enable IMAP or POP access by logging used and the user deletes a message within Username: MyUserName

Figure 1: The Identity step in the Evolution Setup Assistant. Figure 2: Setting up email as an IMAP account.

84 ISSUE 01 DISCOVERY GUIDE


Evolution Email Client

Figure 3: Specifying options for incoming mail. Figure 4: Specifying options for outgoing mail.

Use Secure Conncetion: U MyUserName Accounts button on the left, then on the Add
SSL Encryption RememberU button on the right (Figure 5).
Password: Checked At this point, the Evolution Account Assistant
Next is the Receiving Options dialog box (Fig- appears. Before continuing on to the Receiving
ure 3). Evolution checks for new messages pe- At this point, you can continue to the Account Email window, you need to supply the infor-
riodically if you mark the Check for new mes- Management dialog box and enter the name of mation for the next window (name, email ad-
sages every n minutes box. If you mark Check your account as it should appear in the Evolu- dress, etc.). For the Server Type, select Micro-
for new messages in all folders, it will down- tion email client. To select the time zone in the soft Exchange, then enter a Username and the
load messages for all folders present, including next window, click on the appropriate region OWA URL, and click Authenticate to make
the Sent Items mailbox and any other custom of the world map or find the region in the Se- sure the settings are correct and that Evolution
folders you have created for the email account. lection drop-down menu. can connect to the Exchange server.
In the Options section of this dialog: In the final Evolution Setup Assistant screen, If no error message appears, Evolution has
• Apply filters to new messages in INBOX on click Apply to accept the changes. Now Evolu- connected successfully to Exchange, and you
this server allows message filtering on the tion is fully configured to send and receive can continue to the Receiving Options win-
basis of sender, subject, or content of an email with Gmail or other IMAP/POP ac- dow. Here, you specify the interval at which
email message. Configuring how junk mail counts. Evolution checks for new messages, as well as
is filtered will be covered later on. Most corporate mail users use Microsoft Ex- the Global Catalog server name, which is re-
• Check new messages for Junk contents en- change Server as their back-end mail server. quired to retrieve contacts from an address
ables the SpamAssassin or Bogofilter plugin Exchange accounts automatically synchronize book and access Exchange Free/Busy service
to apply spam-filtering capabilities to mes- contacts, calendars, memos, and tasks, and it when scheduling meetings. If this information
sages received. typically integrates well with Linux desktops; is not available, you should contact your Ex-
• Automatically synchronize remote mail lo- however, with Evolution integrating the two, it change system administrator for it; otherwise,
cally instructs Evolution to download the is painless. it will default to the Exchange Server informa-
contents of the email and “open” the enve- tion passed through OWA.
lope. Otherwise, IMAP by default only Syncing with
downloads the message headers, which is Exchange
essentially the equivalent of the envelope of Evolution connects to Ex-
a physical piece of mail. change through the Outlook
In the Sending Email dialog (Figure 4), in Web Access (OWA) protocol, a
which you configure the outgoing mail server webmail service of Microsoft
options, the configuration for Gmail is: Exchange Server. OWA pub-
lishes a webmail interface for
Server Type: SMTP the user [1], and Evolution can
Server: smtp.U use this nifty interface to im-
gmail.com port the Exchange information.
Server RequiresU To set up an Exchange ac-
Authentication:U count in Evolution, you need
Checked to add a new account with Edit
Use SecureU | Preferences. The Evolution
Connection: SSL Preferences dialog box is
AuthenticationU where most of the configura-
Type: Login tion information for Evolution
Username: is input. First, click on the Mail Figure 5: The Evolution Preferences dialog box.

DISCOVERY GUIDE ISSUE 01 85


Evolution Email Client

Next is the Account Management window.


Here, you enter the name of the account as it
should appear within Evolution and click For-
ward and Apply to save the changes. Evolu-
tion begins syncing email, calendars, and
contact information with Exchange. Depend-
ing on the size of the mailbox, this could take
a few hours. A status message shows synchro-
nization progress at the bottom of the Evolu-
tion Mail window.
Once the data are synchronized, any
changes made within Evolution will be synced
automatically to the Exchange server.

Spam Filtering
SpamAssassin is open source spam-filtering
software maintained by the Apache Group.
Evolution has a plugin in Ubuntu 9 that makes
SpamAssassin the default spam-filtering mod-
ule. It is powerful because of its predefined fil-
tering rules, heuristic learning engine (Bayes’
theorem), and integration into a worldwide
network of spam identification servers.
By default, SpamAssassin is not installed
with Ubuntu 9, so to use the plugin that ships
with Evolution, it will need to be installed by Figure 7: Google Calendar reflects entries made in the Evolution Calendar.
Ubuntu’s package management system. To
open a command-line terminal, navigate to Do you want to continue U msacks@linuxpromag:~$U
Applications | Accessories | Terminal. At the [Y/n]? Y sudo /etc/init.d/U
command prompt, type: spamassassin start
At this point, the dependent software packages Starting SpamAssassin MailU
sudo apt-get install U are downloaded and installed. Once SpamAs- Filter Daemon: spamd.
spamassassin sassin is installed, run the command
To turn off SpamAssassin, enter:
A prompt appears that requires root access to spamassassin -V
install software packages on Ubuntu. The de- msacks@linuxpromag:~$U
pendencies are displayed, with a prompt for to test for successful installation. If it is in- sudo /etc/init.d/U
the user to type Y to continue: stalled properly, the output should indicate the spamassassin stop
SpamAssassin version and the version of Perl
msacks@linuxpromag:~$U that was installed: By default, SpamAssassin is enabled on restart
sudo apt-get installU and bootup from now on unless it is disabled
spamassassin msacks@linuxpromag:~$U by ENABLED=0 and a computer restart.
[sudo] password forU spamassassin -V SpamAssassin offers a wide array of tuning
msacks: SpamAssassin version 3.2.5 and configuration options on which an entire
After this operation, U running on Perl version 5.10.0 book could be written, but reading an entire
6947kB of additional diskU book is not required to make use of its power-
space will be used. Now that you have enabled SpamAssassin, you ful and precise spam-filtering features. Simply
must turn it on and enable it by default. To en- installing SpamAssassin, turning it on, and en-
able SpamAssassin, edit a configuration file as abling it within Evolution is all you need to get
follows by typing the spam-filtering power of SpamAssassin’s
real-time, worldwide blacklists.
sudo gedit /etc/default/U
spamassassin Enabling SpamAssassin Within
Evolution
or Now that the SpamAssassin process is running
in the background, you must configure Evolu-
sudo vi /etc/default/U tion to make use of its features. By default,
spamassassin Evolution installs the SpamAssassin plugin on
Ubuntu 9.04. To verify that it is installed, go to
(see Listing 1). To enable SpamAssassin, mod- the Edit | Plugins menu in Evolution and make
ify ENABLED=0 to ENABLED=1 and make sure sure the Spam-Assassin junk plugin is checked.
that CRON=1 to turn on nightly updates. To In Evolution, you configure this by clicking
Figure 6: To synchronize a Google calendar, turn on SpamAssassin, open another terminal Edit | Preferences. Then click on the Mail Pref-
you should preferably use the CalDAV window and type: erences button and the Junk tab in the top
plugin. right-hand corner.

86 ISSUE 01 DISCOVERY GUIDE


Evolution Email Client

Selecting SpamAssassin in the Default junk check Use SSL. In the URL field, enter the cal- and with better junk mail filtering built in. The
plugin drop-down menu should show “Spam- endar’s address. features list is extensive, and Evolution’s ease
Assassin plug-in is available and the binary is To synchronize with your Google calendar, of use surpasses that of most commercial email
installed.” To make sure the changes take ef- enter caldav://www.google.com/calendar/ clients. The Evolution email client supports a
fect, restart the Evolution client. dav/username@gmail.com/events into the URL variety of mail, calendar, and contact formats,
To test the effectiveness of the SpamAssassin field, replacing username with your Google and the number of formats only grows with
plugin, disable it by unchecking SpamAssassin Mail login. The same entry usually needs to be every release. ■
in Edit | Plugins. Then, send some spam to an entered in the Username field (Figure 6). When
account in the Evolution client. Now try turn- you click OK, the calendar should appear in
Listing 1: SpamAssassin
ing on the plugin again and see if messages are the calendar navigation pane under Google.
automatically moved to the Spam folder when Now when new entries are input into
Defaults
01 # /etc/default/spamassassin
the plugin is enabled. SpamAssassin is very ef- Google Calendar (Figure 7) or iCal, the same
fective and accurate at filtering out spam. appointments will appear in the Evolution Cal- 02 # Duncan Findlay

The Evolution mail client supports a vast endar (Figure 8). 03


array of calendar formats, including Webcal 04 # WARNING: please read README.spamd
(e.g., Apple iCal, CalDAV, Microsoft Exchange, Importing Contacts before using.
and Google Calendars). Web calendars can be Contacts can be imported from Thunderbird 05 # There may be security risks.
published to the web and the calendar infor- and Outlook in CSV format or from another
06
mation then accessed from Evolution. A per- Evolution contact list. Evolution also offers di-
07 # Change to one to enable spamd
sonal calendar, or any number of public calen- rect synchronization with Palm Pilot devices.
08 ENABLED=1
dars, can be aggregated within Evolution. The Only the Microsoft Exchange feature of Evolu-
calendar integration feature has many options tion allows automatic synchronization of con- 09

for retrieving calendar information. tacts. In most instances, a simple export to a 10 # Options
Certain web calendars, such as iCal and file from the old mail client and an import of 11 # See man spamd for possible
Google Calendar, are designed to be edited the file into Evolution is all it takes to capture options. The -d option is
from within their respective services, rather an old contact list. automatically
than from within Evolution. Although Evolution To import contacts into Evolution from Out- 12 added.
has a Google calendar plugin, use CalDAV in- look, open Outlook/Outlook Express on the 13
stead for its full compatibility with Google Cal- source computer and click File | Import and Ex-
14 # SpamAssassin uses a preforking
endar and increased stability in the current port. Now select Export to a file and choose
model, so be careful! You need to
Evolution release (Figure 6). comma-separated values before saving the file
15 # make sure --max-children is not
and transporting it to the computer that is run-
Access Calendar ning the Evolution client.
set to anything higher than 5,

16 # unless you know what you’re


To access a new Google Calendar or web cal- Next, open Evolution on the destination
doing.
endar, click File | New | Calendar. For this ex- computer and click File | Import, then select
17
ample, I will connect to a Google Calendar. Import a single file and select the file contain-
First, choose the calendar Type. As men- ing the Outlook contacts in the following dia- 18 OPTIONS=”--create-prefs
--max-children 5 --helper-home-dir”
tioned above, use CalDAV for Google, al- log. Finally, choose Outlook CSV or Tab and
though Google is also present in the list. Next, choose an import folder, then click Apply. 19

choose a Name and a Color and set the Refresh 20 # Pid file
interval. Google requires the connection to be Conclusion 21 # Where should spamd write its PID
encrypted, which is strongly recommended in The Evolution email client can handle most of to file? If you use the -u or
any other case, too. To activate encryption, the functions that commercial email clients do, 22 # --username option above, this
needs to be writable by that user.

23 # Otherwise, the init script will


not be able to shut spamd down.

24 PIDFILE=”/var/run/spamd.pid”

25

26 # Set nice level of spamd

27 #NICE=”--nicelevel 15”

28

29 # Cronjob

30 # Set to anything but 0 to enable


the cron job to automatically
update

31 # spamassassin’s rules on a nightly


basis

32 CRON=1

Info
[1] OWA: http://office.microsoft.com/
en-us/outlook/HA010860351033.aspx
Figure 8: The Evolution Calendar reflects entries made in Google Calendar.

DISCOVERY GUIDE ISSUE 01 87


Taking Notes

Taking Notes with Tomboy


Record your thoughts with the Tomboy note-taking
tool. BY DMITRI POPOV

The Tomboy note-taking tool helps you create


and manage personal notes. Tomboy notes are
the equivalent of yellow sticky notes, except
that they are stored and automatically orga-
nized on your computer. If you are running an
Ubuntu flavor without Tomboy, such as
Xubuntu, installing the application is easy with
the Synaptic package manager or by executing
the apt-get install tomboy command in the ter-
minal. After you’ve installed Tomboy, you can
launch it by choosing Applications | Accesso-
ries | Tomboy Notes.
To access Tomboy’s commands, click on the
Tomboy icon in the taskbar. The sample note
that appears automatically contains a few start-
ing points, and you can use that note or create
an empty note to experiment with Tomboy’s
features. Each Tomboy note acts as a mini–text
editor with its own toolbar that includes but-
tons for the most important functions (Figure
1). The Search button opens the Search All
Notes window, where you can search your
notes. To find notes containing a specific word
or text fragment, enter it in the search field and
press Enter for a list of matching notes.
Clicking on any note opens it in a separate and then link each item on the list to a separate matically converts all occurrences of this word
window, with all occurrences of the search note. In this way, you can link the “Tomboy ar- into links to the note.
string highlighted for your convenience. Then ticle” item in the to-do note to another note
you can use the Previous and Find Next but- containing relevant links and other resources, WikiWords
tons at the bottom of the window to jump be- and the “Dentist” to-do item can be linked to Besides manual linking, Tomboy supports so-
tween the found instances. To discard the the note with your dentist’s address. called WikiWords, which convert any Camel-
search information and use the note as usual, Tomboy also adds a nifty twist to the linking Case word into a link to a non-existing note.
click on the close button near the toolbar. feature: when you link a selected word
To perform a quick search in the current or text fragment, the system automati-
note, select the word or text fragment you want cally links other similar words and snip-
to find, right-click on it, and choose Find in pets. For example, if you link the word
This Note | Find. Although Tomboy doesn’t “Tomboy” to a note, the system auto-
support tagging notes, you can
add keywords to each note and
then use the Search feature to find
notes containing a specific key-
word. For example, you can add
the keyword “tasks” to all your
to-do lists and then use the
Search feature to find them.

Links
Clicking the Link button in the
toolbar allows you to link any se-
lected word to a new note. This
seemingly simple feature adds a
whole new dimension to Tomboy;
for example, you can keep all Figure 1: Each Tomboy note acts as a mini–text Figure 2: The Preferences window allows you to
your appointments in one note editor. customize Tomboy’s settings.

88 ISSUE 01 DISCOVERY GUIDE


Taking Notes

Once the add-in is en-


abled, select the SSH
(sshfs FUSE) item from
the Service drop-down
list and fill out the re-
quired fields.

Tomboy Add-ins
The Add-ins section al-
lows you to manage
Tomboy’s add-ins, which
are small modules that
expand the application’s
default functionality.
Tomboy comes with a
handful of officially sup-
ported add-ins, and a list
of add-ins maintained by
third-party developers is
Figure 3: Tomboy can sync your notes with another Figure 4: With the use of add-ins, you easily can extend available on the project’s
machine, server, or local directory. Tomboy’s functionality. wiki [1]. At least two
add-ins are particularly
Because this technique is used widely in wikis, Editing tab, you can enable automatic spell useful: Blogposter and Reminder.
you might already know how this feature check and the WikiWords feature. As the name suggests, Blogposter [2] allows
works and how to use it. By default, the Wiki- If you don’t like the default font, you can you to post notes to your blog, thus turning it
Word recognition feature is turned off, so you choose another. To do this, tick the Use custom into a simple blog publishing tool. The add-in
must first enable it in the Preferences window font checkbox and select the font you like. can publish notes to Wordpress, Blogger, Live-
(Figure 2; see also “Preferences” below). Here, you can also specify the template used Journal, or any blogging system that supports
The Text Properties button offers a few es- for every new note. The Hotkeys tab lets you the APP protocol.
sential text-formatting options, such as bold, enable and specify keyboard shortcuts for The Blogposter add-in is available through
italic, strikeout, and highlight. Tomboy also common tasks so you can create and manage the Ubuntu repositories. Search for Blogposter
supports different text sizes, as well as simple notes without leaving the keyboard (Figure 5). in the Synaptic package manager to install the
bulleted lists that come in handy when using With the use of options available in the Syn- package. After you restart Tomboy, open the
Tomboy as a no-frills outliner or a tool for chronization tab, you can configure the way Preferences window and enable the Post note
keeping track of to-do items. The Tools button Tomboy synchronizes notes (Figure 3). This to your blog add-in in the Add-ins section.
provides access to several actions you can per- feature can be especially useful if you use Tom- Then press the Preferences button and fill out
form on the current note; for example, you can boy on several machines and want to keep the required fields.
synchronize your notes and export them in your notes in sync. Moreover, you can use the Reminder [3] is another add-in from the
HTML format. The Tools button also contains synchronization feature to back up your notes. same author. By adding a date and time to a
the What links here command, which displays By default, Tomboy allows you to sync notes note, Reminder allows you to turn the note
a list of notes that link to the current note; this with a directory on the local hard disk or a into a reminder. For example, if you add the
can be useful for backward navigation. WebDAV server. However, you also can per- string !2011/01/01 07:00 to a note, this note
The Delete button doesn’t require any expla- form synchronization with another machine pops up on your screen on January 1, 2011, at
nation, so I’ll move straight to the last button in via SSH, but first you must enable SSH Sync 7:00am.
the toolbar, which allows you to place a note Service Add-in from the Add-ins tab (Figure 4). Reminder also understands strings such as
in an existing notebook. To make !monday, !next monday, and !monday @ 2h
use of this feature, you must set up am. The exclamation mark in front of each re-
at least one notebook with Note- minder entry is used to differentiate the actual
books | New Notebook. Once reminder from regular date and time entries in
you’ve created a notebook, you the note. Downloading the tomboy-reminder.
can add the current note to it, or dll binary and moving it to the .tomboy/add-
you can create a new note directly ins directory is the easiest way to install Re-
in the notebook by choosing Note- minder. Then restart Tomboy and enable the
books | New “Notebook name” add-in in the Add-ins section of the Prefer-
Note. Grouping notes to notebooks ences window. ■
makes searching easier because the
search feature allows you to search Infos
through all notes or only notes in a
[1] Tomboy add-ins: http://live.gnome.
particular notebook.
org/Tomboy/PluginList
Preferences [2] Blogposter add-in: http://flukkost.nu/
The Preferences window, which blog/tomboyblogposter/
you can access by right-clicking on
[3] Reminder: http://flukkost.nu/blog/
the Tomboy icon, allows you to
tomboy-reminder/
tweak Tomboy’s settings. Under the Figure 5: Create keyboard shortcuts in the Hotkeys tab.

DISCOVERY GUIDE ISSUE 01 89


OpenOffice.org

Open Source Office Suite


If your needs extend beyond word processing to spread-
sheets, databases, and presentation software, we’ll show
you how to ramp up your productivity with the OpenOffice
suite. BY DMITRI POPOV

The OpenOffice suite is a comprehensive col- taining a slew of clever fea-


lection of productivity tools for the home or tures. Writer, for example, in-
business user. To find the word processor, cludes a built-in PDF export
spreadsheet, and presentation tools, select the feature that allows you to gen-
Ubuntu Applications menu and choose Office. erate a PDF version of your
document in a matter of a few
■■■ Introduction to Writer clicks (Figure 1). To do this,
For many users, daily computing means writ- choose File | Export as PDF.
ing and editing documents in one form or an- This opens the PDF Options di-
other, so a decent word processor is an essen- alog window that allows you to
tial tool for their work. Although other word tweak the available export op-
processors are available for Linux, such as Abi- tions. Besides PDF, OpenOffice
Word and KWord, they are no match for supports a number of other for-
OpenOffice.org (OOo) Writer. This heavy-duty mats, including Rich Text For-
word processor can be used for pretty much mat (RTF) and Microsoft Word 2003. The latter Writer and take your word processing skills to
anything: From simple letters and invoices to can be particularly useful for people who need the next level, you should learn how to use
books and mail merge documents – Writer to exchange documents with Microsoft Office styles (Figure 2). The Styles feature allows you
handles these tasks equally well. users. Keep in mind, that although OOo Writer to specify paragraph and character formatting
Users familiar with other word processors usually does a commendable job of handling properties. For example, you can create a para-
will feel at home with Writer. It sports a rather the Word format, it can occasionally stumble graph style called My_bold_head (or edit a de-
conventional interface (some might call it on some complex documents containing a lot fault paragraph style) that uses the Bitstream
dated), and all its basic features are immedi- of formatting. Using OpenOffice’s export fea- Vera 9pt Bold font. The next time you have to
ately available via the main toolbar. The For- ture, you can also save Writer documents as format a bold head, you simply apply the My_
matting toolbar provides quick access to the MediaWiki-formatted text files – a boon for bold_head to it.
formatting options, such as font, font size, users who use wikis for web publishing. But you might ask: “Why bother creating a
alignment, numbered and bulleted lists, and so Like any word processor worth its salt, separate style if I can just use the Bold button
on. In other words, even if you are completely Writer supports version tracking, on-the-fly on the Formatting toolbar?” Well, say you have
new to OOo Writer, you can start using it right spell checking, footers, headers, footnotes, ta- a 99-page document with dozens of words and
away. However, behind Writer’s simple inter- bles, and other essential features. Users inter- text fragments in bold. Now, what if you need
face hides a rather powerful application con- ested in mail merge will be pleased to learn to change all heads to bold italic? Without
that Writer comes with a powerful yet user- styles, you have to go through the entire docu-
friendly Mail Merge Wizard. The Frames fea- ment and manually change every single head
ture can help you to lay out complex docu- individually. Needless to say, this is a lot of
ments, and you even have a Media Player you work. With styles, performing this operation is
can use to play media files and insert them simple: Simply open the My_bold_head style
into documents. All these are indispensable for editing, choose the Font tab, select Bold
tools, but two features really
make Writer stand out from the
crowd: styles and master docu-
ments. Moreover, you can ex-
pand the capabilities of Writer
and other OpenOffice applica-
tions with extensions.

Work in Writer
with Style
Styles is one of the features that
make OOo Writer a rather
powerful word processing ap-
Figure 1: Save your Writer documents in PDF plication. In fact, if you really
format with ease. want to get the most out of Figure 2: Tweaking styles in Writer.

90 ISSUE 01 DISCOVERY GUIDE


OpenOffice.org

Writer work like a charm, so if you are plan-


ning to write your next book in OpenOffice,
you should consider using the master/subdoc-
uments capabilities of Writer. Creating a mas-
ter document in Writer couldn’t be easier: Just
choose File | New | Master Document, and
Writer creates an empty master file ready for
use. Then you can use the Navigator tool
(press F5 or choose Edit | Navigator to open it),
which allows you to add subdocuments to the
master and manage them with ease.

Extending Writer
As in Firefox, you can add new features to
OpenOffice applications with extensions. The
best place to find them is the official extension
repository [1]. Here, you can find extensions
for all OpenOffice applications, as well as rate
them and comment on them. Installing Open-
Office extensions is rather straightforward.
First, with the Synaptic package manager,
download the desired extension, which also
requires that the Ubuntu openoffice.org-java-
common package be installed. Then launch
OpenOffice, choose Tools | Extension Man-
ager, and select the My Extension section.
Now press the Add button and select the
Figure 3: Checking grammar with LanguageTool. downloaded .oxt file. Once the extension is
installed, restart OpenOffice to enable it.
Oblique in the Typeface list, press OK, and you save individual chapters as separate .odt files Which extensions you choose to install on
are done. and assemble them in a master document. The your system depends largely on your needs,
The Styles feature offers a few other creature master/subdocuments concept is not new. This but you might want to try at least two exten-
comforts. The Organizer tab in the Style dialog feature has been available in Microsoft Word sions: LanguageTool [2] and OpenOffice.org-
window allows you to specify which style for a while, but it was (and probably still is) so 2GoogleDocs [3].
should follow the current one (the Next Style buggy that even Microsoft recommended you Although OpenOffice comes with a compe-
option) and which style inherits its properties stay away from it. The master documents in tent spell checker and thesaurus, it lacks a
(the Linked with option). For example, you can
create a special style for the document header
and set the Next Style option to the Text body
paragraph style. The next time you type a
header in your document and press Enter,
Writer automatically switches to the Text body
style. Using the Linked with option, you can
link several styles together. For example, you
can link the Heading 1 style with Heading 2,
so the latter style inherits the properties of the
former. If you later change, for example, the
font in the Heading 1 style, this change will be
automatically applied to the Heading 2 style
and any style linked to it. In this way, you
don’t have to go through each style and
change its properties manually. To keep tabs
on styles, Writer sports the Stylist tool, which
can be evoked by pressing the F11 key or by
choosing Format | Styles and Formatting.
Styles can be a bit intimidating in the begin-
ning, but once you’ve learned the ropes, they
can save you a lot of time and make you look
like a real OOo Writer pro.

Mastering the Master


Styles is not the only feature that makes Writer
a perfect word processing tool for complex
documents. When working on a long docu-
ment, like a book or research paper, you can Figure 4: Use the ooo2gd extension to upload your documents quickly to Google Docs.

DISCOVERY GUIDE ISSUE 01 91


OpenOffice.org

TIP
Instead of entering the status manually
each time, click on a status cell and press
the Ctrl+D key combination. This gives
you a drop-down menu containing all
previously entered items. To make the in-
voice manager even more useful, you
can add a feature that marks overdue in-
voices. To do this, simply add a Payment
due column (C) and add a function to the
cells in column D (see Figure 8).

and enter your username and password, and


the extension does the rest.

■■■ Introduction to Calc


When it comes to number crunching and
charting, the OOo Calc spreadsheet applica-
tion is your best friend (Figure 5). Calc has
pretty much all the features you would expect
to see in a competent spreadsheet application.
For starters, Calc offers a wide range of format-
ting options. Similar to Writer, Calc supports
Figure 5: OpenOffice.org Calc in action. styles, which makes it easier to format your
spreadsheet documents. Using the Ranges
grammar module, which many users find 2GoogleDocs (ooo2gd) extension solves the (Data | Define Range) feature, you turn se-
rather useful. If you are among them, then try problem by allowing you to upload OpenOf- lected cells into a named group. For example,
LanguageTool (Figure 3). It might not be as fice documents to Google Docs, as well as you can turn a column containing sales figures
powerful as the grammar checker bundled open existing Docs files in Writer (Figure 4). into a range called “Sales” and the column
with Microsoft Office, but it does let you per- The upload feature supports not only ODT containing costs into a “Costs” range. Then,
form basic grammar checking with ease, and it documents, but also SXW, DOC, and RTF. you can use the ranges to perform natural lan-
supports several languages. Moreover, ooo2gd can send spreadsheets in guage operations on them – for example,
Right from the start, Google Docs (Docs) has ODS, XLS, and CVS formats and as PPT and “Sales - Costs.” Calc also supports conditional
been a useful complement to OpenOffice. Be- PPS presentations. The download part of the formatting, which applies a certain style to a
cause this web-based office suite supports the ooo2gd extension is still in the experimental cell depending on a specified condition. The
OpenDocument format, you can send docu- stage, and for now, you can only open Google spreadsheet application comes with a huge
ments back and forth between OpenOffice and Docs in Writer as plain text files. collection of functions, from something simple
Google Docs. Although this method works fine Use of the extension couldn’t be easier. like LEN (which calculates the length of a text
when you only have to upload or download When installed, it adds a submenu to the File string) to something more esoteric like YIELD-
documents every now and then, if you often menu containing the commands Export to MAT (which returns the annual yield of a secu-
need to transfer dozens of documents between Google Docs and Import from Google Docs. rity that pays interest at maturity). Working
OpenOffice and Google Docs, it can quickly Alternatively, the Zoho service is also sup- with functions can be a bit of a chore, but Calc
become a nuisance. The OpenOffice.org- ported. Simply choose a command you need comes with the Function Wizard, which makes

Figure 6: Insert Hyperlink dialog window.

Figure 7: Conditional Formatting dialog window. Figure 8: Invoice manager.

92 ISSUE 01 DISCOVERY GUIDE


OpenOffice.org

to enter the following function: =IF(AND(C2<


TODAY()-5;B2=”Sent”);”OVERDUE”;” “).
This means that if the payment due date is less
than the current date minus five days and the
status of the current invoice is “Sent,” then the
invoice will be marked “OVERDUE.” Use the
formatting trick described above to apply the
function to other cells in column D, and your
invoice manager is ready to go (Figure 8).

■■■ Introduction to Impress


If you need to create a presentation that deliv-
ers your message with style, OOo Impress is
here to help you. Impress’ interface is divided
into three panes: the Slides pane to the left, the
Task pane to the right, and the working area in
the middle (Figure 9). The working area also
contains several tabs that you can use to switch
between different sections. For example, in the
Notes tab, you can add notes to your slides,
whereas the Slide Sorter tab allows you to
change the order of the slides. The Tasks pane
Figure 9: OpenOffice.org Impress. consists of five sections: Master Pages, Lay-
outs, Table Design, Custom Animation, and
it significantly easier to design simple and Paid, with a green background. Also, you can Slide Transition. The Master Pages section con-
complex functions alike. The spreadsheet ap- choose whatever background color you like. tains so-called master slides – special tem-
plication can also pull data from external data Now click on cell B1 and choose Condi- plates that you can apply to all slides in your
sources (Insert | Link to External Data). With tional Formatting from the Format menu. In the presentation. As you might have guessed, the
this feature, you can, for example, create a Conditional Formatting dialog window, define Slide Transition section can be used to specify
spreadsheet that pulls stock prices from a web- the three conditions, as shown in Figure 7. The transitions between slides, and Impress offers
site and uses these data to generate charts. specified conditional formatting will be used to quite a few effects to choose from.
Speaking of charts, the latest version of Calc apply one of the defined cell styles depending Impress offers the whole gamut of drawing
comes with a completely redesigned Chart on the cell’s content. tools that let you design advanced presenta-
module, which not only makes the process of To do the same for all, or at least some, of tions with minimum fuss. Export formats for
creating charts more intuitive but also adds the cells in column B, click on the formatted presentations include PDF and Flash, and the
new chart types, such as donut and exploding cell B1, click on the black handle in the lower latter makes it easy to embed a presentation
donut. Calc’s DataPilot (Data | DataPilot) fea- right corner (the cursor changes to crosshairs), into a web page. Impress ships with a rather
ture is similar to Microsoft Excel’s pivot tables, hold the mouse button down, and drag the meager collection of presentation templates,
and it allows you to cross-tabulate, summarize, handle down. but you can download and install the Profes-
and convert data into meaningful information. Next, click on cell D1 and press the Func- sional Template Pack extension [4], which adds
tion Wizard button. Use the Function Wizard a few additional templates.
Creating a Simple Spreadsheet
to Manage Invoices
To come to grips with Calc’s basic features, I’ll
create a simple spreadsheet that can help
manage invoices stored on a computer as
Writer documents. The first order of business
is, of course, to create a new spreadsheet.
To insert a link to a specific invoice, click in
cell A1 and choose Hyperlink from the Insert
menu. Select the Document option in the Hy-
perlink dialog window, then enter the path to
the invoice in the Path field (Figure 6). In the
Text field, enter a descriptive name for the in-
voice – for example, the invoice number and
title. If you leave this field blank, Calc will in-
sert the full path into the cell. To finish, click
Apply and then Close.
Now that all of your invoices are in one
place, how do you know which ones need to
be mailed or have already been paid? To solve
this problem, you need to add a status column
with color codes. First, use the Stylist to create
three cell styles: To be sent, with a red back-
ground; Sent, with a yellow background; and Figure 10: Working with the Outline tab.

DISCOVERY GUIDE ISSUE 01 93


OpenOffice.org

peat this step for other slides in your


presentation.

■■■ Introduction to Base


OpenOffice comes with its own data-
base application called Base. Although
it is a rather complex application, once
you’ve mastered its basics, you can cre-
ate pretty much anything: from a sim-
ple recipe database to sophisticated
project management solutions.

Installing OpenOffice
Base
By default, Ubuntu ships without OOo
Base, so before you can start creating
databases, you have to install the Base
application on your machine. To do
this, click on Applications | Add/Re-
move and select the Office section.
Now enter openoffice in the search
field, locate the entry OpenOffice.org
Database in the list of found items, and
tick the checkbox next to it to mark it
for installation. Then press the Apply
Figure 11: Setting a primary key. Changes button to install all the neces-
sary packages.
Although Impress’ features and interface can and work on it. Alternatively, to manage your
be a bit overwhelming in the beginning, using presentation as an outline, click on the Outline Using OpenOffice Base
the application to create presentations is not tab in the working area (Figure 10). Each time The best way to learn the ropes is to create a
that difficult. If you choose File | New | Presen- you type a header and press Enter, Impress working database solution in OOo Base. For
tation, OpenOffice launches the Presentation adds a new slide. Using the promote and de- example, you can build a simple database so-
Wizard, which helps you configure the basic mote buttons in the Formatting toolbar, you lution that will help you to keep track of your
settings of your presentation. First, you have to can manage text as outline items. To speed jobs, how many hours you spend on each job,
choose the template and slide design you want things up, use the Tab key to demote the cur- companies (i.e., your customers), and contact
to use for your slides. Then, you specify the rent item or Tab+Shift to promote it. The Out- persons for each company. Launch OOo Base
output format for the final presentation and line mode allows you to concentrate on the and choose File | New | Database, then use the
choose between overhead sheet, paper, slide, content of your presentation. You can tweak Database Wizard to create and save a database
and other options. The wizard also lets you the layout and overall appearance later. file. When you click the Finish button, OOo
specify a slide transition that will be used Timing is everything in presentations, so Im- Base opens the main window, which is the
throughout the entire presentation. If you want press includes the Rehearse Timings feature. main “working zone” from which you create
the presentation to run automatically, you can With this feature, you can adjust timings for your database.
also specify the duration time for slides and each slide. First choose Slide Show | Rehearse The first thing you need to do is create tables
pauses between them. Once you are satisfied Timings. This launches the presentation, and and populate them with fields. Choose Tables
with the settings, press Create, and the wizard you should see a timer in the left corner at the in the Database pane, and click on Create
generates a presentation. bottom of the slide. Say to your imaginary au- Table in Design View. This will create a new
Of course, if you prefer to create a presenta- dience what you want to communicate about empty table, which you will use to store job
tion from scratch, you can skip all the described the first slide. Then when you are ready to go to data. Then create a JobID field by typing its
steps and simply press the Create button. This the next slide, click on the timer, and Impress name in the Field Name column, and set its
generates a blank presentation that you can saves the timing for the current slide. Now re- type to Integer ([ INTEGER ]).
tweak to your heart’s content. If you choose to
go this way, the first thing you might want to do
is choose a master slide for your presentation.
This will apply a specific layout to all the slides
you create, thus saving you a lot of work. To
choose a master slide, click on the Master
Pages section and choose the master you like
from the Available for Use category.
Impress offers two ways of creating slides
and adding content to them. The first and most
obvious way is to right-click somewhere in the
Slides pane and choose New Slide. Then you
can use the main working area to add bulleted
points, graphs, and other stuff to the slide.
Once the slide is ready, you create a new slide Figure 12: Defining relationships.

94 ISSUE 01 DISCOVERY GUIDE


OpenOffice.org

OOo Base offers a range of field types. The left mouse button, then drag a relation
most important are numerical types (INTEGER, onto the CONTACTS.CompanyID
for integers – e.g., 1001, 2031, 5673; FLOAT, field and release the button. The next
for floating-point numbers – e.g., 375.75, step is to define the relation’s proper-
12.32, 100.21); variable-length strings (VAR- ties (Figure 13). If you have a com-
CHAR, with widths specified in the Field Prop- pany in your database that is no lon-
erties pane); dates (DATE); and times (TIME). ger your customer and you decide to
To set the JobID field as the primary key, delete it from your database, the sys-
right-click on the record pointer (the green tri- tem has to know what to do with the
angle to the far left) and select Primary Key “orphaned” contact records. Nor-
from the contextual menu. The primary key mally, you’d want to delete them as
has to meet two requirements: It must not be well. Double-click on the relation be-
empty, and it must have a unique value. OOo tween COMPANIES and CONTACTS,
Base makes it easy to assign this property to and in the Delete options column, se-
the primary field key. Selecting Yes from the lect Delete cascade and click OK.
AutoValue list in the Field Properties pane (Fig- By the same technique, define rela-
ure 11) ensures that every new record gets a tions between the COMPANIES and
unique value (in this case, it’s a number) in the Figure 13: Setting the properties of relations. JOBS tables. Make sure, however, that
JobID field. the delete option is set to No action;
Now add the rest of the fields and set their member to set the correct format for the Date, otherwise, deleting a job will automatically de-
types. Before you save the table, make sure TimeUsed, and Price fields in the HOURS lete the related company. Finally, define a rela-
that the date format of the Deadline field is table. tion between JOBS and HOURS and set the
configured properly. Select the Deadline field, The Relation Design tools make creation of delete option to Delete cascade. This will en-
and in the Field Properties pane click on the relations between tables as easy as drawing sure that if you delete a job, you won’t end up
button next to the Format example field. Select lines between primary and foreign keys (Figure with orphaned time entries.
the desired format and language and click OK. 12). To define relations between the four ta- When the relations are defined, save them
Save the table (File | Save or Ctrl+S), and when bles, choose Tools | Relationships and use the (File | Save or Ctrl+S) and close the Relation
prompted, give the table the name JOBS. Add Table dialog window to add the tables. Design dialog window (File | Close). Now you
Now that you know how to create tables To establish a relation between the COMPA- have tables, and gradually you need to fill
and fields, you can easily add the HOURS, NIES and CONTACTS tables, select the COM- them with data. To view and manipulate the
COMPANIES, and CONTACTS tables. Just re- PANIES.CompanyID field, click and hold the data, you have to create queries.

WANT TO KNOW
WHAT‘S UP NEXT?
SUBSCRIBE TO LINUX
MAGAZINE PREVIEW,
OUR FREE MONTHLY
EMAIL NEWSLETTER!

DISCOVERY GUIDE
WWW.LINUX-MAGAZINE.COM/NEWSLETTER ISSUE 01 95
OpenOffice.org

OpenOffice Base allows you to create que-


ries with the use of either the Query Wizard or
the Design View. Users that are familiar with
SQL can also use the built-in SQL editor. In
most cases, though, you might want to use the
Design View, which allows you to construct
queries in a GUI. Say you want to create a
query that allows you to extract the relevant
data about a job: job number, customer, job
description, status, type, and deadline. Click-
ing on Create Query in the Design View link in
the Tables section opens the Query Design
window and the Add Tables dialog windows.
Now you can add the JOBS and COMPANIES
tables to the query with the Add button and
click Close.
All you have to do now is add fields to the
query, either by choosing the fields from a
drop-down list in the Field cells or by dragging
fields from the tables to the Field cells.
By default, the query will use the field
names as labels, but you can change that to
make your query more readable. For example,
you can set the JobID field shown as “Job no.” Figure 15: Designing forms in Base.
by typing the latter in the Alias cell (Figure 14).
To save the finished query, choose File | Save Table from the Content Type list, and JOBS from ample, you might want to view and register the
(Ctrl+S) and give the query a name. The new the Content list. time spent on the current job with the use of a
query appears in the Query section, and you To add, for example, the Description text subform.
can launch it by double-clicking on it. field control (which contains the job descrip- In the Form Navigator window, click on the
To make your database application complete, tion), click on the Text box button on the Form Job form and select New | Form. Give the sub-
you need to build a form-based interface. Say Controls toolbar, and draw a text box in the form a descriptive name (e.g., Hours), then
you want to create a form that you can use to form. Now double-click on the text box. Under right-click on it and select Properties. Under
display, edit, and add jobs. Switch to the Forms the Data tab, select Description from the Data the Data tab, select Table from the Content
section by pressing the Forms button, then click field list. In a similar manner you can add other Type list, and HOURS from the Content list.
on Create Form in Design View. This will open a fields like Status, Type, and Deadline. In the Then you can add form controls to the created
blank window. Click on the Form Navigator but- Properties window, you can add short help subform. Because you can have multiple re-
ton on the Form Design toolbar. In the displayed texts to the controls. To do this, click on the cords in the HOURS table that are linked to a
Form Navigator, right-click on the Forms folder General tab, and enter the help text. particular job, you might want to view them as
and choose New | Form. Give the form a de- The form you created allows you to add, a table in the Job form. For this purpose, OOo
scriptive name (e.g., Job), then right-click on it view, and edit data in the JOBS table, but you Base conveniently offers the Table Control (Fig-
and select Properties. Under the Data tab, select can also include data from other tables. For ex- ure 15). Make sure that the Hours subform is
selected in the Form Navigator, click on the
Table Control button and draw a table. Use the
displayed Table Element Wizard to select the
fields you want and press Finish.
When you finish creating the form, save it
and close the Form Designer. Now you can
double-click on the form to open and use it. To
browse, add, and edit records, use the Form
Navigation toolbar (View | Toolbars | Form
Navigation). ■

Info
[1] OpenOffice.org extensions
repository:
http://extensions.services.openoffice.
org
[2] LanguageTool:
http://www.languagetool.org
[3] OpenOffice.org2GoogleDocs:
http://code.google.com/p/ooo2gd
[4] Professional Template Pack:
http://extensions.services.openoffice.
org/project/SunTemplatepack_1
Figure 14: Creating a query.

96 ISSUE 01 DISCOVERY GUIDE


Events SERVICE

AUTHORS CONTACT INFO


Nick Ali 6 Editor in Chief
Jono Bacon 10 Joe Casad, jcasad@ubuntu-user.com
Managing Editor
Mike Basinger 46 Rikki Kite, rkite@ubuntu-user.com
Florian Effenberger 56 Associate Editors & Proofreaders
Carsten Schnober, Rita L. Sooby
Marcel Gagné 11 Editorial Assistant
Heather La Bash
Marcel Hilzinger 67
Contributing Editors / Test Lab Staff
Heike Jurzik 58 Uli Bantle, Andreas Bohle, Jens-Christoph Brendel,
Hans-Georg Eßer, Markus Feilner, Oliver Frommel,
Kristian Kißling 6, 74 Marcel Hilzinger, Mathias Huber, Kristian Kißling,
Jan Kleinert, Thomas Leichtenstern, Jörg Luther,
Andreas Kneib 53 Nils Magnus
Klaus Knopper 22 Localization
Ian Travis
Christoph Langner 48 Layout & Cover Design
Judith Erb, jerb@ubuntu-user.com
Achim Leitner 71
Cartoons
James Mohr 82 K. Curtis Shontz, curt@theagilebadger.com
Cover Illustration
Dave Phillips 76 Pinball Werbeagentur / funkallstars, Fotolia
Dmitri Popov 50, 88, 90 Advertising
www.ubuntu-user.com/Advertise
Matthew Sacks 78, 84 United Kingdom and Ireland
Carsten Schnober 42, 62, 64, 67, 71 Penny Wilby, pwilby@ubuntu-user.com
Phone: +44 1787 211 100
Tim Schürmann 16, 30 North America
Amy Phalen, aphalen@ubuntu-user.com
James Stanger 26, 36 Phone: +1 785 856 3434
Matthias Warkus 80 All other countries
Hubert Wiest, anzeigen@linuxnewmedia.de
Phone: +49 89 9934 1123
Corporate Management (Vorstand)
Hermann Plank, hplank@linuxnewmedia.de
Brian Osborn, bosborn@linuxnewmedia.de
Management North America
Brian Osborn, bosborn@linuxnewmedia.com
Associate Publisher
Rikki Kite, rkite@linuxnewmedia.com
Product Management
Hans-Jörg Ehren, hjehren@ubuntu-user.com
Customer Service / Subscription
For USA and Canada:
Email: cs@ubuntu-user.com
Phone: 1-866-247-2802
(Toll Free from the US and Canada)
Fax: 1-785-274-4305
For all other countries:
Email: subs@ubuntu-user.com
Phone: +49 89 9934 1167
Fax: +49 89 9934 1199
Ubuntu User • c/o Linux New Media •
Putzbrunner Str 71 • 81739 Munich • Germany
www.ubuntu-user.com – Worldwide
www.ubuntu-user.com.au – Australia
www.ubuntu-user.co.uk – United Kingdom
While every care has been taken in the content of the
magazine, the publishers cannot be held responsible for
the accuracy of the information contained within it or any
consequences arising from the use of it. The use of the
DVD provided with the magazine or any material provided
on it is at your own risk.
Copyright and Trademarks © 2009 Linux New Media Ltd.
No material may be reproduced in any form whatsoever
in whole or in part without the written permission of the
publishers. It is assumed that all correspondence sent, for exa-
mple, letters, e-mails, faxes, photographs, articles, drawings,
are supplied for publication or license to third parties on a
non-exclusive worldwide basis by Linux New Media unless
otherwise stated in writing.
Printed in Germany
Distributed by COMAG Specialist, Tavistock Road,
West Drayton, Middlesex, UB7 7QE, United Kingdom
Ubuntu User ISSN 2040-8080
Ubuntu User is published by Linux New Media USA, LLC,
719 Massachusetts, Lawrence, KS, 66044, USA and Linux
New Media Ltd, Manchester, England. Company registered
in England.
Linux is a trademark of Linus Torvalds.
Ubuntu and Canonical are registered trademarks of
Canonical Ltd.

UBUNTU USER ISSUE 01 97


SERVICE Ubuntu User Issue 02

WATCH FOR US...


APPROXIMAAuTg E12
UK / Europe
Aug 26
USA / Canada
Oct 02
Australia
ON SALE DATE

If you are looking for real answers


to your Ubuntu configuration
problems, or even if you just want
to explore the exciting world of
Ubuntu, watch your newsstand
for the next issue of Ubuntu User
magazine.
You’ll learn about great free
tools for the Ubuntu environ-
ment. We’ll also bring you tips
from the experts on scripting and
troubleshooting Ubuntu systems,
and we’ll show how to save time
and money through advanced
techniques for virtualization and
Windows integration.

www.ubuntu-user.com
98 ISSUE 01 UBUNTU USER
DON’T MISS A
SINGLE ISSUE!
Ubuntu User is the first print magazine created specifically for Ubuntu
users. Ease into Ubuntu with the helpful Discovery Guide included in
each issue, or advance your skills with in-depth
technical articles, HOW-TOs, reviews,
R I B E N O W !
tutorials, and community reports. SUBSC er year for o
nly
4 issues p 5
/ E U R 2 9 .9 0 / US$ 39.9
£ 24.90

✔ Don’t miss a single issue!


✔ Huge savings – Save more than 35% off the cover price!
✔ Free DVD – Each issue includes a Free DVD!

www.ubuntu-user.com
N
Sup ow
Ub p
un or ts
JAU tu 9
NT
Y JAC
KA
.04
LO
PE

BACKUP LINUX SERVERS TO


ANYTHING
BackupEDGE™ creates easy, verified data backups with What’s an FTP Backup? BackupEDGE 2.3 can
available high strength encryption and key management. stream live backups to any FTP and / or FTPS
Choose the storage medium best suited to protect your equipped storage server, NAS device or
critical data and systems, including... appliance, providing users with:
Network Attached Storage (intranet or Internet)
¯
High availability and security
¯
Amazon S3 Internet Cloud Storage
¯
Multiple backups on-line
¯
Tape drives (including changers/libraries)
¯
Instant access to archived files and folders
¯
Iomega REV drives (including loaders)
¯
® ®

Bare metal disaster recovery


¯
Removable disk / cartridge disk storage
¯
Freedom from tape management woes
¯
Flash drive storage
¯
New! Re-start option picks up the backup
¯
Standard CD and DVD writers
¯ after a network link outage
Any combination
¯ Browse to: http//www.microlite.com right now
RecoverEDGE™ bare metal disaster recovery is fully for additional information about FTP Backups!
supported from any medium type. It is included with
every copy of BackupEDGE for Linux. Only BackupEDGE has an advanced, standards-based
storage format allowing capture and protection of ALL of
your data. Features include:
Pathnames - up to 5,000 characters
¯
Integrity checksums (file level)
¯
9 selectable compression levels (file level)
¯
Archive / subset-of-archive encryption (file level)
¯
Access control list (ACL) support
¯
Transparent Media™ technology allows virtually
instantaneous restore of individual files and directories
from most archive resources, and the fastest possible
tape positioning and restore.

Microlite Corporation has been in business since 1983 and


protecting SMB and edge-of-enterprise UNIX and Linux
servers since 1987. Visit our website today to download
a fully functional 60-day evaluation copy of BackupEDGE.

http://www.microlite.com CORPORATION

Vous aimerez peut-être aussi