Bug 2012315 - xdg-desktop-portal-gtk missing the Settings portal breaks GTK Flatpak settings on KDE Wayland host systems
Summary: xdg-desktop-portal-gtk missing the Settings portal breaks GTK Flatpak setting...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xdg-desktop-portal-gtk
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David King
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-08 19:43 UTC by Ryan Gonzalez
Modified: 2021-11-15 05:46 UTC (History)
6 users (show)

Fixed In Version: xdg-desktop-portal-gtk-1.10.0-2.fc35
Clone Of:
Environment:
Last Closed: 2021-11-15 05:46:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github flatpak xdg-desktop-portal-gtk issues 355 0 None closed Wayland GTK Flatpaks do not antialias fonts when run on KDE Plasma Wayland 2021-10-09 12:00:49 UTC

Description Ryan Gonzalez 2021-10-08 19:43:52 UTC
Description of problem:

Right now, xdg-desktop-portal-gtk explicitly disables the building of the Settings portal. This is a problem, because:

- GTK within a Flatpak environment reads the font and DPI settings from the `org.gnome.desktop.interface` settings namespace.
- The namespace is *not* available at all from any portals other than the GTK and GNOME implementations.

Version-Release number of selected component (if applicable): 1.10

How reproducible: Very easily.

Steps to Reproduce:
1. Run the following command on the host system (you can substitute many other settings here, but we'll just use font-hinting):

gdbus call -e -d org.freedesktop.portal.Desktop -o /org/freedesktop/portal/desktop -m org.freedesktop.portal.Settings.Read org.gnome.desktop.interface font-hinting

2. Run it inside any Flatpak shell, e.g.:

flatpak run --command=gdbus org.freedesktop.Platform//21.08 call -e -d org.freedesktop.portal.Desktop -o /org/freedesktop/portal/desktop -m org.freedesktop.portal.Settings.Read org.gnome.desktop.interface font-hinting

3. Compare the output of the two. On Workstation, they both return the same result. On the KDE spin, the version inside the Flatpak will fail, due to the settings key not existing.

Actual results:

Font settings are available to Flatpaks so that they can display their graphics correctly.

Expected results:

Font settings are not available inside Flatpaks.

Additional info:

You can see in the GTK source code where the settings are only read from two different namespaces: https://gitlab.gnome.org/GNOME/gtk/-/blob/master/gdk/wayland/gdkdisplay-wayland.c#L1478-1515

Neither of these are available via the KDE portal exclusively.

Comment 1 P D 2021-10-09 04:07:22 UTC
Installing xdg-desktop-portal-gnome and rebooting works around the issue for now.

Comment 2 Vincent Chernin 2021-10-09 07:20:40 UTC
Could re-enabling the settings portal regress anything on Workstation or KDE?

Since users have been installing xdg-desktop-portal-gnome anyways, and nothing critical seems to be going wrong, I think it is suitable to re-enable the settings portal here for now.

I am curious if there's a better way to solve this, but for now it's probably better to just quickly fix this since 35 release is coming up.

Comment 3 Michael Catanzaro 2021-10-09 12:00:50 UTC
Note this is both an upstream AND a downstream bug. We need to fix the upstream defaults to unbreak other distros, but that's not enough because we also have them explicitly set in our downstream spec.

(In reply to Vincent Chernin from comment #2)
> Could re-enabling the settings portal regress anything on Workstation or KDE?

Maybe, but if so we'll just need to figure out how to deal with it.

Comment 4 Vincent Chernin 2021-11-10 19:07:55 UTC
Note upstream has merged a fix. https://github.com/flatpak/xdg-desktop-portal-gtk/pull/362

What's left is for upstream to tag a new release, and then for this package to be updated (and to stop explictly disabling appchooser and settings).

Comment 5 Michael Catanzaro 2021-11-10 19:09:36 UTC
(In reply to Vincent Chernin from comment #4)
> (and to stop explictly disabling appchooser and settings).

Hi David, OK for me to make this change?

Comment 6 Fedora Update System 2021-11-11 09:24:16 UTC
FEDORA-2021-328b84f07c has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-328b84f07c

Comment 7 David King 2021-11-11 11:37:46 UTC
This change will not affect Workstation, as both xdg-desktop-portal-gtk and xdg-desktop-portal-gnome are included there. The upstream release will be good for defaults, but this can be handled entirely downstream as well.

Comment 8 Fedora Update System 2021-11-12 01:02:41 UTC
FEDORA-2021-328b84f07c has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-328b84f07c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-328b84f07c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2021-11-15 05:46:39 UTC
FEDORA-2021-328b84f07c has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.