Xorg: Difference between revisions
Prabuanand (talk | contribs) (created initial page with information from Graphics driver page which was originally from Alpine_setup_scripts#setup-xorg-base) |
Prabuanand (talk | contribs) (Moved more content from Alpine setup scripts page) |
||
Line 1: | Line 1: | ||
== Video Drivers == | |||
== | |||
{{Main|Graphics driver}} | {{Main|Graphics driver}} | ||
Line 15: | Line 14: | ||
* For Hyper-V guests use {{pkg|xf86-video-fbdev}}. Refer [[Hyper-V_guest_services|Hyper-V guest services]]. | * For Hyper-V guests use {{pkg|xf86-video-fbdev}}. Refer [[Hyper-V_guest_services|Hyper-V guest services]]. | ||
* For KVM/QEMU guests refer [[QEMU#Using_Xorg_inside_Qemu|Xorg within QEMU]] | * For KVM/QEMU guests refer [[QEMU#Using_Xorg_inside_Qemu|Xorg within QEMU]] | ||
== Input packages == | |||
If the <b>Numlock</b> settings are not working, or getting <b>'setleds not found'</b> errors: | |||
{{cmd|# apk add kbd}} | |||
If some input device is not working at all, the available xf86-input drivers can be listed with: | |||
{{cmd|$ apk search xf86-input}} | |||
You probably at least want {{cmd| xf86-input-libinput}} or {{cmd| xf86-input-evdev}} | |||
libinput is for Wayland with wrapper for Xorg. evdev is Xorg only.<br><br> | |||
Typical legacy drivers (not packaged. at least as of 2/2022): | |||
{{cmd|# apk add xf86-input-mouse xf86-input-keyboard}} | |||
And for touchpad tapping support on many laptops, also: | |||
{{Cmd|# 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: | |||
{{Cmd|# Xorg -configure}} | |||
This will create a {{Path|/root/xorg.conf.new}} file. You can modify this file to fit your needs.<BR> | |||
(When finished modifying and testing the above configuration file, move it to {{Path|/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 | |||
* [[Repositories#Enabling_the_community_repository|Enable the "community" repository]] | |||
and install setxkbmap: | |||
{{Cmd|# apk add setxkbmap}} | |||
Then try | |||
{{Cmd|# setxkbmap <%a language layout from /usr/share/X11/xkb/rules/xorg.lst%>}} | |||
In order to make it persistent add this section to {{Path|/etc/X11/xorg.conf}}: | |||
{{Cmd|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 {{Path|~/.xinitrc}}. The following example loads a British keymap, simply add this line to the beginning of the file: | |||
<code>setxkbmap gb &</code> | |||
If you need to create the {{Path|~/.xinitrc}} file, you may also want to add a second line like <code>exec openbox-session</code> to still start the window manager with <code>startx</code> or <code>xinit</code>. | |||
<br> | |||
[[category:Graphics]] | [[category:Graphics]] | ||
[[category: Drivers]] | [[category: Drivers]] | ||
[[category: Desktop]] | [[category: Desktop]] |
Latest revision as of 05:58, 22 November 2024
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
.