wlroots, sway, xdg-desktop-portal-wlroots, and other "third position" wayland window mangers for Slackware users.
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
wlroots, sway, xdg-desktop-portal-wlroots, and other "third position" wayland window mangers for Slackware users.
Hello, everyone
I thought that this topic is worth discussing, given that many people already use KDE-Wayland daily.
I guess, GTK-Wayland would have to wait until XFCE people either move to Mutter, or rewrite xfwm4 to work on wayland.
However, the "non-conformists" have an option of using wlroots and less overwhelming window managers based on it. I invite everyone to describe their setups here, and share experiences. (And, perhaps, share Slackbuilds, recipes, and howtos).
I played a bit with wayfire in the past.
Was working well with slack but I had trouble with multimonitor configuration.
Apart from this, which might have been due to my mistakes in the config, i would definitely recommend it if you look for some 3d bling bling. It comes with most of compiz main effects and is/was also extremely light on ram usage.
I'm OP for 1. and use Sway daily since that post was made ... so over 2 years now.
For the most part everything just works. Screen sharing over Teams is a no-go even with the xdg-portal which was added recently.
Office using wine is crazy slow because the wayland display driver isnt integrated into wine yet (Maybe in 7.0.x or 7.1?) though playing games on Steam is flawless using XWayland.
Firefox, Chromium, etc works flawlessly with the right configs etc.
Can't complain... Would be nice if it was a native choice in -current though i3 isnt so I doubt we'll see it any time soon.
Hi i made slackbuilds for river, bemenu, dwl,
improve the Slackbuilds if you want. In my system they work.
if you want or need to build wlroots version 0.15.0 you ll need meson 0.60+. I built also wlroots version 0.15.0 to test vulkan support.
#!/bin/sh
# Slackware build script for river
# Copyright 2021 adcdam Berisso,Argentina
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=river
VERSION=${VERSION:-2021}
BUILD=${BUILD:-1}
TAG=${TAG:-_adcdam}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e # Exit on most errors
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
git submodule update --init
git config "submodule.deps/zig-$dep.url" "$srcdir/zig-$dep"
#zig build -Drelease-safe -Dxwayland \
DESTDIR=$PKG zig build install -Drelease-safe -Dxwayland \
--prefix '/usr'
cd ..
# Strip binaries and libraries - this can be done with 'make install-strip'
# in many source trees, and that's usually acceptable, if not, use this:
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Remove perllocal.pod and other special files that don't need to be installed,
# as they will overwrite what's already on the system. If this is not needed,
# remove it from the script.
find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true
# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
# Make the package; be sure to leave it in $OUTPUT
# If package symlinks need to be created during install *before*
# your custom contents of doinst.sh runs, then add the -p switch to
# the makepkg command below -- see makepkg(8) for details
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
#!/bin/sh
# Slackware build script for bemenu
# Copyright 2021 adcdam Berisso, Argentina
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bemenu
PRGNAM=bemenu
VERSION=${VERSION:-0.6.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_adcdam}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
# Compile the application and install it into the $PKG directory
make
make install DESTDIR=$PKG
# delete unneeded files
rm -r $PKG/usr/include
rm -r $PKG/usr/lib64/pkgconfig
# Strip binaries and libraries
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Compress man pages
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
# Compress info pages and remove the package's dir file
# If no info pages are installed by the software, don't leave this in the script
#rm -f $PKG/usr/info/dir
#gzip -9 $PKG/usr/info/*.info*
# Remove perllocal.pod and other special files that don't need to be installed,
# as they will overwrite what's already on the system. If this is not needed,
# remove it from the script.
# Remove 'special' files
find $PKG -name perllocal.pod \
-o -name ".packlist" \
-o -name "*.bs" \
| xargs rm -f
# Copy program documentation into the package
#mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
#cp -a \
# <documentation> \
# $PKG/usr/doc/$PRGNAM-$VERSION
#cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
#cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
#!/bin/sh
# Slackware build script for dwl
# Copyright 2021 adcdam Berisso, Argentina
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=dwl
VERSION=${VERSION:-0.2.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_adcdam}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
# Compile the application and install it into the $PKG directory
make
mkdir -p $PKG/usr/bin
cp -a dwl $PKG/usr/bin
install -Dm644 LICENSE -t $PKG/usr/share/licenses/dwl
install -Dm644 LICENSE.dwm -t $PKG/usr/share/licenses/dwl
install -Dm644 LICENSE.tinywl $PKG/usr/share/licenses/dwl
# Strip binaries and libraries
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Compress man pages
#find $PKG/usr/man -type f -exec gzip -9 {} \;
#for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
# Compress info pages and remove the package's dir file
# If no info pages are installed by the software, don't leave this in the script
#rm -f $PKG/usr/info/dir
#gzip -9 $PKG/usr/info/*.info*
# Remove perllocal.pod and other special files that don't need to be installed,
# as they will overwrite what's already on the system. If this is not needed,
# remove it from the script.
# Remove 'special' files
find $PKG -name perllocal.pod \
-o -name ".packlist" \
-o -name "*.bs" \
| xargs rm -f
# Copy program documentation into the package
#mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
#cp -a \
# <documentation> \
# $PKG/usr/doc/$PRGNAM-$VERSION
#cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
mkdir -p $PKG/usr/share/wayland-sessions
cat $CWD/dwl.desktop> $PKG/usr/share/wayland-sessions/dwl.desktop
#cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
What's the benefit of using xweston over simple xwayland?
Well, XWeston is a script, basically. Which starts a full screen Weston session, then a full screen XWayland session within this Wayland/Weston session, where you can run whatever X11 DE you like. For example, XFCE or even KDE4. Or Fluxbox.
XWayland itself is a X11 server made as a Wayland client, then it uses the Wayland APIs for input and output, so it does no access directly to the hardware. And it's no supposed to work stand-alone - it needs a Wayland server/compositor to connect to.
So, this design works with no Xorg (and its input or video drivers) installed.
Then, in a post-Xorg world, where it's already abandoned and removed from distributions, and only having the XWayland per compatibility, this XWeston will still permit to run your old good X11 DEs.
I did my experiments just to confirm the functionality on this (hypothetical ?) case. And it works.
The only caveat which I observed it's that screen/monitor configuration will not work, because they will see the XWayland session, which has no direct hardware access.
Last edited by LuckyCyborg; 12-23-2021 at 12:35 AM.
LuckyCyborg, how was the mouse wheel scrolling? It felt really sluggish and unresponsive when I tried fvwm in Xwayland with a different compositor.
I do not remember any issue out of that mentioned visibility of XWayland screen on screen/monitor configuration, which basically rendered it unusable. Because there was no way to change the resolution, which would have been to be expected, as the resolution is controlled by Weston.
However, maybe should be noted that XWayland got hardware acceleration only quite recently, and previously was famous of being sluggish.
Last edited by LuckyCyborg; 12-23-2021 at 03:06 AM.
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 460
Rep:
I see; thanks.
I used cage, which always puts whatever window it's showing in full-screen mode. All of my displays are 1920x1080, though, so I couldn't check how well it would have dealt with some other resolution (or mixed resolutions).
I used cage, which always puts whatever window it's showing in full-screen mode. All of my displays are 1920x1080, though, so I couldn't check how well it would have dealt with some other resolution (or mixed resolutions).
To be clear, the XFCE desktop worked fine itself, BUT with the screen on resolution dictated by Weston, then with the KMS resolution, which usually is the native monitor resolution.
However, on Display Configuration from XFCE was shown the XWayland virtual screen, not the real monitor, then there was no way to change the screen resolution or doing other tuning.
This I say in comparation with the XFCE4 used in the usual way, where you can change the screen resolution via this graphical configuration, just like also in Plasma5.
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 460
Rep:
It turns out there's a program called wlr-randr that can act like a sort of substitute xrandr for some (not all) wlroots-based compositors. To run an X11 WM on top of Xwayland, the trick is to use a lightweight compositor that supports wlr-randr. cage and weston don't, unfortunately. The closest thing I've found so far is a minimal Openbox-like called labwc. It has wlroots-0.15.0 as an outside dependency, which in turn depends on seatd (just the library part is fine).
For setup, I turned off server-side decorations with the following $HOME/.config/labwc/rc.xml:
To prevent applications like LibreOffice from opening in native Wayland mode, "GDK_BACKEND=x11" and "QT_QPA_BACKEND=xcb" need to be set somewhere; I used /etc/environment. Also, labwc's default context menu doesn't come with a terminal, so $HOME/.config/labwc/autostart should be a script that starts a terminal emulator. "DISPLAY=:1 startx -- /usr/bin/Xwayland" does the rest.
I was able to start fvwm3, plug in a TV over HDMI and adjust the position and scaling with wlr-randr. The mode can be adjusted as well. It takes a few seconds of flickering for labwc to pass the new display to the WM, but the setup seems to be working fairly well overall. No screen tearing, low overhead, and copy and paste are fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.