LabWC: Difference between revisions

From Alpine Linux
(remove eudev install command (already done by the setup script))
(use cmd template)
Line 10: Line 10:
First, install & configure eudev:
First, install & configure eudev:


<pre>
{{Cmd|# setup-devd udev}}
# setup-devd udev
</pre>


Then install the mesa gallium drivers:
Then install the mesa gallium drivers:


<pre>
{{Cmd|# apk add mesa-dri-gallium}}
# apk add mesa-dri-gallium
</pre>


The following links contain guides for setting up the video stack.
The following links contain guides for setting up the video stack.
Line 27: Line 23:
Add yourself to the input and video groups:
Add yourself to the input and video groups:


<pre>
 
# adduser $USER input
{{Cmd|&#35; adduser $USER input
# adduser $USER video
&#35; adduser $USER video
</pre>
}}


You have to log out and back in for this to take effect.  
You have to log out and back in for this to take effect.  
Line 36: Line 32:
Install some TTF fonts:
Install some TTF fonts:


<pre>
{{Cmd|# apk add ttf-dejavu}}
# apk add ttf-dejavu
</pre>


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, [[Repositories#Enabling_the_community_repository|enable the community repository]] and choose one of the following methods:
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, [[Repositories#Enabling_the_community_repository|enable the community repository]] and choose one of the following methods:
Line 46: Line 40:
<dt>Option 1: seatd daemon (recommended)</dt>
<dt>Option 1: seatd daemon (recommended)</dt>
<dd>
<dd>
<pre>
{{Cmd|&#35; apk add seatd
# apk add seatd
&#35; rc-update add seatd
# rc-update add seatd
&#35; rc-service seatd start
# rc-service seatd start
&#35; adduser $USER seat
# adduser $USER seat
}}
</pre>


If you are already logged in as a $USER, you will need to relogin.
If you are already logged in as a $USER, you will need to relogin.
Line 58: Line 51:
<dt>Option 2: seatd-launch</dt>
<dt>Option 2: seatd-launch</dt>
<dd>
<dd>
<pre>
{{Cmd|# apk add seatd-launch}}
# apk add seatd-launch
</pre>


When starting labwc, you will need to prefix invocation with <code>seatd-launch</code>.   
When starting labwc, you will need to prefix invocation with <code>seatd-launch</code>.   
Line 69: Line 60:
<dd>
<dd>


<pre>
{{Cmd|&#35; apk add elogind polkit-elogind
# apk add elogind polkit-elogind
&#35; rc-update add elogind
# rc-update add elogind
&#35; rc-service elogind start
# rc-service elogind start
}}
</pre>


Using <code>elogind</code> will automatically set the necessary permissions, so you can skip adding groups like <code>seat</code> and <code>video</code>
Using <code>elogind</code> will automatically set the necessary permissions, so you can skip adding groups like <code>seat</code> and <code>video</code>
Line 84: Line 74:


We can now install labwc:
We can now install labwc:
 
{{Cmd|&#35; apk add labwc labwc-doc
<pre>
&#35; apk add                \ # Install optional dependencies:
# apk add labwc labwc-doc
# apk add                \ # Install optional dependencies:
     xwayland            \ # recommended for compatibility reasons
     xwayland            \ # recommended for compatibility reasons
     foot                \ # default terminal emulator
     foot                \ # default terminal emulator
Line 94: Line 82:
     swaybg              \ # wallpaper daemon
     swaybg              \ # wallpaper daemon
     swayidle              # idle management (DPMS) daemon
     swayidle              # idle management (DPMS) daemon
</pre>
}}


Note that almost all optional dependencies are the same than Sway's. Another interesting packages are specified into the [https://github.com/labwc/labwc#6-integrate project's README], as it can be [https://labwc.github.io/integration.html#waybar waybar] (included into the Alpine's repository) as navigation bar.
Note that almost all optional dependencies are the same than Sway's. Another interesting packages are specified into the [https://github.com/labwc/labwc#6-integrate project's README], as it can be [https://labwc.github.io/integration.html#waybar waybar] (included into the Alpine's repository) as navigation bar.
Line 102: Line 90:
To run labwc, first set XDG_RUNTIME_DIR to a suitable location (e.g. create a .run folder in your home directory and set it to ~/.run). 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):
To run labwc, first set XDG_RUNTIME_DIR to a suitable location (e.g. create a .run folder in your home directory and set it to ~/.run). 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):


<pre>
{{Cmd|$ XDG_RUNTIME_DIR&#61;~/.run dbus-launch labwc}}
$ XDG_RUNTIME_DIR=~/.run dbus-launch labwc
</pre>


(if you run labwc with seatd-launch, you will need to use <code>$ XDG_RUNTIME_DIR=~/.run dbus-launch seatd-launch labwc</code>)
(if you run labwc with seatd-launch, you will need to use <code>$ XDG_RUNTIME_DIR=~/.run dbus-launch seatd-launch labwc</code>)


You can also create a simple alias in your shell rc file (e.g. .zshrc), like:
You can also create a simple alias in your shell rc file (e.g. .zshrc), like:
<pre>
{{Cmd|alias labwcinit&#61;"XDG_RUNTIME_DIR&#61;~/.run dbus-launch seatd-launch labwc"}}
alias labwcinit="XDG_RUNTIME_DIR=~/.run dbus-launch seatd-launch labwc"
</pre>


See the [https://wiki.alpinelinux.org/wiki/Wayland Wayland] page for a permanent configuration (recommended).
See the [https://wiki.alpinelinux.org/wiki/Wayland Wayland] page for a permanent configuration (recommended).

Revision as of 18:18, 2 July 2023

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.

First, install & configure eudev:

# setup-devd udev

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 ttf-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)

# apk add seatd # rc-update add seatd # rc-service seatd start # adduser $USER seat

If you are already logged in as a $USER, you will need to relogin.

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

# apk add elogind polkit-elogind # rc-update add elogind # rc-service elogind start

Using elogind will automatically set the necessary permissions, so you can skip adding groups like seat and video

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

Note that almost all optional dependencies are the same than Sway's. Another interesting packages are specified into the project's README, as it can be waybar (included into the Alpine's repository) as navigation bar.

Running LabWC

To run labwc, first set XDG_RUNTIME_DIR to a suitable location (e.g. create a .run folder in your home directory and set it to ~/.run). 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):

$ XDG_RUNTIME_DIR=~/.run dbus-launch labwc

(if you run labwc with seatd-launch, you will need to use $ XDG_RUNTIME_DIR=~/.run dbus-launch seatd-launch labwc)

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

alias labwcinit="XDG_RUNTIME_DIR=~/.run dbus-launch seatd-launch labwc"

See the Wayland page for a permanent configuration (recommended).

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.