LabWC

From Alpine Linux
Revision as of 19:06, 18 May 2024 by WhyNotHugo (talk | contribs) (→‎Running LabWC: Link to XDG_RUNTIME_DIR)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LabWC is a stacking Wayland compositor. Although it wasn't intended like that, it can serve as a drop-in replacement for the Openbox window manager (the same way Sway is for I3wm).

This wiki was written starting from a fresh install using the Alpine 3.16 x86 extended .iso. The steps begin from the first reboot after running setup-alpine and performing a sys install to disk.

Many steps below were taken from the wiki entry for installing Sway, as both are wlroots-based Wayland compositors. Another interesting page, because of the same reasons, is the River compositor's.

Prerequisites

Note: These steps posted as both Sway and LabWC prerequisites could be applied to almost all wlroots-based Wayland compositors.

Setting up eudev on a desktop system is recommended:

# setup-devd udev

For more details and advanced instructions see Device Manager.

Then install the mesa gallium drivers:

# apk add mesa-dri-gallium

The following links contain guides for setting up the video stack.

Add yourself to the input and video groups:


# adduser $USER input # adduser $USER video

You have to log out and back in for this to take effect.

Install some TTF fonts:

# apk add font-dejavu

Since wlroots 0.14, you need to set up libseat backend if you wish to run labwc directly (without nesting it in another wayland compositor). To do that, enable the community repository and choose one of the following methods:

Option 1: seatd daemon (recommended)

See Seatd.

Option 2: seatd-launch

# apk add seatd-launch

When starting labwc, you will need to prefix invocation with seatd-launch. Note: seatd-launch is a suid binary, so it might be wise to use one of the other methods from a security perspective.

Option 3: elogind daemon

See Elogind.

Installation

We can now install labwc:

# apk add labwc labwc-doc # apk add \ # Install optional dependencies: xwayland \ # recommended for compatibility reasons foot \ # default terminal emulator rofi \ # default application launcher (dmenu could be used instead) swaylock \ # lockscreen tool swaybg \ # wallpaper daemon swayidle \ # idle management (DPMS) daemon dbus-x11

Note that almost all optional dependencies are the same as Sway's.

Running LabWC

To run labwc, first set up XDG_RUNTIME_DIR Then run labwc from the Linux console (dbus-launch is used because pipewire needs it, it is included in dbus-x11 and you may omit it):

$ dbus-launch labwc

(if you run labwc with seatd-launch, you will need to use $ dbus-launch seatd-launch labwc)

You can also create a simple alias in your shell rc file (e.g. .zshrc), like:

alias labwcinit="dbus-launch seatd-launch labwc"

Note:

swaylock needs to be able to read your /etc/shadow file to be able to validate your password

Configuration and Usage

LabWC aims to implement the openbox 3.4 specification, so many things working in OpenBox should be compatible.

Moreover, the project provides examples for all the configuration files and some themes, explaining where it must be located each one of them.

For additional information, labwc manpages and wiki can be consulted.