For information on how to run sway/wayland see this thread: https://forum.obarun.org/viewtopic.php?id=1392

use cower or pacopts to download the aur pkg greetd
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD
cd to greetd

or
cd /tmp
mkdir greetd
cd greetd
wget https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=greetd
wget https://aur.archlinux.org/cgit/aur.git/tree/greetd.pam?h=greetd
edit PKGBUILD

1 remove systemd from the dependencies

depends=(systemd pam)
depends=(pam)

2 Use a comment # or remove these two lines:

# install -Dm644 "$srcdir/greetd-$pkgver/greetd.service" \
# "$pkgdir/usr/lib/systemd/system/greetd.service"

(you can change the package number to 2 from 1 pkgrel=1 --> pkgrel=2 so it is not confuses in your cache with the AUR pkg.)

3 save PKGBUILD and exit

4 make sure you have the greetd.pam file in your directory and it looks like this
# %PAM-1.0

auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
account    include      system-local-login
session    include      system-local-login
install the pkg produced:
% sudo pacman -S git rust scdoc pam
Note which of these were not already installed so you can remove them at the end.
% makepkg
% sudo pacman -U greetd*.pkg.tar.xz
% sudo mv greetd*.pkg.tar.xz /var/cache/pacman/pkg/

Maybe Eric or JM can contribute an install line to be added to the PKGBUILD with obsysusers to add greeter to the video group.
edit as root
/etc/66/service/greetd

and add this content:
[main]
@ type = longrun
@ version = 0.0.1
@ description = "greetd daemon"
@ user = ( root )

[start]
@ execute = ( exec greetd ${cmd_args} ${conf_dir}/${conf_file} )

[stop]
@ build = auto
@ execute = ( s6-rmrf /run/greetd* )

[environment]
cmd_args=!-c
conf_dir=!/etc/greetd
conf_file=!config.toml
I am not that sure that the stop works and greetd doesn't provide a command to stop itself

To enable and start the service:

Then enable and start the service in a tree you want it started (example root)
% sudo 66-enable -t root -FS greetd
% sudo 66-inservice greetd
Also read the documentation about its configuration file in /etc/greetd/config.toml and how to modify it.
AUR has some variants to use with greetd GTK and console.
If you are using the standard 2 ttys on obarun and X starts on tty3 on /etc/greetd/config.toml
you may want to say start on vt = 4

If you are using 6 ttys make this vt = 8 so it doesn't interfere with other ttys

Also root login is not allowed, maybe because it is greeter (user) that when added in video group is allowed to start a session but not a root login?

Also when $SHELL is substituted with xinit or startx as soon as you login your X session starts.
For use with wayland/wlroots/sway etc you should also use this pkg: greetd-wlgreet from AUR

Powered by Obarun