Bug#1006329: Acknowledgement (xwayland does not update dbus activation environment (DISPLAY, XAUTHORITY) on startup)
- To: 1006329@bugs.debian.org
- Subject: Bug#1006329: Acknowledgement (xwayland does not update dbus activation environment (DISPLAY, XAUTHORITY) on startup)
- From: the dude <the-dude@the-du.de>
- Date: Sat, 2 Aug 2025 10:54:45 +0200
- Message-id: <[🔎] 091e0c22-8797-4b69-8be6-48a881759099@the-du.de>
- Reply-to: the dude <the-dude@the-du.de>, 1006329@bugs.debian.org
- In-reply-to: <3aefd1da-5a1b-5667-34c7-2153c554277e@mailbox.org>
- References: <164563497346.4421.12043508119624861389.reportbug@servo.finestructure.net> <handler.1006329.B.164563536211205.ack@bugs.debian.org> <164563497346.4421.12043508119624861389.reportbug@servo.finestructure.net> <87ee3tuzqn.fsf@caltech.edu> <3aefd1da-5a1b-5667-34c7-2153c554277e@mailbox.org> <3aefd1da-5a1b-5667-34c7-2153c554277e@mailbox.org> <164563497346.4421.12043508119624861389.reportbug@servo.finestructure.net>
On Thu, 24 Feb 2022 11:38:51 +0100 <michel.daenzer@mailbox.org> wrote:
On 2022-02-23 20:52, Jameson Graef Rollins wrote:
> I might be mischaracterizing this as an Xwayland issue. Maybe it's a
> sway issue?
It's definitely not an Xwayland issue; Xwayland (like any other X server) itself doesn't set these environment variables or launch any X11 client processes.
I just ran into this issue. There seems to be a race condition or
ordering issue when first logging in after a boot. Sway will set the
environment varables correctly when
/etc/sway/config.d/50-systemd-user.conf is included in
~/.config/sway/config, but this happens _after_ systemd starts
xdg-desktop-portal-gtk. I confirmed this by adding
ExecStartPre=/usr/bin/echo $DISPLAY $WAYLAND_DISPLAY
to the xdg-desktop-portal-gtk unit. After logging in for the first time
after a boot, systemctl --user status xdg-dekstop-portal-gtk looks like
this:
~~~
Aug 02 10:18:05 hostname systemd[2255]: Starting
xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME
implementation)...
Aug 02 10:18:05 hostname (echo)[2382]: xdg-desktop-portal-gtk.service:
Referenced but unset environment variable evaluates to an empty string:
DISPLAY, WAYLAND_DISPLAY
Aug 02 10:18:05 hostname xdg-desktop-por[2383]: cannot open display:
Aug 02 10:18:05 hostname systemd[2255]: xdg-desktop-portal-gtk.service:
Main process exited, code=exited, status=1/FAILURE
Aug 02 10:18:05 hostname systemd[2255]: xdg-desktop-portal-gtk.service:
Failed with result 'exit-code'.
Aug 02 10:18:05 hostname systemd[2255]: Failed to start
xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME implementation).
~~~
After a systemctl --user restart xdg-desktop-portal-gtk the variables
are set:
~~~
Aug 02 10:19:39 hostname systemd[2255]: Starting
xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME
implementation)...
Aug 02 10:19:39 hostname echo[2788]: :0 wayland-1
Aug 02 10:19:39 hostname systemd[2255]: Started
xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME implementation).
~~~
Does anyone have an idea how best to fix this? Do we need to add a
dependency to the xdg-desktop-portal-gtk unit? But what dependency?
Best regards,
-- Martin
Reply to: