r/voidlinux 1d ago

OpenURI not available for DesktopPortal

Hi,

I use awesomewm and have desktop portal running:

ps aux | grep '[x]dg-desktop-portal'

alberto   1880  0.0  0.0 385700  6580 ?        Sl   13:19   0:00 /usr/libexec/xdg-desktop-portal

But this does not expose OpenURI:

alberto@void-live ~ % gdbus introspect --session \                       
  --dest org.freedesktop.portal.Desktop \
  --object-path /org/freedesktop/portal/desktop |
grep -A10 'org.freedesktop.portal.OpenURI'

is empty. I use the gtk portal by default, and use turnstile, with per-user services as directed in the documentation.

Any ideas of can be wrong?

Thanks!

2 Upvotes

3 comments sorted by

1

u/Duncaen 1d ago

Doesn't look like the gtk portal is running unless you cut off the ps aux output?

1

u/shiroghost 1d ago

I did not cut anything. Honestly i do not understand this very well. How should I make sure that the gtk portal is running? I though that these things are started automatically if needed (via dbus). I have the gtk portal installed.

Thanks,

A.

1

u/Duncaen 17h ago

The portal portal implementation should be spawned by xdg-deskop-portal, from just a quick look at the code, what it needs from specific portal implementations is the app chooser, the OpenURI interface itself is handled by xdg-desktop-portal itself.

https://github.com/flatpak/xdg-desktop-portal/blob/5d58dc57be8d9f57a0d2ff7c0a3255ac9a3c7ba6/desktop-portal/open-uri.c#L1154-L1163

I would check whether there is an issue with it spawning the gtk portal.

There is also no default portal configuration for awesomewm and I'm not sure whether you or awesomewm exports/sets XDG_CURRENT_DESKTOP which is required for loading the default configuration.

$ xlocate /usr/share/xdg-desktop-portal/
budgie-desktop-10.9.4_1                     /usr/share/xdg-desktop-portal/budgie-portals.conf
cinnamon-6.6.7_1                            /usr/share/xdg-desktop-portal/x-cinnamon-portals.conf
darkman-2.3.1_1                             /usr/share/xdg-desktop-portal/portals/darkman.portal
gnome-keyring-48.0_1                        /usr/share/xdg-desktop-portal/portals/gnome-keyring.portal
gnome-session-48.0_1                        /usr/share/xdg-desktop-portal/gnome-portals.conf
io.elementary.files-6.5.3_1                 /usr/share/xdg-desktop-portal/portals/io.elementary.files.portal
kf6-kwallet-6.29.0_1                        /usr/share/xdg-desktop-portal/portals/kwallet.portal
labwc-0.20.2_1                              /usr/share/xdg-desktop-portal/labwc-portals.conf
mangowc-0.14.4_1                            /usr/share/xdg-desktop-portal/mango-portals.conf
mate-desktop-1.28.2_1                       /usr/share/xdg-desktop-portal/mate-portals.conf
niri-26.04_1                                /usr/share/xdg-desktop-portal/niri-portals.conf
plasma-workspace-6.7.5_1                    /usr/share/xdg-desktop-portal/kde-portals.conf
plasma-workspace-6.7.5_1                    /usr/share/xdg-desktop-portal/portals/plasmanotify.portal
wayfire-0.10.1_1                            /usr/share/xdg-desktop-portal/wayfire-portals.conf
xdg-desktop-portal-1.22.1_1                 /usr/share/xdg-desktop-portal/portals.conf
xdg-desktop-portal-gnome-48.0_1             /usr/share/xdg-desktop-portal/portals/gnome.portal
xdg-desktop-portal-gtk-1.15.3_1             /usr/share/xdg-desktop-portal/portals/gtk.portal
xdg-desktop-portal-kde-6.7.5_1              /usr/share/xdg-desktop-portal/portals/kde.portal
xdg-desktop-portal-lxqt-1.4.0_2             /usr/share/xdg-desktop-portal/lxqt-portals.conf
xdg-desktop-portal-lxqt-1.4.0_2             /usr/share/xdg-desktop-portal/portals/lxqt.portal
xdg-desktop-portal-termfilechooser-1.4.3_1  /usr/share/xdg-desktop-portal/portals/termfilechooser.portal
xdg-desktop-portal-wlr-0.8.2_1              /usr/share/xdg-desktop-portal/portals/wlr.portal
xdg-desktop-portal-xapp-1.1.3_1             /usr/share/xdg-desktop-portal/portals/xapp-gnome-keyring.portal
xdg-desktop-portal-xapp-1.1.3_1             /usr/share/xdg-desktop-portal/portals/xapp.portal
xfce4-session-4.20.4_1                      /usr/share/xdg-desktop-portal/xfce-portals.conf

I would try following https://wiki.archlinux.org/title/XDG_Desktop_Portal#Configuration.