Desktop System Setup with Debian GNU/Linux 'Testing/Lenny'

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, the Testing variation, with a Linux version 2.6 kernel, using a GNOME desktop environment. It applies most accurately to 32-bit x86 and 64-bit amd64 architectured computers; most of it but not all will apply to all Debian's supported architectures.

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/.

I try to stick closely to stock Debian, which means adding non-free but being very consertaive about installing software from outside Debian, which is to say that some is but not much. This is as much for reasons of simplicity (so you're not chasing round a load of external sites) as it is for system stability (stability in terms of crashing). This is more difficult with browser add-ons because they provide worthwhile functionality but many don't exist in Debian so this restriction is more relaxed for them. Firefox and Thunderbird extensions, compared with other kinds of software from other sources, have the 'advantage' they're checked for and updated automatically on startup.

This document has related documents:
'Desktop System Setup with Debian 3.1 Sarge';
'Desktop System Setup with Debian 4.0 Etch';
'Server Setup with Debian 3.1 'Sarge''
'Server Setup with Debian 4.0 'Etch''.

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

This document needs your feedback, it is under constant development so 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.10.0 - 20 December 2007

0.9.1 - 18 September 2007

0.9.0 - 13 September 2007

0.8.27 - 1 September 2007 - added ufraw; removed gimp-dcraw

0.8.26 - 31 August 2007 - removed thinkpad-base, tpctl, thinkpad-source, configure-thinkpad, ibm-acpi as they're not available and thus also removed the IBM Thinkpad section.

0.8.25 - 30 August 2007 - mistakenly had Testing security updates repository as 'http://secure-testing.debian.net/debian-secure-testing etch/security-updates main contrib' rather than 'http://security.debian.org testing/updates main'

0.8.23 - 29 August 2007

0.8.22 - 25 August 2007

0.8.21 - 24 August 2007

0.8.19 - 11 August 2007

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

0.8.12 - 23 June 2007 - Tidied up NTFS filesystem support info, adding ntfs-3g and better explaining the various mounting capabilities available

0.8.2 - 29 April 2007 - Added regionset

0.8.1 - 25 April 2007 - Reduced 'CD audio - Playing, digital audio extraction (ripping), copying and encoding' section into just 'Copying Audio CDs'; restored serpentine; removed abcde and jack.

0.8.0 - 24 April 2007 - Added an 'Audio / Sound - decoding, encoding, playing' section; just the packages, more will follow.

0.7.0 - 22 April 2007

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/

Subscribe to the debian-testing-changes mailing list (lists.debian.org/debian-testing-changes/) to be kept informed of changes to Debian Testing.

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

Getting Debian

Downloading from the Internet

Download a snapshot of Testing/Lenny from www.debian.org/devel/debian-installer/. 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 Stable 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' version that you boot your computer with, it runs the operating system straight from CD or USB flash media 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.
You can get a live Debian image from live.debian.net/.

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

Hardware4Linux - a web site to lookup and report hardware compatibility and incompatibility with Linux distributions.

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 either dpkg-reconfigure <package-name>. or tasksel

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.

To start the installer, either just press [Enter] to start the installer in text mode, or type installgui and press [Enter] to start the installer in graphical mode.

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 CD discs 1 and 2 (DVD disc 1) and choose to add them all to the sources list when prompted.

Partitioning scheme - You have the following options:

Choose the 'Separate /home partition' 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 option to install one or more predefined collections of software, the 'desktop environment' option will install a fairly useful system (its a massive improvement on what Debian 3.1 installed) but it can be improved upon, which is what this documents all about. You can either choose that option and return to this document for additional software advice, or do it all manually.

The installer's 'desktop environment' option installs the following:
twm, gimp-print, xresprobe, eject, foomatic-filters-ppds, openoffice.org, xserver-xorg-video-all, openoffice.org-help-en-us, foomatic-db-hpijs, cupsys-driver-gutenprint, cupsys-client, avahi-daemon, foomatic-db-gutenprint, openoffice.org-thesaurus-en-us, discover1, myspell-en-us, xdg-utils, hotkey-setup, foomatic-gui, xorg, cupsys-bsd, iceweasel, xserver-xorg-input-all, hplip, desktop-base, alsa-base, libnss-mdns, xterm, cupsys, alsa-utils, anacron, printconf, hpijs, menu, gimp, openoffice.org-gcj, foomatic-db-engine.

The installer's 'laptop' option installs the following:
wireless-tools, acpi-support, hibernate, cpufrequtils, acpi, wpasupplicant, pcmciautils, acpid, apmd, hotkey-setup, anacron, uswsusp, bluetooth

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 - Development version: d-i.alioth.debian.org/manual/

Debian GNU/Linux Installation Guide, Debian 4.0 Etch version: www.debian.org/releases/stable/installmanual.

This is also installable as the installation-guide-<architecture> package, for example installation-guide-i386 or installation-guide-amd64.

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 Desktop → Administration → Users & Groups → Users → pick user → Properties → User privileges.
More specifically groups administration is available from Desktop → Administration → Users & Groups → Groups → pick group → 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.

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

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

GDebi

When you click from within the web browser on a .deb file choose Open with → other → /usr/bin/gdebi-gtk.

Usage

From the command-line

aptitude, using switches
aptitude, used interactively

From GNOME

Synaptic Package Manager
(Desktop → Administration → 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 a GNOME, KDE or XFCE desktop environment depending on which installer you use. This document describes individual packages to install for a GNOME desktop environment for a vaguely modern computer. For an older computer you're advised to use XFCE instead of GNOME.

Install these for a basic desktop environment without major applications:

Configuration

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 IceWeasel / Mozilla Firefox, and so they only serve as an example and are thus worth spending some time changing and adding to with your most used programs.

X Windows: X.org

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

Packages(s)

Configuration

Video Driver Choice

The Debian Installer, or dpkg-reconfigure xserver-xorg should auto-detect your video graphics adapter and configure X.org with the appropriate driver, such as from those below. You can further configure X.org for your particular adapter with options specific to the driver.

New Auto-Configuration

Debian Wiki - XStrikeForce - HowToRandR12: wiki.debian.org/XStrikeForce/HowToRandR12

Brice Goglin's Blog - Debian/X.org notes - Modesettings/RandR-1.2 improvements with Intel driver 2.0 and others: bgoglin.livejournal.com/10214.html

Brice Goglin's Blog - Debian/X.org notes - Dual-Head config breaks with xserver-xorg-video-intel: bgoglin.livejournal.com/9846.html

Brice Goglin's Blog - Debian/X.org notes - Intel driver 2.0 does not find my nice mode/resolution: bgoglin.livejournal.com/10423.html

Utilities

Restart X: Ctrl+Alt+Backspace

dpkg-reconfigure xserver-xorg - 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:

xorgconfig - text based question and answer configuration

xorgcfg - graphical configuration

xvidtune - video mode tuner for Xorg. "When given one of the non-toolkit options, xvidtune provides a command line interface to either switch the video mode. Without any options (or with only toolkit options) it presents the user with various buttons and sliders that can be used to interactively adjust existing video modes. It will also print the settings in a format suitable for inclusion in an xorg.conf file."

Video Resolution

If the video resolution isn't automatically set correctly then after installation you should tune the X configuration to best suit the monitor. Using the original documentation that came with the monitor, or the web, find the horizontal frequency (in kHz), vertical frequency (in Hz), applicable resolutions and possibly 'mode line'. You usually choose the name of the driver that relates to all the manufacturer's monitors.

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/xorg.conf

Configuration information specific to each video chipset and other devices is provided in info pages for specific video card drivers, i.e.

Thorough explanation of mouse configuration: /usr/share/doc/xserver-xorg-input-mouse/README.gz (or, using dwww localhost.localdomain/cgi-bin/dwww?type=file&location=/usr/share/doc/xserver-xorg-input-mouse/README.gz)

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/Xorg.0.log

Further Information

Changelogs for each video card driver are in /usr/share/doc/xserver-xorg-video-<driver name>/changelog.Debian.gz

X.org Foundation: wiki.x.org/ and x.org/

gravityboy's Journal (Debian developer): www.livejournal.com/users/gravityboy/

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)

Backup

Package(s)

Configuration

Note that Simple Backup requires use of sudo.

Usage

Configure and use:
Desktop → Administration → Simple Backup Config

Restore:
Desktop → Administration → Simple Backup Restore

Spellcheckers and Dictionaries

Package(s)

Fonts / Typefaces

Package(s)

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

Configuration

Fonts for all users are located in /usr/share/fonts/

(when should they instead be in /usr/local/share/fonts/truetype?)

Fonts just for particular users (just for print?) are located in ~/.fonts/

list installed fonts (at least, those known of by the fontconfig system):
fc-list

GNOME

GNOME has a location you can copy fonts to to install them: fonts://. This seems to be a compendium of all the system fonts in /usr/share/fonts/truetype/ and below and your personal fonts in ~/.fonts.

Installing Individual TrueType Fonts (TTF) For Print

If a font isn't available in a Debian package you can install individual fonts from other sources.

For a particular user

For all users

GNOME

For a particular user

If you, logged in as an ordinary user, drag and drop or copy and paste fonts to fonts:// it saves them in ~/.fonts and they're subsequently only available to you. You won't see the font appear in the list, though if you try to copy it again GNOME will say it's there and it is actually there. I haven't tried but you may have to logout and login again to see them in the list.

For all users

Presumably you need to be root to put fonts there to be available for the system, rather than for you individually? There's no way to 'become root' through the user interface so you have to run Nautilus from the command-line as root (but will they actually be saved in root's ~/.fonts or in /usr/share/fonts/truetype/?)

Comment

Does any or all of this apply to non-truetype fonts?

If I select to download a font from the web, it defaults to opening in gnome-font-viewer but you can't do anything in gnome-font-viewer other than look at it, which seems kind of pointless, what you want is buttons to 'install' and be asked 'Install for just you' or 'Install for all users', with the latter asking for the root password.
(See Font Sadness by Aaron Bockover, GNOME Bug 495510 - enable gnome-font-viewer to install fonts and GNOME Bug 86598 - Install new fonts through the font dialog.

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-

TrueType Fonts in Debian mini-HOWTO by Bear Giles: tldp.org/HOWTO/TT-Debian.html#toc1 (from 2000 so might be outdated)

Linux fonts (mostly X11): sabi.co.uk/Notes/linuxFonts.html

http://bugzilla.gnome.org/show_bug.cgi?id=160547

Office suite - Word processor, spreadsheet, presentation, database, 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

Apart from using OpenOffice, 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.

manually - THO IT SEEMS WORTH NOT CREATING IT BY HAND AS THERE ARE SOME THINGS TO KEEP TRACK OF IN THE FILE THAT AUTOMATED TOOLS DO FOR YOU

ODBC driver definition file location: /etc/odbcinst.ini

ODBC driver definition file syntax for libmyodbc:
[MySQL]
Description = MySQL driver
Driver = /usr/lib/odbc/libmyodbc.so
Setup = /usr/lib/odbc/libodbcmyS.so
CPTimeout =
CPReuse =

ODBC user data source definition file location: ~/.odbc.ini
ODBC system data source definition file location: /etc/odbc.ini

ODBC data source file syntax for MyODBC:
[MySQL-test]
Description = MySQL database test
Driver = MySQL
Server = <server hostname>
Database = <database name>
User = <database username to connect as>
Password = <database password to connect as>

Using the command-line
Driver: odbcinst -i -d -f /usr/share/libmyodbc/odbcinst.ini Data source: System: odbcinst -i -s -l -f template.ini User: odbcinst -i -s -h -f template.ini SHOULD THIS COMMAND EVEN BE USED BY A PERSON? SHOULD THIS FILE EVEN BE CREATED MANUALLY?
Using GNOME
DRIVER...

To create an ODBC data source just for the particular user you're logged in as, Applications → Debian → Apps → Databases → ODBCConfig → User DSN.

To create an ODBC data source for all users of this system, run ODBCConfig from the command-line whilst root, then choose '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/

GNOME-DB: www.gnome-db.org/

Web editing

Package(s)

Internet applications

Package(s)