SwayWM on BearDog (Debian) & EndeavourOS (Arch) (tutorial)

revised:

1 Jan 2024
2 Dec 2023
20 Jul 2023
22 Jul 2023

Lately, I have taken the time to see how SwayWM/ Wayland might function for me (and you?). I began on a Debian based distro, specifically BearDog.  Now that I have managed to create a functioning reasonably ‘stable’ installation, I thought I’d provide the results and specifics of my discoveries.

As noted above, I believe my environment is now quite stable. I have been running SwayWM for over a month on both Debian (BearDog) and Arch (EndeavourOS). 

TL;DR: Based on my past experiences, I can confirm that SwayWM seems, based upon my usage, to run well on both Arch & Debian (Sid/ Unstable).

I have settled on Arch as my preferred platform, simply because I prefer running on a more reliable rolling release base.  Debian Sid has experienced some peculiar faults/errors over the last few weeks; although none seem linked/ related to  running SwayWM/ Wayland, they ‘got in my way’.  

For that reason,  EndeavourOS simply has functioned better for what I want and how I prefer to do ‘things’.

The following are my SwayWM & Wayland Notes

General:

Debian seems quite resource poor (almost impoverished) in the Wayland/ SwayWM ecosphere, although in recent months that appears to be on the mend (somewhat). The most resource rich distros include: Arch, Void, Gentoo, even ‘tiny’ Alpine seems to have more.  A corollary to this would suggest those distros might be good places to seek help, ideas, tools, etc.

In this tutorial, I will present some of the workarounds I have unearthed in order to over-come challenges and frustrations, I encountered. I think (hope?) I have kept track of the most important info and shared it here.

IMHO. It is “not super easy” but it IS possible to make Wayland/ SwayWM into a fully functional, rewarding computing environment. The environment I have, thus far created, I find enjoyable to use. Almost certainly Wayland is not as rich an environment as x-windows offers; but, it is fun, aesthetically pleasing and usable.

SwayWM, Wayland, Waybar, Conky (x2), Yad, Rofi all on Debian Sid/Trixie

Here is a requisite screenshot. The image displays SwayWM, Wayland, Waybar, Conky (x2), Yad, Rofi all on Debian Sid/Trixie.

Other Wayland information resources:

It all began on BearDog (Debian)

Be advised, I began by running SwayWM & Wayland on Debian Sid/Trixie. The reason for the Sid/Trixie choice is my preference for having and using current software. Tools such as SwayWM and Wayland are in active development; which means they change frequently. Should you elect a different platform, your mileage may vary…

Installing the basic Wayland/ SwayWM base is pretty straight forward. I followed the guidance on this page in the Debian wiki.  As for Arch, here is a link to Colin Woodbury’s tutorial which I used to help with my EndeavourOS install. 

FWIW. My i3wm setup was NOT in any way drop-in compatible with SwayWM. I run both regularly and they ‘are’ different.  Apparently, I have much too much going on in my i3wm install to make any port seemless.

Compatibility between my i3wm and SwayWMis all but non-existent.  I ultimately elected to find a clean SwayWM install and then tweak it to fit my needs. I elected to use the EndeavourOS Sway Community edition as my base. Thank you everyone at EndeavourOS!

My tweaked version, which is by now quite different from that on EOS, is that offered above.  (I’ll attempt to keep the dotfiles current.)

I have augmented what I learned on the above pages creating the following instruction document. Be advised this works for me, I can only hope it works for you, too. (See my warranty at the bottom of the page).  Here is a link to my  SwayWM-Wayland Dotfiles (I have successfully tested and use these dotfiles on my EndeavourOS base (Arch).)

The Journey

Below are the component parts I have tweaked, hacked, revised and bent to my preferred approach, such as my skills allow.  You may certainly use my code base or EndeavourOS’, which is available here and is minus my changes offered at the link above) or…

All of the folders, you wish to use, should be placed in your $Home/ directory. There are materials that will be placed in the following hidden directories:

  • .config
  • .conky
  • .local (the full path will be .local/share/scripts)

Remember: my dotfiles will only work after you have installed SwayWM and Wayland on your system. AND, I apologize in advance for any materials I may have forgotten to put in here. Use our Contact Page to let me know if you need something I may have omitted.

SwayWM-Related Folders

These are most, if not all, of my ‘dotfiles’.

Keep in mind I will continually (assuming I remember) drop new versions of my ‘stuff’ here for you to use.  You should fully expect to modify and enhance what you find here, to suit your needs. This IS NOT a guaranteed clean install. (See my Warranty below)

Terminal Option(s)

I have elected to use foot as my primary Wayland/ SwayWM terminal. Why? Because, it is light, fast, and easy to tweak.  Sadly, it does not run on X11 (or I’d consider using it everywhere).

If you are seeking a terminal that is flexible & reasonably light to use on both X11 and Wayland, I recommend xfce4-terminal. It works amazingly well on both x11 and Wayland; plus, xfce4-terminal is able to support geometry and position settings.

However, you are, certainly, able to find other fancier, cooler, trendier terminals should you choose to do so.

Transition Challenges

Because of an over abundance of x-windows application experience, I have encountered awkward transitions to new methods of working. Think square peg, round hole. Here are a few examples where I am reluctant to perform back-flips in order to accomplish tasks.

Various items (software apps) that are not yet ready for Wayland (Root privs).

  • First and foremost, be aware you need to install a polkit (such as lxpolkit-polkit) for the following fix(es) to work.
  • In the Debian universe Synaptic is pretty important. Sadly, Synaptic is one of those problem children. If you wish to use it, Synaptic is best called via terminal for security reasons. The command line is “sudo -E synaptic”.
  • Thunar Open as Root does not work in Wayland. If you wish to Open Thunar as Root via terminal. The command line is “sudo -E thunar”.
  • The same applies to Nemo. Nemo Open as Root does not work. Open Nemo as Root via terminal. The command line is “sudo -E nemo”.
  • The same applies to Gparted. Open Gparted as Root via terminal. The command line is “sudo -E gparted”.

Synaptic

I have been reliant on this Debian package management tool for more than 20 years… Debian, unlike ArchLinux, does not offer the wealth of package managers and approaches. Luckily, I dug up an approach to rescue & use synaptic. I know this weird hack has risks (the preferred approach involves using sudo -E, noted above) …

Here is another approach you may be able to live with (source: Reddit

My read (FWIW) is that the above approach is both more difficult and less reliable than simply opening an offending app via command line in terminal using sudo -E.

Xwayland

In an effort to get a “goodly number” of x-windows applications to run under Wayland, I installed Xwayland. It is not difficult. You simply install Xwayland in order to achieve a degree of  native x-window (x11) application compatibility.

CAVEAT: It is always better to use a native Wayland application, if you can find one. Xwayland (and QTwayland for that matter) are simply temporary solutions.

QTwayland

The same situation exists, and can be similarly addressed, for qt applications. (Here is the reference for the following solution.)  The major installation process follows:

  • sudo apt install qtbase5-dev
  • git clone git://code.qt.io/qt/qtwayland.git
  • cd qtwayland
  • git checkout v5.10.0
  • qmake
  • make
  • make install

Random Wallpaper Background

The simplest, closest to ‘nitrogen approach’ I prefer to use in X11, involves installing ‘setwall’. Because setwall is written using rust, you can install it using ‘cargo’. I will try using it (it should work well) on my x11 window manager setups.

Wofi/Rofi

If you are running on Wayland only, wofi appears to be an excellent tool to use.  Unlike SwayWM with i3wm, wofi appears to be compatible with the rofi setups and scripts I use.  However if you run both X11 and Wayland based window managers (like I do), I recommend sticking with Rofi (after you install Xwayland).  It works well, then, in both environments.

Taking Screenshots

In order to take desktop screenshots, I found the following installations were required:

  • install grim (using apt/nala).
  • install grimshot (using apt/nala)

I am considering adding a new (to me), hopefully more approachable screenshot toolset to SwayWM:

My initial read is that sway-screenshot adds a few nice features. But, grim by itself is silent, fast and generates a simple screenshot (entire window), just fine.  Obviously the choice is yours.

Conky

As a huge fan (user) of Conky, I am very pleased to have obtained a guide on how-to install and make Conky run on Wayland. This guidance may be found on the Lilidog Forums from @unklar. I should add that getting Conky to reliably run on both Arch & Debian base distros, required I clean up my conky scripts (massively). A warning to the wise, “Conky will NOT suffer messy code on Wayland. “

Additional ‘frustrations’

There are a few pieces of missing system functionality that irk me.  I know I should be able to survive without these things. I simply do not ‘prefer’ to run minus these functions, every day. Oh well…

  • root level access at the GUI level. This impacts several critical applications including Thunar, Gparted, Synaptic, among others I am certain.

Should you find or know of good ways to address the issues I have noted, please use our contact page to let me know.

Have fun with SwayWM and Wayland. If you have additional tips and pointers you believe I should publish here, be sure to let me know.

Remember, like with all of my work, I am able to provide the following assurance(s):
  • It is almost certainly going to work until it breaks; although I have to admit it may never work and that would be sad.
  • When/if it does break, you may keep all of the pieces.
  • If you find my materials helpful, both you & I will be happy, at least for a little while.
  • My advice is worth every penny you paid for it!