Difference between revisions of "Configure X"

From gr0x0rd
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
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.
+
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 you begin, make sure that the following configurations have been set in your make.conf.  
  
'''$''' sudo emerge -av xorg-server
+
Xorg will pull in the video drivers for whatever you have specified for the VIDEO_CARDS value in this same file. 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.
  
 +
<pre># xorg settings
 +
VIDEO_CARDS="nvidia"  # for nvidia, closed source
 +
INPUT_DEVICES="evdev synaptics"
 +
ABI_X86="64 32"
 +
</pre>
  
----
+
Gentoo have a [https://wiki.gentoo.org/wiki/Xorg/Guide Xorg guide] that you should likely have a look at as well.
'''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.
 
----
 
 
 
  
 +
'''$''' sudo emerge -av xorg-drivers xorg-server
  
 
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.
 
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
 
  '''$''' 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.
 
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.
Line 30: Line 24:
 
=== /etc/X11/xorg.conf ===
 
=== /etc/X11/xorg.conf ===
 
This file is an example dual-display configuration using nvidia's proprietary closed-source drivers.
 
This file is an example dual-display configuration using nvidia's proprietary closed-source drivers.
 +
<pre>
 +
###################################################
 +
#
 +
# gr0x0rd's xorg.conf
 +
#
 +
###################################################
 +
 +
Section "ServerLayout"
 +
    Identifier    "TVOut"
 +
    Screen      0  "Screen0" 0 0
 +
    Screen      1  "Screen1" RightOf "Screen0"
 +
    InputDevice    "Keyboard0" "CoreKeyboard"
 +
    InputDevice    "Mouse0" "CorePointer"
 +
    Option        "Xinerama" "0"
 +
EndSection
 +
 +
Section "Module"
 +
    SubSection    "extmod"
 +
        Option        "omit xfree86-dga"
 +
    EndSubSection
 +
    Load          "dbe"
 +
    Load          "vbe"
 +
    Load          "GLcore"
 +
    Load          "extmod"
 +
    Load          "glx"
 +
    Load          "bitmap"
 +
    Load          "speedo"
 +
    Load          "record"
 +
    Disable        "dri"
 +
    Disable        "dri2"
 +
EndSection
 +
 +
Section "InputDevice"
 +
    # generated from default
 +
    Identifier    "Keyboard0"
 +
    Driver        "kbd"
 +
EndSection
 +
 +
Section "InputDevice"
 +
    # generated from data in "/etc/conf.d/gpm"
 +
    Identifier    "Mouse0"
 +
    Driver        "mouse"
 +
    Option        "Protocol"
 +
    Option        "Device" "/dev/input/mice"
 +
    Option        "Emulate3Buttons" "no"
 +
    Option        "ZAxisMapping" "4 5"
 +
EndSection
 +
 +
Section "Monitor"
 +
    Identifier    "Dell LCD"
 +
    VendorName    "Dell"
 +
    ModelName      "DELL E196FP"
 +
    HorizSync      31.5 - 31.5
 +
    VertRefresh    60.0
 +
EndSection
 +
 +
Section "Monitor"
 +
    Identifier    "TV"
 +
    VendorName    "Sony"
 +
    ModelName      "Bravia"
 +
    Option        "DPMS" "true"
 +
    Option        "DPI" "96 x 96"
 +
EndSection
 +
 +
Section "Monitor"
 +
    Identifier    "Monitor0"
 +
    VendorName    "Unknown"
 +
    ModelName      "SONY TV"
 +
    HorizSync      15.0 - 70.0
 +
    VertRefresh    58.0 - 62.0
 +
EndSection
 +
 +
Section "Monitor"
 +
    Identifier    "Monitor1"
 +
    VendorName    "Unknown"
 +
    ModelName      "DELL E196FP"
 +
    HorizSync      31.0 - 83.0
 +
    VertRefresh    56.0 - 75.0
 +
EndSection
 +
 +
Section "Device"
 +
    Identifier    "Device0"
 +
    Driver        "nvidia"
 +
    VendorName    "NVIDIA Corporation"
 +
    BoardName      "GeForce GTX 260"
 +
    Option        "UseEvents" "true"
 +
    Option        "RenderAccel" "false"
 +
    BusID          "PCI:1:0:0"
 +
    Screen          0
 +
EndSection
 +
 +
Section "Device"
 +
    Identifier    "Device1"
 +
    Driver        "nvidia"
 +
    VendorName    "NVIDIA Corporation"
 +
    BoardName      "GeForce GTX 260"
 +
    Option        "UseEvents" "true"
 +
    Option        "RenderAccel" "false"
 +
    BusID          "PCI:1:0:0"
 +
    Screen          1
 +
EndSection
 +
 +
Section "Screen"
 +
    Identifier    "TV Screen"
 +
    Device        "Device0"
 +
    Monitor        "TV"
 +
EndSection
 +
 +
Section "Screen"
 +
    Identifier    "LCD Screen"
 +
    Device        "Device1"
 +
    Monitor        "Dell LCD"
 +
    DefaultDepth    24
 +
    SubSection    "Display"
 +
        Viewport    0 0
 +
        Depth      24
 +
        Modes      "1280x1024"
 +
    EndSubSection
 +
EndSection
 +
 +
Section "Screen"
 +
    Identifier    "Screen0"
 +
    Device        "Device0"
 +
    Monitor        "Monitor0"
 +
    DefaultDepth    24
 +
    Option        "TwinView" "0"
 +
    Option        "TwinViewXineramaInfoOrder" "DFP-0"
 +
    Option        "metamodes" "DFP: nvidia-auto-select +0+0"
 +
    SubSection    "Display"
 +
        Depth      24
 +
    EndSubSection
 +
EndSection
 +
 +
Section "Screen"
 +
    Identifier    "Screen1"
 +
    Device        "Device1"
 +
    Monitor        "Monitor1"
 +
    DefaultDepth    24
 +
    Option        "TwinView" "0"
 +
    Option        "metamodes" "CRT: nvidia-auto-select +0+0"
 +
    SubSection    "Display"
 +
        Depth      24
 +
    EndSubSection
 +
EndSection
  
###################################################
+
Section "Extensions"
#
+
     Option         "Composite" "Enable"
# gr0x0rd's xorg.conf
+
    Option         "RENDER" "Enable"
#
+
    Option         "DAMAGE" "Enable"
###################################################
+
EndSection
+
</pre>
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
 

Latest revision as of 12:12, 23 November 2016

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 you begin, make sure that the following configurations have been set in your make.conf.

Xorg will pull in the video drivers for whatever you have specified for the VIDEO_CARDS value in this same file. 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.

# xorg settings
VIDEO_CARDS="nvidia"   # for nvidia, closed source
INPUT_DEVICES="evdev synaptics"
ABI_X86="64 32"

Gentoo have a Xorg guide that you should likely have a look at as well.

$ sudo emerge -av xorg-drivers xorg-server

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

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  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

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

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "InputDevice"
    # generated from data in "/etc/conf.d/gpm"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

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

Section "Monitor"
    Identifier     "TV"
    VendorName     "Sony"
    ModelName      "Bravia"
    Option         "DPMS" "true"
    Option         "DPI" "96 x 96"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "SONY TV"
    HorizSync       15.0 - 70.0
    VertRefresh     58.0 - 62.0
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "DELL E196FP"
    HorizSync       31.0 - 83.0
    VertRefresh     56.0 - 75.0
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 260"
    Option         "UseEvents" "true"
    Option         "RenderAccel" "false"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 260"
    Option         "UseEvents" "true"
    Option         "RenderAccel" "false"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

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

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

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "TwinViewXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DFP: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "CRT: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

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