Trying Out the Stacking Wayland Compositor Labwc
2024-09-03
This article is the English transition of the article titled ‘スタック型WaylandコンポジタLabwcを使ってみた’.
Trying Out a Simple Stacking Wayland Compositor
When I started using Void Linux, I wasn’t sure which desktop environment to go with. Since I was building from scratch, I figured I might as well choose Wayland over X11. So I began looking into suitable Wayland compositors. I had used Sway before and really liked it, but this time I wanted something more compact and stacking, rather than tiling—so I went with Labwc. Long story short: I’m very happy with it.
Here are some screenshots of the desktop environment I built using Labwc:
For more details on how I set up this Labwc-based environment, see my other post: Building a Lightweight, Practical Wayland Desktop on Void Linux with Labwc
What Is Wayland?
Labwc is a type of Wayland compositor, so let me briefly explain what Wayland is.
Wayland is a protocol designed to replace the X Window System (X11). In simple terms, it’s a modern approach to managing window rendering. Wayland itself is just a protocol that defines how the display server and clients (applications) communicate. A display server that implements this protocol is called a Wayland compositor.
The term compositor is used because a Wayland display server also handles window management (like tiling or stacking), effectively combining display and window manager roles.
There are several Wayland compositors out there, including the reference implementation Weston, and others such as:
- Sway: A tiling compositor with i3-like keybindings, very popular
- Labwc: A stacking compositor inspired by OpenBox
- Hikari: A stacking compositor that incorporates some tiling concepts; active development, especially in BSD environments
- Hyprland: A modern and visually polished tiling compositor
- Mutter: GNOME’s window manager, also functions as a Wayland compositor
- KWin: KDE’s window manager, also supports Wayland
- Enlightenment: Originally developed for X11, now also Wayland-compatible
For a more exhaustive list, refer to the ArchWiki.
Major desktop environments like GNOME and KDE, which traditionally used X11, are now fully compatible with Wayland. While not all environments have made the switch, it’s clear the transition from X11 to Wayland is well underway.
What Is Labwc?
Labwc is a stacking Wayland compositor inspired by OpenBox. Stacking means windows can overlap, be resized, or minimized—just like you see on macOS or Windows. Other stacking compositors include Hikari, Mutter, and KWin.
Whereas Mutter and KWin are closely tied to GNOME and KDE respectively, Labwc is independent and designed to be paired with other tools to create a modular, customizable desktop environment. Since it’s based on OpenBox, you can even use existing OpenBox menu generators. A list of compatible generators is available on the official site.
Wayland is often associated with tiling compositors like Sway and Hyprland, but Labwc offers an alternative that supports freeform customization with the familiar flexibility of stacking. However, it’s very minimal compared to complete desktop environments like GNOME, KDE, or Xfce. As a result, using it alone isn’t very practical—so in this post, I’ll also introduce the tools I use alongside Labwc to make it a full-fledged desktop setup.
Tools That Make Labwc More Usable
Labwc on its own only handles basic window tasks—displaying, moving, closing—so to turn it into a usable desktop environment, you’ll need to install and integrate various tools. Choosing and combining them is part of the fun of using Labwc.
Here are the tools I currently use with Labwc:
Purpose | Tool |
---|---|
Wallpaper | swaybg |
Panel / status bar | waybar |
Notifications | mako |
Screensaver | swaylock |
Session lock | swaylock |
Screenshots | grim / slurp |
Terminal emulator | foot |
Japanese input | fcitx5 |
Application launcher | ngw-launcher |
These are just examples—you’re free to use any alternatives that suit your preferences. That’s the appeal of Labwc: building a desktop that’s uniquely yours.
Using OpenBox Themes
Labwc supports OpenBox themes out of the box! Just download your favorite OpenBox theme and place it in either /usr/share/themes/
or ~/.local/share/themes/
. Then, configure your theme in ~/.config/labwc/rc.xml
. Here’s a simple example:
<theme>
<name>Fresh-Theme</name>
<cornerRadius>8</cornerRadius>
<font name="sans" size="10" />
</theme>
This lets you instantly reuse your existing themes if you’re coming from OpenBox or LXDE.
My Impressions of Using Labwc
Using Labwc feels like rebuilding OpenBox as a Wayland compositor. If you enjoy assembling your own desktop from the ground up, this is the perfect tool. It’s also a great option if you’re a former OpenBox or LXDE user looking to migrate from X11 to Wayland.
The ability to reuse OpenBox themes is a huge plus for long-time users, making the transition smoother.
Conclusion
In this post, I shared an overview of Labwc, a stacking Wayland compositor, and my thoughts after using it to build a desktop environment.
The shift from X11 to Wayland has been ongoing for a while, and so far, I haven’t run into any major issues. While Wayland hasn’t completely replaced X11 yet (as of September 2024), many major desktop environments already support it. With GNOME and KDE leading the charge, I believe Wayland will eventually become the standard.
If you’re curious about Wayland or want a minimal and customizable experience, Labwc is definitely worth trying!