Configure X

From gr0x0rd
Revision as of 23:48, 3 December 2010 by Gr0x0rd (talk | contribs)
Jump to navigation Jump to search

The next thing you'll probably want is a graphical user interface, which is what most people are comfortable with. So let's being emerging xwindows, which will provide a framework you can extend with a desktop manager. Before doing this emerge, make sure the hal USE flag has been set in your /etc/make.conf. New versions of X will use udev for hardware detection, but at this time these versions and their dependencies are still masked in portage.

$ sudo emerge -av xorg-server eselect

There shold be a lot of packages that get installed with X, so feel free to go have a coffee. After the emerge has finished, we now need to configure xorg. First, lets update our environment.

$ sudo env-update && source /etc/profile

Start HAL and configure it to start when the system starts up.

$ sudo /etc/init.d/hald start
$ sudo rc-update add hald default

In a perfect world, X will work without any configuration settings. Sadly the world isn't often perfect, so you may need to edit your /etc/X11/xorg.conf file manually.

$ sudo nano -w /etc/X11/xorg.conf

/etc/X11/xorg.conf

This file is an example dual-display configuration using nvidia's proprietary closed-source drivers.

###################################################
#
# gr0x0rd's xorg.conf
#
###################################################

Section "ServerLayout"
	Identifier     "TVOut"
	Screen      0  "LCD Screen" 0 0
	Screen         "TV Screen" RightOf "LCD Screen"
EndSection

Section "Module"
	SubSection "extmod"
		Option	    "omit xfree86-dga"
	EndSubSection
	Load  "dbe"
	disable  "dri"
	disable  "dri2"
	Load  "vbe"
	Load  "GLcore"
	Load  "extmod"
	Load  "glx"
	Load  "bitmap"
	Load  "speedo"
	Load  "record"
EndSection

Section "Monitor"
	Identifier   "Dell LCD"
	VendorName   "Dell"
	ModelName    "DELL E196FP"
	HorizSync    31.5 - 31.5
	VertRefresh  60.0 - 60.0
EndSection

Section "Monitor"
	Identifier   "TV"
	VendorName   "Sony"
	ModelName    "Wega"
	Option	    "DPMS" "true"
EndSection

Section "Device"
	Identifier  "Device0"
	Driver      "nvidia"
	VendorName  "NVidia Corporation"
	BoardName   "GeForce GTX 260"
	Option	"UseEvents" "true"
EndSection

Section "Device"
	Identifier  "Device1"
	Driver      "nvidia"
	VendorName  "NVidia Corporation"
	BoardName   "GeForce GTX 260"
	Option	"UseEvents" "true"
	Screen      1
EndSection

Section "Screen"
	Identifier "LCD Screen"
	Device     "Device0"
	Monitor    "Dell LCD"
	DefaultDepth     24
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Modes    "1280x1024"
	EndSubSection
EndSection

Section "Screen"
	Identifier "TV Screen"
	Device     "Device1"
	Monitor    "TV"
EndSection

Section "Extensions"
	Option	    "Composite" "Enable"
	Option	    "RENDER" "Enable"
	Option	    "DAMAGE" "Enable"
EndSection