Add support for D-Bus session management in wait_for_session hook#69
Conversation
jikortus
left a comment
There was a problem hiding this comment.
Thank you for this improvement, waiting for gnome-kiosk/Mutter becoming available on D-Bus seems to be useful. However, the environment variables exports seem to be unnecessary, as those are already defined in the systemd unit files (https://github.com/rhinstaller/anabot/blob/main/etc/systemd/system/anabot-direct.service#L16 and https://github.com/rhinstaller/anabot/blob/main/etc/systemd/system/anabot.service#L23).
I also wonder if we could perhaps get rid of the sleep in the unit files (https://github.com/rhinstaller/anabot/blob/main/etc/systemd/system/anabot.service#L15) after we deploy this change (dbus_name_owned()). However, we should make sure that removing it would bring back the crashes due to which we introduced it earlier on, it's just a momentary idea without any deeper research - just in case you'd want to experiment with it.
This update adds a function to check if specific D-Bus names are owned and implements a waiting mechanism for gnome-kiosk and Mutter APIs before starting the gnome-ponytail-daemon, enhancing session readiness checks. Generated-by: Cursor
Good point, removed and confirmed it works fine.
The sleep is for Xorg installations, this change affects just Wayland installations, so it's unrelated. The PR is ready for a final review. |
jikortus
left a comment
There was a problem hiding this comment.
The changes look good to me, hopefully improving stability. Thank you!
This update introduces environment variable exports for XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS. It also adds a function to check if specific D-Bus names are owned and implements a waiting mechanism for gnome-kiosk and Mutter APIs before starting the gnome-ponytail-daemon, enhancing session readiness checks.