LPI Linux Certification/LPIC1 Exam 101/The X Window System

LPI logo

Section Overview edit

  • 1.110.1 Install & Configure XFree86
  • 1.110.2 Setup a display manager|Setup a display manager
  • 1.110.4 Install & Customize a Window Manager Environment

Install & Configure XFree86 edit

Overview edit

X is a windowing system that provides the basic graphic functions of Linux. It's designed to provide a GUI to any other systems operating across a network, regardless of OS.

X operates on a client/server model.

X is not part of the operating system. It is an application.

The standard Linux X server is Xfree86.

The XFree86 log file is located at /var/log/XFree86.0.log.

Configuration edit

type "XFree86 -configure", it will scan your hardware and auto. generate a configuration file matching to your hardware. However, FOR PS/2 MOUSE, I usually need to modify this config file manually from ""Device" "/dev/mouse"" to ""Device" "/dev/psaux""

Starting and stopping X edit

To start X you can use:
startx - terminal command used at level 3;
edit /etc/inittab to run default at level 5;
xinit - when there is no .xinitrc file;
init 5 - to change manually runlevel to 5 (and run display manager);
xdm - (X Display Manager) - graphical login manager, which run automatically at boot process when starting Linux at level 5 (there are also external graphical login managers ex. kdm, gdm).

To stop X you can use: <CTRL>+<ALT>+<BACKSPACE>;
init 3 - at lower level than 5 Linux will stop X Window;
kill the XFree process.

Configuring X To configure X on a system use XF86Setup. The program will generate a configuration file that will be used by the XFree86 server. To tune the screen under X use Xfine2.

Under X, the user can configure every conceivable aspect of graphic display. Screen font size, styles Pointer behaviour Screen colors Window manager

The tunning can be done on a system-wide or per-user. .xinitrc contains the default window manager and style information to be used by the startx command. This file is usually located under /home/username when defined on a per-user basis. .Xdefaults used to setup pointer behaviour, colors, fonts, etc...

Exercises edit

Setup a display manager edit

Overview edit

X needs window managers to manipulate all the graphic applications. Move, size. Open and close. Maximize, minimize, iconize. Title bars The look and feel is implemented in the window manager.shouldn't this be in Widget sets not WMs? Provide virtual desktops.

Linux distributions contain many window managers:

  • Fvwm2 Motif-like look, highly customizable
  • WindowMaker Next Step look, fast and lean
  • Wm2 Ultra lean
  • Olwm Open look (Sun)
  • Fluxbox
  • BlackBox

The desktops bring on top of X Window managers more facilities:

  • KDE: based on Qt, current at the top of market
  • GNOME: The "GNU" Desktop, based on Gtk+-v2

Exercises edit

Install & Customize a Window Manager Environment edit

Overview edit

Exercises edit

Networked X edit

Overview edit

X works in a client-server relationship where the application is the client and the server is the application that knows how to provide the services. On a single system, both applications reside on the same system. On a networked system the user can run an X application which is installed on a remote system and do the display on a local system. The advantage of having a X application server is: No local applications installation is needed. No need to have performant local system. No local access to data.

Networked X edit

Exporting a simple application : In order to do so do: startx on the serverhost. xhost + Enable lack of identification on the server host. telnet serverhost from the clienthost and set the DISPLAY variable to the clienthost. Export DISPLAY=clienthost:0.0

Exporting the window manager : In order to do so do: Activate xdmcp with gdmsetup on the server Use Xnest to connect the client on the server in broadcast

Exercises edit

1)Logging In your system with the failsafe display manager. Execute kde or gdm. Exit kde and logout from failsafe.
2)After logging into your system try to type the following key combinations. CTRL-ALT-F1, CTRL-ALT-F2, CTRL-ALT-F7 What is happening?
3)When you use startx, what is the file where you define the default window manager?