LabWC: Difference between revisions

From Alpine Linux
(Create LabWC page basing on Sway's (nevertheless, everything posted has been tested both on virtual and real machines))
 
 
(23 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[https://labwc.github.io LabWC] is a stacking [[Wayland]] compositor. Although [https://github.com/labwc/labwc#1-what-is-this 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]]).
[https://labwc.github.io LabWC] is a stacking [[Wayland]] compositor. LabWC can serve as a drop-in replacement for the [[Openbox]] window manager.
 
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 [https://wiki.alpinelinux.org/wiki/Sway 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 ==
== Prerequisites ==
{{Note|These steps posted as both Sway and LabWC prerequisites could be applied to almost all wlroots-based Wayland compositors.}}
{{:Include:Desktop prerequisites}}
 
* Wayland compositors need raw access to input and output devices, typically mediated by a [[seat manager]]. Either [[seatd]] or [[elogind]] work fine, but installing both leads to conflicts.
First, install & configure eudev:
* Setting up [[Alpine_setup_scripts#setup-wayland-base|Wayland-base]] enables [[elogind]] as [[Seat manager|seat manager]], enables [[Repositories#Community|community repository]] and enables [[eudev]].
 
<pre>
# apk add eudev
# setup-udev
</pre>
 
Then install graphics drivers appropriate to your system:
 
<pre>
# apk add mesa-dri-gallium  # gallium
# apk add mesa-dri-classic  # or classic
# apk add mesa-dri-nouveau  # for nvidia users
</pre>
 
The following links contain guides for setting up the video stack.
 
* [[Intel Video]]
* [[Radeon Video]]
 
Add yourself to the input and video groups:
 
<pre>
# adduser $USER input
# adduser $USER video
</pre>
 
You have to log out and back in for this to take effect.  
 
Install some TTF fonts:
 
<pre>
# 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, [[Enable Community Repository|enable the community repository]] and choose one of the following methods:
 
<dl>
 
<dt>Option 1: seatd daemon (recommended)</dt>
<dd>
<pre>
# apk add seatd
# rc-update add seatd
# rc-service seatd start
# adduser $USER seat
</pre>
 
If you are already logged in as a $USER, you will need to relogin.
</dd>
 
<dt>Option 2: seatd-launch</dt>
<dd>
<pre>
# apk add seatd-launch
</pre>
 
When starting labwc, you will need to prefix invocation with <code>seatd-launch</code>. 
Note: <code>seatd-launch</code> is a suid binary, so it might be wise to use one of the other methods from a security perspective.
</dd>
 
<dt>Option 3: elogind daemon</dt>
<dd>
 
<pre>
# apk add elogind polkit-elogind
# rc-update add elogind
# 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>
 
</dd>
 
</dl>


== Installation ==
== Installation ==


We can now install labwc:
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
     rofi                \ # default application launcher (dmenu could be used instead)
     rofi                \ # default application launcher (dmenu could be used instead)
     swaylock            \ # lockscreen tool
     swaylock            \ # lockscreen tool
     swayidle               # idle management (DPMS) daemon
    swaybg              \ # wallpaper daemon
</pre>
     swayidle             \ # idle management (DPMS) daemon
 
    dbus-x11            \
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.
    font-dejavu           
}}


== Running LabWC ==
== 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):
To run labwc from console:{{Cmd|$ dbus-launch labwc}}


<pre>
'''dbus-launch labwc''' is used because pipewire needs it, it is included in dbus-x11 and you may omit it.
$ 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>$ 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;"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).


{{Note|
{{Note|
Line 121: Line 36:
}}
}}


== Configuration and Usage ==
== Configuration ==


LabWC aims to implement the [openbox.org/wiki/Help:Contents openbox 3.4] specification, so many things working in OpenBox should be compatible.
LabWC aims to implement the [http://openbox.org/wiki/Help:Contents openbox 3.4] specification, so many things working in OpenBox should be compatible.


Moreover, the project provides [https://github.com/labwc/labwc#4-configure examples for all the configuration files] and some themes, explaining where it must be located each one of them.
Moreover, the project provides [https://github.com/labwc/labwc#4-configure examples for all the configuration files] and some themes, explaining where it must be located each one of them.
Line 129: Line 44:
For additional information, labwc [https://labwc.github.io/manual.html manpages] and [https://github.com/labwc/labwc/wiki wiki] can be consulted.
For additional information, labwc [https://labwc.github.io/manual.html manpages] and [https://github.com/labwc/labwc/wiki wiki] can be consulted.


[[Category:Desktop]]
== Troubleshooting ==
 
== See also ==
 
* [https://labwc.github.io LabWC Official website]
 
 
[[Category:compositor]]

Latest revision as of 15:26, 25 May 2025

LabWC is a stacking Wayland compositor. LabWC can serve as a drop-in replacement for the Openbox window manager.

Prerequisites

Installation

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 \ font-dejavu

Running LabWC

To run labwc from console:

$ dbus-launch labwc

dbus-launch labwc is used because pipewire needs it, it is included in dbus-x11 and you may omit it.

(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

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.

Troubleshooting

See also