Index | Thread | Search

From:
Landry Breuil <landry@openbsd.org>
Subject:
Re: [new/wip] greetd/gtkgreet
To:
ports@openbsd.org
Date:
Sat, 1 Nov 2025 13:29:05 +0100

Download raw body.

Thread
Le Fri, Oct 31, 2025 at 10:40:35PM +0100, Landry Breuil a écrit :
> hi,
> 
> third attempt at a port for https://git.sr.ht/~kennylevinsen/gtkgreet &
> https://git.sr.ht/~kennylevinsen/greetd, i'm at a point where i have
> something that 'works', eg:
> 
> - greetd is started as root via rc.d
> - it spawns cage -- gtkgreet (still as root, but should technically be
>   with a dedicated user) to show the graphical login manager in a caged
> wayland session
> - when the user logs in, the cage wayland session exits, and the chosen
>   wayland session (eg labwc, sway, wayfire for now on OpenBSD, list to
> fill in /etc/greetd/environments) is started as the given user.
> - exiting that session (eg pkill labwc), the greeter is shown again.
> 
> things to improve:
> - properly call login_fbtab instead of the super ugly chown i'm doing
>   (see patches/patch-greetd_src_session_worker_rs, i know nothing to
> rust, and so far i hate this first experience with it)
> 
> - do something to mkdir ~/.local/run with the to-be-logged-in user ?
> 
> - see if it can work on other ttys than ttyC0 (but then fbtab should be
>   amended ?)
> 
> - see if /var/run/greetd should be created/deleted outside of the rc
>   script and in the rust code ? this one is used only for the 'greeter'
> wayland session
> 
> - see how it can work with a dedicated unpriv user

new iteration, with:

- "proper" login_fbtab() integration, which resets ownership to root when
  the wayland session exits
- cage -- gtkgreet runs as the unpriviledged _greetd user, the greetd
  daemon takes care of properly changing ownership via login_fbtab, so
this seems to work fine pretty transparently: greetd (as root) starts
gtkgreet (which starts as _greetd), upon user login the devices are
transferred to the user.
- The tempdir /var/run/greetd is owned by _greetd, and purged when
  greetd exits, maybe that should be done from the rust code..
- uid/gid 565 is reused for _greetd

i've added a default /etc/greetd/environments list, with:
- startxfce4 --wayland
- labwc
- sway
- wayfire

all those seem to work fine when started from greetd. using xfce4 with
labwc as the wayland compositor for some days without 'large' issues.

testing more than welcome, oks too :)

Landry