LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-22-2021, 04:30 AM   #1
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Rep: Reputation: 253Reputation: 253Reputation: 253
Post 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).

Some previous research includes:

1. https://www.linuxquestions.org/quest...re-4175664961/ (a mostly outdated topic).
2. https://github.com/biker-rat/swaywm-packages-slackware -- the first approach to building a sway-based DE. Does not include xdg-desktop-portal-wlroots, but is a good start.
3. https://github.com/solarkraft/awesome-wlroots -- a set of building blocks for a wlroots DE.
4. greetd - an opinionated introduction into logging in with wayland https://git.sr.ht/~kennylevinsen/greetd
5. https://github.com/jbuchermn/newm/

I planned to write a couple of slackbuild for the new "DE", but the choice is vast, the time is limited, so suggestions welcome.
 
Old 12-22-2021, 05:35 AM   #2
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,555

Rep: Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418
Quote:
Originally Posted by Lockywolf View Post
I guess, GTK-Wayland would have to wait until XFCE people either move to Mutter, or rewrite xfwm4 to work on wayland.
From what I heard, in fact the XFCE people wants to use Weston as Wayland server/compositor for Wayland/XFCE sessions.

https://wiki.xfce.org/releng/wayland_roadmap

But there's also XFway, which is a Weston based Wayland server/compositor make in the like of XFWM4.

https://github.com/adlocode/xfway

Anyway, I've already managed to run XFCE sessions on Wayland, using XWeston as x11 server.

Last edited by LuckyCyborg; 12-22-2021 at 05:45 AM.
 
1 members found this post helpful.
Old 12-22-2021, 05:39 AM   #3
giomat
Member
 
Registered: Jul 2017
Posts: 339

Rep: Reputation: 239Reputation: 239Reputation: 239
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.
 
Old 12-22-2021, 07:32 AM   #4
tramtrist
Member
 
Registered: Jul 2018
Location: Cincinnati USA
Distribution: Slackware
Posts: 549

Rep: Reputation: 343Reputation: 343Reputation: 343Reputation: 343
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.
 
Old 12-22-2021, 09:59 AM   #5
adcdam
Member
 
Registered: Aug 2020
Location: Berisso, Argentina
Distribution: Slackware
Posts: 255

Rep: Reputation: 205Reputation: 205Reputation: 205
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.





https://github.com/riverwm/river
river depend on zig to build https://ziglang.org/

Code:
#!/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}



bemenu https://github.com/Cloudef/bemenu

Code:
#!/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}


dwl https://github.com/djpohly/dwl

Code:
#!/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}


about bemenu i changed the GNUmakefile to this:


Code:
VERSION ?= $(shell cat VERSION)
PREFIX ?= /usr
includedir ?= /include
bindir ?= /bin
libdir ?= /lib64
mandir ?= /man/man1
 
GIT_SHA1 = $(shell git rev-parse HEAD 2>/dev/null || printf 'nogit')
GIT_TAG = $(shell git tag --points-at HEAD 2>/dev/null || cat VERSION)
MAKEFLAGS += --no-builtin-rules
 
WARNINGS = -Wall -Wextra -Wpedantic -Wformat=2 -Wstrict-aliasing=3 -Wstrict-overflow=5 -Wstack-usage=12500 \
	-Wfloat-equal -Wcast-align -Wpointer-arith -Wchar-subscripts -Warray-bounds=2 -Wno-unknown-warning-option
 
override CFLAGS ?= -g -O2 $(WARNINGS) $(EXTRA_WARNINGS)
override CFLAGS += -std=c99
override CPPFLAGS ?= -D_FORTIFY_SOURCE=2
override CPPFLAGS += -DBM_VERSION=\"$(VERSION)\" -DBM_PLUGIN_VERSION=\"$(VERSION)-$(GIT_SHA1)\" -DINSTALL_LIBDIR=\"$(PREFIX)$(libdir)\"
override CPPFLAGS += -D_DEFAULT_SOURCE -Ilib
 
libs = libbemenu.so
pkgconfigs = bemenu.pc
bins = bemenu bemenu-run
mans = bemenu.1
renderers = bemenu-renderer-x11.so bemenu-renderer-curses.so bemenu-renderer-wayland.so
all: $(bins) $(renderers) $(mans)
clients: $(bins)
curses: bemenu-renderer-curses.so
x11: bemenu-renderer-x11.so
wayland: bemenu-renderer-wayland.so
 
# support non git builds
.git/index:
	mkdir -p .git
	touch .git/index
 
%.a:
	$(LINK.c) -c $(filter %.c,$^) $(LDLIBS) -o $@
 
$(libs): private override full=$(addsuffix .$(VERSION), $@)
$(libs): private override major=$(addsuffix .$(firstword $(subst ., ,$(VERSION))), $@)
$(libs): %: VERSION .git/index
	$(LINK.c) -shared -fPIC $(filter %.c %.a,$^) $(LDLIBS) -o $(full) -Wl,-soname,$(major)
	ln -fs $(full) $(major)
	ln -fs $(full) $@
 
$(pkgconfigs): %: VERSION %.in
	sed "s/@VERSION@/$(VERSION)/;s,@PREFIX@,$(PREFIX),;s,@LIBDIR@,$(libdir),;s,@INCLUDEDIR@,$(includedir)," $(addsuffix .in, $@) > $@
 
bemenu.1: man/bemenu.1.in
	sed 's,@LIBDIR@,$(PREFIX)$(libdir),' $< > $@
 
$(renderers): %: VERSION .git/index | $(libs)
	$(LINK.c) -shared -fPIC $(filter %.c %.a,$^) $(LDLIBS) -L. -lbemenu -o $@
 
$(bins): %: | $(libs)
	$(LINK.c) $(filter %.c %.a,$^) $(LDLIBS) -L. -lbemenu -o $@
 
cdl.a: private override LDFLAGS += -fPIC
cdl.a: lib/3rdparty/cdl.c lib/3rdparty/cdl.h
 
libbemenu.so: private override LDLIBS += -ldl
libbemenu.so: lib/bemenu.h lib/internal.h lib/filter.c lib/item.c lib/library.c lib/list.c lib/menu.c lib/util.c cdl.a
 
bemenu-renderer-curses.so: private override LDLIBS += $(shell pkg-config --libs ncursesw) -lm
bemenu-renderer-curses.so: private override CPPFLAGS += $(shell pkg-config --cflags-only-I ncursesw)
bemenu-renderer-curses.so: lib/renderers/curses/curses.c
 
bemenu-renderer-x11.so: private override LDLIBS += $(shell pkg-config --libs x11 xinerama cairo pango pangocairo)
bemenu-renderer-x11.so: private override CPPFLAGS += $(shell pkg-config --cflags-only-I x11 xinerama cairo pango pangocairo)
bemenu-renderer-x11.so: lib/renderers/cairo_renderer.h lib/renderers/x11/x11.c lib/renderers/x11/x11.h lib/renderers/x11/window.c lib/renderers/x11/xkb_unicode.c lib/renderers/x11/xkb_unicode.h
 
lib/renderers/wayland/xdg-shell.c:
	wayland-scanner private-code < "$$(pkg-config --variable=pkgdatadir wayland-protocols)/stable/xdg-shell/xdg-shell.xml" > $@
 
lib/renderers/wayland/wlr-layer-shell-unstable-v1.h: lib/renderers/wayland/wlr-layer-shell-unstable-v1.xml
	wayland-scanner client-header < $^ > $@
 
lib/renderers/wayland/wlr-layer-shell-unstable-v1.c: lib/renderers/wayland/wlr-layer-shell-unstable-v1.xml
	wayland-scanner private-code < $^ > $@
 
lib/renderers/wayland/xdg-output-unstable-v1.h: lib/renderers/wayland/xdg-output-unstable-v1.xml
	wayland-scanner client-header < $^ > $@
 
lib/renderers/wayland/xdg-output-unstable-v1.c: lib/renderers/wayland/xdg-output-unstable-v1.xml
	wayland-scanner private-code < $^ > $@
 
xdg-shell.a: private override LDFLAGS += -fPIC
xdg-shell.a: private override CPPFLAGS += $(shell pkg-config --cflags-only-I wayland-client)
xdg-shell.a: lib/renderers/wayland/xdg-shell.c
wlr-layer-shell.a: private override LDFLAGS += -fPIC
wlr-layer-shell.a: private override CPPFLAGS += $(shell pkg-config --cflags-only-I wayland-client)
wlr-layer-shell.a: lib/renderers/wayland/wlr-layer-shell-unstable-v1.c lib/renderers/wayland/wlr-layer-shell-unstable-v1.h
xdg-output.a: private override LDFLAGS += -fPIC
xdg-output.a: private override CPPFLAGS += $(shell pkg-config --cflags-only-I wayland-client)
xdg-output.a: lib/renderers/wayland/xdg-output-unstable-v1.c lib/renderers/wayland/xdg-output-unstable-v1.h
bemenu-renderer-wayland.so: private override LDLIBS += $(shell pkg-config --libs wayland-client cairo pango pangocairo xkbcommon)
bemenu-renderer-wayland.so: private override CPPFLAGS += $(shell pkg-config --cflags-only-I wayland-client cairo pango pangocairo xkbcommon)
bemenu-renderer-wayland.so: lib/renderers/cairo_renderer.h lib/renderers/wayland/wayland.c lib/renderers/wayland/wayland.h lib/renderers/wayland/registry.c lib/renderers/wayland/window.c xdg-shell.a wlr-layer-shell.a xdg-output.a
 
common.a: client/common/common.c client/common/common.h
bemenu: common.a client/bemenu.c
bemenu-run: common.a client/bemenu-run.c
 
install-pkgconfig: $(pkgconfigs)
	mkdir -p "$(DESTDIR)$(PREFIX)$(libdir)/pkgconfig"
	cp $^ "$(DESTDIR)$(PREFIX)$(libdir)/pkgconfig"
 
install-include: lib/bemenu.h
	mkdir -p "$(DESTDIR)$(PREFIX)$(includedir)"
	cp $^ "$(DESTDIR)$(PREFIX)$(includedir)"
 
install-libs: $(libs)
	mkdir -p "$(DESTDIR)$(PREFIX)$(libdir)"
	cp $(addsuffix .$(VERSION), $^) "$(DESTDIR)$(PREFIX)$(libdir)"
 
install-lib-symlinks: $(libs) | install-libs
	cp -RP $^ $(addsuffix .$(firstword $(subst ., ,$(VERSION))), $^) "$(DESTDIR)$(PREFIX)$(libdir)"
 
install-bins:
	mkdir -p "$(DESTDIR)$(PREFIX)$(bindir)"
	-cp $(bins) "$(DESTDIR)$(PREFIX)$(bindir)"
	-chmod 0755 $(addprefix "$(DESTDIR)$(PREFIX)$(bindir)"/,$(bins))
 
install-man: bemenu.1
	mkdir -p "$(DESTDIR)$(PREFIX)$(mandir)"
	cp $< "$(DESTDIR)$(PREFIX)$(mandir)"
 
install-renderers: install-curses install-wayland install-x11
 
install-curses:
	mkdir -p "$(DESTDIR)$(PREFIX)$(libdir)/bemenu"
	-cp bemenu-renderer-curses.so "$(DESTDIR)$(PREFIX)$(libdir)/bemenu"
 
install-wayland:
	mkdir -p "$(DESTDIR)$(PREFIX)$(libdir)/bemenu"
	-cp bemenu-renderer-wayland.so "$(DESTDIR)$(PREFIX)$(libdir)/bemenu"
 
install-x11:
	mkdir -p "$(DESTDIR)$(PREFIX)$(libdir)/bemenu"
	-cp bemenu-renderer-x11.so "$(DESTDIR)$(PREFIX)$(libdir)/bemenu"
 
install-base: install-pkgconfig install-include install-lib-symlinks install-bins install-man
 
install: install-base install-renderers
	@echo "Install OK!"
 
doxygen:
	BM_VERSION=$(VERSION) doxygen doxygen/Doxyfile
	cp -R doxygen/doxygen-qmi-style/navtree html
	cp -R doxygen/doxygen-qmi-style/search html/search
 
sign:
	test "x$(GIT_TAG)" = "x$(VERSION)"
	git archive --prefix="bemenu-$(VERSION)/" -o "bemenu-$(VERSION).tar.gz" "$(GIT_TAG)"
	gpg --default-key "$(GPG_KEY_ID)" --armor --detach-sign "bemenu-$(VERSION).tar.gz"
 
clean:
	$(RM) -r *.dSYM # OSX generates .dSYM dirs with -g ...
	$(RM) $(pkgconfigs) $(libs) $(bins) $(renderers) $(mans) *.a *.so.*
	$(RM) lib/renderers/wayland/wlr-*.h lib/renderers/wayland/wlr-*.c lib/renderers/wayland/xdg-shell.c
	$(RM) -r html
 
.DELETE_ON_ERROR:
.PHONY: all clean install install-base install-pkgconfig install-include install-libs install-lib-symlinks \
		install-man install-bins install-renderers install-curses install-wayland install-x11 \
		doxygen sign clients curses x11 wayland

Last edited by adcdam; 12-22-2021 at 09:23 PM.
 
Old 12-22-2021, 08:55 PM   #6
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Original Poster
Rep: Reputation: 253Reputation: 253Reputation: 253
Quote:
Originally Posted by LuckyCyborg View Post
From what I heard, in fact the XFCE people wants to use Weston as Wayland server/compositor for Wayland/XFCE sessions.

https://wiki.xfce.org/releng/wayland_roadmap

But there's also XFway, which is a Weston based Wayland server/compositor make in the like of XFWM4.

https://github.com/adlocode/xfway

Anyway, I've already managed to run XFCE sessions on Wayland, using XWeston as x11 server.
What's the benefit of using xweston over simple xwayland?
 
Old 12-23-2021, 12:23 AM   #7
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,555

Rep: Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418
Quote:
Originally Posted by Lockywolf View Post
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.
 
Old 12-23-2021, 02:46 AM   #8
pghvlaans
Member
 
Registered: Jan 2021
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 460

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
LuckyCyborg, how was the mouse wheel scrolling? It felt really sluggish and unresponsive when I tried fvwm in Xwayland with a different compositor.
 
Old 12-23-2021, 03:04 AM   #9
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,555

Rep: Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418
Quote:
Originally Posted by pghvlaans View Post
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.
 
1 members found this post helpful.
Old 12-23-2021, 03:09 AM   #10
pghvlaans
Member
 
Registered: Jan 2021
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 460

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
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).
 
Old 12-23-2021, 06:23 AM   #11
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,555

Rep: Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418Reputation: 3418
Quote:
Originally Posted by pghvlaans View Post
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).
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.
 
Old 12-23-2021, 10:04 AM   #12
biker_rat
Member
 
Registered: Feb 2010
Posts: 371

Rep: Reputation: 220Reputation: 220Reputation: 220
Release candidate for next sway version is out.
 
Old 12-23-2021, 01:32 PM   #13
adcdam
Member
 
Registered: Aug 2020
Location: Berisso, Argentina
Distribution: Slackware
Posts: 255

Rep: Reputation: 205Reputation: 205Reputation: 205
Also for the more adventurous there is Arcan, it's not X it's not wayland but it have backward compatibility with both xorg and wayland.
https://arcan-fe.com/2021/11/19/arcan-0-6-1/
https://github.com/letoram/arcan
 
Old 02-09-2022, 09:22 AM   #14
pghvlaans
Member
 
Registered: Jan 2021
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 460

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
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:
Code:
<labwc_config>
	<core>
		<decoration>client</decoration>
	</core>
</labwc_config>
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.
 
Old 02-10-2022, 10:08 AM   #15
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 780
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Mahogany, a wlroots based wm, is underway, but not complete.
 
  


Reply

Tags
newm, wayland, wlroots



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
-current: gtk3/gtk4 font rendering require xdg-desktop-portal-gnome in plasma wayland walecha Slackware 4 11-10-2021 06:38 AM
Wayland/Sway in Current tramtrist Slackware 1 03-02-2021 04:32 AM
Wayland/Sway & Slackware tramtrist Slackware 5 05-02-2020 01:47 PM
configure: error: The xdg python module is required (pyxdg or python-xdg) Sargalus Linux - Software 7 03-24-2010 07:34 AM
Desktop & Window Mangers ryanstrayer Linux - General 1 01-27-2002 08:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration