Subject: [bug#76619] [PATCH] gnu: home: services: Add 'wayland-display' service.

From: Ludovic Courtès <[email-masked]>
Date: Mon, 10 Mar 2025 22:16:36 +0100

Hi!

Hilton Chain <[email-masked]> skribis:

> On a second thought ‘display’ may not be a good name, I'm going to use
> ‘graphical-session’, sounds familiar? ;)

Good idea.  :-)

> I have realized that for a Wayland session, setting only ‘WAYLAND_DISPLAY’ in
> Shepherd is not sufficient to make all applications work.

The goal of ‘x11-display’ now is only to (1) ensure X11 is running, and
(2) determine the correct value of ‘DISPLAY’ so other services can use
it.

I would say that other environment variables like the Freedesktop ones
(XDG_*) are beyond the scope of such a service.  WDYT?

> herd start graphical-session \
>     DISPLAY=$DISPLAY \
>     WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
>     XDG_SESSION_TYPE=$XDG_SESSION_TYPE \
>     XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP \
>     NIRI_SOCKET=$NIRI_SOCKET
>
>
> These environment variables will be collected in ‘GUIX_GRAPHICAL_SESSION’:

That seems a bit too complex to me.

> However I found that Shepherd starts ‘graphical-session’ even if its
> auto-starting is disabled, when there're services depending on it.

That’s not really intended, but it’s a Guix issue, not a Shepherd issue
(the Shepherd has no notion of “auto starting”; it just starts whatever
you ask it to start in your config file).

Perhaps the ‘auto-start?’ property should automatically propagate along
edges?

Thanks,
Ludo’.