xorgconfig is an interactive command for generating an xorg.conf file for use with Xorg X servers.
This program will create a basic xorg.conf file, based on menu selections you make. It will ask for a pathname when it is ready to write the file.
The xorg.conf file usually resides in /etc/X11 or /usr/X11R6/etc/X11. If no xorg.conf file is present there, Xorg will probe the system to autoconfigure itself. You can run Xorg -configure to generate a xorg.conf
Before using this program, make sure you know what video card you have, and preferably also the chipset it uses and the amount of video memory on your video card, as well as the specifications of your monitor. Run lspci command to obtained information about your card.
Update: Newer Linux / UNIX distro with Xorg should use the following command instead of xorgconfig:
# Xorg -configure
$ sudo Xorg -configure
The -configure option force the Xorg server to load all video driver modules, probes for available hardware, and writes out an initial xorg.conf file based on what was detected. The above will build an initial configuration file and you must run it as the super user (root user).