<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cubi</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cubi"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Cubi"/>
	<updated>2026-05-09T15:59:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Wayland&amp;diff=32021</id>
		<title>Wayland</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Wayland&amp;diff=32021"/>
		<updated>2026-02-07T08:54:31Z</updated>

		<summary type="html">&lt;p&gt;Cubi: fixing it, previous one i edited in threw xdg missing errors for pipewire, THIS should be fine now as i just tested as it works in pipewire.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://en.wikipedia.org/wiki/Wayland%20(protocol) Wayland] is a new display protocol that aims to replace [[Xorg|X11]]. Wayland requires a [[Seat manager|seat manager]] to work.  &lt;br /&gt;
&lt;br /&gt;
The {{ic|setup-wayland-base}} script installs and enables [[elogind]] as [[Seat manager|seat manager]] besides enabling [[Repositories#Community|community repository]] and [[eudev]].&lt;br /&gt;
&lt;br /&gt;
== Compositors ==&lt;br /&gt;
&lt;br /&gt;
Display servers that implement the Wayland display server protocol are also called Wayland compositors because they additionally perform the task of a compositing window manager. &lt;br /&gt;
&lt;br /&gt;
Multiple compositor implementations exist, including [[Sway]], [https://en.wikipedia.org/wiki/Mutter%20(software) Mutter] ([[GNOME]]&#039;s compositor) and [https://en.wikipedia.org/wiki/KWin Kwin] ([[KDE]]&#039;s compositor). The following [[:Category:Compositor|compositors]] are available in Alpine Linux. &lt;br /&gt;
&lt;br /&gt;
== XWayland ==&lt;br /&gt;
&lt;br /&gt;
XWayland is an X server that can be instructed to run under Wayland so as to enable certain native X11 applications that have not been fully upgraded for Wayland.  However, XWayland is a compatibility layer that is still not sufficiently effective to run native X11 graphical applications that still require running as root without advanced configuration, such as &#039;&#039;&#039;gparted&#039;&#039;&#039;, as XWayland does not have root permissions as per Wayland protocols and for the sake of enhanced security.&lt;br /&gt;
&lt;br /&gt;
Although the X11 protocol design seeks to include flexibility and network transparency, consider that the use of XWayland reintroduces certain [https://biggo.com/news/202511040138_X11-Wayland-Security-Debate X11 design vulnerabilities] into a Wayland session that was originally designed to avoid them, potentially including &#039;&#039;keylogging&#039;&#039; (capturing keystrokes)/taking screenshots/moving/resizing of other windows, although patches are applied where possible.&lt;br /&gt;
&lt;br /&gt;
{{Pkg|xwayland}} is typically bundled with compositors.  To check performance without XWayland, attempt to disable it on the compositor first (this can be achieved, for example, in [[Sway]], by adding the line {{ic|xwayland disable}}, say, near the top of the {{Path|~/.config/sway/config}} file).  If performance for your packages appears satisfactory, the package could be attempted to be removed in various compositors, including &#039;&#039;&#039;Sway&#039;&#039;&#039;, but it is a dependency on others, such as &#039;&#039;&#039;Labwc&#039;&#039;&#039;, &#039;&#039;&#039;river-classic&#039;&#039;&#039;, &#039;&#039;&#039;Cagebreak&#039;&#039;&#039;;   ensure that &#039;&#039;&#039;apk&#039;&#039;&#039; does not indicate that it is a dependency to a given package when removing it:&lt;br /&gt;
{{Cmd|$ doas apk del xwayland}}&lt;br /&gt;
&lt;br /&gt;
== Wayback ==&lt;br /&gt;
{{Main|Wayback}}&lt;br /&gt;
&lt;br /&gt;
Wayback is another X11 compatibility layer, but unlike XWayland, it enables hosting a full X11 desktop environment on Wayland by enabling XWayland to run in rootful mode (future plans include enabling Wayback rootless mode).  This enables [[Xfce]] and [[MATE]] to run fully under Wayland.  However, as of December 2025, Wayback is still in alpha quality and thus not recommended for production.&lt;br /&gt;
&lt;br /&gt;
== XDG_RUNTIME_DIR ==&lt;br /&gt;
&lt;br /&gt;
As per the protocol specifications, Wayland compositors require the &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; variable to be set. When setting paths for {{ic|XDG_RUNTIME_DIR}}, at all times they should follow [https://specifications.freedesktop.org/basedir/latest/#variables &#039;&#039;&#039;XDG specifications&#039;&#039;&#039;]. &lt;br /&gt;
&lt;br /&gt;
{{Note|If &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; variable is set inside startup script/file, it MUST be initialised before the Wayland compositor and the D-Bus session instances are started.}}&lt;br /&gt;
&lt;br /&gt;
=== With elogind ===&lt;br /&gt;
&lt;br /&gt;
When using [[elogind]] as a seat manager, it exports &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; and other XDG environment variables automatically for each session. No further configuration is required. &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; would be set as {{Path|/run/user/$(id -u)}} by &#039;&#039;&#039;elogind&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== With pam_rundir === &lt;br /&gt;
&lt;br /&gt;
[https://github.com/jjk-jacky/pam_rundir pam_rundir] is a [[PAM]] module that provides the runtime directory variable. Installing the package {{pkg|pam-rundir}} takes care of dependencies and no further configuration is required. &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; would be set as  {{Path|/run/user/$(id -u)}} by pam_rundir. &lt;br /&gt;
&lt;br /&gt;
=== With mkrundir ===&lt;br /&gt;
&lt;br /&gt;
[https://git.sr.ht/~whynothugo/mkrundir mkrundir] is an executable that can be used to initialise the runtime directory explicitly by each user. To use &amp;lt;code&amp;gt;mkrundir&amp;lt;/Code&amp;gt;, install the package {{pkg|mkrundir}} available in [[Repositories#Testing|testing]] repository. &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; would be set as {{Path|/run/user-$UID}} by mkrundir.  In your shell init script (e.g.: {{Path|~/.profile}} include an entry as follows at the &#039;&#039;&#039;top&#039;&#039;&#039; of the file {{Cat|~/.profile|...&lt;br /&gt;
export XDG_RUNTIME_DIR{{=}}$(mkrundir)&lt;br /&gt;
...}}&lt;br /&gt;
&lt;br /&gt;
As per [https://git.sr.ht/~whynothugo/mkrundir mkrundir] website, this might have issues inside containers, due to privilege escalation.&lt;br /&gt;
&lt;br /&gt;
=== Creating and exporting XDG_RUNTIME_DIR manually ===&lt;br /&gt;
&lt;br /&gt;
Generally, care should be taken when configuring the &amp;lt;code&amp;gt;XDG_*&amp;lt;/code&amp;gt; variables manually as this configuration may have errors or conflict with other utilities that do this automatically. Use this only on a system that&#039;s not using [[elogind]] and other solutions outlined above cannot handle this. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; can be initialised manually by adding below snippet to shell init scripts (e.g.: {{Path|~/.profile}}):&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.profile|&amp;lt;nowiki&amp;gt;if test -z &amp;quot;${XDG_RUNTIME_DIR}&amp;quot;; then&lt;br /&gt;
  export XDG_RUNTIME_DIR=/tmp/xdg/&amp;quot;${UID}&amp;quot;-xdg-runtime-dir&lt;br /&gt;
    if ! test -d &amp;quot;${XDG_RUNTIME_DIR}&amp;quot;; then&lt;br /&gt;
      mkdir -p &amp;quot;${XDG_RUNTIME_DIR}&amp;quot;&lt;br /&gt;
      chmod 0700 &amp;quot;${XDG_RUNTIME_DIR}&amp;quot;&lt;br /&gt;
    fi&lt;br /&gt;
fi &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== error: XDG_RUNTIME_DIR is invalid or not set in the environment ===&lt;br /&gt;
&lt;br /&gt;
The above error message appears when starting services/applications that require the environment variable [[#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] to be set. Fix it using one of the above methods before proceeding. &lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Kodi]]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Wayland Wayland - Arch Wiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Wayland Wayland - Gentoo Wiki]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Wayland_(protocol) Wayland (protocol) - Wikipedia]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Wayland]]&lt;br /&gt;
[[Category:Compositor]]&lt;/div&gt;</summary>
		<author><name>Cubi</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Wayland&amp;diff=32020</id>
		<title>Wayland</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Wayland&amp;diff=32020"/>
		<updated>2026-02-07T06:40:02Z</updated>

		<summary type="html">&lt;p&gt;Cubi: Current method that&amp;#039;s listed on the page will throw a lack of permission error, this method actually works as I just tested on a fresh system just now.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://en.wikipedia.org/wiki/Wayland%20(protocol) Wayland] is a new display protocol that aims to replace [[Xorg|X11]]. Wayland requires a [[Seat manager|seat manager]] to work.  &lt;br /&gt;
&lt;br /&gt;
The {{ic|setup-wayland-base}} script installs and enables [[elogind]] as [[Seat manager|seat manager]] besides enabling [[Repositories#Community|community repository]] and [[eudev]].&lt;br /&gt;
&lt;br /&gt;
== Compositors ==&lt;br /&gt;
&lt;br /&gt;
Display servers that implement the Wayland display server protocol are also called Wayland compositors because they additionally perform the task of a compositing window manager. &lt;br /&gt;
&lt;br /&gt;
Multiple compositor implementations exist, including [[Sway]], [https://en.wikipedia.org/wiki/Mutter%20(software) Mutter] ([[GNOME]]&#039;s compositor) and [https://en.wikipedia.org/wiki/KWin Kwin] ([[KDE]]&#039;s compositor). The following [[:Category:Compositor|compositors]] are available in Alpine Linux. &lt;br /&gt;
&lt;br /&gt;
== XWayland ==&lt;br /&gt;
&lt;br /&gt;
XWayland is an X server that can be instructed to run under Wayland so as to enable certain native X11 applications that have not been fully upgraded for Wayland.  However, XWayland is a compatibility layer that is still not sufficiently effective to run native X11 graphical applications that still require running as root without advanced configuration, such as &#039;&#039;&#039;gparted&#039;&#039;&#039;, as XWayland does not have root permissions as per Wayland protocols and for the sake of enhanced security.&lt;br /&gt;
&lt;br /&gt;
Although the X11 protocol design seeks to include flexibility and network transparency, consider that the use of XWayland reintroduces certain [https://biggo.com/news/202511040138_X11-Wayland-Security-Debate X11 design vulnerabilities] into a Wayland session that was originally designed to avoid them, potentially including &#039;&#039;keylogging&#039;&#039; (capturing keystrokes)/taking screenshots/moving/resizing of other windows, although patches are applied where possible.&lt;br /&gt;
&lt;br /&gt;
{{Pkg|xwayland}} is typically bundled with compositors.  To check performance without XWayland, attempt to disable it on the compositor first (this can be achieved, for example, in [[Sway]], by adding the line {{ic|xwayland disable}}, say, near the top of the {{Path|~/.config/sway/config}} file).  If performance for your packages appears satisfactory, the package could be attempted to be removed in various compositors, including &#039;&#039;&#039;Sway&#039;&#039;&#039;, but it is a dependency on others, such as &#039;&#039;&#039;Labwc&#039;&#039;&#039;, &#039;&#039;&#039;river-classic&#039;&#039;&#039;, &#039;&#039;&#039;Cagebreak&#039;&#039;&#039;;   ensure that &#039;&#039;&#039;apk&#039;&#039;&#039; does not indicate that it is a dependency to a given package when removing it:&lt;br /&gt;
{{Cmd|$ doas apk del xwayland}}&lt;br /&gt;
&lt;br /&gt;
== Wayback ==&lt;br /&gt;
{{Main|Wayback}}&lt;br /&gt;
&lt;br /&gt;
Wayback is another X11 compatibility layer, but unlike XWayland, it enables hosting a full X11 desktop environment on Wayland by enabling XWayland to run in rootful mode (future plans include enabling Wayback rootless mode).  This enables [[Xfce]] and [[MATE]] to run fully under Wayland.  However, as of December 2025, Wayback is still in alpha quality and thus not recommended for production.&lt;br /&gt;
&lt;br /&gt;
== XDG_RUNTIME_DIR ==&lt;br /&gt;
&lt;br /&gt;
As per the protocol specifications, Wayland compositors require the &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; variable to be set. When setting paths for {{ic|XDG_RUNTIME_DIR}}, at all times they should follow [https://specifications.freedesktop.org/basedir/latest/#variables &#039;&#039;&#039;XDG specifications&#039;&#039;&#039;]. &lt;br /&gt;
&lt;br /&gt;
{{Note|If &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; variable is set inside startup script/file, it MUST be initialised before the Wayland compositor and the D-Bus session instances are started.}}&lt;br /&gt;
&lt;br /&gt;
=== With elogind ===&lt;br /&gt;
&lt;br /&gt;
When using [[elogind]] as a seat manager, it exports &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; and other XDG environment variables automatically for each session. No further configuration is required. &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; would be set as {{Path|/run/user/$(id -u)}} by &#039;&#039;&#039;elogind&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== With pam_rundir === &lt;br /&gt;
&lt;br /&gt;
[https://github.com/jjk-jacky/pam_rundir pam_rundir] is a [[PAM]] module that provides the runtime directory variable. Installing the package {{pkg|pam-rundir}} takes care of dependencies and no further configuration is required. &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; would be set as  {{Path|/run/user/$(id -u)}} by pam_rundir. &lt;br /&gt;
&lt;br /&gt;
=== With mkrundir ===&lt;br /&gt;
&lt;br /&gt;
[https://git.sr.ht/~whynothugo/mkrundir mkrundir] is an executable that can be used to initialise the runtime directory explicitly by each user. To use &amp;lt;code&amp;gt;mkrundir&amp;lt;/Code&amp;gt;, install the package {{pkg|mkrundir}} available in [[Repositories#Testing|testing]] repository. &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; would be set as {{Path|/run/user-$UID}} by mkrundir.  In your shell init script (e.g.: {{Path|~/.profile}} include an entry as follows at the &#039;&#039;&#039;top&#039;&#039;&#039; of the file {{Cat|~/.profile|...&lt;br /&gt;
export XDG_RUNTIME_DIR{{=}}$(mkrundir)&lt;br /&gt;
...}}&lt;br /&gt;
&lt;br /&gt;
As per [https://git.sr.ht/~whynothugo/mkrundir mkrundir] website, this might have issues inside containers, due to privilege escalation.&lt;br /&gt;
&lt;br /&gt;
=== Creating and exporting XDG_RUNTIME_DIR manually ===&lt;br /&gt;
&lt;br /&gt;
Generally, care should be taken when configuring the &amp;lt;code&amp;gt;XDG_*&amp;lt;/code&amp;gt; variables manually as this configuration may have errors or conflict with other utilities that do this automatically. Use this only on a system that&#039;s not using [[elogind]] and other solutions outlined above cannot handle this. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; can be initialised manually by adding below snippet to shell init scripts (e.g.: {{Path|~/.profile}}):&lt;br /&gt;
&lt;br /&gt;
{{Cat|~/.profile|&amp;lt;nowiki&amp;gt;if test -z &amp;quot;${XDG_RUNTIME_DIR}&amp;quot;; then&lt;br /&gt;
  export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir&lt;br /&gt;
  if ! test -d &amp;quot;${XDG_RUNTIME_DIR}&amp;quot;; then&lt;br /&gt;
    mkdir &amp;quot;${XDG_RUNTIME_DIR}&amp;quot;&lt;br /&gt;
    chmod 0700 &amp;quot;${XDG_RUNTIME_DIR}&amp;quot;&lt;br /&gt;
  fi&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== error: XDG_RUNTIME_DIR is invalid or not set in the environment ===&lt;br /&gt;
&lt;br /&gt;
The above error message appears when starting services/applications that require the environment variable [[#XDG_RUNTIME_DIR|XDG_RUNTIME_DIR]] to be set. Fix it using one of the above methods before proceeding. &lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Kodi]]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Wayland Wayland - Arch Wiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Wayland Wayland - Gentoo Wiki]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Wayland_(protocol) Wayland (protocol) - Wikipedia]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Wayland]]&lt;br /&gt;
[[Category:Compositor]]&lt;/div&gt;</summary>
		<author><name>Cubi</name></author>
	</entry>
</feed>