Pages

Thursday, July 24, 2014

Customizing the UNIX User Environment - Part 2 - Customizing X - Part 2

Customizing the UNIX User Environment

**********************************************************************************

Customizing X

**********************************************************************************

 

Setting up an XFree86 server

-----------------------------------

XFree86 is the most widespread version of the X Window System. The latest version of XFree86 is version 4.x. Before you set up a computer to be an XFree 86 4.x server, you need to gather information about its display hardware. You need to find out about its

 

- monitor refresh rate - the horizontal scan rate and the vertical synchronization rate of the monitor

- display adapter chipset

- display adapter memory - determines the max resoulution and color depth that X can use.

 

To set up a computer as an XFree85 4.x server, you need to generate an initial X configuration file. To do this, you log in as the superuser and type the following at the shell prompt. Which inturn checks the computer's display hardware and generates a matching configuration file called XF86Config.new

 

bash-2.05a$ XFree86 - configure

bash-2.05a$ ls -l | grep 'XF86'

-rw-r--r-- 1 root wheel 2383 Oct 31 17:08 XF86Config.new

bash-2.05a$

 

You need to test whether the configuration file is set up correctly. To do this, you type the command statement shown here.

 

bash-2.05a$ XFree86 -xf86config XF86Config.new

 

XFree86 runs a test to determine whether X works with the configuration file. If it works, you should see a gray grid background with a black X-shaped cursor in the center.

 

To exit the test, you press Ctrl+Alt+Backspace.

 

Once you've generated and tested the XFree86 configuration file, you open the file using a text editor such as vi and tune it for the hardware and display configuration that you want.

The XFree86Config file consists of several sections, each of which deals with a specific area of X configuration.

The following sections specify basic XFree86 configuration settings

-Module - specifies optional modules that X can load when it start up. Eg font modules and double buffer extension (DBE) module

-Files - allows you to specify path to RGB color code db as well as paths to font directories

-Server flags - enable/disable various X server settings including detailed error messages

 

The following section of the XFree86Config file deal with the X server's input and output devices:

-Input devices - protocols & settings for i/p devices & specify props like keyboard layout, keystrike autorepeat speed, three-button mouse emulation etc..

-Monitor - horz scan rate and vert synchronization rate for monitor

-Graphics device - disp adapter and video memory

-Screen - color depth & resolution

-ServerLayout - configuring X for multiple monitors

 

You need to configure the refresh rate, color depth, and screen resolution before you can run X reliably

 

To specify the refresh rate of your monito, you open the XFb6Config file and go to the Monitor section.

You specify the horizontal refresh rate by assigning a value in KHz to the HorizSync parameter and you specify the vertical refresh rate by assigning a value in Hz to the VertRefresh parameter.

 

Note: You can find out your monito's refresh rates from the monitor's user manual or from the plaguw at the rear of the monitor.

 

To specify color depth and screen resolution, you go to the Screen section of the XF86Config file.

The Screen section contains multiple Display subsections, each of which applies to a particular color depth. You can set different screen resoluitons for each color depth.

 

To set the screen resolution for a particular color depth, you add a line to the relevant subsection and specify the resolution using the Modes parameter

 

You set the default color depth using the DefaultColorDepth parameter at the beginning of the Screen section.

When you start X, it displays at the default color depth and uses the screen resolution that you've specified in the Display subsection corresponding to that color depth.

 

Once you've finished editing the XF86Config file, you copy it to the /etc/X11 directory. X will then use this configuration fole each time you start X.

 

bash-2.05a$ cp XF86Config.new /etc/X11/XF86Config

 

Unless a computer has been configured to load X automatically at startup, you need to start X manually from the command prompt. You type the following command to do it

 

bash-2.05a$ startx

 

When X starts up, it also loads the window manager and desktop environment that are currently configured as defaults.

 

To shut down X, you choose Logout from the desktop's main menu or press cntrl+Alt+Backspace to kill X.

No comments:

Post a Comment