OK after much discussion with flatpak developers and testing things in
VMs, we have found the reason this happens on wayland only !

Quote from TingPing, "dconf supports distros installing override files
into the system, then when queried dconf will look at user setting, then
fallback to distro setting, then fallback to default setting. In a
sandbox we can ask dconf for the user setting but we don't have disk
access to the override files".

So what this means is that on wayland the flatpak can't read the default
overrides from the session (eg Ubuntu choosing Ambiance and Minimise,
Maximise, Close) as it doesn't have permission to read the system files
only user ones. (this doesn't affect X11 sessions as gtk reads from
xsettings instead).

This will be solved when the settings portal [0] is used in xdg-desktop-
portal, as that runs on the host outside of the sandbox it is able to
read the necessary files.


For now the workaround is to install gnome-tweaks, change your theme to 
something else and then back to Ambiance. Also for the window controls change 
one of them from true to false to true. This will then write user settings to 
dconf which the flatpak's can then read.


As this will be solved in the next version of xdg-deskop-portal, I will close 
this bug for the flatpak package and open against xdg-desktop-portal.

0 - https://github.com/flatpak/xdg-desktop-portal/pull/245

** Summary changed:

- Themes work in Xorg but not Wayland sessions - when using Communitheme snap 
sessions
+ dconf overrides are not read by flatpaks on wayland sessions

** Description changed:

+ "dconf supports distros installing override files into the system, then
+ when queried dconf will look at user setting, then fallback to distro
+ setting, then fallback to default setting. In a sandbox we can ask dconf
+ for the user setting but we don't have disk access to the override
+ files"
+ 
+ So what this means is that on wayland flatpaks can't read the default
+ overrides from the session (eg Ubuntu choosing Ambiance and Minimise,
+ Maximise, Close etc) as it doesn't have permission to read the system
+ files only user ones. (this doesn't affect X11 sessions as gtk reads
+ from xsettings instead).
+ 
+ This will be solved when the settings portal [0] is used in xdg-desktop-
+ portal, as that runs on the host outside of the sandbox it is able to
+ read the necessary files.
+ 
+ # Workaround
+ 
+ Install gnome-tweaks, change your theme to something else and then back
+ to Ambiance. Also for the window controls change one of them from true
+ to false to true. This will then write user settings to dconf which the
+ flatpak's can then read.
+ 
+ 
+ 0 - https://github.com/flatpak/xdg-desktop-portal/pull/245
+ 
+ 
+ === Original Description ===
+ 
  System: Ubuntu 18.04.1
  Flatpak version: 1.0.6-flatpak1~bionic (from 
https://launchpad.net/~alexlarsson/+archive/ubuntu/flatpak)
  
  Description: Flatpaks using GTK3 default to the Adwaita theme in a
  Wayland Gnome session. In Xorg sesions they are themed correctly. The
  attached screenshots demonstrate the same version of Gnome Builder
  running in Communitheme-Wayland and Communitheme-Xorg. However, flatpaks
  that use Qt5 (like KeepassXC) seem to be themed correctly under Wayland.

** Also affects: xdg-desktop-portal (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: flatpak (Ubuntu)
       Status: Confirmed => Invalid

** Changed in: xdg-desktop-portal (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1804954

Title:
  dconf overrides are not read by flatpaks on wayland sessions

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/flatpak/+bug/1804954/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to