Xorg: Difference between revisions
Prabuanand (talk | contribs) (Moved more content from Alpine setup scripts page) |
(Add installation and start session sections) |
||
Line 1: | Line 1: | ||
Xorg is a x.org implementation of X window system. | |||
It is de-facto standard way to launch graphical applications. | |||
Its most popular alternative is [https://wiki.alpinelinux.org/wiki/Wayland Wayland] | |||
== Installation == | |||
Can be installed automatically with [https://wiki.alpinelinux.org/wiki/Alpine_setup_scripts#setup-xorg-base setup-xorg-base] | |||
{{Note|ensure you have the necessary video drivers}} | |||
== Start session == | |||
Xorg can be started via [https://wiki.alpinelinux.org/wiki/Display_manager display manager] | |||
or manually with command: | |||
{{Cmd|# startx }} | |||
{{Note| startx is intended to run as user.}} | |||
You may also want per-user configuration: | |||
{{Cmd|# cp /etc/X11/xinit/xinitrc ~/.xinitrc}} | |||
{{Warning| carefully read the default configuration, it may look for itself to execute, | |||
which causes terminal to hang! | |||
}} | |||
== Video Drivers == | == Video Drivers == | ||
{{Main|Graphics driver}} | {{Main|Graphics driver}} |
Revision as of 17:38, 22 July 2025
Xorg is a x.org implementation of X window system. It is de-facto standard way to launch graphical applications. Its most popular alternative is Wayland
Installation
Can be installed automatically with setup-xorg-base
Start session
Xorg can be started via display manager or manually with command:
# startx
You may also want per-user configuration:
# cp /etc/X11/xinit/xinitrc ~/.xinitrc

which causes terminal to hang!
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.
To see available xf86 video driver packages run:
$ apk search xf86-video
- For Sis video chipset install xf86-video-sis
- For VMware guests use xf86-video-vmware
- For VirtualBox guests use xf86-video-vboxvideo. Refer VirtualBox guest additions
- For Hyper-V guests use xf86-video-fbdev. Refer Hyper-V guest services.
- For KVM/QEMU guests refer Xorg within QEMU
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
.