Presented by Ben McMillan on September 27, 2006
Table of Contents
- 1. Work in progress
- 2. Credits
- 3. Introduction
- 4. Why Linux / *BSD / Unix?
- 4.1. Customizability
- 4.2. Experience
- 5. The User Interface
- 5.1. Choices
- 5.2. Configuring the User Interface
- 5.3. ‘Help!’ or, How To RTFM.
- 6. Doing ‘Normal’ Things
- 7. Package Management
- 7.1. RPM
- 7.2. Debian / Ubuntu
- 7.3. Tarballs
- 7.4. Autoconf
- 8. Whizzy Stuff
1. Work in progress
THIS IS A WORK IN PROGRESS. READ AT YOUR OWN RISK. YOU MIGHT GO BLIND.
2. Credits
This presentation was originally given by Michael Imamura and Sonny Rao in 2002. I
have used a lot of their text, but with modifications and updated images.
3. Introduction
3.1. What is this all about?
The growth of Linux towards becoming a useful desktop platform over
the past years has brought many new users into understanding the
alternatives that exist in both operating systems and applications.
The much-advocated system of Open Source development to improve software
quality and collaboration has also made quite a splash, bringing in
developers who would otherwise have never dreamed of becoming involved
in such large, influential projects such as the Linux kernel, KDE,
Gnome, and Mozilla.
That’s all fine and good for software developers, but amid the talk
of releasing source code, arguing over architectural decisions and
which editor is the greatest in the universe, there are the cries of
the non-developers:
"What’s in it for me? How does this help me get
my job done?"
4. Why Linux / *BSD / Unix?
4.1. Customizability
Everybody uses a computer differently, so being able to adapt your
system to fit your needs is a valuable tool for getting work done
efficiently. When there is such a large selection of environments to
choose from (more on this later), the focus shifts from learning how
other people work to learning how you as a user works.
4.2. Experience
Mastery of a single particular system is admirable, but a worker
is always better off knowing what tools are available. Linux and the
applications that run on it are tools for getting your work done, and
it’s a good thing to know if it is a better tool for the job by experience
rather than a marketing brochure.
5. The User Interface
5.1. Choices
As mentioned earlier, Linux provides a dazzling array of ways to
interact with your system, from the simple text-only console, to
complete desktop environments such as
Gnome,
XFCE, and
KDE. Graphical user interfaces are
sometimes referred to as "window managers", and are generally interchangeable.
In particular, Gnome and KDE are desktop environments which utilize their own
or other window managers for the sole task of window management (aha!).
While we will be focusing on
Gnome and KDE (Gnome in particular), there are many others available,
descriptions and screenshots of which can be found
here: http://www.plig.org/xwinman/.
5.2. Configuring the User Interface
In Gnome, most of the configuration options for changing the user
user interface of the default window manager (Metacity), can be found
in the System -> Preferences menu, or the Gnome Control Center,
or the gconf-editor (a more direct, "hardcore" way).
5.3. ‘Help!’ or, How To RTFM.
In Windows, standardized help is invoked via the F1 key. The standard
help system on Unix systems are "manual" (or simply, "man") pages,
commonly viewed via the man command. You may also use the F1
key in Gnome for application specific help (pressing F1 in gnome-terminal
will display documentation about using Gnome’s terminal). Or you can
access help documentation from System -> Help if using Gnome.
The web, as always, is a valuable resource for finding support
in addition to any help provided with the application. In particular,
if you are getting started with an application, search for the word
"HOWTO" in addition to you search terms.
6. Doing ‘Normal’ Things
6.1. File Management
Managing files in Gnome and KDE should feel familiar to users of
the Explorer in Windows, using the standard folder and icon interface.
The Gnome file manager is called Nautilus, and will be the focus of
this section. If you are using KDE, information on managing files
can be found
here.
6.2. Understanding Unix Paths
"If the path be beautiful, let us not ask where it leads."
– Anatole France
There are three major points to remember when it comes to Unix-style
filenames:
- The names of files and directories are case-sensitive.
- All paths start at the root directory ("/").
- Your personal files go in your "home" directory, which is usually
"/home/yourname" and is often abbreviated as simply
"~" (tilde).
Your hard drives, CD-ROM drives, and floppy drives are "mounted" to
become accessible. Mounting a drive simply means that it is associated
with a path, such as "/mnt/cdrom", from which you can access
the files on the drive.
6.3. Dot-Files (Hidden Files)
Unlike Windows, files cannot be marked "hidden". Rather, files which
begin with a period (often referred to as "dot-files") are treated as
hidden files, and are usually found in your home directory to store
personal settings for programs.
6.4. Understanding Unix File Permissions
All files on a Unix system have settings for permissions. There
are nine major permission settings which can be toggled on or off:
three categories (user, group, and other), each with three settings
(read, write, execute). Each file is also owned by a user and is
assigned to a group.
The permissions for a file are usually abbreviated as 9 characters
in a row, like this:
rwxrwxrwx
The first three characters are the permissions of the file as they
relate to the file’s owner (read, write, and execute). Read and write
are self-explanatory; execute means that the file can be run as a
program. The next three characters refer to the permissions relating
to the file’s group, and the last three refer to the permissions
in regard to all other users. If instead of a character there is a
hyphen ("-"), when that means the permission in that space is not
set.
Examples:
rwxrwxrwx: This means that the file is open to
all users (all users can read and write this file). Also, all users
can execute this file as a program.rwxr-xr--: This means that the user who owns this
file can read, write, and execute the file. Users who belong to
the same group which the file is assigned to can read and execute
the file. All other users can read, but not execute, the file.rw-r-----: This means that the user who owns this
file can read from and write to the file. Users who belong to the
same group which the file is assigned to can read the file. All
other users cannot read or write the file.
6.5. Finding Files
To search for files from Nautilus, you may press Ctrl+F to open
the search dialog, or you may (in Gnome) use "Search" in the Applications -> Accessories
menu.
You may also search for files from the command line. The fastest way is to use
"locate" (man locate for more information). However, this only works if there is an
index. Usually this is generated by a scheduled job (cron) daily via updatedb (or, rather,
slocate). If you do not have an index, or it is too old (like if what you’re searching for
was added or moved since the last index), you will need to use "find" (again, man find). Find
searches the filesystem directly, and thus will probably be slow.
Examples:
$> locate -i "fstab" # -i for case insensitivity
/etc/fstab
/usr/lib/perl5/site_perl/5.8.8/i686-linux/fstab.ph
/usr/share/doc/busybox-1.1.3/bootfloppy/fstab.gz
/usr/share/doc/util-linux-2.12r-r4/examples/fstab.gz
/usr/share/man/man5/fstab.5.gz
...
$> find / -iname "*fstab*" # -iname for case insens.
(should be same output as above if index recent)
6.6. Opening a File with a Specified Program
Typically you can just double click the file in a graphical browser (like Nautilus)
to open the file with a reasonable program. If the default application for that file
is not what you desire, you can use a different program to open the file by
right clicking the file and choosing "Open With -> Other Application…" (or "Open with other application").
or (sometimes Nautilus will group the "Open with"’s into its own submenu)…
Next, select the application you wish to associate with the file type
in the list. If your application is not listed, type it in under "Use a custom command".
Doing this will not set the application as the default for that file type (aka mime type). It will only add it to the list of relevant programs (read on!).
Of course, you may open a file from the command line. The philosophy is a bit different,
in that instead of choosing the file then choosing the action (noun verb), you choose
the action and then the file (verb noun). If the program you use to open the file
is graphical and you run the command from a terminal inside X (like, from within xterm,
gnome-terminal, konsole, etc), the program will appear in X. If the program is
not graphical, it will be run inside that terminal.
6.6.1. Setting the Default Program for a File Type
To make a certain program the default when opening a certain type of file, you can do so
by editing the properties of any file of that type. Right click that file, select "Properties" and from that dialog select the "Open With" tab. Listed are the most relevant programs (some were added if/when you used the "Open with other application" option).
You may select the app to use by checking it’s radio button. You can also delete a possibility. Doing this will remove it from not only this menu, but also the context menu (via right click). Or you can add an application to the list, which brings up the same dialog as above.
6.7. Playing and Managing Multimedia
There are many ways to play and/or manage multimedia. The classic way is to just
use XMMS or a newer fork, Beep (Media Player – BMP).
Most music and video files in Gnome by default will open in Totem, which
uses gstreamer as a backend.
Or if you prefer something similar to iTunes (without the Music Store, of course),
you can use Rhythmbox. Ubuntu will hopefully, on insert of an MP3 player (like an
iPod – unless it only recognizes iPods …), run Rhythmbox automatically. It can actually
understand the iPods database file and manage the music on it. You will only
be able to play non-DRMed music, though (anything not bought in the iTunes music store –
any CDs ripped via iTunes are fine).
Finally, there is mplayer. Although not seemingly
fancy, it is a beast.
Nautilus by default will open pictures with "Eye of Gnome". Alternatively, you can use
gqview which is much like ACDSee in Windows.
7. Package Management
Installing Programs (or "Packages" as they are often called in the
*nix world) is handled in a multitude of ways depending on what
distribution or system you are using. Even between different
distributions there are several different package management systems
in use today. The most prevalent system is called RPM – Redhat
Package Mangager which is used on RedHat, Mandrake, and Suse (and
probably others). Beyond that, there is the Debian package management
system which has the famous "apt" – Advance Package Tool set of
scripts, "portage" – BSD’s Ports clone for Gentoo, and the simple
tarball.
7.1. RPM
From the man page:
rpm is a powerful package manager, which can be used to
build, install, query, verify, update, and erase individual software
packages. A package consists of an archive of files, and package
information, including name, version, and description.
RPM does package and architecture dependency checking for you and
maintains a database of what packages are installed. The manpage for
rpm is rather daunting, but thankfully there are a few simple
invokations that should get you through most situations.
Installing a new package: rpm -i foo-0.1.rpm
Upgrading an existing package: rpm -U foo-0.2.rpm
(more verbose version): rpm -Uvh foo-0.2.rpm
Removing a package: rpm -e foo
Alternatively, if you don’t want to look for the rpms (and their
dependencies), you can use yum if your distribution offers it.
If console commands strike fear into your heart, don’t worry, most
RPM-based distributions come with their own GUI management system.
We don’t really know how well they work (they have generally not
been very high quality in the past).
Also of note, is Mandrake’s high-level "urpmi" system for
automatically fetching and installing RPM packages.
See man pages and how-to’s for more details.
7.2. Debian / Ubuntu
Debian uses several systems in concert to handle package management.
Among them is the low-level dpkg command, the menu-driven dselect, and
the high-level apt system. Debian maintains a great deal of meta
information about packages such as dependencies, recommended packages
to install, and stability status.
For the simple tasks you will use either apt (and specifically the
"apt-get") command or dselect to manage packages on Debian. Apt-get
is a simple command line tool for package installation where you
specify installation, removal, or update of packages whose names you
know. Dselect is a menu-driven system where you can look at package
names, descriptions, dependencies, and what is currently installed.
Apt grabs packages from web-based central repositories of debian
packages, verifies their integrity, and installs them all automatically.
Searching for a package:apt-cache search rhythmbox
Installing a package:apt-get install rhtyhmbox
Ubuntu offers a more intuitive way to search for and install packages
graphically – Synaptic. You can access it via "System->Administration".
7.3. Tarballs
You might often find packages offered as tarballs. To extract
the tarball, use "tar" (man tar – use "-x" to extract). Use the "-z" or "-j"
flag if the
tarball is compressed using gzip or bzip, respectively.
$> tar -xzf tarball.tgz
After doing this, go into the directory it created (unless it
extracted to the current directory without creating its own) and see
if a "README" or "INSTALL" file exists. This will contain instructions
for compiling and/or installing the package. Or you can read on.
7.4. Autoconf
GNU autoconf is not package management per-se, but is typically how
raw source packages are configured and then subsequently built with
make when packages are not available or one is intentionally avoiding
using the package manager.
Compiling and installing packages from the authors is not terribly
difficult when autoconf is used to configure it. It basically boils
down to three easy steps:
./configure
make
(as root)make install
Remember to cd into the directory where the program untared
Sometimes, you will have to pass options to the configure script and
you can determine what options are available by typing:
./configure --help
Usually, this system works fairly well, but in the case where it does
not, it can often be a rather complex task to assure that everything
is working correctly, and you should try and find packages if
possible.
8. Whizzy Stuff
8.1. Changing the Desktop Wallpaper
To change the background image of the desktop when using Nautilus,
right-click on the desktop and select "Change Desktop Background" from
the menu.







