UseIn fallbck is used even if preference is set to none for interfaces within portals.conf file
SoumyaRanjanPatnaik opened this issue · 1 comments
SoumyaRanjanPatnaik commented
Operating System
Ubuntu 23.10 (mantic)
XDG Desktop Portal version
1.18
XDG Desktop Portal version (Other)
No response
Desktop Environment
Other
Desktop Environment (Other)
Regolith
Expected Behavior
- If the preferred value for an interface is set to
none
inportals.conf
, the interface should be disabled. - If the
default
preference is set tonone
, all the interfaces should be disabled, except the ones that explicitly specify some other backend in their preference list
Current Behavior
X-D-P ignores none
values in portals.conf
file, if the UseIn
value is specified by any of the backends
Steps to Reproduce
- Install a portals backend that uses the legacy
UseIn
field in its.portals
file (example: X-D-P-gnome) - In your
portals.conf
file, set the preference for any interface supported by the backend. I used the following for gnome.org.freedesktop.impl.portal.Background=none
- Run
/usr/libexec/xdg-desktop-portal -r -v
Result: the interface is not disabled
XDP: Found 'none' in configuration for org.freedesktop.impl.portal.Background
(/usr/libexec/xdg-desktop-portal:81335): xdg-desktop-portal-WARNING **: 19:29:21.131: Choosing gnome.portal for org.freedesktop.impl.portal.Background via the deprecated UseIn key
(/usr/libexec/xdg-desktop-portal:81335): xdg-desktop-portal-WARNING **: 19:29:21.131: The preferred method to match portal implementations to desktop environments is to use the portals.conf(5) configuration file
XDP: Using gnome.portal for org.freedesktop.impl.portal.Background in gnome (fallback)
Anything else we should know?
Setting default
to none
produces the same behaviour but for all the interfaces provided by the backends with UseIn
in their .portal
file
SoumyaRanjanPatnaik commented
Potential fix: #1255