Customizing a Debian Installation

In this Section a lot of Software will be installed. The basic Commands are described in the "Patches" Section.

System Services

Some Services are usefull on any System, while others will only be needed on special ones. Unneded Services will cost some Disk Space if installed, but they will cost Memory and Performance if running. It is up to the Administrator to decide what to install and run on the given Machine.

There is a Set of Packets that the Author uses to install on a Workstation running Testing:
Model Workstation

Getting Access - SSH

This Service is usefull an any Machine and should be installed, but it hast to be secured.
#> apt-get install openssh-server openssh-client

Graphical Subsystem

To get the graphical Interface running some Software has to be installed. Here, once agein, the layerd Structure of Linux can be seen. Like the Operating System itself, the graphical Frontend consists of several Layers. In this Example, there are 3 of them.

  1. X System (Xorg, X86, Xfree, ...)
  2. Window Manager (gdm, kdm, ...)
  3. Desktop Environment (KDE, Gnome, ...)

Any Combination of these will work, in Theory at least, but there are some Combinations that are proofen to work smooth.
The Combination Xorg - gdm - KDE will be used here. And so we do:
#> apt-get install xorg
#> apt-get install gdm gdm-themes zenity
#> apt-get install kde
This will provide a complete graphical Desktop, but lets get Web and Mail now as well.
#> apt-get install iceweasel
#> apt-get install icedove

OK, let's fire up the Baby now:
#> /etc/init.d/gdm start

Configuring the Display Manager gdm

The gdm can be configured to fit the Needs of the Users interacting with it. It might seem ridiculous to put work in the layout of the Logon Screen, but on the other Hand, the first Impression is very important. To give Yourself and Your Users an cool System right from the Beginning, is something that will delight everyone.

Most of the Configuration will be done in the Display Magagers Configutation File. So let's start and open it:
#> vi gdm.conf
Refere to /usr/share/gdm/defaults.conf for further Information on the Options for gdm.

Login Sound

A Sound can be plaeyd whenever the Login Screen is ready. A Player is needed that works from the Commandline, like music123:
#> apt-get install music123
Now tell gdm to use the Player:

[daemon]

SoundProgram=/usr/bin/music123

The Soundclip is configured in:

[greeter]

SoundOnLogin=true
SoundOnLoginFile=/usr/share/sounds/KDE_Startup_3.ogg


The Path to the Sound File has to be absolute, and can be switched on and off with the SoundOnLogin Statement.

Themes

There is a Multitude of Themes avaulable on the Net. For gdm they can be found at Gnome-Look.
Unpack the Theme and move the Themes Directory to the Theme Directory /usr/share/gdm/themes/. The Value GraphicalTheme is set to the Directory Name.
In Case more then just one Theme should displayed, set the Value GraphicalThemeRand to true. Enter all desired Themes in the Value GraphicalTheme, separted by /:.

[greeter]

GraphicalThemeRand=true
GraphicalTheme=debian-dawn/:sky/:summer07

Clock Format

To show the Clock in the standard 24 Hour Format set
[greeter]

Use24Clock=true

Default Sessions

If You want your Users to open a KDE Session by Default set
[daemon]

DefaultSession=kde.desktop

Informational Message

The User can be molested by an informational Message, that is display when the Login Screen is ready and must be aknowledged to actually log in.

[greeter]

InfoMsgFile=/etc/gdm/info.txt

Set the Value InfoMsgFile to point to a Text File containing the Message to Diplay.

root Access

First of all root should NEVER log on to the graphical Subsystem. There is no Reason to do this and if it is done, the System is put at a high and unneseccary Risk. It undermines the Security built into Linux and it doesn't have to be done.
Open a Terminal Session, sux - to login root, start the Program needed to configure the System - and then log out again.

[security]
AllowRoot=true

Do not use the root User for graphical Logins.
This should only be done if You exacly know what You are doning and log out as soon as possibile!
Remember: Never do ordinary Work as Superuser!

Graphics Drivers

nVidia Driver

First of all please note that the n-Vidia Driver does work with Kernel Release 2.6.18, but will not work with Kernel Release 2.6.21.
It should do with the next Kernel 2.6.22, so You've got to stay with 2.6.18 for now.

#> m-a update
#> m-a prpare
#> m-a auto-install nvidia
#> /etc/init.d/gdm restart

To build the Nvidia Drivers from Sources, become root and add unstable to the Sources in /etc/apt/sources.list.
#> mkdir deb
#> ls
#> cd deb
#> apt-get build-dep nvidia-glx
#> pt-get -b source nvidia-glx
#> ls
#> dpkg -i nvidia-glx_1.0.9755-1_i386.deb nvidia-kernel-source_1.0.9755-1_i386.deb
#> cd
#> m-a a-i -t nvidia
#> apt-get -f install
#> rmmod nvidia
#> modprobe nvidia
#> startx
#> /etc/init.d/gdm stop
#> /etc/init.d/gdm start

Make nVidia-Driver for a Kernel not currently running

To Build a Driver for a newly installed, but not jet booted Kernel, use the Following:

#> module-assistant auto-install -t -l x.y.z-v-arch nvidia

just like in

#> m-a a-i -t -l 2.6.30-1-686 nvidia

The Kernel Architecture has to include Details like -bigmen if applicable .

The same with Sources from Unstable

Add Unstable to /etc/apt/sources.list.
deb-src http://your.favorite.mirror:PORT/debian/ unstable main contrib non-free

Builde the Source Packet with
#>apt-get -b source nvidia-kernel-source

Now install the Source Packet
#>dpkg -i nvidia-kernel-source_185.18.36-1_i386.deb

Use the Module-Assistant to build and install the kernel Module
#>module-assistant -t -l 2.6.30-1-686-bigmem auto-install nvidia

It might be necessary to clean out the Build Directory for Module-Assistant to run
(rm -rd /usr/src/modules/nvidia-kernel)

Finally install the new GLX the Source Build produced
dpkg -i nvidia-glx_185.18.36-1_i386.deb

and Reboot.

Changing the Kernel Grub boots

Somtimes it is wanted to boot an older Kernel by default. (Whenever the Drivers for the Graphics Adapter won't work for Exaple.)

Edit the Grub Bootime Configuration:
#> vi /boot/grub/menu.lst
Change the Value for default to point toi the desired Kernel. Save, quit and do:
#> update-grub

Changing the Boot Device

To Move the System to a Device with a different Name is not a trivial Task. Linux gives You a chance to do this, but some manual Work is required.
At least in Testing the Dvice Naming Convention changed in the Past, so it became a Necessity to perform this Operation.

After the System has been changed, it will not boot normally and wait for the Root Filesystem forever. To get the system back up try to Modify the root= Entry in the Boot Menu, using e, or boot a life CD. First of all find out what needs to be changed
sdhd or hdsd or …
then go to the
#> vi /boot/grub/menu.lst
and change the Value of kopt in the ## Start Default Options ##to the desired One.
# kopt=root=/dev/sda3 ro# kopt=root=/dev/hda3 ro
Leave the #s at the Start of the Line in Place. Read the Documentation to learn about their Meaning!
Now run:
#> update-grub
and check wheter the definitions in the Menu Entries at the End of menu.lst have changed correctly.
The Changes will show on the next reboot.



HomeLinuxLogBook → Customize Debian
Tue Aug 3 17:16:12 CEST 2010