Skip to content

Add a dbus daemon

Demo

Screencast_From_2025-02-17_23-05-12

Explanation

This merge request is an updated version of !219 (closed), that supercedes it.

The main difference between this version and !219 (closed) is that this version's detached stream (stream/nd-stream.c) uses Mutter's private screencasting API instead of the portal. As a result, the detached stream "bypasses" the portal dialog and starts sharing the primary display immediately. Since the purpose of this feature is to eventually integrate GNOME Network Displays into GNOME Shell, the Design Team decided it was best to avoid the portal dialog and go for a more straightforward experience (i.e. similar to the way that mobile operating systems like Android do display mirroring).

Testing

Here's a guide for testing this feature on Fedora:

  1. Install GNOME Network Displays build dependencies: sudo dnf5 builddep gnome-network-displays -y
  2. Install necessary video codecs (from rpmfusion): sudo dnf5 install gstreamer1-plugin-openh264 gstreamer1-plugins-ugly -y
  3. Clone the source code for this merge request and cd into its directory
  4. Configure meson with: meson setup -Dprefix=/usr -Dbuild_daemon=true --reconfigure build
  5. Build and install with: sudo meson install -C build
  6. Run the daemon with dummy sinks enabled: NETWORK_DISPLAYS_DUMMY=1 gnome-network-displays-daemon
  7. Open D-Spy and find the /org/gnome/NetworkDisplays/Registry interface
  8. Click the "Sinks" property, then click "Execute". image
  9. Copy the UUID of the WFD sink ("Dummy WFD Sink")
  10. Find the /org/gnome/NetworkDisplays/Manager interface
  11. Click the "StartStream" method, paste the UUID in single quotes in Paramenters, then click "Execute" image
  12. Observe the orange screen sharing indicator on panel. That means it worked!
  13. Watch the video stream (needs ffmpeg installed): "ffplay rtsp://localhost:7236/wfd1.0"

Gratitude

@jadahl @aday @felipeborges @kyteinsky @bberg @cwunder Thank you all for the attentive, patient, and friendly mentorship! You all inspired me to join the GNOME Internship Committee so other people could have a great experience like mine :)

Edited by Pedro Sader Azevedo

Merge request reports

Loading