|/
|\ISS LINUX™

News (20210723a)
Blog
Install
FAQ
Wiki
Package System
Package Manager
Testimonials
Screenshots
Contact
Donate
Archive
wiki / wayland / install                                          Edit this page
Edited (1a3f275) at 2023-07-12 by Dylan Araps
INSTALL WAYLAND
________________________________________________________________________________
Wayland [0] is a display protocol that aims to be a simpler and modern
replacement for the X Window System. [1] The Wayland protocol follows a
client–server model in which clients are the graphical applications requesting
the display of pixel buffers on the screen, and the server (compositor) is the
service provider controlling the display of these buffers. [2]
Unlike Xorg, which is at the center of the universe (and everyone must talk to),
Wayland puts the Linux kernel and its components (DRI, DRM, etc) in the middle.
This effectively leaves the Wayland compositor off in the corner as its little
more than a special application. [3]
Wayland has been in development since September of 2008 [4] and is usable today
for a large number of use-cases. Some hardware configurations (namely NVIDIA
GPUs) [5] [6] and a number of features are not currently supported by
compositors.
Installing Wayland
________________________________________________________________________________
First, pick a wayland compositor. If unsure, see @/alternatives  
+------------------------------------------------------------------------------+
|                                                                              |
|   $ kiss b sway                                                              |
|                                                                              |
+------------------------------------------------------------------------------+
Second, pick a terminal emulator.
+------------------------------------------------------------------------------+
|                                                                              |
|   $ kiss b foot                                                              |
|                                                                              |
+------------------------------------------------------------------------------+
Setup XDG_RUNTIME_DIR
________________________________________________________________________________
The XDG_RUNTIME_DIR environment variable must be set and its value must be a
directory writable by your user.
+------------------------------------------------------------------------------+
| .shellrc or .profile                                                         |
+------------------------------------------------------------------------------+
|                                                                              |
|   export XDG_RUNTIME_DIR=/run/user/$(id -u)                                  |
|                                                                              |
+------------------------------------------------------------------------------+
Create the runtime directory.
+------------------------------------------------------------------------------+
|                                                                              |
|   $ mkdir -m 0700 -p "$XDG_RUNTIME_DIR"                                      |
|                                                                              |
+------------------------------------------------------------------------------+
Setup Groups
________________________________________________________________________________
Your user must be a member of the video and audio groups.
+------------------------------------------------------------------------------+
|                                                                              |
|   $ addgroup USERNAME video                                                  |
|   $ addgroup USERNAME audio                                                  |
|                                                                              |
+------------------------------------------------------------------------------+
Launching Compositor on login
________________________________________________________________________________
+------------------------------------------------------------------------------+
| .profile                                                                     |
+------------------------------------------------------------------------------+
|                                                                              |
|  # Method 1: with prompt.                                                    |
|  [ "$WAYLAND_DISPLAY" ] || {                                                 |
|      printf 'start wayland?'                                                 |
|      ! read -r || exec sway                                                  |
|  }                                                                           |
|                                                                              |
|  # Method 2: auto if not running.                                            |
|  [ "$WAYLAND_DISPLAY" ] || exec sway                                         |
|                                                                              |
+------------------------------------------------------------------------------+
Further Steps
________________________________________________________________________________
Refer to the documentation of your chosen compositor.
References
________________________________________________________________________________
[0]  https://wayland.freedesktop.org/
[1]  https://wayland.freedesktop.org/faq.html#heading_toc_j_4
[2]  https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)
[3]  https://lwn.net/Articles/413335/
[4]  https://cgit.freedesktop.org/wayland/wayland/commit/?id=97f1ebe8d5c2e166fabf757182c289fed266a45a
[5]  https://github.com/swaywm/sway/issues/490
[6]  https://drewdevault.com/2017/10/26/Fuck-you-nvidia.html
________________________________________________________________________________
Dylan Araps (C) 2019-2021
The registered trademark Linux(R) is used pursuant to a sublicense from the
Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark
on a world­wide basis.