Configure X

From gr0x0rd
Revision as of 12:07, 8 January 2011 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-x11



Note: at this point, xorg will pull in the video drivers for whatever you have specified for the VIDEO_CARDS value in your /etc/make.conf. If you are electing to use the nvidia closed-source drivers, be sure to build them with the gtk USE flag in order to install a useful graphical driver settings utility.

If you are installing Gentoo onto a laptop with a synaptics touchpad, you may also want to include synaptics as one of the values for the INPUT_DEVICES setting.



There should 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

There are 2 policy configuration files that need to be set for HAL to work properly.

$ sudo cp /usr/share/hal/fdi/policy/10osvendor/10-input-policy.fdi /etc/hal/fdi/policy
$ sudo cp /usr/share/hal/fdi/policy/10osvendor/10-x11-input.fdi /etc/hal/fdi/policy

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