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:
- Install GNOME Network Displays build dependencies:
sudo dnf5 builddep gnome-network-displays -y
- Install necessary video codecs (from rpmfusion):
sudo dnf5 install gstreamer1-plugin-openh264 gstreamer1-plugins-ugly -y
- Clone the source code for this merge request and
cd
into its directory - Configure meson with:
meson setup -Dprefix=/usr -Dbuild_daemon=true --reconfigure build
- Build and install with:
sudo meson install -C build
- Run the daemon with dummy sinks enabled: NETWORK_DISPLAYS_DUMMY=1 gnome-network-displays-daemon
- Open D-Spy and find the /org/gnome/NetworkDisplays/Registry interface
- Click the "Sinks" property, then click "Execute".
- Copy the UUID of the WFD sink ("Dummy WFD Sink")
- Find the /org/gnome/NetworkDisplays/Manager interface
- Click the "StartStream" method, paste the UUID in single quotes in Paramenters, then click "Execute"
- Observe the orange screen sharing indicator on panel. That means it worked!
- 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 :)