THIS WIKI IS DEPRECATED. It is no longer being maintained. Please visit https://docs.voidlinux.org/ for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues

Xorg

From Void Linux Wiki
Jump to navigation Jump to search

WORK IN PROGRESS --Sth (talk) 15:58, 5 November 2015 (UTC)

X.Org Server is the free and open source implementation of the display server for the X Window System stewarded by the X.Org Foundation.

Xorg is the de facto standard for running graphical applications in Linux and Unix; it does not come preinstalled as part of the base system in Void Linux, so manual installation and some configuration is necessary if you plan to use graphical applications with Void.

Installation

The Void repositories contain the xorg metapackage which include Xorg and its related utilities including X fonts, basic applications, and input/video drivers. To install this metapackage and a basic terminal emulator, type:

# xbps-install  xorg xterm

For a more minimal Xorg implementation, the Void repositories also contain a smaller metapackage xorg-minimal, which contains the Xorg server, input drivers and a few additional utilities.

# xbps-install xorg-minimal xinit 

Please note that xorg-minimal does not include everything you need to run an X session. To get up and running using this metapackage, you will need to determine the correct video driver for your hardware

# xbps-install  xf86-video-intel -> for Intel GPUs
# xbps-install  xf86-video-ati -> for AMD/ATI GPUs using the default radeon driver
# xbps-install  xf86-video-amdgpu -> for AMD/ATI GPUs using the new AMDGPU driver
# xbps-install  xf86-video-nouveau -> for NVIDIA GPUs 
# xbps-install  xf86-video-vmware -> for VMWARE

You will also likely need to install a window manager or a full-featured desktop environment.

Usage

First, make sure to install a window manager or a desktop environment. The examples in this section will use Openbox as the window manager. To start an X session from your TTY, you'll need to edit your ~/.xinitrc file. startx reads this file to determine what scripts and applications to run along with your window manager or desktop environment. First, open or create ~/.xinitrc:

$ vi ~/.xinitrc

The most important command for now is to add an exec WM/DE_command at the end of the file. For example, using Openbox, you would use the following statement:

exec openbox-session

After adding your window manager or desktop environment's session executable, save the file and quit vi. Now you're ready to start your X session. Type:

startx

to enter your graphical environment. If you're using Openbox, you'll be presented with a grey screen and a cursor. To exit Openbox, you can right-click anywhere on the desktop and choose 'Log Out' to return to the TTY.

Rootless xorg

To start Xorg as non root user you'll need to enable KMS:

To enable KMS with Intel add i915.modeset=1 to kernel cmdline and reboot. To see if KMS is enabled:

# cat /sys/module/i915/parameters/modeset
1

Disable needs_root_rights in Xwrapper.config:

# cat /etc/X11/Xwrapper.config
needs_root_rights = no

Add user to input and video groups:

# usermod -aG input,video user

You may start Xorg with $ startx -- vt1, it should run under user account.