
Typically, the X configuration file will be located in the /etc/ or /etc/X11/ directory. Based on the version of X being used, the configuration file may be:
- Xorg.conf
- XF86Config
- XF86Config-4
The X Window configuration file will typically have sections for:
- Module
- InputDevice
- Monitor
- Device
- Screen
- ServerLayout
Modules
The modules section, as the name implies, loads the modules (drivers) used by X.
[root@server1 ~]# cat /etc/X11/Xorg.conf
Section "Module"
Load "dbe"
Load "extmod"
Load "record"
. . .
EndSection
InputDevice (keyboard / mouse)
[root@server1 ~]# cat /etc/X11/Xorg.conf
Section "InputDevice"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "system-mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
EndSection
Monitor
[root@server1 ~]# cat /etc/X11/Xorg.conf
Section "Monitor"
Identifier "Monitor0"
ModelName "Dell 9490"
HorizSync 30.0 - 85.0
VertRefresh 55.0 - 75.0
EndSection
Device
[root@server1 ~]# cat /etc/X11/Xorg.conf
Section "Device"
Identifier "VideoCard0"
vendorName "nVIDIA"
BoardName "GeForce 7500"
VideoRam 131072
EndSection
Screen
The screen section uses information from the Monitor and Device sections, so you must first have the Monitor and Device sections defined before defining the Screen section.
[root@server1 ~]# cat /etc/X11/Xorg.conf
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
EndSection
ServerLayout
The ServerLayout section uses information from the Screen, Keyboard, and Mouse sections, so you must first have the Screen, Keyboard, and Mouse sections defined before defining the ServerLayout section.
[root@server1 ~]# cat /etc/X11/Xorg.conf
Section "ServerLayout"
Identifier "My Server Layout"
Screen "Screen0"
InputDevice "Keyboard0"
InputDevice "Mouse0"
EndSection
Did you find this article helpful?
If so, consider buying me a coffee over at