====== Xenocara ====== [[https://www.xenocara.org/|Xenocara]] provides a framework to host OpenBSD modifications and to automate the build of the modular X.Org components, including 3rd party packages and some software maintained by OpenBSD developers. It includes a customised X.Org X server that utilises a **dedicated _x11 user by default to drop privileges and perform privilege separation** in accordance to OpenBSD's least privilege policy. Furthermore, Xenocara includes several other projects, such as [[https://www.hyperbola.info/packages/?name=xenocara-twm|twm]], **a tabbed window manager for the X Window System**. The **perform privilege separation feature** was disabled in Hyperbola GNU/Linux-libre because it requires OpenBSD-specific system calls such as [[https://man.openbsd.org/OpenBSD-6.5/pledge|pledge]] and [[https://man.openbsd.org/OpenBSD-6.5/unveil|unveil]], however it will be implemented for [[en:project:nomenclatures#hyperbolabsd|HyperbolaBSD]], an operating system which is being developed by **Hyperbola Project**. ===== Installation ===== Xenocara can be installed with the [[https://www.hyperbola.info/packages/?name=xenocara-server|xenocara-server]] package. # pacman -S xenocara-server Additionally, some packages from the [[https://www.hyperbola.info/groups/x86_64/xenocara-apps/|xenocara-apps]] group are necessary for certain configuration tasks, they are pointed out in the relevant sections. Finally, an [[https://www.hyperbola.info/groups/x86_64/xenocara/|xenocara]] group is also available, which includes Xenocara server packages, packages from the [[https://www.hyperbola.info/groups/x86_64/xenocara-apps/|xenocara-apps]] group and fonts. You will typically seek to install a [[en:system:userspace:window_manager|window manager]] or a [[en:system:userspace:desktop_enviroment|desktop environment]] to supplement Xenocara. ==== Driver installation ==== The Linux-libre kernel includes free video drivers and support for hardware accelerated framebuffers. However, userland support is required for OpenGL and 2D acceleration in X11. First, identify your card: $ lspci | grep -e VGA -e 3D Then install an appropriate driver. You can search the package database for a complete list of free video drivers: $ pacman -Ss xenocara-video && pacman -Ss xorg-video Xenocara searches for installed drivers automatically: * If it cannot find the specific driver installed for the hardware (listed below), it first searches for fbdev ([[https://www.hyperbola.info/packages/?name=xorg-video-fbdev|xorg-video-fbdev]]). * If that is not found, it searches for vesa ([[https://www.hyperbola.info/packages/?name=xenocara-video-vesa|xenocara-video-vesa]]), the generic driver, which handles a large number of chipsets but does not include any 2D or 3D acceleration. * If vesa is not found, Xenocara will fall back to kernel mode setting, which includes GLAMOR acceleration (see [[https://man.openbsd.org/OpenBSD-6.5/modesetting.4|modesetting(4)]]). In order for video acceleration to work, and often to expose all the modes that the GPU can set, a proper video driver is required: {| border="1" style="sortable; text-align: center; width: 100%; border-collapse:collapse; color:#262627; background-color:#f8f9fa;" ! style="background-color:#eaecf0" |Graphicscard ! style="background-color:#eaecf0" |OpenGL ! style="background-color:#eaecf0" |Driver |- ! rowspan="3" style="background-color:#eaecf0" |AMD/ATI |- | rowspan="4" | [[https://www.hyperbola.info/packages/?name=mesa|mesa]] |- | [[https://www.hyperbola.info/packages/?name=xenocara-video-ati|xenocara-video-ati]] |- ! style="background-color:#eaecf0" | Intel | [[https://www.hyperbola.info/packages/?name=xenocara-video-intel|xenocara-video-intel]] |- ! style="background-color:#eaecf0" | NVIDIA | [[https://www.hyperbola.info/packages/?name=xorg-video-nouveau|xorg-video-nouveau]] |} Fourth generation Intel GPUs users (GMA 3000 from 2006 and newer) may want to use the default Xenocara driver, rather than installing [[https://www.hyperbola.info/packages/?name=xenocara-video-intel|xenocara-video-intel]] driver package. For more information, see [[https://man.openbsd.org/OpenBSD-6.5/modesetting.4|modesetting(4)]]. For NVIDIA GPUs users, may find their respective card's [[https://nouveau.freedesktop.org/wiki/CodeNames/|code name]] (a more detailed list is available on [[https://en.wikipedia.org/wiki/Comparison_of_Nvidia_Graphics_Processing_Units|Wikipedia]]), and compare it with the [[https://nouveau.freedesktop.org/wiki/FeatureMatrix/|feature matrix]] for supported features. AMD GPUs users (GCN third generation from 2014 and newer) should not install [[https://www.hyperbola.info/packages/?name=xenocara-video-ati|xenocara-video-ati]] driver package that is dedicated for old AMD and ATI GPUs. Please note that AMD GPUs are mostly not running free, libre driver implementations therefore and cannot make usage of full OpenGL. Other video drivers can be found in the [[https://www.hyperbola.info/groups/x86_64/xenocara-drivers/|xenocara-drivers]] group. Xenocara should run smoothly with fully free software drivers. The exceptions to this rule are recent GPUs (especially NVIDIA and AMD GPUs), that are not supported. If it is the case, use the default Xenocara driver which includes GLAMOR acceleration (see [[https://man.openbsd.org/OpenBSD-6.5/modesetting.4|modesetting(4)]]). Please note that **Hyperbola is not supporting Vulkan** and only implements the OpenGL-standard. The reasoning is a minimalist approach as Vulkan needs wide more dependencies. ===== Running ===== The [[https://man.openbsd.org/OpenBSD-6.5/Xorg.1|Xorg(1)]] command is usually not run directly, instead the X server is started with either a [[en:system:userspace:application:display_managers|display manager]] or xinit. ==== xinit ==== The xinit program allows an user to manually start an Xenocara display server. The [[https://man.openbsd.org/OpenBSD-6.5/startx.1|startx(1)]] script is a front-end for [[https://man.openbsd.org/OpenBSD-6.5/xinit.1|xinit(1)]]. If **Lumina Desktop** is being used you would need to use start-lumina-desktop instead xinit is typically used to start [[en:system:userspace:window_manager|window managers]] or [[en:system:userspace:desktop_enviroment|desktop environments]]. === Installation === Install the [[https://www.hyperbola.info/packages/?name=xenocara-xinit|xenocara-xinit]] package. # pacman -S xenocara-xinit === xinitrc === ~/.xinitrc is handy to run programs depending on X and set environment variables on X server startup. If it is present in a user's home directory, startx and xinit execute it. Otherwise startx will run the default /etc/X11/xinit/xinitrc. Xinit has its own default behaviour instead of executing the file. See [[https://man.openbsd.org/OpenBSD-6.5/xinit.1|xinit(1)]] for details. This default xinitrc will start a basic environment with [[https://www.hyperbola.info/packages/?name=xenocara-twm|xenocara-twm]], [[https://www.hyperbola.info/packages/?name=xenocara-xclock|xenocara-xclock]] and [[https://www.hyperbola.info/packages/?name=xterm|xterm]] (assuming that the necessary packages are installed). Therefore, to start a different [[en:system:userspace:window_manager|window manager]] or [[en:system:userspace:desktop_enviroment|desktop environment]], first create a copy of the default xinitrc in your home directory: $ cp /etc/X11/xinit/xinitrc ~/.xinitrc Then edit the file and replace the default programs with desired commands. Remember that lines following a command using exec would be ignored. For example, to start [[https://www.hyperbola.info/packages/?name=xscreensaver|xscreensaver]] in the background and then start [[en:system:userspace:application:window_managers:openbox|openbox]], use the following: $ ~/.xinitrc ... xscreensaver & exec openbox-session === Usage === To run Xorg as a regular user: $ startx ===== Configuring ===== Hyperbola supplies default configuration files in /usr/share/X11/xorg.conf.d/, and no extra configuration is necessary for most setups. Xenocara uses a configuration file called xorg.conf and files ending in the suffix .conf for its initial setup: the complete list of the folders where these files are searched can be found in [[https://man.openbsd.org/OpenBSD-6.5/xorg.conf.5|xorg.conf(5)]], together with a detailed explanation of all the available options. ==== Using .conf files ==== The /etc/X11/xorg.conf.d/ directory stores host-specific configuration. You are free to add configuration files there, but they must have a .conf suffix: the files are read in ASCII order, and by convention their names start with XX- (two digits and a hyphen, so that for example 10 is read before 20). These files are parsed by the X server upon startup and are treated like part of the traditional xorg.conf configuration file. Note that on conflicting configuration, the file read last will be processed. For that reason the most generic configuration files should be ordered first by name. The configuration entries in the xorg.conf file are processed at the end. ==== Using xorg.conf ==== Xorg can also be configured via /etc/X11/xorg.conf or /etc/xorg.conf. You can also generate a skeleton for xorg.conf with: # Xorg :0 -configure This should create a xorg.conf.new file in /root/ that you can copy over to /etc/X11/xorg.conf. If you are already running an X server, use a different display, for example: # Xorg :2 -configure ===== Input devices ===== For input devices the X server defaults to the libinput driver, but [[https://www.hyperbola.info/packages/?name=xorg-input-evdev|xorg-input-evdev]] and related drivers are available as alternative. [[https://www.hyperbola.info/packages/?name=eudev|eudev]] will detect hardware and both drivers will act as hotplugging input driver for almost all devices, as defined in the default configuration files 10-quirks.conf and 40-libinput.conf in the /usr/share/X11/xorg.conf.d/ directory. After starting X server, the log file will show which driver hotplugged for the individual devices (note the most recent log file name may vary): $ grep -e "Using input driver " Xorg.0.log If both do not support a particular device, install the needed driver from the [[https://www.hyperbola.info/groups/x86_64/xenocara-drivers/|xenocara-drivers]] group. The same applies, if you want to use another driver. ===== Acknowledgement ===== This wiki article is based on **ArchWiki**. We may have removed non-[[https://www.gnu.org/philosophy/free-system-distribution-guidelines.html|FSDG]] bits from it.