X server

From Gentoo Wiki
Jump to: navigation, search
Resources

The X.Org server, part of the X.Org releases, is the main component of the X Window system which abstracts the hardware and provides the foundation for most graphical user interfaces, like desktop environments or window managers, and their applications.

Installation

This page will provide you with useful information but the Xorg guide details the installation of Xorg in a more convenient manner.

Note
If you're only updating, check the upgrade sub-article.

USE flags

Portage knows the X USE flag for enabling support for X in other packages (default in all desktop profiles). Make sure this USE flag is added to the USE flag list to ensure X compatibility system wide:

FILE /etc/portage/make.conf
USE="X"

xorg-drivers

x11-base/xorg-drivers is a meta package to pull in the wanted drivers:

Follow the links for information how to set up these devices.

mesa

media-libs/mesa (see Wikipedia) is a graphic library that provides a generic OpenGL implementation.

USE flags for media-libs/mesa OpenGL-like graphic library for Linux

bindist Disable patent-encumbered ARB_texture_float, EXT_texture_shared_exponent, and EXT_packed_float extensions. local
classic Build drivers based on the classic architecture. local
d3d9 Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine. local
debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces global
dri3 Enable DRI3 support. local
egl Enable EGL support. local
gallium Build drivers based on Gallium3D, the new architecture for 3D graphics drivers. local
gbm Enable the Graphics Buffer Manager for EGL on KMS. local
gles1 Enable GLESv1 support. local
gles2 Enable GLESv2 support. local
llvm Enable LLVM backend for Gallium3D. local
nptl Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually) global
opencl Enable the Clover Gallium OpenCL state tracker. local
openmax Enable OpenMAX video decode/encode acceleration for Gallium3D. local
osmesa Build the Mesa library for off-screen rendering. local
pax_kernel Enable if the user plans to run the package under a pax enabled hardened kernel local
pic disable optimized assembly code that is not PIC friendly local
selinux !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur global
unwind Add support for stack trace unwinding and function name resolution local
vaapi Enable Video Acceleration API for hardware decoding global
valgrind Compile in valgrind memory hints local
vdpau Enable the VDPAU acceleration interface for the Gallium3D Video Layer. local
vulkan Enable Vulkan drivers local
wayland Enable support for dev-libs/wayland local
xa Enable the XA (X Acceleration) API for Gallium3D. local
xvmc Enable the XvMC acceleration interface for the Gallium3D Video Layer. local

xorg-server

Now install x11-base/xorg-server.

Alternatively you can install the x11-base/xorg-x11 meta package, which installs the full X.Org release with additional fonts and utilities. They're not necessary for a working desktop.

USE flags for x11-base/xorg-server X.Org X servers

debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces global
dmx Build the Distributed Multiheaded X server local
doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally global
glamor Enable Glamor OpenGL 2D acceleration local
ipv6 Add support for IP version 6 global
kdrive Build the kdrive X servers local
libressl Use dev-libs/libressl as SSL provider (might need ssl USE flag), packages should not depend on this USE flag global
minimal Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features) global
selinux !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur global
static-libs Build static versions of dynamic libraries as well global
systemd Enable use of systemd-specific libraries and features like socket activation or session tracking global
udev Enable virtual/udev integration (device discovery, power and storage device support, etc) global
unwind Enable libunwind usage for backtraces local
wayland Enable dev-libs/wayland backend global
xcsecurity Build Security extension local
xephyr Build the Xephyr server local
xnest Build the Xnest server local
xorg Build the Xorg X server (HIGHLY RECOMMENDED) local
xvfb Build the Xvfb server local

root #emerge --ask xorg-server

Configuration

Permissions

If the acl USE flag is enabled globally and ConsoleKit is being used (default for desktop profiles) permissions to video cards will be handled automatically. It is possible to check the permissions using getfacl:

user $getfacl /dev/dri/card0 | grep larry
user:larry:rw-

A broader solution is to add the user(s) needing access the video card to the video group:

root #gpasswd -a larry video

Note that users will be able to run X without permission to the DRI subsystem, but acceleration will be disabled.

xorg.conf

The X server is designed to work out-of-the-box, with no need to manually edit Xorg's configuration files. It should detect and configure devices such as displays, keyboards, and mice.

However, the main configuration file of the X server is the xorg.conf.

Boot service

Usually the X server is started by starting a display manager automatically on boot.

x11 ebuild repository

The Gentoo X11 team maintains the x11 ebuild repository. It contains X.Org versions in preparation to be moved to the portage tree, pre versions of the next main version and live versions for trunk. Use layman to setup the repository.

See also

  • Xorg/Guide - A guide detailing specifics on the configuration of Xorg.