Wayland: Difference between revisions

imported>Spitzeqc
Added basics for enabling Wayland
Malix (talk | contribs)
m Electron and Chromium: general enhancements
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Expansion|Verify accuracy of article}}
{{Expansion|Verify accuracy of article}}
[https://wayland.freedesktop.org/ Wayland] is a modern display server protocol intended as a replacement for the legacy [[Xorg | X11]] system.
For additional details, see {{NixOS Manual|anchor=#sec-wayland|name=NixOS Manual: Chapter - Wayland}}.


== Checking for Wayland ==
== Checking for Wayland ==
Line 31: Line 35:
=== X and Wayland support ===
=== X and Wayland support ===


* [https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/desktops/gnome/core/mutter/default.nix Mutter] is the default [[GNOME]] Desktop Environment/Compositor.
* [https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/desktops/gnome/core/mutter/default.nix Mutter] is the default compositor for [[GNOME]] Desktop Environment.
* [https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/desktops/plasma-5/default.nix Plasma] is the default [[KDE]] Desktop Environment/Compositor.
* [https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/desktops/plasma-5/kwin/default.nix KWin] is the default compositor for [[KDE]] Desktop Environment.


== Applications ==
== Applications ==
Line 38: Line 42:


==== Electron and Chromium ====
==== Electron and Chromium ====
Ozone Wayland support in [[Chromium]] and [[Electron]] based applications (which allow these applications to run on Wayland native instead of Xwayland) can be enabled by setting the environment variable "<code>NIXOS_OWONE_WL</code>" with <code>NIXOS_OZONE_WL=1</code>
===== Example =====
{{File|3=environment.sessionVariables.NIXOS_OZONE_WL = "1";|name=/etc/nixos/configuration.nix|lang=nix}}


<!-- I kept getting META error when trying {{ic|NIXOS_OZONE_WL=1}}, and replacing the equals with &equals; didn't work either — does anyone know how to markup this correctly? -->
== See also ==
As of NixOS 22.05 ("Quokka"), you can enable Ozone Wayland support in [[Chromium]] and [[Electron]] based applications by setting the environment variable <code>NIXOS_OZONE_WL=1</code>. For example, in a {{ic|configuration.nix}}:


<syntaxhighlight lang="nix">
* [[Xorg]]
environment.sessionVariables.NIXOS_OZONE_WL = "1";
</syntaxhighlight>


This allows these applications to run without Xwayland.
[[Category:Desktop]]