Intercept a wayland session

I’m trying to record/intercept a wayland session for a remote desktop program. Since I need to access the session d-bus owned by the user who is logged in from the remote desktop program (and that might run as another user), the only way I found is to:

  1. register a program in the XDG autostart folder
  2. let it be launched with the same logged in user and access the session bus

Is there any better way? I’m not sure if relying on XDG autostart is a good way (e.g. what if another autostart program takes longer? Will it delay my program start? Is it reliable for most shells including gnome-shell - which is my primary target -?)

This documentation seems to hint that there are other ways to launch services in the Wayland session besides autostart:

For starting services, there are various alternatives: D-Bus activation, systemd user services, xdg autostart files. Autostart files and systemd services can have conditions that control their activation.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.