Skip to content

ponytail-daemon: Wait for all proxies before start session

Ponytail's session requires the remote desktop proxy and the screencast proxy to start successfully.

The current code relies on the remote desktop proxy to be stored in on_remote_desktop_proxy_acquired() before on_screen_cast_proxy_acquired() starts the session by calling gpd_session_start().

However, if on_screen_cast_proxy_acquired() is invoked before on_remote_desktop_proxy_acquired(), the gpd_session_start() function would be invoked and gpd_context_get_remote_desktop_proxy() would return NULL, causing a hang.

Wait until the remote desktop proxy and the screencast proxy are acquired to start the session.

Steps to reproduce the issue:

  1. Open a terminal and get the list of windows:
    $ dbus-send --session --print-reply \
      --dest=org.gnome.Shell.Introspect /org/gnome/Shell/Introspect \
      org.gnome.Shell.Introspect.GetWindows
  1. Connect to a window:
    $ dbus-send --session --print-reply --dest=org.gnome.Ponytail \
      /org/gnome/Ponytail/EventController \
      org.gnome.Ponytail.EventController.ConnectWindow uint64:<ID>
  1. Stop and start the graphical session:
    $ sudo systemctl isolate multi-user.target
    $ sudo systemctl isolate graphical.target
  1. Try to connect to a window repeating steps 1. and 2.

  2. Ponytail will fail to connect wit error:

   dbus-send --session --print-reply --dest=org.gnome.Shell.Introspect
   /org/gnome/Shell/Introspect org.gnome.Shell.Introspect.GetWindows

Merge request reports