In this section we document noteworthy tasks that did not fit in well anywhere else.
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 does not appear to have a system-wide configuration file. However, users can specify their preferences in
/.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.
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
(That xml file -P.)
(/usr/lib/gnumeric/*-bonobo/plugins/excel/ -P.)
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 /.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:
cd /.opera/
cp opera.ini opera.ini.orig
cd /.opera/
diff opera.ini opera.ini.orig > /tmp/opera.diffs
(Where can people find out more information about this? -P.)
(Additional themes -P.)
(Toolbar, Preferences, Menu files -P.)
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 .
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.)
(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:
(HTML links -P.)
(Extra games to run in small mode -P.)
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.
(Document Charles' application here -P.)
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 Help WCLP Help menu option.
(/etc/exports -P.)
(kernel server or user server? -P.)
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.)
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:
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 .
cd /usr/src/
tar xvzf kernel-source-VERSION.tar.gz
patch -p1 < /tmp/supermount.patch
patch_the_kernel := YES
make-kpkg debian
cd /usr/src/kernel-source-VERSION
zcat /usr/share/doc/kernel-package/README.gz | less
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.
cd /usr/src/kernel-source-VERSION/
make xconfig
A pretty Tcl/Tk interface should pop up.
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.
wclp/installer/class/DEFAULT.var
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:
Note that apt-get will not install “suggests” dependencies by default.
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.)
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 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:
Searching is quite sophisticated. By prepending the string d to a query, you can search via description. Before doing this, however, you will want to turn off partial matching: press , then select Options UI Options . Unselect the Show partial search results option.
There is also a = keystroke that puts packages on hold, so they will be forced to remain in their current state.
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:
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