Implementing Linux Window Managers ~ Tutorial

If you are looking for a Free detailed tutorial and toolset describing how-to build a Linux Window Manager Environment, I have created one for you use. The tutorial describes how-to create a setup on either Debian (MXLinux) or ArchLabs/EndeavourOS. The final product provides access to bspwm, dwm, herbstluftwm, openbox desktops via LightDM. The tutorial is nearly 2200 words long and provides some 250MB of dotfiles, wallpapers, icons, etc. Enjoy:

1 Like

Top again @manyroads

Nice guide Mark, thanks for sharing!

Some observations…

Please note that ~/.profile won’t be read by bash or zsh in Arch-based distributions — bash reads ~/.bash_profile and zsh reads ~/.zprofile instead.

This bit in your ~/.bashrc isn’t needed:

# Add sbin directories to PATH.  This is useful on systems that have sudo
echo $PATH | grep -Eq "(^|:)/sbin(:|)"     || PATH=$PATH:/sbin
echo $PATH | grep -Eq "(^|:)/usr/sbin(:|)" || PATH=$PATH:/usr/sbin

Arch’s sbin directories are all symlinked to /usr/bin. It’s not actually needed for Debian either because the sudo command changes the PATH to include the sbin directories.

And why do you then later add the sbin directories to PATH again without checking? You also add the local bin directories to PATH in both ~/.profile (with a check beforehand to see if they exist) and in ~/.bashrc as well (without a check), which will result in a *very* long PATH with multiple duplicated directories.

Parameters like that should probably be set via the login configuration file (ie, ~/.profile) because otherwise they’ll be set every time a shell is opened.

I’m not sure if people will like you resetting their $EDITOR, it might be better to only set that parameter if it’s empty, like this:

#nnn settings
EDITOR="${EDITOR:-geany}"

In respect of ~/.xprofile you shouldn’t use the -b switch with compton if you also add an ampersand (&) afterwards because they both do the same thing. FWIW we found that the ampersand is more reliable than the -b switch when we were going through the openbox autostart file for BunsenLabs.

As a general rule adding ampersands at the end of every line can be counter-productive and may even cause problems with race conditions (something we also encountered with BunsenLabs) — test if the command actually needs an ampersand appended by running it from the command line: if the prompt is returned then no ampersand is needed.

You shouldn’t need to add nm-applet or xfce4-power-manager because they are XDG-autostarted and puseaudio is run by a systemd user service so no need for that line either. The light-locker command is also autostarted by LightDM.

HTH

1 Like

You are a true friend. I’ll make the fixes. Thank you.

1 Like

In addition to the option of a login manager (LightDM) there are a few others that might be worth mentioning if you are looking for light-weight LM’s (for example, SDDM)
Might I also suggest including the option of not using a login manager and implementing xinit?
It adds another dynamic to running X and many more seasoned folks prefer that over a LM.

2 Likes

This will depend on the window manager. Openbox reads the /etc/xdg/autostart files, but dwm does not. I don’t think bspwm does; I don’t know if herbstluftwm does or does not.

2 Likes

I like the idea but will attempt to create the tutorial as a separate item. I’ll edit and make reference to the optional choices from the body of this tutorial, as well.