Xdg-desktop-portal does not support ScreenCast portal

xdg-desktop-portal is used extensively by flatpak, but also by a number of non-flatpak applications such as Gnome-Network-Displays.

org.freedesktop.portal.ScreenCast is used by Gnome-Network-Displays for doing Miracast, for example to an Android TV. Gnome-Network-Displays does not work for this reason. I have tried both the flatpak version as well as the two AUR versions, the same error is present.

This portal is missing from Manjaro’s build of xdg-desktop-portal. This shows up with the following error on Gnome-Network-Displays:

(gnome-network-displays:6217): Gnd-WARNING **: 20:41:36.603: Failed to create screencast session: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.ScreenCast”

Looking deeper, I investigated using Door Knocker and this portal is indeed missing from xdg-desktop-portal.

2024-12-26_20-50

This could be due to the way xdg-desktop-portal is built.

I’m providing some diagnostic info below.

$ pamac list | grep xdg-desktop-portal
xdg-desktop-portal                   1.18.4-2                     extra     2,3 MB
xdg-desktop-portal-gnome             47.1-3                       extra     820,8 kB
xdg-desktop-portal-gtk               1.15.1-2                     extra     443,7 kB
xdg-desktop-portal-xapp              1.1.0-1                      extra     159,1 kB
$ uname -a
Linux xxxxx 6.12.4-1-MANJARO #1 SMP PREEMPT_DYNAMIC Mon, 09 Dec 2024 11:58:37 +0000 x86_64 GNU/Linux
$ inxi -F
System:
  Host: xxxxx Kernel: 6.12.4-1-MANJARO arch: x86_64 bits: 64
  Desktop: Xfce v: 4.18.1 Distro: Manjaro Linux

I believe it’s provided by xdg-desktop-portal

pamac search -f "org.freedesktop.portal.ScreenCast"
/usr/share/dbus-1/interfaces/org.freedesktop.portal.ScreenCast.xml is owned by xdg-desktop-portal

Check if portal is running

systemctl status --user xdg-desktop-portal.service
systemctl status --user xdg-desktop-portal.service
● xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: active (running) since Thu 2024-12-26 20:37:48 CET; 54min ago
 Invocation: 777a2bb53d0a4966822a5a1b9ee4fff2
   Main PID: 1384 (xdg-desktop-por)
      Tasks: 7 (limit: 18503)
     Memory: 203.7M (peak: 872.5M)
        CPU: 8.232s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal.service
             └─1384 /usr/lib/xdg-desktop-portal

Dez 26 20:37:48 zzzzzz systemd[1065]: Starting Portal service...
Dez 26 20:37:48 zzzzzz xdg-desktop-por[1384]: Error loading /usr/share/xdg-desktop-portal/portals/gnome.portal: Not a portal backend interface: org.freedesktop.portal.ScreenCast
Dez 26 20:37:48 zzzzzz xdg-desktop-por[1384]: Choosing xapp.portal for org.freedesktop.impl.portal.Background via the deprecated UseIn key
Dez 26 20:37:48 zzzzzz xdg-desktop-por[1384]: The preferred method to match portal implementations to desktop environments is to use the portals.conf(5) configuration file
Dez 26 20:37:48 zzzzzz xdg-desktop-por[1384]: Choosing xapp-gnome-keyring.portal for org.freedesktop.impl.portal.Secret via the deprecated UseIn key
Dez 26 20:37:48 zzzzzz systemd[1065]: Started Portal service.
Dez 26 20:38:25 zzzzzz xdg-desktop-por[1384]: Failed to get application states: GDBus.Error:org.freedesktop.portal.Error.Failed: GetAppState currently only supported in Cinnamon

It seems to be running fine.

My suspicion is that xdg-desktop-portal.service does not support ScreenCast unless built with certain flags.

First of all, how did you install GNOME Network Displays? The Flatpak or the AUR package?

Who built what now? :thinking:

❯ pamac info xdg-desktop-portal | grep Packager
Packager              : Jan Alexander Steffens (heftig) <heftig@archlinux.org>

Indeed it is.

…available. I just checked.

Please see:

Please read what I wrote above. As I wrote above, I installed the Flatpak version and the two separate AUR versions. Behaviour is identical.

Please see:

    How to Post
    [HowTo] Request support

You’re not reading what I write anyway :slight_smile:

I also checked and ScreenCast definitely is available on current stable branch. Something is broken on your side – I don’t use gnome portal – maybe this is issue:

Please provide the following command output:

inxi --admin --verbosity=8 --filter --no-host --width

More information on how to provide diagnostics and other useful information may be found in:

Please note that it’s easy to miss information given in forum posts. Instead of claiming “you didn’t read it” (and similar), perhaps think about how you might have presented the information better:

Regards.

@mynewlaptop I’ve deleted my last reply. The thread is open again for further troubleshooting.

Help us help you: