webpointmorpheus total solution web design

webpointmorpheus Linux Info
System Initialization
and the X Environment

©2005 - material compiled by Bob Carnaghi, www.webpointmorpheus.com

Introduction     Top of Page
This is the introduction...
System Initializtion     Top of Page
When the computer boots, the process outlined below takes place. Please note that many of the processes as listed are covered in other documents of this series. The objective of this document is the init daemon, and its role in bringing the Linux operating system into action.
  1. The computer first boots, and performs an initial hardware check called the POST routine.
  2. When the POST routine finishes, the computer looks at the defined boot device, be it the floppy, CD-ROM, hard drive, or USB device.
  3. From the outlined boot device, the computer looks for a boot loader. The two most popular Linux boot loaders are LILO and GRUB.
  4. The boot loader tells the computer where to find the essential operating system files. In the case of a hard drive, the boot loader tells the computer which partition is active, or where the preferred operating system is located.
  5. The boot loader is capable of offering a choice of operating systems if the computer is configured to dual boot.
  6. In the case that the Linux operating system is chosen, the Linux kernel is loaded into memory.
  7. Next the init daemon is run, which has a PID (Process ID) of 1. This daemon is responsible for loading all start-up scripts and the subsequent daemons.
The init Daemon     Top of Page
The Linux system always boots to a specific runlevel, as outlined. Each runlevel has certain daemons that run, and parameters that are inherent to that runlevel, such as networking, multi-user capability, etc. To see what is the current runlevel, use the runlevel command. To change runlevels, use the telinit command, which is a shortcut to the init command. The daemons that are to be run for each runlevel are located (or the appropriate shortcuts) in the /etc/rc.d/rcn.d/ directory, where n is the runlevel. Specific configuration information for the init process is contained in the inittab file, outlined below.
The inittab File     Top of Page
The /etc/inittab file is the mapped outline for bringing the Linux system to and from each runlevel. The file is well commented, and is best read to gain some understanding of the init process. The inittab file references the scripts in the /etc/rc.d/rcn.d directories, which contain lists of scripts (per symbolic links) that are to be run for initialization and shutdown at each runlevel. In each of these lists of files, the daemons are listed and prefixed with a 'K' or an 'S', which tells the system 'Start' or 'Kill' that process when switching to that runlevel. These symbolic links point to the executable files that are located in /etc/rc.d/init.d directory. Further, the directory /etc/init.d is symbolically linked to the /etc/rc.d/init.d directory. Specific daemons can be started, stopped, and restarted from the /etc/init.d directory, and most have a start, stop, and restart option. Once all the scripts in the appropriate runlevel directory have been run for system initialization, the /etc/rc.d/rc.local file is executed to perform tasks that must occur after system startup.
To add a specific daemon to be started at system boot for any runlevel, copy the daemon link to the /etc/rc.d/init.d directory, and add the appropriate links at /etc/init.d and /etc/rc.d/rcn.d It is also possible to us the GUI provided in Fedora or Red Hat, or issue the ntsysv command to modify the appropriate entries.
What is the X Window System?     Top of Page
The X Window System (also known as X or X11) is an application suite that is designed to provide GUI interaction on UNIX and UNIX type operating systems.
A Brief History of the X Window System     Top of Page
The X Window System was originally designed at MIT (Masachusetts Institute of Technology) and DEC (Digital Equipment Corporation) and was known as Project Athena. The project went through various evolutions, and was released as 'X11'. There was a period of time when the X11 project was not released as Open Source, and a parallel project known as XFree86 was inititated. X does not specify a user interface, so desktops and window managers have different appearances. X was developed to serve a large community with disparate hardware types, therefore different versions of X client and server interoperate quite well. See www.x.org for more info.
From the outset, the X system was designed and engineered to run independent of the video hardware, which means that the system is extremely modular. Indeed, it is possible to run the X Clients on a different system from the X Windows by setting the BASH DISPLAY environment variable. The typical hierarchy of X components are outlined below:
  1. X Clients (Graphical Programs)
  2. Desktop Environment
  3. Window Manager
  4. X Windows (X Server)
  5. Video Hardware
X System Terms     Top of Page
  1. Screen - The desktop as displayed in its entirety.
  2. Root Window - The screen background
  3. Window Manager - The interface that sits between the X Window System and the user that the user interfaces with. The Window Manager modifies the look and feel of X Windows. Simply put, the Window Manager manages the windows that the user interfaces with.
  4. Desktop Environment - A set of tools that come in addition to the Window Manager. The tools included in the Desktop Environment typically include a web browser, file manager, graphic program, etc. Simply put, the Desktop Environment makes it possible to have a desktop, and all that goes with it.
  5. Pointer - The system cursor as displayed on the screen and controlled by the mouse
  6. Window - A frame that is displayed by an application
  7. Terminal Emulator - A window that provides a visual representation, or 'pseudo-terminal.'
  8. X Client is the software that makes requests for services from the X Server. One of the advantages of the structure of the X Windows System of distributed processing is that the X Server and the X Client can be on distinctly different machines. The client layer is device-independent, and the server layer is device-dependent.
  9. X Protocol - a standard that determines how the various portions of X talk to each other.
  10. X Server - the software that operates at the base level of the X System to interact with and provide direct hardware support for the system.
Several common Window Managers are listed below.
  • enlightenment - common in GNOME
  • fvwm - feeble virtual window manager, consumes little system resources.
  • kwin - common in KDE
  • metacity - used in Fedora Core 2.
  • mwm - motif window manager
  • sawfish - a GNOME window manager
  • twm - tab window manager - a long standing basic window manager.
  • wmaker - window maker window manager, similar to Apple environment
There are two desktop systems that are in wide use today: GNOME and KDE.
  • GNOME (GNU Network Object Model Environment) - part of the GNU project. GNOME uses the Metacity Window Manager and the GTK+ toolkit for the C programming language. The GTK+ toolkit was originally developed for the GNU Image Manipulation Program (GIMP). Visit www.gnome.org for more info.
  • KDE (K Desktop Environment) - The traditional desktop in Linux, uses the K Window Manager (kwin), and the Qt toolkit for the C++ programming language. Visit www.kde.org for more info.
Configuration of the X Windows System     Top of Page
Know the hardware specifics before attempting configuration (look for specifics in dmesg, /proc, the /dev/xxx, etc.). Document all hardware , installation, and configuration. Document the general X configuration and setup: what is the XF86 version? what XF86 setup program is being used? Back up all configuration files before making changes.
Mouse: what is the mouse type? ...manufacturer? ...# of buttons? CordMiddle? ... The exact location of the mouse is important: /dev/mouse, /dev/ttys0, /dev/psaux, /dev/tsmo, etc.) can probe for the mouse? There are two mouse configuration utilities: mouseconfig, and system-config-mouse.
Monitor: Who is the monitor manufacturer? What is the monitor make and model? What is the monitor resolution? What is the horizontal sync rate? What is the vertical refresh rate? What are the color depth capabilities of the monitor?
Video Card: Who is the manufacturer? What is the make and model of the video card? What is the chipset? What is the general type? What is the RAMDAC? what is the available memory? what is the video card ClockChip? Try the system-config-display utility.
Keyboard: system-config-keyboard
Tools and files:     Top of Page
  • X - a symbolic link to the X Server that is used on the system (/usr/X11R6/bin).
  • xinit - program that starts the X Window System.
  • .xinitrc - file that contains configuration info; in the absence of this file, this default config is used: xterm -geometry +1+1 -n login -display :0.
  • Xorg -configure - automatic configuration utility. See the man page for details.
  • XFree86 -configure - automatic configuration utility. See the man page for details.
  • XF86Setup - a text based config utility. See the man page for details.
  • xf86config - a text based config utility. See the man page for details.
  • xorgconfig - a text based config utility. See the man page for details.
  • xf86cfg - a graphical based config utility. See the man page for details.
  • xorgcfg - a graphical based config utility. See the man page for details.
  • CTRL+ALT+BACKSPACE - will log out of X Windows, return to a command prompt.
  • Mandrake Control Center - a user friendly GUI for X configuration.
Other Documents in this Series      Top of Page
  1. Introduction and History
  2. Installation, Advanced Installation, and Usage
  3. The Linux Kernel and the Boot Process
  4. Filesystems - Management & Administration
  5. The BASH and Other Shells
  6. System Initialization and the X Environment
  7. Linux Processes
  8. Linux Administration, Peripherals, and Hardware
  9. Software Installation and Management
  10. Backups and Log Files
  11. Performance and Problems
  12. Network Configuration
  13. Security
  14. Key Linux Commands
  15. Essential Linux Definitions
webpointmorpheus Home       Technical Pages Site Map      This page was last modified: Wednesday January 03, 2007 10:53 AM