Xorg

From Alpine Linux
Revision as of 05:58, 22 November 2024 by Prabuanand (talk | contribs) (Moved more content from Alpine setup scripts page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Video Drivers

To install X11 based desktop, you may want to install specific Xorg xf86 driver packages for your video card's chipset, as they may support specific features, effects and acceleration modes, and avoid error messages during X initialization. However, the most basic X features should work fine with just using the default kernel video-modesetting drivers.

Tip: xf86 driver packages follow standard naming conventions. So information found in ArchWiki, or Gentoo wiki are to a large degree, also applicable to configuring the video hardware on Alpine Linux, except for proprietary drivers which are not available.

To see available xf86 video driver packages run:

$ apk search xf86-video

Input packages

If the Numlock settings are not working, or getting 'setleds not found' errors:

# apk add kbd

If some input device is not working at all, the available xf86-input drivers can be listed with:

$ apk search xf86-input

You probably at least want

xf86-input-libinput

or

xf86-input-evdev

libinput is for Wayland with wrapper for Xorg. evdev is Xorg only.

Typical legacy drivers (not packaged. at least as of 2/2022):

# apk add xf86-input-mouse xf86-input-keyboard

And for touchpad tapping support on many laptops, also:

# apk add xf86-input-synaptics

Configure xorg-server (optional)

On most systems, xorg should be able to autodetect all devices. However you can still configure xorg-server by hand by launching:

# Xorg -configure

This will create a /root/xorg.conf.new file. You can modify this file to fit your needs.
(When finished modifying and testing the above configuration file, move it to /etc/X11/xorg.conf for normal usage.)

Keyboard Layout (optional)

If you use a keyboard layout different than "us", and you are using a window manager or desktop environment that does not support to configure the keyboard layout itself, then you need to

and install setxkbmap:

# apk add setxkbmap

Then try

# setxkbmap <%a language layout from /usr/share/X11/xkb/rules/xorg.lst%>


In order to make it persistent add this section to /etc/X11/xorg.conf:

Section "InputClass" Identifier "Keyboard Default" MatchIsKeyboard "yes" Option "XkbLayout" "<%a language layout from /usr/share/X11/xkb/rules/xorg.lst%>" EndSection

Another way to change the keymap when logging into X is to use ~/.xinitrc. The following example loads a British keymap, simply add this line to the beginning of the file: setxkbmap gb &


If you need to create the ~/.xinitrc file, you may also want to add a second line like exec openbox-session to still start the window manager with startx or xinit.