X server
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.
Functionality of the X.Org server is handled by Xwayland on systems running the Wayland protocol.
This page provides useful information but the Xorg guide details the installation of Xorg in a more convenient manner. See also Xorg.
Installation
Installing xorg-server is much lighter than emerging the entire xorg package, and has all the necessary components to have a fully functional GUI such as plasma for example.
When just updating, check the upgrade sub-article.
USE flags
mesa
Correctly setting make.conf VIDEO_CARDS
with an entry from Category:Video cards affects the USE expand for media-libs/mesa (see Wikipedia). Mesa is a graphic library that provides a generic OpenGL implementation and may already be automatically pulled in by graphics card/driver settings in make.conf and if a graphical profile is set. Issue the command emerge --search mesa to see if mesa is already installed prior to emerging.
xorg-drivers
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:
USE="X"
x11-base/xorg-drivers is a meta package to pull in the wanted drivers (note that these driver can be automatically pulled in if the graphics card/drivers info is set in make.conf and using a graphical profile) Issue the command emerge --search xorg-drivers to see if xorg-drivers is already installed prior to emerging.
Follow the links for information how to set up these devices.
It is recommended to issue the --verbose
option when emerging xorg-server because xorg-drivers or mesa may be pulled in as dependencies if they are not already installed. Using --verbose
will show more information on USE flags and dependencies before package installation. If xorg-drivers and/or the mesa packages are emerged directly (IE without the --one-shot
option) they will be recorded in the world file and could cause future package upgrade conflicts when Portage is upgrading dependencies. It is a best practice to allow them to be merged into the system as dependencies by setting USE flags or using a graphical profile.
xorg-server
Now install x11-base/xorg-server.
USE flags for x11-base/xorg-server X.Org X servers
+elogind
|
Use elogind to get control over framebuffer when running as regular user |
+udev
|
Enable virtual/udev integration (device discovery, power and storage device support, etc) |
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 |
minimal
|
Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features) |
selinux
|
!!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur |
suid
|
Enable setuid root program(s) |
systemd
|
Enable use of systemd-specific libraries and features like socket activation or session tracking |
test
|
Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently) |
unwind
|
Enable libunwind usage for backtraces |
xcsecurity
|
Build Security extension |
xephyr
|
Build the Xephyr server |
xnest
|
Build the Xnest server |
xorg
|
Build the Xorg X server (HIGHLY RECOMMENDED) |
xvfb
|
Build the Xvfb server |
root #
emerge --ask x11-base/xorg-server
x11 overlay
The Gentoo X11 team maintains the x11 overlay. It contains main and 'live' revisions of X.Org versions in preparation to be moved into gentoo.git , the primary Gentoo ebuild repository. Use eselect repository to setup the repository.
Configuration
Permissions
If the acl
USE flag is enabled globally and elogind
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 hardware 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.
See also
- Non root Xorg — describes how an unprivileged user can run Xorg without using suid.
- Xorg — an open source implementation of the X server.
- Xorg/Guide — explains what Xorg is, how to install it, and the various configuration options.
- Xrandr — X protocol extension and its CLI tool xrandr are used to manage screen resolutions, rotation and screens with multiply displays in X