# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2026-02-22 15:58+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: YAML Front Matter: description #: documentation/content/en/books/handbook/wayland/_index.adoc:1 #, no-wrap msgid "This chapter describes how to install and configure Wayland and compositors on FreeBSD, which provides a graphical user environment" msgstr "" #. type: YAML Front Matter: part #: documentation/content/en/books/handbook/wayland/_index.adoc:1 #, no-wrap msgid "Part I. Getting Started" msgstr "" #. type: YAML Front Matter: title #: documentation/content/en/books/handbook/wayland/_index.adoc:1 #, no-wrap msgid "Chapter 6. Wayland" msgstr "" #. type: Title = #: documentation/content/en/books/handbook/wayland/_index.adoc:15 #, no-wrap msgid "Wayland on FreeBSD" msgstr "" #. type: Title == #: documentation/content/en/books/handbook/wayland/_index.adoc:53 #, no-wrap msgid "Synopsis" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:57 msgid "" "An installation of FreeBSD using bsdinstall does not automatically install a " "graphical user interface. This chapter describes how to select, install, " "and configure a Wayland compositor, which provides a graphical environment." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:59 msgid "Before reading this chapter:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:61 msgid "" "Know how to install crossref:ports[ports,additional third-party software]." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:63 msgid "" "Know how to identify and configure crossref:x11[x-graphic-card-" "drivers,drivers for the graphics hardware]." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:65 msgid "Read this chapter to learn:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:67 msgid "How to configure FreeBSD to host a Wayland graphical environment." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:69 msgid "How to install and configure a Wayland compositor." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:71 msgid "How to run programs designed for the older X Window System." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:73 msgid "" "How to configure remote desktop access to a Wayland graphical environment." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/wayland/_index.adoc:75 #, no-wrap msgid "Wayland Overview" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:81 msgid "" "Wayland is a communication protocol that can replace a display server such " "as Xorg. It differs from Xorg in several important ways. First, Wayland is " "only a protocol that acts as an intermediary between clients using a " "mechanism which removes the dependency on an X server. Xorg includes both " "the X11 protocol, used to run remote displays, and the X server, used to " "accept connections and display windows. Under Wayland, the compositor or " "window manager provides the display server instead of a traditional X server." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:84 msgid "" "Since Wayland is not an X server, traditional X screen connections will need " "to utilize other methods such as VNC or RDP for remote desktop management. " "Second, Wayland can manage composite communications between clients and a " "compositor as a separate entity which does not need to support the X " "protocols." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:88 msgid "" "Wayland is relatively new, and not all software has been updated to run " "natively without `Xwayland` support. Because Wayland does not provide the X " "server, and expects compositors to provide that support, X11 window managers " "that do not yet support Wayland will require that `Xwayland` is not started " "with the `-rootless` parameter. The `-rootless` parameter, when removed, " "will restore X11 window manager support." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:93 msgid "" "The current NVIDIA(R) driver should work with most wlroots compositors, but " "it may be a little unstable and not support all features at this time. " "Volunteers to help work on the NVIDIA(R) DRM are requested." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:97 msgid "" "Currently, a lot of software will function with minimal issues on Wayland, " "including Firefox. And a few desktops are also available, such as the " "Compiz Fusion replacement, known as Wayfire, and the i3 window manager " "replacement, Sway." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:104 msgid "" "As of May, 2021, plasma5-kwin does support Wayland on FreeBSD. To use " "Plasma under Wayland, use the `startplasma-wayland` parameter to `ck-launch-" "session` and tie in dbus with: `dbus-launch --exit-with-x11 ck-launch-" "session startplasma-wayland` to get it working." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:110 msgid "" "For compositors, a kernel supporting the man:evdev[4] driver must exist to " "utilize the keybinding functionality. This is built into the " "[.filename]#GENERIC# kernel by default; however, if it has been customized " "and man:evdev[4] support was stripped out, the man:evdev[4] module will need " "to be loaded. In addition, users of `Wayland` will need to be members of " "the `video` group. To quickly make this change, use the `pw` command:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:114 #, no-wrap msgid "pw groupmod video -m user\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:119 msgid "" "Installing Wayland is simple; there is not a great deal of configuration for " "the protocol itself. Most of the composition will depend on the chosen " "compositor. By installing `seatd` now, a step is skipped as part of the " "compositor installation and configuration as `seatd` is needed to provide " "non-root access to certain devices." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:122 msgid "" "All of the compositors described here should work with package:graphics/drm-" "kmod[] open source drivers; however, the NVIDIA(R) graphics cards may have " "issues when using the proprietary drivers. Begin by installing the " "following packages:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:126 #, no-wrap msgid "# pkg install wayland seatd\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:133 msgid "" "Once the protocol and supporting packages have been installed, a compositor " "must create the user interface. Several compositors will be covered in the " "following sections. All compositors using Wayland will need a runtime " "directory defined in the environment. Since FreeBSD 14.1, this is created " "and defined automatically. For previous versions, this is achieved with the " "following command in the bourne shell:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:137 #, no-wrap msgid "% export XDG_RUNTIME_DIR=/var/run/user/`id -u`\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:142 msgid "" "It is important to note that most compositors will search the " "XDG_RUNTIME_DIR directory for the configuration files. In the examples " "included here, a parameter will be used to specify a configuration file in " "[.filename]#~/.config# to keep temporary files and configuration files " "separate. It is recommended that an alias be configured for each compositor " "to load the designated configuration file." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:150 msgid "" "It has been reported that ZFS users may experience issues with some Wayland " "clients because they need access to `posix_fallocate()` in the runtime " "directory. While the author could not reproduce this issue on their ZFS " "system, a recommended workaround is not to use ZFS for the runtime directory " "and instead use `tmpfs` for the [.filename]#/var/run# directory. In this " "case, the `tmpfs` file system is used for [.filename]#/var/run# and mounted " "through the command `mount -t tmpfs tmpfs /var/run` command and then make " "this change persist across reboots through [.filename]#/etc/fstab#. The " "XDG_RUNTIME_DIR environment variable could be configured to use [.filename]#/" "var/run/user/$UID# and avoid potential pitfalls with ZFS. Consider that " "scenario when reviewing the configuration examples in the following sections." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:155 msgid "" "The seatd daemon helps manage access to shared system devices for non-root " "users in compositors; this includes graphics cards. For traditional X11 " "managers, `seatd` is not needed, such as both Plasma and GNOME, but for the " "Wayland compositors discussed here, it will need enabled on the system and " "be running before starting a compositor environment. To enable and start " "the `seatd` daemon now, and on system initialization:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:160 #, no-wrap msgid "" "# sysrc seatd_enable=\"YES\"\n" "# service seatd start\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:164 msgid "" "Afterward, a compositor, which is similar to an X11 desktop, will need to be " "installed for the GUI environment. Three are discussed here, including " "basic configuration options, setting up a screen lock, and recommendations " "for more information." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/wayland/_index.adoc:166 #, no-wrap msgid "The Wayfire Compositor" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:171 msgid "" "Wayfire is a compositor that aims to be lightweight and customizable. " "Several features are available, and it brings back several elements from the " "previously released Compiz Fusion desktop. All of the parts look beautiful " "on modern hardware. To get Wayfire up and running, begin by installing the " "required packages:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:175 #, no-wrap msgid "# pkg install wayfire wf-shell alacritty swaylock-effects swayidle wlogout kanshi mako wlsunset\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:181 msgid "" "The `alacritty` package provides a terminal emulator. Still, it is not " "completely required as other terminal emulators such as `kitty`, and XFCE-4 " "`Terminal` have been tested and verified to work under the Wayfire " "compositor. Wayfire configuration is relatively simple; it uses a file that " "should be reviewed for any customizations. To begin, copy the example file " "over to the runtime environment configuration directory and then edit the " "file:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:186 #, no-wrap msgid "" "% mkdir ~/.config/wayfire\n" "% cp /usr/local/share/examples/wayfire/wayfire.ini ~/.config/wayfire\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:191 msgid "" "The defaults for most users should be fine. Within the configuration file, " "items like the famous `cube` are pre-configured, and there are instructions " "to help with the available settings. A few primary settings of note include:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:199 #, no-wrap msgid "" "[output]\n" "mode = 1920x1080@60000\n" "position = 0,0\n" "transform = normal\n" "scale = 1.000000\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:207 msgid "" "In this example, from the configuration file, the screen's output should be " "the listed mode at the listed hertz. For example, the mode should be set to " "`widthxheight@refresh_rate`. The position places the output at a specific " "pixel location specified. The default should be fine for most users. " "Finally, transform sets a background transform, and scale will scale the " "output to the specified scale factor. The defaults for these options are " "generally acceptable; for more information, see the documentation." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:211 msgid "" "As mentioned, Wayland is new, and not all applications work with the " "protocol yet. At this time, `sddm` does not appear to support starting and " "managing compositors in Wayland. The `swaylock` utility has been used " "instead in these examples. The configuration file contains options to run " "`swayidle` and `swaylock` for idle and locking of the screen." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:213 msgid "" "This option to define the action to take when the system is idle is listed " "as:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:217 #, no-wrap msgid "idle = swaylock\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:220 msgid "And the lock timeout is configured using the following lines:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:227 #, no-wrap msgid "" "[idle]\n" "toggle = KEY_Z\n" "screensaver_timeout = 300\n" "dpms_timeout = 600\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:230 msgid "" "The first option will lock the screen after 300 seconds, and after another " "300, the screen will shut off through the `dpms_timeout` option." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:238 msgid "" "One final thing to note is the key. Most of the configuration " "mentions this key, and it is the traditional `Windows` key on the keyboard. " "Most keyboards have this super key available; however, it should be remapped " "within this configuration file if it is not available. For example, to lock " "the screen, press and hold the super key, the kbd:[shift] key, and press the " "kbd:[escape] key. Unless the mappings have changed, this will execute the " "swaylock application. The default configuration for `swaylock` will show a " "grey screen; however, the application is highly customizable and well " "documented. In addition, since the swaylock-effects is the version that was " "installed, there are several options available such as the blur effect, " "which can be seen using the following command:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:242 #, no-wrap msgid "% swaylock --effect-blur 7x5\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:248 msgid "" "There is also the `--clock` parameter which will display a clock with the " "date and time on the lock screen. When package:x11/swaylock-effects[] was " "installed, a default [.filename]#pam.d# configuration was included. It " "provides the default options that should be fine for most users. More " "advanced options are available; see the PAM documentation for more " "information." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:251 msgid "" "At this point, it is time to test Wayfire and see if it can start up on the " "system. Just type the following command:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:255 #, no-wrap msgid "% wayfire -c ~/.config/wayfire/wayfire.ini\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:262 msgid "" "The compositor should now start and display a background image along with a " "menu bar at the top of the screen. Wayfire will attempt to list installed " "compatible applications for the desktop and present them in this drop-down " "menu; for example, if the XFCE-4 file manager is installed, it will show up " "in this drop-down menu. If a specific application is compatible and " "valuable enough for a keyboard shortcut, it may be mapped to a keyboard " "sequence using the [.filename]#wayfire.ini# configuration file. Wayfire " "also has a configuration tool named Wayfire Config Manager. It is located " "in the drop-down menu bar but may also be started through a terminal by " "issuing the following command:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:266 #, no-wrap msgid "% wcm\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:270 msgid "" "Various Wayfire configuration options, including the composite special " "effects, maybe enabled, disabled, or configured through this application. " "In addition, for a more user-friendly experience, a background manager, " "panel, and docking application may be enabled in the configuration file:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:276 #, no-wrap msgid "" "panel = wf-panel\n" "dock = wf-dock\n" "background = wf-background\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:282 msgid "" "Changes made through `wcm` will overwrite custom changes in the " "[.filename]#wayfire.ini# configuration file. The [.filename]#wayfire.ini# " "file is highly recommended to be backed up so any essential changes may be " "restored." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:285 msgid "" "Finally, the default launcher listed in the [.filename]#wayfire.ini# is " "package:x11/wf-shell[] which may be replaced with other panels if desired by " "the user." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/wayland/_index.adoc:287 #, no-wrap msgid "The Hikari Compositor" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:297 msgid "" "The Hikari compositor uses several concepts centered around productivity, " "such as sheets, workspaces, and more. In that way, it resembles a tiling " "window manager. Breaking this down, the compositor starts with a single " "workspace, which is similar to virtual desktops. Hikari uses a single " "workspace or virtual desktop for user interaction. The workspace is made up " "of several views, which are the working windows in the compositor grouped as " "either sheets or groups. Both sheets and groups are made up of a collection " "of views; again, the windows that are grouped together. When switching " "between sheets or groups, the active sheet or group will become known " "collectively as the workspace. The manual page will break this down into " "more information on the functions of each but for this document, just " "consider a single workspace utilizing a single sheet. Hikari installation " "will comprise of a single package, package:x11-wm/hikari[], and a terminal " "emulator `alacritty`:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:301 #, no-wrap msgid "# pkg install hikari alacritty\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:306 msgid "" "Other shells, such as `kitty` or the Plasma `Terminal`, will function under " "Wayland. Users should experiment with their favorite terminal editor to " "validate compatibility." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:311 msgid "" "Hikari uses a configuration file, [.filename]#hikari.conf#, which could " "either be placed in the XDG_RUNTIME_DIR or specified on startup using the `-" "c` parameter. An autostart configuration file is not required but may make " "the migration to this compositor a little easier. Beginning the " "configuration is to create the Hikari configuration directory and copy over " "the configuration file for editing:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:316 #, no-wrap msgid "" "% mkdir ~/.config/hikari\n" "% cp /usr/local/etc/hikari/hikari.conf ~/.config/hikari\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:322 msgid "" "The configuration is broken out into various stanzas such as ui, outputs, " "layouts, and more. For most users, the defaults will function fine; " "however, some important changes should be made. For example, the $TERMINAL " "variable is normally not set within the user's environment. Changing this " "variable or altering the [.filename]#hikari.conf# file to read:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:326 #, no-wrap msgid "terminal = \"/usr/local/bin/alacritty\"\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:334 msgid "" "Will launch the `alacritty` terminal using the bound key press. While going " "through the configuration file, it should be noted that the capital letters " "are used to map keys out for the user. For example, the kbd:[L] key for " "starting the terminal kbd:[L+Return] is actually the previously discussed " "super key or Windows logo key. Therefore, holding the kbd:[L/super/Windows] " "key and pressing kbd:[Enter] will open the specified terminal emulator with " "the default configuration. Mapping other keys to applications require an " "action definition to be created. For this, the action item should be listed " "in the actions stanza, for example:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:341 #, no-wrap msgid "" "actions {\n" " terminal = \"/usr/local/bin/alacritty\"\n" " browser = \"/usr/local/bin/firefox\"\n" "}\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:344 msgid "" "Then an action may be mapped under the keyboard stanza, which is defined " "within the bindings stanza:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:353 #, no-wrap msgid "" "bindings {\n" " keyboard {\n" "SNIP\n" " \"L+Return\" = action-terminal\n" " \"L+b\" = action-browser\n" "SNIP\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:359 msgid "" "After Hikari is restarted, holding the Windows logo button and pressing the " "kbd:[b] key on the keyboard will start the web browser. The compositor does " "not have a menu bar, and it is recommended the user set up, at minimal, a " "terminal emulator before migration. The manual page contains a great deal " "of documentation it should be read before performing a full migration. " "Another positive aspect about Hikari is that, while migrating to the " "compositor, Hikari can be started in the Plasma and GNOME desktop " "environments, allowing for a test-drive before completely migrating." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:366 msgid "" "Locking the screen in Hikari is easy because a default [.filename]#pam.d# " "configuration file and unlock utility are bundled with the package. The key " "binding for locking the screen is kbd:[L] (Windows logo key)+ kbd:[Shift] + " "kbd:[Backspace]. It should be noted that all views not marked public will " "be hidden. These views will never accept input when locked but beware of " "sensitive information being visible. For some users, it may be easier to " "migrate to a different screen locking utility such as swaylock-effects, " "discussed in this section. To start Hikari, use the following command:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:370 #, no-wrap msgid "% hikari -c ~/.config/hikari/hikari.conf\n" msgstr "" #. type: Title == #: documentation/content/en/books/handbook/wayland/_index.adoc:373 #, no-wrap msgid "The Sway Compositor" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:377 msgid "" "The Sway compositor is a tiling compositor that attempts to replace the i3 " "windows manager. It should work with the user's current i3 configuration; " "however, new features may require some additional setup." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:381 msgid "" "Before starting the Sway installation, ensure that a graphics card (GPU) is " "installed and configured correctly. Refer to the section crossref:x11[x-" "graphic-card-drivers,drivers for the graphics hardware] for guidance. This " "step is essential for the Sway compositor to function properly." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:384 msgid "" "In the forthcoming examples, a fresh installation without migrating any i3 " "configuration will be assumed. To install Sway and valuable components, " "issue the following command as the root user:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:388 #, no-wrap msgid "# pkg install sway swayidle swaylock-effects alacritty dmenu-wayland dmenu\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:391 msgid "" "For a basic configuration file, issue the following commands and then edit " "the configuration file after it is copied:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:396 #, no-wrap msgid "" "% mkdir ~/.config/sway\n" "% cp /usr/local/etc/sway/config ~/.config/sway\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:400 msgid "" "The base configuration file has many defaults, which will be fine for most " "users. Several important changes should be made like the following:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:416 #, no-wrap msgid "" "# Logo key. Use Mod1 for Alt.\n" "input * xkb_rules evdev\n" "set $mod Mod4\n" "# The preferred terminal emulator\n" "set $term alacritty\n" "set $lock swaylock -f -c 000000\n" "output \"My Workstation\" mode 1366x768@60Hz position 1366 0\n" "output * bg ~/wallpapers/mywallpaper.png stretch\n" "### Idle configuration\n" "exec swayidle -w \\\n" " timeout 300 'swaylock -f -c 000000' \\\n" " timeout 600 'swaymsg \"output * dpms off\"' resume 'swaymsg \"output * dpms on\"' \\\n" " before-sleep 'swaylock -f -c 000000'\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:426 msgid "" "In the previous example, the `xkb` rules for man:evdev[4] events are loaded, " "and the $mod key is set to the Windows logo key for the key bindings. Next, " "the terminal emulator was set to be `alacritty`, and a screen lock command " "was defined; more on this later. The output keyword, the mode, the " "position, a background wallpaper, and Sway is also told to stretch this " "wallpaper to fill out the screen. Finally, `swayidle` is set to daemonize " "and lock the screen after a timeout of 300 seconds, placing the screen or " "monitor into sleep mode after 600 seconds. The locked background color of " "000000, which is black, is also defined here. Using swaylock-effects, a " "clock may also be displayed with the `--clock` parameter. See the manual " "page for more options. The man:sway-output[5] manual page should also be " "reviewed; it includes a great deal of information on customing the output " "options available." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:434 msgid "" "While in Sway, to bring up a menu of applications, hold the Windows logo key " "(mod) and press the kbd:[d] key. The menu may be navigated using the arrow " "keys on the keyboard. There is also a method to manipulate the layout of " "the bar and add a tray; read the man:sway-bar[5] manual page for more " "information. The default configuration adds a date and time to the upper " "right-hand corner. See the `Bar` stanza in the configuration file for an " "example. By default, the configuration does not include locking the screen " "outside of the example above, enabling a lockout timer. Creating a lock key " "binding requires the following line to the `Key bindings` section:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:439 #, no-wrap msgid "" "# Lock the screen manually\n" "bindsym $mod+Shift+Return exec $lock\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:445 msgid "" "Now the screen may be locked using the combination of holding the Windows " "logo key, pressing and holding shift, and finally pressing return. When " "Sway is installed, whether from a package or the FreeBSD Ports Collection, a " "default file for [.filename]#pam.d# was installed. The default " "configuration should be acceptable for most users, but more advanced options " "are available. Read through the PAM documentation for more information." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:451 msgid "" "Finally, to exit Sway and return to the shell, hold the Windows logo key, " "the shift key, and press the kbd:[e] key. A prompt will be displayed with " "an option to exit Sway. During migration, Sway can be started through a " "terminal emulator on an X11 desktop such as Plasma. This makes testing " "different changes and key bindings a little easier prior to fully migrating " "to this compositor. To start Sway, issue the following command:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:455 #, no-wrap msgid "% sway -c ~/.config/sway/config\n" msgstr "" #. type: Title == #: documentation/content/en/books/handbook/wayland/_index.adoc:458 #, no-wrap msgid "Using Xwayland" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:462 msgid "" "When installing Wayland, the `Xwayland` binary should have been installed " "unless Wayland was built without X11 support. If the [.filename]#/usr/local/" "bin/Xwayland# file does not exist, install it using the following command:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:466 #, no-wrap msgid "# pkg install xwayland\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:472 msgid "" "The development version of Xwayland is recommended and was most likely " "installed with the Wayland package. Each compositor has a method of " "enabling or disabling this feature." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:476 msgid "" "Once `Xwayland` has been installed, configure it within the chosen " "compositor. For Wayfire, the following line is required in the " "[.filename]#wayfire.ini# file:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:480 #, no-wrap msgid "xwayland = true\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:484 msgid "" "For the Sway compositor, `Xwayland` should be enabled by default. Even so, " "it is recommended to manually add a configuration line in the " "[.filename]#~/.config/sway/config# like the following:" msgstr "" #. type: delimited block . 5 #: documentation/content/en/books/handbook/wayland/_index.adoc:488 #, no-wrap msgid "xwayland enable\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:493 msgid "" "Finally, for Hikari, no changes are needed. Support for `Xwayland` is built " "in by default. To disable that support, rebuild the package from the ports " "collection and disable Xwayland support at that time." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:497 msgid "" "After these changes are made, start the compositor at the command line and " "execute a terminal from the key bindings. Within this terminal, issue the " "`env` command and search for the `DISPLAY` variables. If the compositor was " "able to properly start the Xwayland X server, these environment variables " "should look similar to the following:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:501 #: documentation/content/en/books/handbook/wayland/_index.adoc:531 #, no-wrap msgid "% env | grep DISPLAY\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:507 #, no-wrap msgid "" "WAYLAND_DISPLAY=wayland-1\n" "DISPLAY=:0\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:513 msgid "" "In this output, there is a default Wayland display and a display set for the " "Xwayland server. Another method to verify that `Xwayland` is functioning " "properly is to use install and test the small package:[x11/eyes] and check " "the output. If the `xeyes` application starts and the eyes follow the mouse " "pointer, Xwayland is functioning properly. If an error such as the " "following is displayed, something happened during the `Xwayland` " "initialization and it may need reinstalled:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:517 #, no-wrap msgid "Error: Cannot open display wayland-0\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:523 msgid "" "A security feature of Wayland is that, without running an X server, there is " "not another network listener. Once `Xwayland` is enabled, this security " "feature is no longer applicable to the system." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:527 msgid "" "For some compositors, such as Wayfire, `Xwayland` may not start properly. " "As such, `env` will show the following information for the `DISPLAY` " "environment variables:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:537 #, no-wrap msgid "" "DISPLAY=wayland-1\n" "WAYLAND_DISPLAY=wayland-1\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:542 msgid "" "Even though `Xwayfire` was installed and configured, X11 applications will " "not start giving a display issue. To work around this, verify that there is " "already an instance of `Xwayland` using a UNIX socket through these two " "methods. First, check the output from `sockstat` and search for X11-unix:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:546 #, no-wrap msgid "% sockstat | grep x11\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:549 msgid "There should be something similar to the following information:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:557 #, no-wrap msgid "" "trhodes Xwayland 2734 8 stream /tmp/.X11-unix/X0\n" "trhodes Xwayland 2734 9 stream /tmp/.X11-unix/X0\n" "trhodes Xwayland 2734 10 stream /tmp/.X11-unix/X0\n" "trhodes Xwayland 2734 27 stream /tmp/.X11-unix/X0_\n" "trhodes Xwayland 2734 28 stream /tmp/.X11-unix/X0\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:561 msgid "" "This suggests the existence of an X11 socket. This can be further verified " "by attempting to execute `Xwayland` manually within a terminal emulator " "running under the compositor:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:565 #, no-wrap msgid "% Xwayland\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:568 msgid "" "If an X11 socket is already available, the following error should be " "presented to the user:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:577 #, no-wrap msgid "" "(EE)\n" "Fatal server error:\n" "(EE) Server is already active for display 0\n" "\tIf this server is no longer running, remove /tmp/.X0-lock\n" "\tand start again.\n" "(EE)\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:581 msgid "" "Since there is an active X display available using display zero, the " "environment variable was just set improperly, to fix this, change the " "`DISPLAY` environment variable to `:0` and attempt to execute the " "application again. The following example uses package:mail/claws-mail[] as " "the application which needs the `Xwayland` service:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:585 #, no-wrap msgid "export DISPLAY=:0\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:588 msgid "" "After this change, the package:mail/claws-mail[] application should now " "start using `Xwayland` and function as expected." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/wayland/_index.adoc:590 #, no-wrap msgid "Remote Desktop Using VNC" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:596 msgid "" "Earlier in this document it was noted that Wayland does not provide the same " "X server style access as Xorg provides. Instead, users are free to pick and " "choose a remote desktop protocol such as RDP or VNC. The FreeBSD Ports " "collection includes the `wayvnc`, which will support wlroots based " "compositors such as the ones discussed here. This application may be " "installed using:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:600 #, no-wrap msgid "# pkg install wayvnc\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:604 msgid "" "Unlike some other packages, `wayvnc` does not come with a configuration " "file. Thankfully, the manual page documents the important options and they " "may be extrapolated into a simple configuration file:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:613 #, no-wrap msgid "" "address=0.0.0.0\n" "enable_auth=true\n" "username=username\n" "password=password\n" "private_key_file=/path/to/key.pem\n" "certificate_file=/path/to/cert.pem\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:619 msgid "" "The key files will need to be generated, and it is highly recommended they " "be used for increased security of the connection. When invoked, wayvnc will " "search for the configuration file in [.filename]#~/.config/wayvnc/config#. " "This could be overwritten using the `-C configuration_file` option when " "starting the server. Thus, to start the `wayvnc` server, issue the " "following command:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:623 #, no-wrap msgid "% wayvnc -C ~/.config/wayvnc/config\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:630 msgid "" "At the time of this writing, there is no rc.d script to start `wayvnc` on " "system initialization. If that functionality is desired, a local startup " "file will need to be created. This is probably a feature request for the " "port maintainer." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/wayland/_index.adoc:633 #, no-wrap msgid "Wayland Login Manager" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:637 msgid "" "While several login managers exist and are slowly migrating to Wayland, one " "option is the package:x11/ly[] text user interface (TUI) manager. Needing " "minimal configuration, `ly` will start Sway, Wayfire, and others by " "presenting a login window on system initialization. To install `ly`, issue " "the following command:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:641 #, no-wrap msgid "# pkg install ly\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:644 msgid "" "There will be some configuration hints presented, the import steps are to " "add the following lines to [.filename]#/etc/gettytab#:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:650 #, no-wrap msgid "" "Ly:\\\n" " :lo=/usr/local/bin/ly:\\\n" " :al=root:\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:653 msgid "" "And then modify the ttyv1 line in [.filename]#/etc/ttys# to match the " "following line:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:657 #, no-wrap msgid "ttyv1 \"/usr/libexec/getty Ly\" xterm onifexists secure\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:662 msgid "" "After a system reboot, a login should appear. To configure specific " "settings, such as language and edit [.filename]#/usr/local/etc/ly/" "config.ini#. At minimal, this file should have the designated tty that was " "previously specified in [.filename]#/etc/ttys#." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:666 msgid "" "If setting ttyv0 up as the login terminal, it may be required to press the " "kbd:[alt] and kbd:[F1] keys to properly see the login window." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:669 msgid "" "When the login window appears, using the left and right arrows will swap " "through different, supported, window managers." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/wayland/_index.adoc:671 #, no-wrap msgid "Useful Utilities" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:677 msgid "" "One useful Wayland utility which all compositors can make use of is the " "waybar. While Wayfire does come with a launch menu, an easy-to-use and fast " "taskbar is a good accessory for any compositor or desktop manager. A " "Wayland compatible taskbar that is fast and easy to configure is waybar. To " "install the package and a supporting audio control utility, issue the " "following command:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:681 #, no-wrap msgid "# pkg install pavucontrol waybar\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:684 msgid "" "To create the configuration directory and copy over a default configuration " "file, execute the following commands:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:689 #, no-wrap msgid "" "% mkdir ~/.config/waybar\n" "% cp /usr/local/etc/xdg/waybar/config ~/.config/waybar\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:693 msgid "" "The `lavalauncher` utility provides a launch bar for various applications. " "There is no example configuration file provided with the package, so the " "following actions must be taken:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:697 #, no-wrap msgid "mkdir ~/.config/lavalauncher\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/wayland/_index.adoc:700 msgid "" "An example configuration file that only includes Firefox, and is placed on " "the right, is below:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:706 #, no-wrap msgid "" "global-settings {\n" "\twatch-config-file = true;\n" "}\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:711 #, no-wrap msgid "" "bar {\n" "\toutput = eDP-1;\n" "\tposition = bottom;\n" "\tbackground-colour = \"#202020\";\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:714 #, no-wrap msgid "" "\t# Condition for the default configuration set.\n" "\tcondition-resolution = wider-than-high;\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:718 #, no-wrap msgid "" "\tconfig {\n" "\t\tposition = right;\n" "\t}\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/wayland/_index.adoc:727 #, no-wrap msgid "" "\tbutton {\n" "\t\timage-path = /usr/local/lib/firefox/browser/chrome/icons/default/default48.png;\n" "\t\tcommand[mouse-left] = /usr/local/bin/firefox;\n" "\t}\n" "\tbutton {\n" "\t image-path = /usr/local/share/pixmaps/thunderbird.png;\n" "\t command[mouse-left] = /usr/local/bin/thunderbird;\n" "}\n" msgstr ""