606
Debian GNU/Linux Desktop Survival Guide Graham Williams

Graham Williams- Debian GNU/Linux: Desktop Survival Guide

Embed Size (px)

Citation preview

Debian GNU/LinuxDesktop Survival Guide

Graham Williams

ii The procedures and applications presented in this book have been included for their instructional value. They have been tested but are not guaranteed for any particular purpose. The publisher does not oer any warranties or representations, nor does it accept any liabilities with respect to the programs and applications. This book is a work in progress (and probably will always be so!). Please send me comments, suggestions, updates, criticisms.

Printed 9 March 2004

Copyright c 2003-2004 by Graham Williams mailto:[email protected] Permission is granted to copy and distribute this book but not for commercial gain with the exception that this document may be included with any distribution of Debian GNU/Linux, without limitation.

ContentsPreface 1 Quick Start 2 Advocacy 2.1 Linux Adopters . . . . . . . . . . . . . . . . . . . . . . . . . . xxix 1 3 3 7 8

3 History: Unix, GNU, Gnome 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 Unix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

GNU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Gnome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Free and Open Source Software . . . . . . . . . . . . . . . . . 15 Free Documentation . . . . . . . . . . . . . . . . . . . . . . . 17 Freedom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 General Resources 3.8.1 3.8.2 . . . . . . . . . . . . . . . . . . . . . . . . 18

Books . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Internet . . . . . . . . . . . . . . . . . . . . . . . . . . 20 21

4 Distributions 4.1

Debian GNU/Linux Distributions . . . . . . . . . . . . . . . . 22 iii

iv 4.2 4.3 4.4 4.5

CONTENTS Advantages of the Debian Distribution . . . . . . . . . . . . . 23 Debian Distributions . . . . . . . . . . . . . . . . . . . . . . . 25 Debian Packages . . . . . . . . . . . . . . . . . . . . . . . . . 27 Debian Releases . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.5.1 4.5.2 4.5.3 4.5.4 4.6 4.7 Naming The Releases . . . . . . . . . . . . . . . . . . . 27 Recording Your Choice . . . . . . . . . . . . . . . . . . 28 Other Flavours . . . . . . . . . . . . . . . . . . . . . . 29 Package Basics . . . . . . . . . . . . . . . . . . . . . . 29

Using dselect . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Debian on CD . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 Build or Download the CD Image? . . . . . . . . . . . 32 Obtain The Debian Pseudo-Image Kit . . . . . . . . . 33 Listing of CD Image Contents . . . . . . . . . . . . . . 33 Download Debian Packages . . . . . . . . . . . . . . . 34 CD-ROM Packages from APT . . . . . . . . . . . . . . 35

4.8

Other Distributions . . . . . . . . . . . . . . . . . . . . . . . . 35 4.8.1 Moving From Red Hat . . . . . . . . . . . . . . . . . . 35 37

5 Installation 5.1 5.2

Hardware Compatibility . . . . . . . . . . . . . . . . . . . . . 38 Getting the Installation Media . . . . . . . . . . . . . . . . . . 39 5.2.1 5.2.2 5.2.3 Floppy Distribution . . . . . . . . . . . . . . . . . . . . 39 CD-ROM Distribution . . . . . . . . . . . . . . . . . . 39 LiveCD Distributions . . . . . . . . . . . . . . . . . . . 40

5.3

Boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 5.3.1 SPARCStation Boot . . . . . . . . . . . . . . . . . . . 41

CONTENTS 5.3.2 5.4

v BIOS Not Supporting CD-ROM . . . . . . . . . . . . . 41

Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 5.4.1 5.4.2 Debian Install . . . . . . . . . . . . . . . . . . . . . . . 41 PGI Install . . . . . . . . . . . . . . . . . . . . . . . . 42

5.5

Base Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 5.5.1 5.5.2 5.5.3 5.5.4 5.5.5 5.5.6 5.5.7 5.5.8 5.5.9 Keyboard . . . . . . . . . . . . . . . . . . . . . . . . . 43 Partitions . . . . . . . . . . . . . . . . . . . . . . . . . 43 Congure Devices . . . . . . . . . . . . . . . . . . . . . 43 Networking . . . . . . . . . . . . . . . . . . . . . . . . 44 Time Zone . . . . . . . . . . . . . . . . . . . . . . . . . 44 Floppy Boot Disk . . . . . . . . . . . . . . . . . . . . . 44 Reboot and User Accounts . . . . . . . . . . . . . . . . 45 Package Selections . . . . . . . . . . . . . . . . . . . . 45 EMail: Setup Exim . . . . . . . . . . . . . . . . . . . . 45

5.6

Installing Packages . . . . . . . . . . . . . . . . . . . . . . . . 46 5.6.1 5.6.2 5.6.3 Update To Newest Distribution . . . . . . . . . . . . . 46 Upgrade . . . . . . . . . . . . . . . . . . . . . . . . . . 46 New Packages . . . . . . . . . . . . . . . . . . . . . . . 46

5.7 5.8 5.9

Kernel Upgrade: 2.2 to 2.4 . . . . . . . . . . . . . . . . . . . . 49 Initial Congurations . . . . . . . . . . . . . . . . . . . . . . . 49 Target Machines 5.9.1 5.9.2 5.9.3 5.9.4 5.9.5 . . . . . . . . . . . . . . . . . . . . . . . . . 50

Build (Wayfare) . . . . . . . . . . . . . . . . . . . . . . 50 Dell Latitude C600 (Inci) . . . . . . . . . . . . . . . . 54

Compaq Evo N610c (Axel) . . . . . . . . . . . . . . . . 57 Compaq Presario 5740AP (Friends) . . . . . . . . . . . 60 Dell Precision 650 (Caravan) . . . . . . . . . . . . . . . 63

vi 5.9.6 5.9.7 5.9.8 5.9.9

CONTENTS Dell OptiPlex GX270 (Modern) . . . . . . . . . . . . . 66 Dell OptiPlex GX150 (Fairmond) . . . . . . . . . . . . 70 Dell OptiPlex GX240 (Bigdaddy) . . . . . . . . . . . . 73 Dell OptiPlex GX260 (Vince) . . . . . . . . . . . . . . 75

5.9.10 Dell Optiplex GX260 (Festival) . . . . . . . . . . . . . 78 5.9.11 Dell Optiplex GX260 (Uramys1) . . . . . . . . . . . . . 82 5.9.12 Optima (Vivaldi) . . . . . . . . . . . . . . . . . . . . . 85 5.9.13 Dell Precision 620 (Brick) . . . . . . . . . . . . . . . . 89 5.9.14 Dell Precision 620 (Atom) . . . . . . . . . . . . . . . . 91 5.9.15 Optima WorkPro (Bach) . . . . . . . . . . . . . . . . . 93 5.9.16 Dell OptiPlex GXi 523M (Prefect) . . . . . . . . . . . 97 5.9.17 Dell Precision 420 MT (Cleveland) . . . . . . . . . . . 99 5.9.18 Dell Optiplex GX240 (Cultus) . . . . . . . . . . . . . . 100 5.9.19 Optima Super Vizon II 3600 Customised (Bartok) . . . 102 5.9.20 Dell Precision WorkStation 530 MT (Altrop) . . . . . . 108 5.9.21 Sun SPARCstation 5 (sun4m) (Cepheus) . . . . . . . . 111 5.9.22 Toshiba Satellite 1800 (HAX) . . . . . . . . . . . . . . 112 5.9.23 IBM ThinkPad (Hukz) . . . . . . . . . . . . . . . . . . 114 5.9.24 Dell Latitude C600 (Inco) . . . . . . . . . . . . . . . . 116 5.9.25 Dell OptiPlex GX1p (Plymouth) . . . . . . . . . . . . 119 5.9.26 Dell Precision WorkStation 420 MT (Velox) . . . . . . 121 5.9.27 Dell OptiPlex GX110 (Mint) . . . . . . . . . . . . . . . 123 5.9.28 Dell Latitude CPiD300XT (Inka) . . . . . . . . . . . . 125 5.9.29 Dell Latitude XPi (Rose) . . . . . . . . . . . . . . . . . 131 5.9.30 Generic 486/DX66 (Roast) . . . . . . . . . . . . . . . . 133 5.10 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

CONTENTS

vii

5.10.1 Books . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 6 Basic Survival 6.1 135

Basic Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 6.1.1 6.1.2 File and Directory Protections . . . . . . . . . . . . . . 135 Background Jobs . . . . . . . . . . . . . . . . . . . . . 135

6.2

System Information . . . . . . . . . . . . . . . . . . . . . . . . 136 137

7 Wajig: Administering Debian 7.0.1 7.0.2 7.0.3 7.0.4 7.0.5 7.0.6 7.0.7 7.0.8 7.0.9

History: Motivations For Wajig . . . . . . . . . . . . . 137 Installing Wajig . . . . . . . . . . . . . . . . . . . . . . 138 The Basic Debian Tools . . . . . . . . . . . . . . . . . 138 Wajig Overview . . . . . . . . . . . . . . . . . . . . . . 139 Getting Started with SUDO . . . . . . . . . . . . . . . 140 Available Packages . . . . . . . . . . . . . . . . . . . . 141 Finding Packages . . . . . . . . . . . . . . . . . . . . . 142 Installing Packages . . . . . . . . . . . . . . . . . . . . 144 Checking Whats Changed Before Installing . . . . . . 145

7.0.10 Installing Alien Packages . . . . . . . . . . . . . . . . . 145 7.0.11 Putting Packages on Hold . . . . . . . . . . . . . . . . 146 7.0.12 Building Packages . . . . . . . . . . . . . . . . . . . . . 146 7.0.13 Managing A Local Package Archive . . . . . . . . . . . 147 7.0.14 Mirroring With APT . . . . . . . . . . . . . . . . . . . 148 7.0.15 Pinning Distributions . . . . . . . . . . . . . . . . . . . 148 7.0.16 Cache Packages Locally . . . . . . . . . . . . . . . . . 149

7.0.17 Recongure Packages . . . . . . . . . . . . . . . . . . . 149 7.0.18 Setting Default Applications . . . . . . . . . . . . . . . 149

viii

CONTENTS 7.0.19 Bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 7.0.20 Managing Daemons or Services . . . . . . . . . . . . . 150 7.1 Other Commands . . . . . . . . . . . . . . . . . . . . . . . . . 151 7.1.1 7.1.2 7.2 7.3 7.4 7.5 Maintaining a Distribution Archive . . . . . . . . . . . 151 Synchronising Two Installations . . . . . . . . . . . . . 153

Package Information . . . . . . . . . . . . . . . . . . . . . . . 153 Alternative Applications . . . . . . . . . . . . . . . . . . . . . 154 Building Debian Packages . . . . . . . . . . . . . . . . . . . . 155 Packages: Roll Your Own . . . . . . . . . . . . . . . . . . . . 156 7.5.1 7.5.2 7.5.3 7.5.4 7.5.5 Prepackaging Development Environment . . . . . . . . 156 Initiating the Debian Package . . . . . . . . . . . . . . 158 Building the Debian Package: First Time . . . . . . . . 159 Adding the Package to Your Archive . . . . . . . . . . 159 Updating the Debian Package . . . . . . . . . . . . . . 160 163

8 Audio 8.1 8.2 8.3

Conguring Your Audio Chip . . . . . . . . . . . . . . . . . . 163 Audio Not Working . . . . . . . . . . . . . . . . . . . . . . . . 164 Audio File Information . . . . . . . . . . . . . . . . . . . . . . 164 165

9 AbiWord: Word Processor 9.1

Export to LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . 165 167 171

10 APM: Power Management 11 Backup

11.1 Backup To Other Computers . . . . . . . . . . . . . . . . . . . 171 11.2 Legato NetWorker . . . . . . . . . . . . . . . . . . . . . . . . 173

CONTENTS 12 Command Line: Bash 13 Booting

ix 177 179

13.1 Lilo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 13.1.1 Large Disks . . . . . . . . . . . . . . . . . . . . . . . . 180 13.1.2 Kernel Images . . . . . . . . . . . . . . . . . . . . . . . 180 13.2 GRUB: The Grand Unied Boot Loader . . . . . . . . . . . . 181 13.3 Secure Boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 13.4 Dual Boot: Multiple Operating Systems . . . . . . . . . . . . 183 13.4.1 Dual Boot with MS-Windows/NT . . . . . . . . . . . . 183 13.4.2 Boot NT from LILO . . . . . . . . . . . . . . . . . . . 185 13.5 MS-Windows/NT or MS-Windows/2000 . . . . . . . . . . . . 185 13.6 The Booting From Floppy Alternative . . . . . . . . . . . . . 186 14 Cameras 187

14.1 Setup of HP Photosmart 320 . . . . . . . . . . . . . . . . . . . 187 14.2 Accessing Photos . . . . . . . . . . . . . . . . . . . . . . . . . 187 15 CD-ROM 189

15.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 15.1.1 CD Writer as a SCSI Device . . . . . . . . . . . . . . . 191 15.1.2 Docking Station CD-ROM . . . . . . . . . . . . . . . . 193 15.1.3 LG CED-8080B Problems . . . . . . . . . . . . . . . . 193 15.1.4 cdrecord Problem: Cannot . . . Bytes on /dev/zero . . . 194 15.2 CD Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 15.2.1 cdrdao . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 15.2.2 gcdmaster . . . . . . . . . . . . . . . . . . . . . . . . . 196

x

CONTENTS 15.2.3 xcdroast . . . . . . . . . . . . . . . . . . . . . . . . . . 197 15.2.4 MP3 Encoders . . . . . . . . . . . . . . . . . . . . . . 197

15.3 CD Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 15.3.1 Duplicate Audio CD Using cdrdao 15.3.2 Duplicate Audio CD Using cdrecord . . . . . . . . . . . 197 . . . . . . . . . . 199

15.3.3 Audio CD From Collection of MP3s . . . . . . . . . . . 199 15.4 Copy a CD image to Disk . . . . . . . . . . . . . . . . . . . . 200 15.5 CD Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 15.5.1 Intermediate Image . . . . . . . . . . . . . . . . . . . . 201 15.5.2 No Intermediate Image . . . . . . . . . . . . . . . . . . 201 15.5.3 Direct Copy Data CD from /dev/cdrom to SCSI burner 202 15.5.4 Copy Video CD . . . . . . . . . . . . . . . . . . . . . . 202 15.6 CD Mixed Data Audio . . . . . . . . . . . . . . . . . . . . . . 202 15.7 CD-RW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 15.8 Multi Session CDs . . . . . . . . . . . . . . . . . . . . . . . . 203 15.9 CD Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 16 Chinese 17 ChRoot: Multiple Distributions 18 Clock: An Explanation 205 207 209

18.0.1 Timezones . . . . . . . . . . . . . . . . . . . . . . . . . 209 18.0.2 System Clock Drift . . . . . . . . . . . . . . . . . . . . 209 18.0.3 chrony . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 18.0.4 Hardware Clock Drift . . . . . . . . . . . . . . . . . . . 213

CONTENTS 19 Commercial

xi 215

19.1 Corel WPO Oce Alternative . . . . . . . . . . . . . . . . . . 215 20 Conguration 217

20.1 System Conguration in /etc . . . . . . . . . . . . . . . . . . . 217 21 CRON: Regular Tasks 22 CVS: Concurrent Versioning 219 221

22.1 Managing a Project . . . . . . . . . . . . . . . . . . . . . . . . 221 22.1.1 Initialising your own Repository . . . . . . . . . . . . . 221 22.1.2 Creating a New Project . . . . . . . . . . . . . . . . . 222 22.1.3 Adding Files to a Project . . . . . . . . . . . . . . . . 223 22.1.4 Updating Your Project Copy . . . . . . . . . . . . . . . 223 22.1.5 Identifying Changes . . . . . . . . . . . . . . . . . . . . 224 22.1.6 Removing Files from a Project . . . . . . . . . . . . . . 224 22.1.7 Committing Changes . . . . . . . . . . . . . . . . . . . 225 22.1.8 Tagging a Release . . . . . . . . . . . . . . . . . . . . . 225 22.2 Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 22.2.1 Location of Repository . . . . . . . . . . . . . . . . . . 225 22.2.2 Using ssh Rather Than rsh . . . . . . . . . . . . . . . . 226 22.2.3 Notify Users of Changes . . . . . . . . . . . . . . . . . 226 22.2.4 Ignoring Files . . . . . . . . . . . . . . . . . . . . . . . 226 22.3 CVS for NT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 23 Desktop 229

xii 24 DIA: Charts and Diagrams

CONTENTS 231

24.1 Basic Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 232 24.2 Walkthrough: Creating Simple Diagrams . . . . . . . . . . . . 232 24.3 Reference: Command Line Options . . . . . . . . . . . . . . . 234 24.4 Reference: The Tools Windows . . . . . . . . . . . . . . . . . 235 24.4.1 Pointer, View, and Text Objects . . . . . . . . . . . . . 235 24.4.2 Standard Shapes . . . . . . . . . . . . . . . . . . . . . 236 24.4.3 Handles and Connection Points . . . . . . . . . . . . . 236 24.4.4 Sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 24.4.5 Pen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 24.4.6 Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 24.5 Reference: The Right Mouse Button Menu . . . . . . . . . . . 238 24.5.1 The File Menu . . . . . . . . . . . . . . . . . . . . . . 238 24.5.2 The Edit Menu . . . . . . . . . . . . . . . . . . . . . . 242 24.5.3 The View Menu . . . . . . . . . . . . . . . . . . . . . . 242 24.5.4 The Select Menu . . . . . . . . . . . . . . . . . . . . . 242 24.5.5 The Objects Menu . . . . . . . . . . . . . . . . . . . . 243 24.5.6 The Tools Menu . . . . . . . . . . . . . . . . . . . . . . 243 24.5.7 The Dialogs Menu . . . . . . . . . . . . . . . . . . . . 244 24.6 Reference: Sample Sheets . . . . . . . . . . . . . . . . . . . . 244 24.6.1 Chronogram . . . . . . . . . . . . . . . . . . . . . . . . 244 24.6.2 Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 24.6.3 ER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 24.6.4 Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . 245 24.6.5 FS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 24.6.6 GRAFCET . . . . . . . . . . . . . . . . . . . . . . . . 246

CONTENTS

xiii

24.6.7 Ladder . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 24.6.8 Networks . . . . . . . . . . . . . . . . . . . . . . . . . 247

24.6.9 Pneumatic/Hydraulic . . . . . . . . . . . . . . . . . . . 247 24.6.10 SADT . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 24.6.11 Sybase . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 24.6.12 UML . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 24.7 Walkthrough: Creating Your Own Shapes . . . . . . . . . . . 249 24.7.1 Simple Example . . . . . . . . . . . . . . . . . . . . . . 249 24.7.2 Shape Elements . . . . . . . . . . . . . . . . . . . . . . 250 24.7.3 SVG Support . . . . . . . . . . . . . . . . . . . . . . . 252 24.7.4 Sheet Elements . . . . . . . . . . . . . . . . . . . . . . 252 24.7.5 Installing New Sheets . . . . . . . . . . . . . . . . . . . 252 24.8 Reference: The dia Save Format . . . . . . . . . . . . . . . . . 252 24.9 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 252 25 Directories: Linux Folders 255

25.1 The Standard Linux Directory Structure . . . . . . . . . . . . 255 26 Disks 257

26.1 New Disk Setup . . . . . . . . . . . . . . . . . . . . . . . . . . 257 26.2 Ext2 to Ext3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 26.3 Disk Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 257 27 Documentation 261

27.1 Debian doc-central . . . . . . . . . . . . . . . . . . . . . . . . 261 28 Email 263

28.1 Setting up EMail . . . . . . . . . . . . . . . . . . . . . . . . . 263

xiv

CONTENTS 28.1.1 Exim . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 28.2 Retrieving and Filtering Email . . . . . . . . . . . . . . . . . . 264 28.2.1 Fetchmail: Collect Mail from Remote Hosts . . . . . . 264 28.2.2 Procmail to Filter and Split Email . . . . . . . . . . . 266 28.2.3 IMAP: Mail Server . . . . . . . . . . . . . . . . . . . . 267 28.2.4 POP Mail Server . . . . . . . . . . . . . . . . . . . . . 267 28.3 Reading Email . . . . . . . . . . . . . . . . . . . . . . . . . . 268

28.3.1 Mutt . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 28.3.2 Gnus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 28.4 Email Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 28.4.1 Grepmail: Search mail archives . . . . . . . . . . . . . 269 28.4.2 EMail Attachments . . . . . . . . . . . . . . . . . . . . 270 28.4.3 MS-TNEF attachments . . . . . . . . . . . . . . . . . . 270 28.4.4 Uuencode and Uudecode in Mail . . . . . . . . . . . . 270

28.4.5 Mailing Lists . . . . . . . . . . . . . . . . . . . . . . . 270 28.5 Spam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 28.6 SMTP Direct . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 29 Eye of Gnome: Image Viewer 30 Evolution: GNU Personal Information Manager 273 275

30.1 Managing Email . . . . . . . . . . . . . . . . . . . . . . . . . . 275 30.1.1 Using Virtual Folders . . . . . . . . . . . . . . . . . . . 275 30.2 Contacts and Address Book . . . . . . . . . . . . . . . . . . . 276 30.3 Managing Your Calendar . . . . . . . . . . . . . . . . . . . . . 276 30.4 Tracking Your Tasks . . . . . . . . . . . . . . . . . . . . . . . 276

CONTENTS 31 File Systems 32 Firewalls

xv 277 279

32.1 IPMASQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 32.2 IPCHAINS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 33 Floppy Disks 283

33.1 Floppy Drive Access Permissions . . . . . . . . . . . . . . . . 283 33.2 Format a Floppy . . . . . . . . . . . . . . . . . . . . . . . . . 283 33.3 Using DOS-Like Commands . . . . . . . . . . . . . . . . . . . 284 33.4 Mounting Floppy Disk Device . . . . . . . . . . . . . . . . . . 284 34 Fonts: X Window System 287

34.1 Setting Up Fonts in X . . . . . . . . . . . . . . . . . . . . . . 287 34.2 Fonts are too Large . . . . . . . . . . . . . . . . . . . . . . . . 289 35 Ghemical: Chemical Modelling 36 GIMP: Image and Photo Manipulation 291 293

36.1 Remove Red Eye . . . . . . . . . . . . . . . . . . . . . . . . . 293 36.2 Image Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 36.3 Gimp Resources . . . . . . . . . . . . . . . . . . . . . . . . . . 295 37 Glade: GUI Builder 297

37.1 Using Glade . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 37.2 Glade Walkthroughs . . . . . . . . . . . . . . . . . . . . . . . 299 37.2.1 Building the GUI . . . . . . . . . . . . . . . . . . . . . 299 37.2.2 Building the C Code . . . . . . . . . . . . . . . . . . . 307 37.2.3 Using Libglade C . . . . . . . . . . . . . . . . . . . . . 309

xvi

CONTENTS 37.2.4 Using Libglade with Python . . . . . . . . . . . . . . . 309 37.2.5 Using Libglade with Perl . . . . . . . . . . . . . . . . . 310 37.3 Glade Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 311 37.3.1 Writing Your Code . . . . . . . . . . . . . . . . . . . . 311 37.3.2 Command Line Options . . . . . . . . . . . . . . . . . 312 37.3.3 The Menus and Toolbar . . . . . . . . . . . . . . . . . 313 37.3.4 Project Options . . . . . . . . . . . . . . . . . . . . . . 317 37.3.5 Widget Properties . . . . . . . . . . . . . . . . . . . . 320 37.3.6 Widget Palettes . . . . . . . . . . . . . . . . . . . . . . 320 37.3.7 The Glade Save Format . . . . . . . . . . . . . . . . . 321 37.4 Glade Resources . . . . . . . . . . . . . . . . . . . . . . . . . . 321 37.5 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 322 37.6 Using Napster . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 37.7 Gnome Hack . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326

38 Gnome: The Desktop

327

38.1 Using Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 38.1.1 Tear-O Menus . . . . . . . . . . . . . . . . . . . . . . 328 38.1.2 Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . 329 38.2 Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 38.2.1 Floating Toolbars . . . . . . . . . . . . . . . . . . . . . 330 38.3 Dialogues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 38.3.1 Filename Completion and Hidden Files . . . . . . . . . 330 38.4 Gnome Applications . . . . . . . . . . . . . . . . . . . . . . . 330 38.4.1 Other Applications . . . . . . . . . . . . . . . . . . . . 332 38.5 Desktop Managers . . . . . . . . . . . . . . . . . . . . . . . . 334

CONTENTS

xvii

38.6 Window Managers . . . . . . . . . . . . . . . . . . . . . . . . 334 38.7 Other Desktops . . . . . . . . . . . . . . . . . . . . . . . . . . 334 38.7.1 KDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 38.7.2 XFCE . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 38.8 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . 336 38.8.1 Locked File . . . . . . . . . . . . . . . . . . . . . . . . 336 38.9 Gnome Resources . . . . . . . . . . . . . . . . . . . . . . . . . 336 38.9.1 Gnome Books . . . . . . . . . . . . . . . . . . . . . . . 336 39 GnuCash: Finances 40 Gnumeric: Spreadsheet 337 339

40.1 Other Spreadsheets . . . . . . . . . . . . . . . . . . . . . . . . 341 40.1.1 The StarOce Calc . . . . . . . . . . . . . . . . . . . . 341 40.1.2 KSpread . . . . . . . . . . . . . . . . . . . . . . . . . . 341 40.1.3 ApplixWare Spreadsheet . . . . . . . . . . . . . . . . . 341 41 GQView: Viewing Images 42 Graphics 345 347

42.1 Graphics Editors . . . . . . . . . . . . . . . . . . . . . . . . . 347 42.1.1 Xg: Vector Graphics Editor . . . . . . . . . . . . . . 348

42.2 Common Operations . . . . . . . . . . . . . . . . . . . . . . . 349 42.2.1 Charts and Plots . . . . . . . . . . . . . . . . . . . . . 349 42.2.2 Screen Capture . . . . . . . . . . . . . . . . . . . . . . 350 42.2.3 Thumbnails . . . . . . . . . . . . . . . . . . . . . . . . 351 42.2.4 Transparent PNG Images . . . . . . . . . . . . . . . . 351 42.3 Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351

xviii

CONTENTS 42.3.1 PostScript . . . . . . . . . . . . . . . . . . . . . . . . . 351

43 Grip: CD Audio Extraction 44 Groups: Managing Access Permissions 45 HTML Editors

353 359 363

45.1 Bluesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 46 ImageMagick 47 Initialisations on Booting 365 367

47.1 Run Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 47.2 Initialisation Scripts . . . . . . . . . . . . . . . . . . . . . . . 369 47.3 CTRL-ALT-DEL: The Three Finger Salute . . . . . . . . . . . 370 47.4 Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 48 Java 373

48.1 Install Sun Java . . . . . . . . . . . . . . . . . . . . . . . . . . 373 48.2 Java Alternatives . . . . . . . . . . . . . . . . . . . . . . . . . 374 48.2.1 Mozilla Java Plugin . . . . . . . . . . . . . . . . . . . . 374 49 Jigdo: Build CD-ROM Images 50 KDE: Desktop Management 51 Kernel: Rolling Your Own 377 379 381

51.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . 382 51.2 Kernel Conguration . . . . . . . . . . . . . . . . . . . . . . . 383 51.3 Kernel Modules . . . . . . . . . . . . . . . . . . . . . . . . . . 385

CONTENTS

xix

51.4 Compiling the Kernel . . . . . . . . . . . . . . . . . . . . . . . 385 51.5 Installing the Kernel . . . . . . . . . . . . . . . . . . . . . . . 385 51.6 Lilo Conguration . . . . . . . . . . . . . . . . . . . . . . . . . 387 51.7 Kernel Versions . . . . . . . . . . . . . . . . . . . . . . . . . . 387 51.8 Latest Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 51.9 Why make-kpkg? . . . . . . . . . . . . . . . . . . . . . . . . . 388 51.10Loading Kernel Modules . . . . . . . . . . . . . . . . . . . . . 389 52 Keyboard 391

52.1 Mapping a Key . . . . . . . . . . . . . . . . . . . . . . . . . . 391 53 Konqueror: The KDE File Manager 54 LaTeX 393 395

54.1 LaTeX Documentation . . . . . . . . . . . . . . . . . . . . . . 395 54.2 Generating LaTeX . . . . . . . . . . . . . . . . . . . . . . . . 395 54.3 Creating LaTeX Documents . . . . . . . . . . . . . . . . . . . 396 54.3.1 Using LyX . . . . . . . . . . . . . . . . . . . . . . . . . 396 54.3.2 Using Emacs . . . . . . . . . . . . . . . . . . . . . . . 396 54.4 Processing a LaTeX Document . . . . . . . . . . . . . . . . . 396

54.5 LaTeX Tips and Tricks . . . . . . . . . . . . . . . . . . . . . . 397 54.5.1 Bibliography Starts on a New Page . . . . . . . . . . . 397 54.6 TeX Capacity Exceeded . . . . . . . . . . . . . . . . . . . . . 397 55 Login 55.1 All Capitals Login 399 . . . . . . . . . . . . . . . . . . . . . . . . 399

55.2 Login Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 55.3 Midnight Commander . . . . . . . . . . . . . . . . . . . . . . 401

xx

CONTENTS 55.4 Gnome Memory Blocks . . . . . . . . . . . . . . . . . . . . . . 401

56 Magellan: KDE Personal Information Manager 57 Modems

403 405

57.1 Silence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 57.2 No Dial Tone . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 57.3 Chat Script Giving up Too Early . . . . . . . . . . . . . . . . 406 58 MSWindows 407

58.1 Wine: Emultaing MS-Windows . . . . . . . . . . . . . . . . . 407 58.2 Citrix: MSWindows Under Linux . . . . . . . . . . . . . . . . 407 58.2.1 Screenshot . . . . . . . . . . . . . . . . . . . . . . . . . 408 58.2.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . 408 59 Music 60 MySQL 411 413

60.0.3 MySQL Root Password . . . . . . . . . . . . . . . . . . 414 60.0.4 Creating New Database . . . . . . . . . . . . . . . . . 414 60.0.5 Create a New User . . . . . . . . . . . . . . . . . . . . 416 60.0.6 Remote Host Access . . . . . . . . . . . . . . . . . . . 417 60.0.7 Remote User Permissions . . . . . . . . . . . . . . . . . 417 60.0.8 Basic MySQL . . . . . . . . . . . . . . . . . . . . . . . 418 61 Nautilus: Navigating FoldersNear and Far 421

61.1 Finding Your Way . . . . . . . . . . . . . . . . . . . . . . . . 421 61.2 Browsing HTML Documents . . . . . . . . . . . . . . . . . . . 422 61.3 Nautilus CD Creator . . . . . . . . . . . . . . . . . . . . . . . 423

CONTENTS

xxi

61.4 Browsing Remote Sites . . . . . . . . . . . . . . . . . . . . . . 423 62 Networks 425

62.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 62.2 Network Conguration . . . . . . . . . . . . . . . . . . . . . . 426 62.2.1 Graphical Tools . . . . . . . . . . . . . . . . . . . . . . 426 62.2.2 Manual Setup . . . . . . . . . . . . . . . . . . . . . . . 426 62.2.3 Neighborhood Table Overow . . . . . . . . . . . . . . 427 62.2.4 Example Congurations . . . . . . . . . . . . . . . . . 427 62.3 Wireless Network . . . . . . . . . . . . . . . . . . . . . . . . . 429 62.4 Domain Name Searching . . . . . . . . . . . . . . . . . . . . . 430 62.5 Hostname Changes . . . . . . . . . . . . . . . . . . . . . . . . 431 62.6 Ports and Services . . . . . . . . . . . . . . . . . . . . . . . . 431 62.7 Getting the Cabling Right . . . . . . . . . . . . . . . . . . . . 433 62.8 IP Forwarding: Home Networks . . . . . . . . . . . . . . . . . 433 62.9 Multiple Ethernet Cards . . . . . . . . . . . . . . . . . . . . . 436 63 NFS: Network File System 437

63.1 Setting Up NFS . . . . . . . . . . . . . . . . . . . . . . . . . . 437 63.2 Export Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 63.3 Root Access On NFS . . . . . . . . . . . . . . . . . . . . . . . 439 64 NT File System 65 OpenOce 65.1 OpenOce Writer 441 443 . . . . . . . . . . . . . . . . . . . . . . . . 443

65.2 Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 65.3 OpenOce Impress . . . . . . . . . . . . . . . . . . . . . . . . 445

xxii 66 Oracle: Commercial Database

CONTENTS 447

66.1 Obtaining the Distribution . . . . . . . . . . . . . . . . . . . . 447 66.2 Oracle User and Groups . . . . . . . . . . . . . . . . . . . . . 447 66.3 Oracle Installation . . . . . . . . . . . . . . . . . . . . . . . . 448 67 Partitions 449

67.1 Sample Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 67.2 Suggested Partitioning . . . . . . . . . . . . . . . . . . . . . . 450 67.3 Repartitioning MS-Windows . . . . . . . . . . . . . . . . . . . 452 68 Passwords 455

68.1 Password File Sharing . . . . . . . . . . . . . . . . . . . . . . 455 68.1.1 Using rdist . . . . . . . . . . . . . . . . . . . . . . . . . 456 68.1.2 Simple tar . . . . . . . . . . . . . . . . . . . . . . . . . 456 68.1.3 Using NIS . . . . . . . . . . . . . . . . . . . . . . . . . 457 69 PPP: Networking Over Modems 459

69.1 modemlights applet . . . . . . . . . . . . . . . . . . . . . . . . 460 70 Presentations 461

70.1 Beamer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 70.2 Prosper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 70.3 OpenOce Impress . . . . . . . . . . . . . . . . . . . . . . . . 461 70.4 KPresenter 71 Printing 71.1 CUPS - Common Unix Printing System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 463 . . . . . . . . . . . . 463

71.1.1 Add Printing to New Host . . . . . . . . . . . . . . . . 463

CONTENTS

xxiii

71.1.2 Using the Web Interface . . . . . . . . . . . . . . . . . 464 71.1.3 Installing a HP PSC 2210 . . . . . . . . . . . . . . . . 465 71.1.4 Enabling a Printer . . . . . . . . . . . . . . . . . . . . 465 71.1.5 CUPS Command Line Interfaces . . . . . . . . . . . . 465 71.2 Using lprng to Print on Remote Hosts . . . . . . . . . . . . . 466 71.3 Using rlpr to Print on Remote Hosts . . . . . . . . . . . . . . 467 72 Python 469

72.1 Python Documentation . . . . . . . . . . . . . . . . . . . . . . 469 72.2 Python and R: Python Interfaces to R . . . . . . . . . . . . . 470 72.2.1 Installing RSPython . . . . . . . . . . . . . . . . . . . 470 72.2.2 Installing RPy . . . . . . . . . . . . . . . . . . . . . . . 471 73 R: Statistical Software 475

73.1 Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 74 Rsync: Remote Files 481

74.1 Rsync Server . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 75 Samba 76 Scanning 483 485

76.1 Setup HP PSC 2210 . . . . . . . . . . . . . . . . . . . . . . . 485 76.2 Scanning Setup . . . . . . . . . . . . . . . . . . . . . . . . . . 486 77 Science 487

77.1 Chemistry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 77.1.1 Periodic Tables . . . . . . . . . . . . . . . . . . . . . . 487

xxiv 78 Security

CONTENTS 489

78.1 Booting Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 78.2 Checking Security with Nessus . . . . . . . . . . . . . . . . . . 489 78.3 Check Security with Chkrootkit . . . . . . . . . . . . . . . . . 490 78.4 Identify Portscanners . . . . . . . . . . . . . . . . . . . . . . . 494 78.5 Packages to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . 494 78.6 OpenPGP and Keys . . . . . . . . . . . . . . . . . . . . . . . 496 78.7 Securing Your Network . . . . . . . . . . . . . . . . . . . . . . 499 78.8 Identifying Your System? . . . . . . . . . . . . . . . . . . . . . 501 79 Sketch 80 Sound Recording 503 505

80.1 Required Software . . . . . . . . . . . . . . . . . . . . . . . . . 505 80.2 Hardware Connections . . . . . . . . . . . . . . . . . . . . . . 506 80.3 Mixer Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 80.4 Using Gramole . . . . . . . . . . . . . . . . . . . . . . . . . . 507 80.5 Recommended Recording Process . . . . . . . . . . . . . . . . 508 80.6 Recordings Using the Gnome Sound Recorder . . . . . . . . . 509 80.7 Using Command Line Sound-Recorder . . . . . . . . . . . . . 509 80.8 Using Command Line Sox . . . . . . . . . . . . . . . . . . . . 509 81 Spell 82 SPlus: Statistical Software 83 Spruce: Email 511 513 515

CONTENTS 84 SSH: Secure Communications

xxv 517

84.1 Versions of SSH . . . . . . . . . . . . . . . . . . . . . . . . . . 517 84.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517 84.3 Remote Host Authentication . . . . . . . . . . . . . . . . . . . 518 84.4 Simple Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 84.5 Public and Private Keys . . . . . . . . . . . . . . . . . . . . . 519 84.6 SSH Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520 84.7 DSA Key Generation . . . . . . . . . . . . . . . . . . . . . . . 521 84.8 Changing Your Passphrase . . . . . . . . . . . . . . . . . . . . 521 84.9 SSH and Rsync . . . . . . . . . . . . . . . . . . . . . . . . . . 522 84.10SSH and the X Window System . . . . . . . . . . . . . . . . . 522 84.11SSH Tunnelling . . . . . . . . . . . . . . . . . . . . . . . . . . 523 84.12SSH Access Denied . . . . . . . . . . . . . . . . . . . . . . . . 524 84.13SSH Terminal in a Browser . . . . . . . . . . . . . . . . . . . . 524 84.14SSH Version 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 525 85 SUDO: Root Access 86 Swap 87 Themes 527 529 531

87.1 Enlightenment . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 88 USB 533

88.1 Mass Storage Devices . . . . . . . . . . . . . . . . . . . . . . . 534 88.1.1 HP Photosmart 320 . . . . . . . . . . . . . . . . . . . . 535 88.2 Mass Storage Devices (DVD Writer) . . . . . . . . . . . . . . 535 88.3 USB Printer: HP LaserJet 1200 . . . . . . . . . . . . . . . . . 537

xxvi

CONTENTS

88.4 USB Printer: HP PSC2210 . . . . . . . . . . . . . . . . . . . . 537 89 Video 539

89.1 Viewing Video . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 89.2 DVD Videos . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 89.2.1 Xine . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 89.2.2 Ogle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 89.2.3 DVD Sound Track . . . . . . . . . . . . . . . . . . . . 540 89.3 Video Backups . . . . . . . . . . . . . . . . . . . . . . . . . . 542 89.4 Command Line Video Tools . . . . . . . . . . . . . . . . . . . 543 89.5 DVD-AUDIO . . . . . . . . . . . . . . . . . . . . . . . . . . . 545 89.6 Video from Photos . . . . . . . . . . . . . . . . . . . . . . . . 545 89.7 nVidia Video Driver . . . . . . . . . . . . . . . . . . . . . . . 545 90 Web: Serving, Accessing, and Mirroring 549

90.1 Browsing the Web . . . . . . . . . . . . . . . . . . . . . . . . . 549 90.1.1 Epiphany . . . . . . . . . . . . . . . . . . . . . . . . . 549 90.1.2 Galeon . . . . . . . . . . . . . . . . . . . . . . . . . . . 549 90.1.3 Mozilla . . . . . . . . . . . . . . . . . . . . . . . . . . . 549 90.1.4 Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 90.2 Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 90.2.1 User Web Pages . . . . . . . . . . . . . . . . . . . . . . 552 90.2.2 Bad Behaviour on Missing / . . . . . . . . . . . . . . . 552 90.2.3 Password Protect Web Files . . . . . . . . . . . . . . . 552 90.2.4 Renew SSL Certicate . . . . . . . . . . . . . . . . . . 554 90.2.5 Compressed HTML . . . . . . . . . . . . . . . . . . . . 554 90.2.6 Web Log Summaries . . . . . . . . . . . . . . . . . . . 554

CONTENTS

xxvii

90.2.7 Server Side Includes . . . . . . . . . . . . . . . . . . . 555 90.2.8 Identifying the Web Server . . . . . . . . . . . . . . . . 556 90.3 Mirror Websites . . . . . . . . . . . . . . . . . . . . . . . . . . 556 91 Word: Processing and Printing 92 X: The Window System 557 559

92.1 Hand Crafting your XF86Cong . . . . . . . . . . . . . . . . . 560 92.2 The Basic X Window System Architecture . . . . . . . . . . . 562 92.3 Multiple X Window System Users, One Console . . . . . . . . 567 92.4 Getting Started with Gnome . . . . . . . . . . . . . . . . . . . 567 92.5 GDM Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 92.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 92.7 Wheel Mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 92.8 Window Managers . . . . . . . . . . . . . . . . . . . . . . . . 569 92.9 XFree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 93 XML 571

93.1 XSLT Processors . . . . . . . . . . . . . . . . . . . . . . . . . 571

xxviii

CONTENTS

PrefaceWelcome to the world of GNU/Linux, liberating the computing desktop from the shackles of proprietary interests. The aim of this book is to get you up to speed with GNU/Linux and to deliver a fun and productive environment. It guides you through the many dierent regions of a GNU/Linux system with a focus on getting your desktop environment to do what you want it to do. It is comprehensive with basic support for the user who installs and maintains the system themselves (whether in the home, oce, club, or school). It provides insights and stepby-step procedures that deal with specic tasks in setting your system up and maintaining it. The book covers many of the core features of a GNU/Linux system and you will gain the knowledge to enjoy and use one of the most comprehensive and useful developments in the history of computing. The details in this book are presented in the context of Debian GNU/Linux the most open of the GNU/Linux distributions and the distribution setting the standards for free software and collaborative developments. In general the details translate directly to RedHat and other standard distributions of GNU/Linux. A growing number of the applications (including StarOce, AbiWord, The Gimp, Dia and gPhoto, to name just a few) are cross-platform developments and run also under MS-Windows. The chapters that cover these applications in this book will also generally apply to those versions. The structure of this on-line version of the book is basically alphabetical. Each individual chapter aims to be a standalone reference. The book includes an overview of GNU/Linux and its history, a guide to installing GNU/Linux, introductions to the suite of GNU/Linux desktop productivity tools, and recipes for tuning specic parts of a GNU/Linux system. The book begins with an introduction to the world of GNU/Linux, Free Software, and the Open Source Software movement. Free software equals, and often surpasses, the commercial oerings for the same or equivalent functionxxix

xxx

Preface

ality. We present historical and philosophical perspectives. Chapter 4 briey reviews GNU/Linux, the various distributions, the licensing issues, and the freedom that GNU/Linux delivers. There are many ways of obtaining GNU/Linux and we only cover the most common approaches. Chapter 5 provides an overview of installing Debian with detailed examples for a number of hardware platforms. Chapter 6 is a brief introduction to some of the essential GNU/Linux utilities that you are likely to come across soon. The Debian packaging system used to manage (and take all of the hard work out of maintaining) packages is described in Chapter 4.4. Setting up the X Window System is covered in Chapter 92. By this stage you will have a system ready to take full advantage of. On a more technical level Chapter 51 shows how simple it is to compile your own kernel to suit your hardware requirements. The remaining alphabetical chapters cover the Desktop Environment and Debian GNU/Linux administration. All of the major classes of desktop tools are covered, including word processing, spreadsheets, personal information management, graphics, databases and, of course, games. Also included are chapters covering some of the tools for developers, including emacs and glade. The aim is to set you well on the road to using these tools at a level that is sucient for many users. Of course, each tool itself deserves, and often has available for it, a book or extensive manuals. The administration chapters cover very many dierent topics that let you tune your GNU/Linux system to suit your needs. Not everything here is relevant to everybody, but it brings together many recipes for many of the typical tasks that users sometimes need to know about, again without going into exhaustive detail (which is available elsewhere if you need it or are interested). So sit back and enjoy the freedom of free software and become part of the community that is making computers and the applications they run a benet to society world wide, rather than a costly privilege. Conventions Used Throughout The Book Typography Screen shots from the Galeon web browser are based on Galeon at 700x600. Whats In A Name

xxxi The phrase Microsoft Windows (and less informatively just Windows) usually refers to the whole of the popular operating systems, irrespective of which version of Microsoft Windows is being run, unless the version is important. But Microsoft Windows is just one of many windowing systems available, and indeed, Microsoft Windows came on to the screen rather later than the pioneering Apple Macintosh windowing system and the Unix windowing systems. We will simply refer to all varieties of Microsofts windowing systems (Windows 95/98/NT/2000/XP) as MS-Windows. If the particular version is important it will be referred to as MS-Windows/XP, for example. We use the phrase GNU/Linux to refer to the GNU environment and the GNU and other applications running in that environment on top of the Linux operating system kernel. Similarly, GNU/Hurd refers to the GNU environment and the GNU and other applications running in that environment on top of the GNU Hurd operating system kernel. Debian is a complete distribution which includes many applications based around a particular choice of operating system kernel (usually either GNU/Linux or GNU/Hurd). Where the particular kernel is not important we will refer to whole system as Debian. The common windowing system used in Debian is a separate, but integral, component that we will refer to as the X Window System. Screen Shots Through out the document screen shots are presented using a variety of Gnome and KDE themes. The theme species what things look like inside the windows that an application displays, and now also tend to specify what the window frame looks likethat is, the area immediately surrounding the applications window. There is an endless variety of themes to suit your own preferences. Some favourites include the E-efm-GTK+ Gnome theme and the QN-X11 and Crux Sawsh themes. Refer to the discussion of themes in Chapter 87 for details, if interested. About This Book The book is copyright by the author ([email protected]) but released under a license which allows it to be available somewhat freely. You are welcome to read it on-line and even to download and print the whole book yourself. You can also download the book (either PDF or HTML) to have a local copy of the book on your system and make it available for others to access either locally or even globally. However, you are required to retain the

xxxii

Preface

copyright attributions and you are required to give appropriate attribution for any material you use from the book. Also, by taking a copy, or even simply using the book, you should feel obliged to contribute to the book in some way, by sending corrections, comments, updates, suggestions, or even whole new chapters, to me at mailto:Graham. [email protected]. Citations Debian Weekly News pointed to this book in their 8th July 2003 edition.

Chapter 1 Quick StartIt is quite reasonable to want to skip all the details and to simply get started with GNU/Linux. In this chapter we will get you up and running with GNU/Linux real soon! The rst step is to obtain a LiveCD distribution, such as Morphix, from http://www.morphix.org. See Section 5.2.3 for details and Section 4.1 for other distributions of Debian GNU/Linux. Boot your computer from this CD and you will have a running system (but not yet installed). Then ask Morphix to install itself. You will end up with an installed Debian GNU/Linux system.

1

2

Quick Start

Chapter 2 AdvocacyWhy bother with open source software when Microsoft has the market sewn up? The cost of GNU/Linux (it is freely available to whoever wants it) is not always the primary issue! Usability, reliability, security, and developerability are often just as, and for dierent users even more, important issues. GNU/Linux oers a value proposition that money can not buy. vestment in GNU/Linux is really an investment in human beings to bring a better and coordinated solution to the organisation. A that in the long run delivers more for less, without the traditional proprietary systems. The inworking solution tie-in of

We begin with a review of major decisions by governments and organisations the world over, then review some of the key benets.

2.1

Linux Adopters

The Swiss taxation oce distribute a CDROM with the open source oce suite called Open Oce. On the CDROM is an Open Oce version of the Tax form. Tax payers ll in the form and lodge their returns electronically. In June 2003, at the Net World Order conference, held at the CeBIT trade show in New York City, and sponsored by the Business Council for the United Nations, Bruno Lanvin from the World Bank said These countries need cheap and ecient technology to make the giant leaps necessary to catch up with the rest of the world. Many 3

4

Advocacy are now using Linux, which looks to become the No. 1 operating system in China and India soon.

As of October, 2003, many local governments in Germany are taking the step toward GNU/Linux

UsabilityUsability has been a problem for GNU/Linux for a long time. It has not been comparable to the ease of use of the MS-Windows system in terms of being a common desktop environment. As we demonstrate in this book though this issue has been well addressed and the time is now right for Debian GNU/Linux on the desktop.

ReliabilityGNU/Linux is a very stable operating system and system crashes are virtually unknown. GNU/Linux, like Unix before it, is designed to be a multi-user, shared system. Simply because one user of the system runs an application that crashes, other users of the same system should not be aected. Also, most GNU/Linux applications have been in open development for many years with many developers working on and looking over the code. Bugs of course are not unknown, but they are usually quickly xed within GNU/Linux, leading to a very reliable system.

SecurityThe issue of security is crucial and will continue to grow as an important concern for users. An article in the 27 August 2001 issue of Interactive Week by Rob Fixmer recalls a 1998 interview with then Symantec CEO Gordon Eubanks: Everybody can see whats under the hood, so were on equal footing with hackers. With proprietary systems intruders often

2.1 Linux Adopters have illegal means of learning things about the underlying code that are superior to the legal information at our disposaleven though we get excellent cooperation and support from Microsoft.

5

Gartner Groups John Pescatore on 19 September 2001 had the following to say in an advisory from the Gartner web site1 (emphasis is mine): Gartner recommends that enterprises hit by both Code Red and Nimda immediately investigate alternatives to IIS, including moving Web applications to Web server software from other vendors, such as iPlanet and Apache. Although these Web servers have required some security patches, they have much better security records than IIS and are not under active attack by the vast number of virus and worm writers. Gartner remains concerned that viruses and worms will continue to attack IIS until Microsoft has released a completely rewritten, thoroughly and publicly tested, new release of IIS. Sucient operational testing should follow to ensure that the initial wave of security vulnerabilities every software product experiences has been uncovered and xed. This move should include any Microsoft .NET Web services, which requires the use of IIS. Gartner believes that this rewriting will not occur before year-end 2002 (0.8 probability) Any one can scan the GNU/Linux code for vulnerabilities (and for ineciencies and bugs) and as they are discovered the solutions quickly become available for all to access. Of course, the unscrupulous can also scan the code for opportunities to attack a system, unlike proprietary code where only a few have access to the source code. But would you prefer security by obscurity or security by peer review? It is a choice!

DeveloperabilityMS-Windows provides many good environments for the development of software. However, GNU/Linux, and Unix before it, has a long tradition of providing powerful environments for software development. Sophisticated graphical interactive development environments (IDEs) were developed onActual document obtained from http://www3.gartner.com/DisplayDocument?doc_ cd=1010341

6

Advocacy

Unix but took of on the Apple Macintosh and particularly on MS-Windows. However, the focus is beginning to again turn to GNU/Linux as the most exible open source, free software, and commercial development environment.

Chapter 3 History: Unix, GNU, GnomeA brief review of the history of Unix will place in context much of the terminology and philosophy of this operating system. Terms like Linux, GNU, Unix, Gnome, Free Software, and Open Source Software get bandied around, often with little understanding and usually with much misunderstanding. A fundamental misunderstanding is the relationship between Linux and operating systems. Linux is the low level code that interacts with and controls the hardware of the computer (whether it is an Intel 486, Pentium, Sun Sparc, or a Merced). This is the kernel of the operating system, providing routines to help applications talk to each other, allowing many applications to share the CPU at the same time, and managing the use of memory, allowing many dierent applications to run at the same time without interfering with other applications. Linus Torvalds wrote the rst Linux kernel in 1991 and it continues to be actively developed today by Linus and a core team of international developers. While the kernel is crucial, it is the larger suite of software that sits on top of the kernel that provides the functional operating system. Most of the software applications at this level come from the GNU Project. These tools include the command line utilities like ls, cp, nd, bash, and the compilers like gcc. This collection of applications is usually considered to be the actual operating system and hence we refer to the operating system as GNU/Linux in recognition of the GNU software coupled with the Linux kernel. GNU/HURD is an alternative operating system using the GNU software with the HURD kernel being developed by the GNU Project. Sitting on top of this command-line level of the operating system is what we 7

8

History: Unix, GNU, Gnome

might refer to as the end user level of the operating system. This is typically a graphical user interface (GUI) aiming to provide an intuitive, easy to use system for both the general, non-technical user and the power user. Such an interface is typically an application that sits on top of and makes considerable use of the operating system. For GNU/Linux this is the X Window System. The Window System provides a platform for GUI-based applications. Other applications sit on top of the Window System to provide integrated platforms with a common look and feel. Gnome, another GNU project, is one such popular platform. All Gnome applications have a similar look and share many components and can communicate with each other. KDE is a popular alternative to Gnome and while it is not one I use, I will try to include information about it whenever I can. In this chapter we briey review the history of Unix, GNU Software, the GNU/Linux Operating System, Gnome, and Free and Open Source Software and Documentation.

3.1

Unix

GNU/Linux is fashioned on Unix. Unix dates from 1969 when Ken Thompson at Bell Telephone Laboratories initiated work on this new operating system. Others involved in the project included Dennis Ritchie and Brian Kernighan. The name Unix is a pun on an alternative operating system of the time called MULTICS (MULTiplexed Information and Computing Service). MULTICS was developed by The Massachusetts Institute of Technology, General Electric and Bell Labs. Unix was originally spelt UNICS, an acronym for UNiplexed Information and Computing Service! Some of the basic ideas introduced by Multics and then Unix were the tree structured le system, a program for command interpretation (called the shell), the structure and nature of text les and the semantics of I/O operations. Some of the philosophy that rose with the development of Unix included the desire to write programs that performed one task and to do it well, to write programs that worked together to perform larger tasks, and to write programs that communicated with each other using text from one program to the other. The advantages of Unix were quickly identied by many and quite a few varieties of Unix emerged over time. Sun Microsystems have pioneered many of

3.1 Unix

9

the developments in Unix, followed by such greats as the old Digital Equipment Corporation (DEC, which was swallowed by Compaq, which was swallowed by Hewlett-Packard), Silicon Graphics Incorporated (SGI), International Business Machines (IBM), and Hewlett-Packard (HP). A variety of avours have existed, including SunOS, Solaris, Ultrix, Irix, BSD, System V, HPUX, and so on. Although computer programs written for one version of Unix could sometimes be ported to other versions, it was not always an easy task. The diversity of Unix implementations (more so than the proprietary nature of most of them) made it dicult for Unix to become a commodity operating system. The GNU project worked hard to free software development from nuances of each of the dierent Unix versions through providing a common programming language environment (GNU C) and a sophisticated packaging tool (autoconf and automake) to carefully hide the dierences. GNU/Linux has now become the most popular Unix variant and all the major Unix players support GNU/Linux in some way. A particularly touted feature of Unix comes from a tools philosophy where complex tasks are performed by bringing together a collection of simpler tools. This is contrasted with the philosophy of providing monolithic applications that in one fell swoop solve all your problems, supposedly. The reality is often dierent. Most operating systems supply a collection of basic utility programs for managing your les (things like arranging your les into folders, trashing les, and copying les from one place to another). Large applications then provide the word processing, spreadsheet, and web browsing functionality. Unix places less emphasis on the monolithic applications. Instead, tools provide simple functionality, focusing on doing well what they are designed to do. They simply pass their results on to another tool once theyre done. Unix pipes provide the mechanism for doing this: one tool pipes its output on to another tool. This allows complex actions to be performed by piping together a collection of simpler commands. A typical example is to determine the number of users logged on to your system:

> who | wc -l

The who command will list, one per line, each user logged on. The wc command will count the number of characters, words, and lines that it comes

10

History: Unix, GNU, Gnome

across, with the -l option only counting the number of lines. (GNU tools, like Unix, introduce options with the minus sign.) For various reasons though this tools philosophy was often overlooked when large monolithic applications arose that did not adhere to the philosophy they did not share components. Common tools such as Netscape, ghostview, Acrobat, FrameMaker, and Star Oce essentially share very little. Compare that with the Microsoft community where, for example, an application like Internet Explorer is component-based. This is now changing in the GNU world with the operating system software and the Gnome project encouraging component-based architectures. Another feature of Unix is that Unix applications tend to use open le formats allowing a variety of tools to collaborate to work on those open formats. Indeed, this has been a key in recent developments to remove the stranglehold of Microsoft proprietary formats. Rather than electronic document storage providing a longer term solution to the archival of documents, it is delivering an even shorter lifetime than paper-based archives! How can that be so? The formats created by proprietary software are often binary and not fully publicly specied. How many packages today can read old Word Perfect and Microsoft Word documents? The standardisation on open formats, often text-based formats like XML that allow anyone to read them, provides a solution to this problem. So why Unix? It is a conceptually simple operating system facilitating creativity by not restricting the developer. Many have found it to be a fun operating system to work with allowing many innovative developments to be combined in new and even more innovative ways to deliver powerful ideas. A very large world wide group of people willingly provide excellent, free support over the Internet. Anyone can learn more about the operating system by studying the code itself. Anyone can contribute to porting the operating system to their favourite computer. And nally, the much touted stability. There is very little doubt that GNU and Linux are extremely stable. The habit of rebooting your computer every time you come back to it is something Microsoft seems to encourage because of its notorious instability and tendency for the operating system not to carefully manage its use of memory. Also, install a new package under MS-Windows and chances are you need to reboot the computer. Most Unix users rarely need to reboot their machine. Check the uptime and you will generally nd the machine has not been rebooted for months or years. Installing packages invariably does not require rebooting. Indeed, the only

3.2 GNU time it does is when you upgrade your Linux kernel!

11

3.2

GNU

The GNU Project1 was begun in 1984 by Richard Stallman of MIT with the aim to develop a complete free (meaning free for everyone to look at, to learn from, and to build upon) software operating system. In 1989 he codied the terms under which this free software was released, producing the GNU Public License (GPL) which is the basis on which much of the GNU/Linux operating system is released. The license is often referred to as the copyleft license in contrast to the restrictive practise of copyright. By 1991 when Linus Torvalds wrote his Linux kernel GNU provided the operating system. By combining the GNU operating system with the Linux kernel the seeds for this most popular free operating system were sown. Many users installed the GNU tools on many dierent computers as replacements for vendor supplied tools. This provided these users with a consistency across the many dierent platforms they used. The tools even eventually appeared under MS-Windows, providing a Unix-like environment on a very dierent operating system.2 The tools developed by the GNU project include such essential utilities as the GNU le management utilities and the GNU text le processing utilities. The GNU le management utilities include fundamental command line tools like ls (to list information about les/documents), mkdir (to create new directories/folders), mv (to move directories and les around), rm (to remove les), and many more. The GNU text le processing commands include cat (to concatenate les together), head (to preview the top few lines of a le), sort (to sort the contents of a le), and wc (to count the number of lines, words, and bytes in a le). The toolkits developed by the GNU project are comprehensive. The following table lists just some of the 200 or more packages that you can obtain freely from http://www.gnu.org/software/software.html: Package aspell1 2

Description An interactive spell checker that suggests near misses to replace unrecognised words.

GNU stands for the recursive GNU is Not Unix. http://www.cygwin.com

12 Package awk bash

History: Unix, GNU, Gnome Description A powerful yet simple pattern-based scripting language. The Bourne Again SHell is compatible with the traditional Unix sh and oers many extensions found in csh and ksh. It is similar in concept to DOS. Consists of programs used to assemble, link, and manipulate binary and object les. It is used in conjunction with a compiler and various libraries to build programs for Linux. A state-of-the-art chess-playing program. The Concurrent Versioning System used for version control and management of software projects. An extensible, customisable real-time display editor and computing environment. This editor is widely used by developers and is more than just an editor. Emacs is capable of reading email, of providing integrated development environments, and spreadsheets, to name just a few. An ASCII le formatter generating PostScript for printing of text documents on PostScript printers. File management utilities. The nd utility is frequently used both interactively and in shell scripts to nd les which match certain criteria and perform arbitrary operations on them. A free compiler collection for C, C++, Objective C and other languages. This compiler is used widely, on multiple platforms, including MS-Windows. A source-level debugger for C, C++ and Fortran. An interpreter for the Postscript and PDF graphics languages. A sophisticated graphical image manipulation application. The GNU desktop which provides a consistent graphical user interface for common applications including everything from spreadsheets to mail clients, and more. A spreadsheet. A graphical application for retrieving, organising, and publishing images in various graphics formats, from a range of supported digital cameras. A complete implementation of the OpenPGP Internet standard for providing pretty good protection through encryption. A GUI toolkit for the X Window System. All Gnome packages use this toolkit for their consistent look and feel. GNUs program for compressing and decompressing les.

binutils

chess cvs emacs

enscript leutils ndutils

gcc

gdb ghostscript gimp gnome

gnumeric gphoto

gnupg gtk+ gzip

3.3 Linux Package kde

13 Description An alternative, and very popular desktop which provides a consistent graphical user interface for common applications including everything from spreadsheets to mail clients, and more. A display paginator similar to more and pg, but with various features (such as the ability to scroll backwards) that most pagers lack. Programs to allow Unix systems to read, write, and manipulate les on a DOS le system (typically a diskette). A system for statistical computation and graphics. Useful command line utilities including basename, date, dirname, echo, groups, hostname, printf, pwd, uname, uptime, users, who, and whoami. An archive utility. A set of utilities for manipulating text. A utility to report on the time taken to execute other programs. A non-interactive web browser to retrieve les from the Internet using HTTP and FTP. See Chapter 90.3 for details.

less

mtools r shellutils

tar textutils time wget

Many of these GNU tools are command line tools but a growing number of them are now also GUI-based, including Gnome, KDE, The Gimp, and Gnumeric.

3.3

Linux

Unix was popular because, originally, the source code was practically free. For various reasons the Unix license began to forbid the Universities from using the source code in their teaching. This lead Andy Tannenbaum to write MINIX which then inspired Linus Torvalds to write the Linux kernel for his Intel 386. Unix has a long heritage and the new GNU/Linux has the luxury of learning from the success and failings of both Unix and MS-Windows. Of particular importance is the component-based architecture that facilitates the sharing of components among many applications. These are the focus of much modern development for GNU/Linux. Gnome, for example, uses Bonobo (built on

14

History: Unix, GNU, Gnome

top of the international CORBA standard) for its component architecture to support sharing. CORBA is an object model dened by the Object Management Group. Its use by Bonobo is based on ORBit, a thin and fast implementation of the CORBA specication. Bonobo is then the Gnome architecture for creating reusable software components and compound documents. It was designed and implemented to support the needs of the free software community to facilitate component reuse and to allow new applications to build on the shoulders of those that went before them. Dont be too concerned about the technicalities. You will see reference to these terms so it is wise to be aware of them. The details are not so important to the end user.

3.4

Gnome

Unix lead to the development of the GNU Project which needed a kernel that was supplied by Linux to produce the GNU/Linux Operating System. GNU/Linux and Unix are generally criticised for being hard to use for the common userall those command line tools and all that ddling with congurations placed them back in the MS-DOS days. The demand is for modern intuitive interfaces similar to those pioneered by the Macintosh back in 1984. Unix has had graphical user interfaces for a long time. The problem was that Unix was provided by multiple vendors and those vendors had diculty agreeing on a common way of doing things in the graphical user interface. There were systems like NeWS, OpenWindows, Display PostScript, and the X Window System. There was also a multitude of windowing systems available for the X Window System, including CDE, Motif, OpenLook, etc. They oered tremendous exibility which lead to great diversity! And great confusion. Developers could chose dierent toolkits and get very dierent behaviours. Dierent ways of interacting with applications lead to much confusion and certainly no consistency: dierent ways of moving to the next text eld; dierent defaults for keyboard shortcuts; dierent mechanisms for cut and paste between applications; etc. Apple, with the Macintosh, had a lot of control on how things should be done and developed guidelines for developers to do things the right way. Later, Microsoft with MS-Windows/95 and beyond also dictated standards for others to follow. This meant that once the user had learnt the nuances of the interface they were set for life.

3.5 Free and Open Source Software

15

The Gnome Project pioneered by Miguel de Icaza in 1997 and progressed by the free software company he founded with Nat Friedman in early 2000, originally called HelixCode and then Ximian, has set the standards. The traditional Unix players, including Sun Microsystems, IBM, Hewlett-Package, and Compaq joined the Gnome Foundation in August 2000 to help that standard become, well, standard. Gnome is not the only standard. KDE, begun by Matthias Ettrich in 1996, is a very respectable and popular alternative. KDE suered in the early days of its development by being dependent on a toolkit, Qt, that did not meet the licensing criteria for Free Software. This one unfortunate blemish lead to the development of the Gnome project. The fact that there are two standard desktops is not a particular concern, despite the above discussion. The friendly (but at times heated) competition drives the enthusiasts in both camp. What we have to be careful about is that we learn from the past and not allow this competition to destroy the common goals. Perhaps one will live on, or perhaps both will live on. Either way, both are excellent products developing easier to use GNU/Linux systems, and leaving the choice to the user.

3.5

Free and Open Source Software

There is much confusion over the terms free software and open source. They are not the same thing. Open source software is not necessarily free software. Indeed, some open source software places considerable restrictions on what you can do with the source code, thus rendering it non-free. GNU software is open source software that is also free in the sense of freedom. This software allows everyone to redistribute and modify the software, without restriction. We contrast open and free software with proprietary software that we have become familiar withthe software that we buy on trust from a vendor, trust that it will work, but for which the vendor disowns any responsibility. When you nd it has bugs and is not t for purpose you must buy the next version to get something that works for you. Proprietary applications for word processing, spreadsheets, presentations, Web browsing and so on abound. In general they work pretty well today, providing sophisticated functionality. However, probably because of their proprietary nature, they generally do not work well together, particularly products from dierent vendors. There is little motivation for vendors to

16

History: Unix, GNU, Gnome

make it easy for you to move away from their product to a competitors product. What makes this situation rather sad is that each of these proprietary applications have a lot of functionality in common. Today we have a pretty good understanding of the common features we require in a product: open and save les, cut and paste, spell checking, etc. They all provide this, often over and over again. There will always be opportunity to innovate and do things in dierent and possibly better ways, but why are we wasting resources on the most basic of operations instead of innovating with new functionality? This has been addressed on the major modern platforms by sharing toolkits. But sharing of more substantial functionality has been slower to develop. Another aspect is that open source software makes development cheaper because more people are involved, the work load is shared, people with very dierent skill levels can collaborate and help increase the overall skill level of the whole community, bugs are caught quicker because there are more people looking over the source and bugs are xed quicker because of this. Free software demands that the user be granted four kinds of freedom: freedom to run the program, for any purpose; freedom to study how the program works, and adapt it to your own needs; freedom to redistribute copies so you can help your neighbour; and freedom to improve the program, and release your improvements to the public, so that the whole community benets. A pre-condition for this is the availability of the entire source code, so that along with the freedom comes the responsibility to share your discoveries with others. Free software open source projects still need to be structured. Usually they are conducted under the watchful eye of a project leader, commonly referred to as the maintainer. Anyone can contribute to the project and decisions are often discussed openly and decided by consensus after discussion of the technical merits. Sometimes the project leader will need to cast the deciding vote. Finally, in addition to founding the GNU Project Richard Stallman founded the Free Software Foundation to pioneer the cause of free softwarefree software that gives individuals the opportunity to share their innovations and through this to allow others to learn and to contribute their discoveries.

3.6 Free Documentation

17

3.6

Free Documentation

In March 2000 Richard Stallman (with Eben Moglen, a professor at Columbia Law School) introduced the GNU Free Documentation License (GFDL). Stallman identies the GFDL as a means to enlist commercial publishers to fund free document writing without surrendering any vital liberty. The GFDL identies the conditions relating to the copying and revision of documents. Documents are more complicated than simply placing source code on the Internet. The GFDL is consequently more complex, covering the mass copying of the document, inclusion in collections, and specic issues relating to the covers. Two important concepts relating to the availability of the document are introduced: transparent copies of the document and opaque copies of the document. A GFDL document must be transparentthat is, available in a format whose specication is available to the general public and which can A be read using free software. Formats such as L TEX (used for this book) and XML (using publicly available DTDs) are ne. But making your document available only in PostScript or PDF or Microsoft Word is not transparent. These are opaque documents that might suer the same old problems of document rotafter a few years the documents may no longer be accessible because the proprietor of the proprietary format might have gone out of business and the knowledge of the format has been lost.

3.7

Freedom

The free software world aims to share their knowledge and software in order for all to gain towards a common goal. The proprietary software world aims to hoard their software, to hide their discoveries, to let others go through the discovery process themselves rather than to innovate from the shoulders of those who went before them. Stallman characterises the view of the proprietary vendors as: If you share with your neighbour, you are a pirate. If you want any changes, beg us to make them.. If I enjoyed a piece of music or a novel, should I be inhibited from lending the CD or the book to my neighbour? Eric Raymond, in his Musings on Linux and Open Source in the book The Cathedral and the Bazaar makes compelling arguments for Free and

18

History: Unix, GNU, Gnome

Open Source Software development. Some of his points, paraphrased, are: The quality of the software is maintained by a simple strategy of releasing the software to the general public every week and receiving feedback from hundreds of users within days: release early and release often. Users can be cultivated into becoming developers if your software is serving a need of theirs. They will add functionality to suit their particular goals, and this functionality is likely to be useful to others.

3.83.8.1

General ResourcesBooks

A Quarter Century of Unix by Peter H. Salus. 256 pages published by Addison Wesley, 1994, ISBN 0-201-54777-5. This is a good review of the history of Unix with many interesting insights. Well worth a read if you are interested in where Unix came from and you can nd a copy of the book. The Cathedral and the Bazaar: Musings on Linux and Open Source by an Accidental Revolutionary by Eric S. Raymond. 288 pages, published October 1999 by OReilly & Associates, ISBN 1565927249. Discusses the free software business model. The author is an identity in the Open Source movement and here captures a model of Open Source and Free Software development. Linux in A Nutshell: A Desktop Quick Reference, Second Edition by Ellen Siever. 632 pages, published February 1999 by OReilly & Associates, ISBN 1565925858. An excellent reference to many standard GNU and Unix tools. An intermediate resource between this current book which aims to get you started with the tools and fully edged manuals. The Linux Sampler: A Linux Resource Guide by Belinda Frazier and Laurie Tucker. 240 pages, published November 1994 by Specialized Systems Consultants, ISBN 0916151743. Presents an overview of Linux from the point of view of where, how, and why it is being used, with a little technical help thrown in. Linux Rute Users Tutorial and Exposition by Paul Sheer. 500 pages, published January 2002 by Prentice Hall, ISBN 0130333514. Presents an

3.8 General Resources

19

excellent guide to many aspects of the Linux operating system. Also available from http://www.icon.co.za/~psheer/book/.

20

History: Unix, GNU, Gnome

3.8.2

Internet

For the GNU perspective on many of the issues mentioned here refer to http: //www.gnu.org/philosophy/free-software-for-freedom.html. This article, titled Why Free Software is better than Open Source is written by Richard Stallman and is an essential read on the topic. It explains why the use of the term Open Source is not strong enough in the context of Free Software. Freshmeat (http://freshmeat.net/) is an index of a large collection of GNU/Linux packages with up-to-date information on their status and links to their home pages and related locations. The index can be searched or browsed. Most of the GNU/Linux tools are included. Gnome (http://gnome.org/) is the framework and associated toolkit used by many of the graphical applications introduced in this book. The Gnome web site includes a list of many of the major Gnome applications. Linux Today (http://linuxtoday.org/) is a news service providing updates on developments related to GNU/Linux. It has a good selection of articles usually updated several times a day, and does not overwhelm the reader with news. Summaries are presented with links to slightly more detailed summaries, with links to the complete articles, wherever they appear on the Internet. Slashdot (http://slashdot.org/) is another news service with a Linux bent.

Chapter 4 DistributionsWhen you purchase a computer the chances are that it comes with MSWindows pre-installed. The version of MS-Windows has been tuned and set up by the manufacturer or retailer to run well on the particular conguration you have purchased. Drivers for the particular devices, such as audio, video, and CD-ROM, will have been included in the installation. The computer is ready to turn on and get started in MS-Windows. It will just work (usually)! To run GNU/Linux instead of MS-Windows (or in addition to MS-Windows) you need to install the system yourself. This entails obtaining a distribution of GNU/Linux, installing it, and conguring the device drivers to suit your particular setup. So some extra eort is usually required to get GNU/Linux up and running. The GNU/Linux Operating System is built upon the foundation that is the Linux kernel. To install GNU/Linux on your PC you could start with installing the Linux kernel and then compiling and installing the GNU tools and other essential software that you need. But this approach is not for the light hearted. Luckily this is not the usual manner of installing a GNU/Linux system! Many people have put a lot of eort into packaging things together into distributions so that installing GNU/Linux is a more straightforward exercise. GNU/Linux distributions typically provide the whole system as a collection of packages from which you choose those that you want install. Some packages are mandatory, and form the base installation. Other packages are then installed as you need them. Until pre-installed GNU/Linux systems become more common chances are 21

22

Distributions

you will need to install a distribution yourself. The process is not trivial but it is straightforward. In Chapter 5 we will highlight the steps with just enough detail to get you through the installation process. In this chapter we review the options available in selecting a distribution of GNU/Linux to install.

4.1

Debian GNU/Linux Distributions

The reference distribution for this book, and my preferred distribution, is Debian GNU/Linux, the Linux for the GNU Generation. I originally started with Slackware in the early 90s but migrated through Red Hat and then quickly on to Debian in 1995. Red Hat is a good distribution and is quite popular but has limitations. Debian conforms to the open and distributed development model making it a very open distribution where even you can make a change to it if you so desired. Debian is the basis of a number of commercial distributions and it also powers quite a few web sites including Linux.com. Distributions involving Debian GNU/Linux are listed at http://www.debian. org/misc/children-distros and include: Demo Linux This is a CD based GNU/Linux that allows one to run GNU/Linux without installation or disk partitioning. See http://www.demolinux. org/. Gibraltar The Gibraltar project produces a Debian-based rewall/router that runs entirely o of a bootable CD-ROM. See http://gibraltar. vianova.at/. Knoppix The Knoppix distribution, based on Debian, allows one to run Debian without installing it! Just boot from the CD-ROM and Debian will run from there. If you decide to then install Debian, you can do so from the Knoppix CD-ROM. Knoppix works on most but not all hardware, trying its best to automatically identify hardware and set things up appropriately. See http://www.knopper.net/knoppix/ index-en.html. Libranet Linux by Libranet packages commonly used applications onto an easy to install CD and includes, for example, Gnome. See http://www. libranet.com.

4.2 Advantages of the Debian Distribution

23

Linex A Debian-based distribution being developed by the regional government of Extremadura (Spain) with the goal of migrating all the computer systems, from government oces, to businesses to schools into Linux. Morphix Morphix is a modular LiveCD derived from Knoppix, with install images for Games, Gnome, KDE, and LightGUI. It is available from http://www.morphix.org. Stormix Storm Linux is built around Debian GNU/Linux, the most stable and secure distribution available. See http://www.stormix.com/. ThinkNIC This is a $200 new Internet computer (NIC) which runs from a CD-ROM using Debian GNU/Linux. See http://www.thinknic.com. TuxTops This distributor of laptops pre-installs Debian GNU/Linux on their laptops. See http://www.tuxtops.com/. Related distributions include Amirix (http://www.amirixlinux.com/), Embedded Debian (http://www.emdebian.org/), TimeSys for real time GNU/Linux (http://timesys.com/products/linux.html) and the VA Linux Systems, OReilly and SGI collaboration (http://www.oreilly.com/catalog/debian/ index.html).

4.2

Advantages of the Debian Distribution

Debian (http://www.debian.org) is an excellent distribution of GNU/Linux. (A popular commercial alternative to Debian is Red Hat.) The releases of Debian are rock solid stable and come highly recommended. The Debian packaging system is well developed and acknowledge as an excellent piece of work. You can purchase the CD-ROM distributions of Debian inexpensively (see http://www.debian.org/distrib/vendors for a list of vendors) or burn your own CD-ROMs from images available on the net. This latter option is explored in this chapter. Here are some specic advantages and benets that distinguish Debian from other distributions: As a non-prot organisation Debian is more of a partner than a competitor with other distributions. Anyone can sign up as a Debian developer and be granted the same privileges as anyone else. There are

24

Distributions currently over 870 active Debian developers. New work developed for Debian is available for all of the other Linux distributions to copy as soon as its uploaded to the Debian servers. The Debian Free Software Guidelines are a critical component from a business standpoint. They specify the requirements for licenses of any package that is to be included with Debian. Debian conforms to the ocial GNU version of free software which means that every package included in Debian can be redistributed freely. Debian is driven by policy. The formal and publicly available Debian policies have been developed over many years and are a mature response to dealing with the large task of maintaining such a distribution in a distributed manner. Various Debian tools (such as dpkg, apt-get, and lintian) eectively implement the policy and provide a guarantee of quality in the packaging. Debian is an excellent choice for the development of software for all distributions of GNU/Linux. Because Debians processes, in terms of policies and packaging, are fair and visible and open standards conforming, Debian is a very clean and very carefully constructed distribution. Developments that occur on a Debian platform can thus easily be delivered or transferred to other GNU/Linux (and Unix) platforms. It is dicult to upgrade a system from one RedHat release to another. Debian provides simple migration paths that are well trodden. No more re-installing the operating system just to upgrade to the new release. Debians tools have the ability to do recursive upgrades of systems. Debian deals with dependencies and will identify the required packages and install them and then install the package you want. Debian packages can Suggest other packages to be installed, and it is left to the user whether to follow the suggestions or not. Multiple packages can Provide the same functionality (e.g., email, web server, editor). A package might thus specify that it depends on a web server, but not which particular web server (assuming it works with any web server). Debian has a utility to install RedHat packages if you are desperate!

4.3 Debian Distributions

25

Debian does not overwrite your cong les nor does the packaging system touch /usr/local except perhaps to ensure appropriate directories exist for local (non-Debian) installed data and utilities. RedHat uses a binary database for its package data while Debian (dpkg) uses text les. Debian is more robust (if a single le gets corrupted its less of a problem) and it is possible to x or modify things by hand using a normal text editor if needed. (Debians apt-get uses a mixed approach: it uses the same text les as dpkg but uses a binary cache to also get the advantages of a binary database. RedHat packages rarely x upstream (i.e., original source of packages) le locations to be standards compliant but instead just place les whereever the upstream package happens to put them. Many upstream developers do not know about or conform to the standards. A minor example, the openssh rpms create /usr/libexec for the sftpd daemons, but libexec is a BSD standard and the Linux standard1 says such things should go in /usr/lib/program or /usr/sbin. Generally speaking, Debian packages must be created by qualied developers (and there are thousands of them) who are committed to following Debians strict policies requiring such things as FHS compliance and never overwriting cong les without permission. Only packages from these developers become part of the Debian archives. Debian runs on more hardware platforms than any other distribution. The Debian packaging philosophy is to keep packages in small chunks so that the user can choose what to install with a little more control. See also http://www