Desktop System Setup with Debian GNU/Linux 3.1 'Sarge'

Contents

Introduction

This document intends to provide enough information to get an effective desktop system ready to use using a 'Linux' distribution, providing a concise, point-by-point guide to configuring where it's necessary, with links to further reading if you want to know more.

This desktop system will use the Debian GNU/Linux distribution, version 3.1 'Sarge' with a Linux version 2.6 kernel, using a GNOME version 2.8 desktop environment.

We also provide a menu driven command-line program, called Twix, to help you install most of what is covered in this document and configure some of it. Twix can be downloaded for free from thegoldenear.org/toolbox/unices/twix/.

This document has related documents:
'Server Setup with Debian 3.1 'Sarge''.

A good introduction to Debian is the Debian article at Wikipedia.

This document needs your feedback. If you have any comments or suggestions please email them to inkwire [at] thegoldenear [dot] org and they can be considered.

Notable changes to this document

0.4.31 - 26 April 2008 - flashplugin-nonfree removed from Debian Sarge as of version 3.1r8

0.4.27 - 25 November 2007

0.4.26 - November 2007 - added msttcorefonts to wine

0.4.25 - 24 August 2007

0.4.21 - 12 July 2007 - Changed volatile.debian.net to volatile.debian.org (volatile.debian.net will still work for the life of Debian 4.0 Etch).

0.4.17 - 24 June 2007 - Better described X video drivers; added video graphics utilities radeontool, rovclock, i810switch, matroxset, nvidia-settings, nvtv

0.4.10 - 29 April 2007 - Added regionset

0.4.8 - 24 April 2007 - Updated the debian-multimedia source address that has changed for Sarge

0.4.7 - 3 April 2007 - Added missing hp-ppd

0.4.6 - 8 March 2007 - Removed trailing '/' from 'ftp.uk.debian.org/debian' apt sources.list example

0.4.4 - 2 March 2007

0.4.0 - 15 February 2007

0.3.9 - 13 December 2006 - removed hplip-ppds as it doesn't exist in Sarge

0.3.3 - 24 November 2006

0.3.2 - 22 November 2006 - added printer device naming when using the HPLIP driver

0.3.0 - 20 November 2006 - refreshed printing section with the addition of Foomatic, ijsgutenprint, pnm2ppa, foo2zjs, printconf and various PPD files

Glossary

<something> - when something is in angle brackets you should replace this with something particular to your system; you do not use the angle brackets.

command - text in monospaced typeface indicates a command you issue at the command-line or text you type yourself into a text editor.

$ - when a command-line command is preceded by a dollar it means you run this whilst logged in as a regular user

# - when a command-line command is preceded by a dollar it means you run this whilst logged in as super user / root

Debian GNU/Linux

Debian is a GNU operating system with a Linux kernel and collection of currently 8,000 software programs. The GNU operating system is a part of the family of Unix operating systems that date back to 1969, it is a version of Unix written from scratch by a large community of disparately located hackers and made available for free. (Debian is based on System V Unix rather than BSD Unix). This community is a social movement, motivated in part by the desire to provide the world with an operating system free of the restrictions the contemporary software industry imposes upon us.

Debian is one of a number of 'distributions' of GNU/Linux. A distribution is the operating system plus a number of software applications; there are many aspects differentiating distributions. We recommend Debian in particular for these reasons:

Debian is available in a number of different flavours, one of which you subscribe your system to:

Further Information

Debian Weekly News: www.debian.org/News/weekly/

Debian Planet: www.debianplanet.org/

Planet Debian (accumulation of Debian developers' blogs): planet.debian.org/, ianmurdock.com/

Debian bug tracking system: www.debian.org/Bugs/

Getting Debian

Downloading from the Internet

Download from www.debian.org/distrib/. There are various options of what to download, the most useful to choose from are

Choose which architecture you want, the following are the most popular

By Post

Debian 3.1 is available to order on CD/DVD from various vendors, a list of them is available at www.debian.org/CD/vendors/.

A Demonstration

If you want to check-out Debian before installing it, it's possible to download a so-called 'live CD' that you boot your computer with, it runs the operating system straight from the CD without touching your existing operating system, allowing you to see exactly what it would look like were it installed on your computer, but is gone when you turn the computer off and take the CD out.
An official Debian live disc isn't yet available, though it is being discussed, but an example of what Debian can look like is available using the live CD from the Ubuntu distribution. Ubuntu is similar to Debian, as it is dervied from it, but it isn't Debian. The Ubuntu live CD won't look exactly like the system this document describes, but it's similar enough to be worth using as a sampler. Note that this isn't a recommendation to install Ubuntu, this document is all about installing Debian.
Ubuntu can be ordered or downloaded from www.ubuntulinux.org/download/.

Hardware support

Debian GNU/Linux device driver check page: kmuto.jp/debian/hcl/ - paste in the results of lspci -n and it will tell you what GNU/Linux drivers exist for the specified hardware.

Linux Hardware Compatibility HOWTO at en.tldp.org/HOWTO/Hardware-HOWTO.html

The recommended hardware you'll want to run this system on is roughly as follows:

ScaleCPUCPU speedRAM / memoryDesktop environment
Low endIntel Pentium II equivalent300MHz128MBXFCE
MidAMD Duron equivalent700MHz128MB - 500MBGNOME
High endanything moreanything moreanything moreGNOME

Installation

Note that any decision you make during installation that you would rather have made differerently, can be changed once installation is finished, usually using the command dpkg-reconfigure <package-name>.

Choose to install version 2.6 of the Linux kernel rather than the default of 2.4. When the installer first starts, type 'linux26' at the 'boot:' prompt then press [Enter], rather than just pressing [Enter] on its own.

Your particular system may require some boot options to work around specific known problems, you can see a list of these by pressing some of the Function keys on the keyboard. Otherwise just press [Enter] to start the installer.

When asked during the installation if you want 'discover' to manage /media/cdrom0, choose 'no' otherwise gnome-volume-manager won't be able to auto-mount discs for you when inserted and logged in as a normal user. (this may now be fixed).

If you're able to update your Debian system using the Internet, rather than from CD/DVD media, do so, but it's not essential. The best way to ensure this happens is to remove the disc after the initial stage of installation when the disc is ejected. Also, be sure to add a 'source' to download from during installation. If you're using CD/DVD media to install packages from then try to have at least discs 1 and 2 and choose to add them all to the sources list when prompted.

Partitioning scheme - You have the following options:
a. All files in one partition - will create a root partition (/) and a swap.
b. Desktop machine - will create a root partition, swap, and /home.
c. Multi-user workstation - will create partitions for /, /usr, /var, /tmp, /home and swap.
Choose the 'desktop system' scheme.

When choosing the keyboard layout, the default is 'us', there isn't a drop-down list of available options for different languages, for example you would choose 'gb' for UK English.

When you're presented with the menu saying 'Debian configuration' - 'Debian software selection' - 'you can choose to install one or more of the following predefined collections of software.' don't be fooled into thinking 'desktop environment' sets up the ideal desktop environment for you - it doesn't - hence the need for this document.
Rather than choose the pre-defined functions, we're going to do this manually, which will be quicker and use less disk space, as Tasksel's 'Desktop environment' installs more than you're likely to need.
Tasksel's 'desktop environment' installs GNOME (using the 'gnome-desktop-environment' package), KDE and various applications. If you use GNOME rather than KDE as your desktop environment, which we believe provides a higher quality interface, it can be annoying to have the menus populated with so many extra programs that you have to spend time installing and updating. We propose not choosing anything at this menu for your desktop system and instead installing GNOME and various applications manually, which will be described in this document.

A minimal mail system is installed by default. Through answering the various questions asked of you, configure this mail system with your SMTP server address and other information so that your system has the ability to send email, which is useful for various software to be able to use.

If connected to the Internet do an upgrade after installation, using either Synaptic from within GNOME to update then install all available updates; or from the command-line aptitude update then aptitude dist-upgrade.

Further Information

Debian GNU/Linux Installation Guide, Debian 3.1 'Sarge' version: www.debian.org/releases/stable/installmanual.
This is also installable as the debian-installer-manual package.
Debian GNU/Linux Installation Guide - Development version: d-i.alioth.debian.org/manual/.

Basic commands

To use this document you'll need to be able to use these basic commands:

For typing at the command-line from within GNOME you can use the 'Terminal command line', depicted by a monitor with a blank screen but for the 'command-line prompt' on the 'panel'.

To install programs before you have the desktop environment and Synaptic Package Manager installed (which give you a more user friendly environment), login as root and use aptitude update and [Enter] then when thats done use aptitude install <package name> <package name> <package name>.

To add a user to a group, from GNOME:
Common functions that relate to specific group membership are available in Applications → System Tools → Users & Groups → Users → pick user <locale> Properties → User privileges.
More specifically groups administration is available from Applications → System Tools → Users & Groups → Groups → pick group <locale> Properties → Group Members → pick user → Add.
If you're logged in as the user for whom you're changing their group membership, you need to log out and log back in again for it to take effect.

Become the super user by issuing the command su at the commnd-line. The super user is the user called 'root', you'll be asked for the password for the root user which you set during installation.

When typing at the command-line you have a useful feature called 'command-line completion' available to you. As you type program names or direcoty and file paths, you can press the [Tab] key to automatically complete such lines. If there is more than one option for a particular line you've so far typed in, command-line completion will stop at the point the various options differ, pressing [Tab] again will show you the various options available.

If you're at the command-line, logged in as root, wanting to edit configuration files, a simple text editor you can use is nano. Typing nano <path>/<filename> will load a file; Ctrl+W will search within a file for text; Ctrl+X will quit, where upon you can choose to save or not.

When you've installed new software and are logged in and using GNOME, to get the shortcuts to appear in the menus without logging out and back in, use the command update-menus at the command-line.

To reconfigure a package in the same way as was done when it was first installed: dpkg-reconfigure <package name>

Each package has Debian-specific documentation for it in /usr/share/doc/<package name>

To create a 'symbolic link' or 'symlink' (known as a 'shortcut' in Windows): ln -s location-of-file-to-link-to location-of-symbolic-link

To restart X Windows, the graphical windowing system, use Ctrl+Alt+Backspace. This is useful when applying changes to video settings in the X Windows configuration file.

To cancel a running command-line program use Ctrl+C.

To quit from a command-line program that is displaying text for you on the screen, such as a man page, use 'q'.

Package repositories, Updates & Upgrades

Package repositories

Debian's package management system, known as 'apt', keeps a list of sources, or repositories, it can retrieve packages from when you choose to install them, in the file /etc/apt/sources.list.

Sources can be of the form

You define which Debian flavour you're subscribed to

These different licencing groups are kept track of

There are different providors of Internet server sources

Debian installs with a default that uses 'main', it doesn't include 'contrib' or 'non-free'.

To add new CDs to your sources list, other than during installation

To add new Internet servers to your sources list, other than during installation

Updates

3.1 Sarge

Release Date Changes
3.1r0 6 June 2005
3.1r0a 10 June 2005
3.1r1 20 December 2006
3.1r2 19 April 2006
3.1r3 1 September 2006
3.1r4 6 November 2006
3.1r5 18 February 2007
3.1r6 7 April 2007
3.1r7 28 December 2007
3.1r8 13 April 2008

There are two daily 'pulses' at 00:00 and 12:00 GMT upon which updated packages, if any, are made available.

Security updates are often made available, potentially even daily.

Very occasional other updates are made in the form of new 'point releases' of Debian stable. They comprise packages with a very conservative amount of miscellaneous bugfixes, removed packages, missing builds and security updates (those previously available thru security updates). These packages are introduced into the main stable archive when released. Similarly the downloadable ISO images available for installing Debian are updated, they have a 'r' designation.

The packages waiting to be made available in the next point release are held in a repository known as stable-proposed-updates but seemingly more readily available as sarge-proposed-updates. You can subscribe to this repository to get these packages as they enter the queue rather than waiting for the release date.

Upgrades

To upgrade to the next version of Debian, replace the code name / alias in sources.list from 'etch' to 'lenny'.

Skipping releases is not supported. To upgrade from Woody to Etch you must first upgrade to Sarge, then to Etch. Edit /etc/apt/sources.list and replace 'testing' or 'etch' or 'stable' or 'unstable' with 'sarge' then 'aptitude update && aptitude dist-upgrade'.

Package management - finding, adding and removing programs

Debian's software programs, or 'packages', are versions of popular software specifically re-packaged for Debian, and in particular for its package management system (called 'apt') which is used to easily add and remove them. You don't need to independently download, compile and configure software manually - Debian maintainers have done the work for you, making sure the software fits into your system cleanly - an example of doing things the 'Debian Way', a phrase that defines ways of doing things specific to Debian that are usually very efficient and elegant.

Package(s)

Configuration

Synaptic

Usage

From the command-line

aptitude, using switches
aptitude, used interactively

From GNOME

Synaptic Package Manager
(Applications → System Tools → Synaptic Package Manager)

Further information

Changes in Debian packages

Package configuration - Debconf

Debconf is used as much as possible to configure packages for you (but not exclusively), asking questions and editing configuration files respectively. You are asked how to configure debconf upon installation of debconf itself, during Debian's installtion. You can permanently reconfigure debconf at any time using # dpkg-reconfigure debconf. Either way you are asked the following:

"Packages that use debconf for configuration share a common look and feel. You can select the type of user interface they use.

To change these per-package installation use # dpkg-reconfigure -p<priority level> <package-name>.

Desktop Environment: GNOME

Packages(s)

Choosing to install a 'desktop environment' in the Debian installer (or 'Tasksel', as the particular program that is running at that point is known), installs both KDE and GNOME, which is a lot more than you actually need if you only want one desktop environment, 1 such as GNOME for a vaguely modern computer. For an older computer you're advised to use XFCE instead of GNOME. This document will instead describe the individual packages to install.

Install these for a basic desktop environment without major applications:

Configuration

Per-machine configuration

If you already have KDE installed and wish to remove it, remove packages kdelibs3 and kdelibs4

Per-user configuration

Further Information

FootNotes: www.gnomedesktop.org/

The GNOME Journal: www.gnomejournal.org

Jordi Mallach's blog: oskuro.net/blog/freesoftware

Ben Maurer's blog: codeblogs.ximian.com/blogs/benm/

Various channels on irc://irc.gnome.org/

Planet GNOME, an aggregate blog of GNOME developers: planet.gnome.org/

GNOME changelog

Bug reporting

GNOME's Bug Database: bugzilla.gnome.org/

Desktop Environment: XFCE

This is an alternative to GNOME which will run well on very old computers that are too small and slow for GNOME, such as a 233MHz CPU with 128MB RAM.

Packages(s)

Configuration

XFCE's default toolbar comes with shortcuts for some specific applications, such as the Mozilla suite, which you may not have installed as you may use alternative programs, such as Mozilla Firefox, and so they only serv as an example and are thus worth spending some time changing and adding to with your most used programs.

X Windows: XFree86

'X Windows' creates the graphical windows on your screen.

Packages(s)

Configuration

Video driver choice

Restart X: Ctrl+Alt+Backspace

dpkg-reconfigure xserver-xfree86

- this is the configuration program run by the debian-installer, but with priority 'high' rather than the more common 'medium'.
If you're going to reconfigure X this way then install the following packages first:

dpkg-reconfigure xfree86-common

xf86config - text based question and answer configuration

xf86cfg - graphical configuration

Video Resolution

When X is being configured after installation, you'll be asked how detailed the questions should be. You can choose 'expert'(?) mode and be asked all questions now, or choose a lesser mode and configure the X configuration file by hand later, or re-run the X configuration program again, or, some of this is configurable using GNOME tools, some not.
Either way, you should use the original documentation, or the web, to find the capabilities of your monitor (horizontal frequency (in kHz), vertical frequency (in Hz), resolutions and possibly 'mode line'), mouse and video card (you usually just need to choose the name of the driver that relates to all the manufacturer's monitors), otherwise these aspects won't be operating to their best abilities.

To decrease the resolution temporarily you can cycle through any configured resolutions with Ctrl+Alt+[+|-] (the keypad + or - keys). The size of the desktop will stay constant (e.g. 1280x1024) but your window into it will be smaller (e.g. 1024x768). You can thus still access all of your desktop by moving the mouse to the edges of the screen, which will scroll the smaller window over the larger desktop.

Configuration file

/etc/X11/XF86Config-4

Sample configuration file: /usr/share/doc/xserver-xfree86/examples/xorg.conf.eg.gz (or, using dwww localhost.localdomain/cgi-bin/dwww?type=file&location=/usr/share/doc/xserver-xfree86/examples/xorg.conf.eg.gz)

Configuration information specific to each video chipset and other devices is provided in

Example important configuration sections

Set the correct login screen typeface size

Set the correct GNOME screen typeface size

You may however find this gives typefaces that are too small.

Troubleshooting

Log file: /var/log/XFree86.0.log

Further Information

The XFree86 Project, Inc: www.xfree86.org

irc.freenode.org#debian-x

Environment Configuration

Remove annoying console beeps

Within the command-line environment

For Bash / GNU Readline: echo 'set bell-style none' >> ~/.inputrc

For all programs, from the system console: setterm -blength 0

Within the X window system

For all programs:xset b off

Within GNOME

Desktop → Preferences → Sound → System Beep →

Minor Software

Package(s)

Spellcheckers and dictionaries

Package(s)

Fonts / Typefaces

Package(s)

(xfonts-scalable, installed by default, at least includes Bitstream Charter)

Further reading

List of other Bitstream Vera derivatives: dejavu.sourceforge.net/wiki/index.php/Bitstream_Vera_derivatives

Unicode Font Guide For Free/Libre Open Source Operating Systems: unifont.org/fontguide/

Issue this command at the command-line to see all available TrueType fonts: apt-cache search ttf-

Office suite - Word processor, spreadsheet, presentation, layout

Package(s)

Configuration

OpenOffice.org

To enable the GNOME file picker, with useful shortcuts to various places, rather than OpenOffice's default which lacks such usefulness: Tools → Options... → OpenOffice.org → General → Open/Save dialogs → Use OpenOffice.org dialogs - off

Further Information

About OpenOffice packages in Debian: openoffice.debian.net

Debian-OpenOffice IRC discussion channel: irc://irc.freenode.net#debian-oo

Database

This information is based on using a MySQL database.

Package(s)

If you're using a remote database and want applications to be able to interface with it

Usage

Connecting to a remote database - create a data source

Register data sources so that applications such as OpenOffice know of them.

Using the command-line

User data sources: ~/.odbc.ini
System data sources: /etc/odbc.ini

Using GNOME

To create a data source just for the particular user you're logged in as, run gODBCConfig as that user then choose a 'User DSN'.

To create a data source for all users of this system, run gODBCConfig whilst root then choose a 'System DSN'.

Choose Add → choose a driver → OK → Enter at least the following:

mysql-client accessing a remote database

Use the MySQL client to work with MySQL in general: mysql -h <hostname> -u <username> -p
Then enter the password for that particular user when prompted to do so.

Access a particular database: mysql -h <hostname> -u <username> -p <your database name>
Then enter the password for that particular user with that particular database when prompted to do so.

Basic MySQL commands

mysql> SHOW databases; - show all databases you have access to

mysql> CREATE database <database>; - create a new database

mysql> USE <database>; - open a databaase so you can use it

mysql> DROP database <database>; - delete an existing database

mysql> CREATE TABLE <table> (<field> <type>); - create a table, with fields

mysql> SHOW tables; - show existing tables in the current database

mysql> DROP TABLE <table>; - delete a table

mysql> DESCRIBE <table>; - display structure information about an existing table

mysql> ALTER table <table> <alter specification>; - change the structure of an existing table

mysql> INSERT INTO <table> VALUES ('a','b','1999-03-30',NULL); - add data to a table

mysql> SELECT what_to_select [and optionally operate upon that, displaying the results] FROM which_table WHERE conditions_to_satisfy; - display the contents of fields according to certain criteria

mysql> UPDATE <table> SET <field> = '<value>' WHERE <another field> = '<another value>'; - change the contents of existing fields

mysql> ALTER TABLE <table> DROP <row>; - delete rows

mysql> DELETE from <table> ...; - delete rows

Methods of automatically loading data into a MySQL database

Further Information

MySQL 3.23, 4.0, 4.1 Reference Manual: dev.mysql.com/doc/refman/4.1/en/

MySQL 5.0 Reference Manual: dev.mysql.com/doc/refman/5.0/en/

Web editing

Package(s)

Internet applications

Package(s)

Configuration

gFTP

Per-user configuration

User bookmarks location: ~/.gftp/bookmarks

Further Information

Planet Mozilla: planet.mozilla.org/

Penguin.SWF - tracks development status and issues regarding the Linux version of Adobe's Flash Player: blogs.adobe.com/penguin.swf/

Image viewing

Package(s)

Image editing

Package(s)

Further Information

Beginning GIMP: From Novice to Professional (a printed book): apress.com/book/bookDisplay.html?bID=10080

Security

Package(s)

Configuration

Multi media players, including DVD

Package(s)

Configuration

Audio architectures

Package(s)

Audio editing

Package(s)

multi-track audio editors

single-track audio editors

Sound effects

Compression / Archival

These can be useful for many reasons, for example the anti-virus and spam co-ordinating program Amavis uses many of them if they're installed; as does GNOME's archive manager / file roller.

Package(s)

Java Runtime Environment (JRE)

Java is very non-free, so getting it to work in Debian involves some manual steps.

Package(s)

Usage

Further Information

The Debian readme file: file:///usr/share/doc/java-package/README.Debian

Blackdown Java-Linux: www.blackdown.org/

Debian GNU/Linux Java FAQ: www.debian.org/doc/manuals/debian-java-faq/

irc.freenode.net#debian's dpkg bot on 'Java Virtual Machine': "a platform independent OO language. Server-side Java is extremely powerful due to the threads capabilities and the huge number of APIs available. On the other hand, Sun's Java licensing is extremely restrictive. Ask me about <java licensing> and <install java> and <sid mozilla java> (for starters). write once, run nowhere"

irc.freenode.net#debian's dpkg bot on 'install java': "First, read <java licensing>. Still here? If you're in sarge or sid, ask me about <java-package>. If you're in woody, grab java-package manually from packages.debian.org/java-package and then ask me about <java-package> for instructions on how to use it."

irc.freenode.net#debian's dpkg bot on 'java licensing': "read the faq at www.debian.org/doc/manuals/debian-java-faq/ch5.html#s-license-concerns"

irc.freenode.net#debian's dpkg bot on 'java-package': "i guess java-package is the new name for mpkg-j2se... err, I mean j2se-package... DAMN IT, CAN'T THEY PICK A NAME?! Anyway, it lets you build a .deb file from Sun's non-free upstream Java distributions. See "man make-jpkg". Cf. "make-kpkg" (from kernel-package). only in sarge and sid currently, but it's a -all package, so it's safe to use it in woody."

irc.freenode.net#debian's dpkg bot on 'sid mozilla java': "somebody said sid mozilla java was extra, extra, read all about it, sid mozilla java is mozilla 1.7 (in sid) is compiled with g++ 3.2. The ABI has changed, and old Java virtual machines will not work any more. Please see www.mozilla.org/releases/mozilla1.3/#compatible for details. jrfonseca.dyndns.org/debian/#java for packages that work as of 13 ..."

Sound card

Package(s)

Configuration

Usage

From the command-line

From GNOME

Troubleshooting

Further Information

'The Linux Audio Developers Mailing List' (and Linux Audio Users Mailing List), including various resources: www.linuxdj.com/audio/lad/index.php

Low-Latency HOWTO by Paul Winkler: www.djcj.org/LAU/guide/Low_latency-Mini-HOWTO.php3

More on low latency: jackit.sourceforge.net/docs/faq.php#a53

Printing

These instructions describe how to setup to print to a directly attached personal printer, or a remote printer, using CUPS (the Common Unix Printing System). CUPS uses the Internet Printing Protocol (IPP), rather than LPR (an alternative printing mechanism).
For sharing printers, using either a dedicated print server or to simply share your printer from your desktop computer, see the printing section of our document 'Server Setup with Debian Sarge'.

Package(s)

When printing to a directly attached printer

When printing to either a directly attached or remote printer

Package installation options

cupsys-bsd asks "Do you want to set up the BSD lpd compatibility server?" - yes

When printing to a remote printer

Put the hostname or IP address of the print server in the ServerName section of the configuration file /etc/cups/client.conf. The printer should then be available to most applications to print to.

Install the Printer Driver, when the printer is directly attached

You need a PostScript printer driver (and filter, if the printer isn't a PostScript printer) for each printer, even if the printer isn't a PostScript printer. Go to the http://www.linux-foundation.org/en/OpenPrinting Printer Database at linuxprinting.org/printer_list.cgi and look up your particular printer and note which driver (and accompanying filter) it recommends using.

Install the recommended PostScript printer driver package (see previously), or if you're using an actual PostScript printer you may be getting the driver from the printer vendor.

Restart CUPS: /etc/init.d/cupsys restart

(this example is for an Epson Stylus C84, you need to change the name of the files to suit your printer)

Create the print queue, when the printer is directly attached

using GNOME

Use Applications → Desktop Preferences → System Tools → Printing → New Printer.
(GNOME will know where to look for the printer drivers and deal with them in their gzipped format so you don't need to uncompress them manually.).

To remove the print queue, there isn't a GNOME option to become administrator and do so (it's dimmed), so you could either run, or create a launcher for, gksu gnome-cups-manager; or use the CUPS web interface.

using the CUPS web interface

Using the command-line

If you need to remove the print queue, use lpadmin -x <printer>.

Configure the printer driver

Using the CUPS web interface

Configure Printer...

Using the command-line

lpoptions - display or set printer options and defaults. Use it to lock down a set of sensible defaults. To see the options available for your setup, use the 'docs' option like this: lp -d <printer> -o docs /etc/hosts; or use lpoptions -p <printer> -l. Usually, you can also use the media=..., sides=..., and duplex CUPS options, if there are InputSlot, MediaType, and Duplex options for your driver.

Some applications require specific printer configuration

OpenOffice

If you have installed the cupsys-bsd package, OpenOffice will automatically detect your printer queues. Otherwise you have to add the printer queues manually with the oopadmin tool.

GIMP

GIMP needs you to set the specific printer by replacing 'PostScript Level 2' with the specific printer. Choose 'Setup printer...'; pick the printer from the list; (the command line already has the right queue name (i.e. lp -s -dprinter -oraw)); choose 'Save Settings'.

Inkscape

Use the command lp -P <printer>. (Bug: the man page wrongly recommends a lower case -p.)

Tools for working with printer queues and print jobs

Using GNOME

Should be self explanatory; however, if you try to delete a print job the print dialog hangs. There is no GNOME option to become administrator and perform such acts, so you could either run, or create a launcher for, gksu gnome-cups-manager; or use the CUPS web interface. Perhaps there is a group that printer operators should be a member of?

Using the CUPS web interface

Should be self explanatory.

Using the command-line

(use -h IP-address with each of these to specify the IP address of the print server if using a remote printer)

Inkjet printer maintenance

With Epson Stylus printers

Using the command-line

Troubleshooting

show available devices or drivers: lpinfo

restart CUPS: /etc/init.d/cupsys restart

CUPS configuration file: /etc/cups/cupsd.conf

CUPS error log: /var/log/cups/error_log. (Change 'LogLevel warn' to 'LogLevel debug' in /etc/cups/cupsd.conf, then restart CUPS, for more verbose messages in the error log.)

Configuration for Printing to Windows Printers

Check you can connect to the Windows system: smbclient -L computer-name -N. If WINS isn't available you need to additionally specify the IP address with -I IP-address.

Verify that your installation of CUPS has the SMB backend by looking for a particular symbolic link: ls -l /usr/lib/cups/backend/smb. If this symbolic link doesn't exist, create it: ln -s /usr/bin/smbspool /usr/lib/cups/backend/smb

Further Information

CUPS Software Administrators Manual: local-host:631/documentation.html or www.cups.org/sam.html

CUPS Software Users Manual: www.cups.org/sum.html

www.linux-foundation.org/en/OpenPrinting includes forums for specific printer makes

CUPS Software Users Manual, localhost:631/documentation.html

Setting Up CUPS under Debian GNU/Linux: mumford1.dyndns.org/~bs7452/linuxhelp/cups.html

HP Linux Printing Project: hpinkjet.sourceforge.net/

Debian and Windows Shared Printing mini-HOWTO: www.faqs.org/docs/Linux-mini/Debian-and-Windows-Shared-Printing.html (this is a good introduction)

www.linuxmafia.com/faq/Debian/printing-setup.html

gimp-print.sourceforge.net/p_Documentation.php3

Scanning

Package(s)

Configuration for locally attached scanners

If the scanner uses a USB interface and is recognised by the system when you plug it in, it will likely just work without any further configuration.

Identify information about the scanner and the system

There are a number of different methods used by the system to access the scanner, depending on the interface it's attached to and possibly Linux kernel version