Subsections


Other tasks

In this section we document noteworthy tasks that did not fit in well anywhere else.


Local Package Customizations

We made several customizations to our software. Most of these customizations are performed automatically by the installer.

Why do we make customizations? In many cases it is to set default save formats so that they are compatible with the save formats of Windows products.

Abiword

Abiword does not appear to have a system-wide configuration file. However, users can specify their preferences in

$\sim$/.AbiSuite/Abiword.Profile

In this file, we add the following line:

DefaultSaveFormat=".rtf"

to the “_custom_” scheme. This sets the default save format to Rich Text Format, which is readable by most modern word processors.

We then take this configuration directory and stuff it into /etc/skel/ , so that this preference file will be copied into the home directory of each user account.

The version of Abiword.Profile that we install can be found in the file

skel-winlike.tar.gz

in the installer/local.files/ directory.

Gaim

As with Abiword, Gaim does not have a system-wide configuration file, but rather uses a .gaimrc configuration file that lives in each user's home directory.

We again use the /etc/skel/ hack by copying a customized .gaimrc file to
skel-winlike.tar.gz .

In this case we want the configuration to load all common chat protocols that Gaim supports. We add the following lines to .gaimrc, in the plugins section:


plugin /usr/lib/gaim/libyahoo.so
plugin /usr/lib/gaim/libicq.so
plugin /usr/lib/gaim/libirc.so
plugin /usr/lib/gaim/libmsn.so

Gnumeric

(That xml file -P.)

(/usr/lib/gnumeric/*-bonobo/plugins/excel/ -P.)

Opera

opera offers two global configuration files that can be used to set preferences for all users on the system:

As indicated by their names, both these files are specific to version 6 of opera. We only modify the /etc/opera6rc file.

The syntax for these files matches the syntax in users' personal configuration files, which you can find in $\sim$/.opera/opera.ini . (CHECK THIS -P.)

We wanted to make the following changes to Opera's preferences:

To create the /etc/opera6rc file, you can modify a user's preferences file as follows:

  1. First, create a dummy account (or delete the $\sim$/.opera/ directory in an existing dummy account.

  2. Next, start Opera, then shut it down right away without changing any options. This creates a fresh $\sim$/.opera/opera.ini file.

  3. Make a backup copy of this clean preferences file:

    cd $\sim$/.opera/

    cp opera.ini opera.ini.orig

  4. Start Opera again. Now make all the changes you want. Then shut down the browser again. This changes the opera.ini file.

  5. Look for differences in the two configuration files:

    cd $\sim$/.opera/

    diff opera.ini opera.ini.orig > /tmp/opera.diffs

  6. Looking at the /tmp/opera.diffs file you created should indicate which lines changed in the file. Simply enter these new lines into the /etc/opera6rc file. Order is probably important: try to match the section headings in the opera.ini file. (example? -P.)

(Where can people find out more information about this? -P.)

IceWM

(Additional themes -P.)

(Toolbar, Preferences, Menu files -P.)

GMC

GMC is the file manager. It also puts icons on the “desktop” - that is, the root window. We want to put icons on the desktop without opening a browsing window. To do this, we put the following lines into the file .xsession :


gmc -nowindows &
exec x-window-manager

This .xsession file lives in /etc/skel/, and it is put there by skel-winlike.tar.gz .

Symbolic links

Sometimes, applications call other applications in order to perform certain tasks. For example, a spreadsheet might launch a web browser to display the spreadsheet's help files. There is nothing wrong with that, but some programs make a stupid mistake: instead of realizing that there are many different programs that accomplish the same task, they hard-code an alternative. An example of this are programs that expect the netscape browser to be installed. These programs call netscape to view online documentation explicitly - which is a mistake, because there are lots and lots of HTML browsers available.

To get around this problem, we use symbolic links. We make a symbolic name from our replacement program (for example, opera) to the expected program (for example, netscape). This way, the offensive program that calls netscape to view documentation will still work - it will indirectly call opera instead.

In our distribution, we make the following symbolic links. Unless otherwise stated, the code that makes these links is in the hooks directory of the installer:

(Check these files! They may have changed! -P.)


Local menu entries


adduser configuration

(This first bit is basic UNIX information. Why is it here? -P.)

In UNIX, just about everything is a file. For example, a CD-ROM can be accessed by reading from the file /dev/cdrom and the floppy drive is accessed as the file /dev/fd0 .

Every file in UNIX belongs to one user and one group. For example, in many UNIX systems configuration files are owned by the user root and the group wheel . There should be only one user called root, but many user accounts can belong to group wheel .

For security purposes, access to special device files (floppy drives, CD-ROM drives, sound cards, printer ports and so on) are typically restricted. In order to access these devices, users must belong to the group that owns the file in question, and the file must give the group read and write permissions.

By default, user accounts do not belong to groups that can access devices. This is a problem, so we fixed it by writing a script, which can be found in /usr/local/bin/adduser.local . This script is executed by the adduser program when creating users.

Our adduser.local script is simple: we add every user that is created to all groups that can access devices. Specifically, our script consists of a bunch of lines of the form:

/usr/sbin/addgroup $1 group

$1 refers to the user that has been created. We add users to the following groups:

floppy
for floppy drive access.

cdrom
for CD-ROM access.

lp
for parallel port access. This is needed for printing.

dialout
for modem access.

dip
which is also needed by some modem programs.

audio
for sound card access.

(HTML links -P.)

(Extra games to run in small mode -P.)

WCLP In-house additions

Most of the software we use comes straight from the Debian distribution. However, we have created a few WCLP-specific resources and applications for our users.

Our feedback form

(Document Charles' application here -P.)

Offline help

New computer users often have a lot of trouble finding documentation and support for the applications they use. UNIX-like systems have a lot of documentation available, but that documentation can be hard to find and hard to use.

We don't have a great solution to this problem. Debian offers some packages to provide easier access to documentation (such as the dhelp package), but we thought even this was too complicated. We opted to set up a few local HTML pages that would point to some of the more relevant documentation available on the system.

On the user's system, this page is located in

/usr/local/share/wclp/html/

The pages contain the following information:

(Which file is this on the local.files directory? -P.)

On the system's menu, users can access this help via the Programs $\to$ Help $\to$ WCLP Help menu option.

NFS Configuration

(/etc/exports -P.)

(kernel server or user server? -P.)


Creating the UNIXLIKE package configuration file

FAI will by default install all packages with priority “Required” and “Important”, but will install no packages with priority “Extra”, which includes such useful utilities as less .

In order to specify these packages explicitly, we had to manually install Debian GNU/Linux on a machine, then use its package selections for the UNIXLIKE file.

To get a listing of package selections on a machine, type

dpkg -get-selections > /tmp/select.txt

This will put the selections into the file /tmp/select.txt . This file will consist of each installed package, followed by the word “install”. For example, here are the first few lines of select.txt on my machine:

acroread                                        install
adduser                                         install
ae                                              install
anacron                                         install
apt                                             install
at                                              install
base-config                                     install
base-files                                      install
base-passwd                                     install

In order to use this file with FAI, you need to get rid of the “install” lines. To do this, either search and replace using a text editor or type

sed 's/deinstall//;s/install//' select.txt > select2.txt

This command first gets rid of all invocations of the word “deinstall”, and then gets rid of all invocations of “install”. Note that if either of these words occurs as some part of a package name, the word will be removed, which will cause errors.

You can then use select2.txt by putting the following line at the top of the file:

packages INSTALL

and then saving the file as UNIXLIKE in the following directory:

/usr/local/share/fai/installer/package_config/

(Which of the standard packages do we not need? Move from the UNIXLIKE section? -P.)


Compiling the kernel

The Linux kernel is the core of the operating system. It is the program responsible for managing programs, processes, system devices, and memory. An interesting aspect of Linux is that you can compile a customized version of the kernel, which includes the functionality you need and omits the functionality you don't.

Compiling the kernel is a big topic, so we will not attempt to describe it all here. For more information about the kernel and how to compile it, see the Kernel-HOWTO, and the documentation in /usr/share/doc/kernel-package .

We use a custom kernel with our distribution. To create this, we download Debian packages We use the following kernel patches:

  1. The “supermount” patch allows users to access floppies without having to use the mount command first. The patch varies from kernel release to kernel release, so make sure you get the patch that corresponds to your kernel version. (from where can you download this patch? -P.)

  2. Patches to enable ext3 filesystem support. This is included in the standard kernel sources for 2.4 series kernels. A Debian package called kernel-patch-ext3-2.2 provides the ext3 patch for 2.2 series kernels.

To build the kernel, go through the following steps. In all cases, assume VERSION is the version of the kernel we want to compile. For example, in our case VERSION was 2.2.20 .

  1. First, download the kernel sources we wanted. To do this, install the
    kernel-source-VERSION Debian package.

  2. Install the kernel-package Debian package. This package provides scripts that make kernel compilation a lot easier.

  3. Download any Debianized patches you wish to apply.

  4. Unpack the kernel sources. To do this, type:

    cd /usr/src/

    tar xvzf kernel-source-VERSION.tar.gz

    patch -p1 < /tmp/supermount.patch

  5. If you have any other patches, the Debian kernel system can make them automatically. Simply add the following line to /etc/kernel-pkg.conf :

    patch_the_kernel := YES

  6. You want to apply these automatic kernel patches. To do this, type:

    make-kpkg debian

  7. Now apply the Supermount patch (which as of this writing was not Debianized). Say that the patch was in the file /tmp/supermount.patch . Then we would type the following:

    cd /usr/src/kernel-source-VERSION

  8. Now would be a good time to read the kernel package documentation so that you know what you are doing:

    zcat /usr/share/doc/kernel-package/README.gz | less

  9. You now have two choices: you can manually configure the kernel, or you can modify an existing kernel configuration file. We chose to modify the standard Debian configuration for their “vanilla” kernels.

    You can download kernel configuration files from any mirror. For example, as of the Potato release you could find the “vanilla” kernel configuration in the following file on any Debian mirror (for example, http://http.us.debian.org

    debian/dists/stable/main/disks-i386/current/kernel-config

    Download this file someplace accessible. We'll assume that you save it to
    /tmp/kernel-config.vanilla

    We chose to modify the “vanilla” kernel because it includes a lot of device drivers, which makes life easier when trying to get obscure hardware to work.

  10. Now you need to configure the kernel:

  11. As the root user, type

    make-kpkg -bzimage -revision=name kernel_image

    Where name is the name of the kernel. For example, our kernels are named

    custom.wclp.486.vanilla.x

    where x is the revision of our kernel - for example “1.1” .

    Do not run

    make-kpkg clean

    or you will undo the kernel patches, and furthermore you won't be able to apply them correctly (because the Supermount patch will conflict with the ext3 one). With 2.4 series kernels this may not matter so much.

  12. Wait. If you have a slow processor, wait and wait and wait. (Kernel compilation takes about four hours on our Pentium II 233MHz system.)

  13. If all went well, a .deb file should be created in the /usr/src/ directory. Copy this kernel to your mirror, and specify its name in the FAI default configuration file:

    wclp/installer/class/DEFAULT.var


Package Management

Debian programs are broken down into packages. A Debian package filename ends with .deb . Packages most often contain program files or libraries. Sometimes packages do not contain any data, but rather just specify dependency information to make other packages work together.

Often, programs in Linux require other programs or libraries to work properly. Such requirements are called dependencies. A primary purpose of packaging systems is to help make program installation easier by automatically managing dependencies. The .deb format contains the following dependency-related fields:

Depends:
If package A depends on package B, then B must be installed for A to work properly.

Suggests:
If package A suggests package B, then B adds some important functionality to A, but A will work without B.

Note that apt-get will not install “suggests” dependencies by default.

Recommends:
This is a weaker form of “suggests”. It indicates that packages A and B fit together in some way. “recommends” dependencies are also not installed by default.

Conflicts:
If package A conflicts with package B, then A and B cannot both be installed at the same time. Trying to install package A when package B is installed will fail.

Provides:
Sometimes many packages provide the same functionality. These packages can state that they provide this functionality with a “provides” dependency. Say that package A provides C and package D provides C, and that package B depends on C. Then either package D or package A will satisfy B's dependency.

The .deb format provides some other information which can be useful:

There are several levels of abstraction that control package management. The interface we will use is called APT - “A Package Tool”. A lower-level interface is provided by the dpkg program.

For more information on packages and dependencies, see the APT-HOWTO. (Where?? -P.)

apt-get

The classic Debian interface to APT is a command-line based utility called apt-get . It is great for installing packages easily, but not so good for browsing through packages or learning the names of packages you want to install.

Before installing packages, you will want to refresh the local package database to make sure that it is current. To do this, type

apt-get update

To install packages foo and bar and all their “depends” dependencies (but not their “suggested” or “recommended” dependencies) type

apt-get install foo bar

As usual, you need to be the root user to do this.

For more information, see the apt-get(8) man pagman page.


aptitude

aptitude is a console-based front end to Debian's package management system. It allows you to search for packages to install, select and deselect packages, and inspect package dependencies. It also shows estimated disk usage for packages that are to be installed.

In many cases you will want to use aptitude on the server to check dependencies and install sizes. Then you can install packages on the client using the command-line based apt-get utility.

aptitude is a wonderful program, but it is hampered by some really weird keystrokes. Here are the options I use most, and some of the quirks I have to work around:

synaptic

synaptic is another frontend to APT. This one is GUI-based. From the installer, selecting the SYNAPTIC class (from the screen documented in Section 4.3.1) will install it.

This program will only work if you are logged in as the root user. The root user must have access to the X-display. (provide more info -P.)

In addition, the program uses up a lot of colours. It is unusable on a display with 256 colours.

synaptic provides about the same amount of functionality as aptitude. The interface is relatively straightforward to figure out, so I will only document things I found confusing here:

packages.debian.org

Unfortunately, none of these package managers make it easy to search for packages based on their description. It is easy to find packages if you know the name of the package, but hard to learn the names of those packages if you don't know what you are looking for. You can look through packages one by one, but with over 10 000 packages available for Debian, this can take a while.

UPDATE: I have learned that aptitude allows you to search for package descriptions; see Section 8.6.2. However, searching via http://packages.debian.org seems to be faster.

To search for promising programs, I use http://packages.debian.org. This website provides three nice interfaces for package search:

Of course, standard web searches for programs works well too. You can also look in Section 11.1 to look through installation candidates we have already inspected.

2004-04-13