Bug 1083862 - GTK 3 applications ignore settings.ini on wayland
GTK 3 applications ignore settings.ini on wayland
Status: NEW
: 1083863 1083864 (view as bug list)
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: GNOME
Current
Other Other
: P5 - None : Major (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-04 13:36 UTC by Fabian Vogt
Modified: 2019-04-17 06:55 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---
yfjiang: needinfo? (sreeves)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Vogt 2018-03-04 13:36:29 UTC
This results in a broken appearance on non-GNOME wayland platforms.

https://gitlab.gnome.org/GNOME/gtk/commit/b8c58f41b6d2668ae3425e2b485e2482f899998d should fix this.
Comment 1 Andreas Stieger 2018-03-04 18:48:16 UTC
*** Bug 1083863 has been marked as a duplicate of this bug. ***
Comment 2 Andreas Stieger 2018-03-04 18:48:24 UTC
*** Bug 1083864 has been marked as a duplicate of this bug. ***
Comment 3 Fabian Vogt 2018-03-04 20:21:16 UTC
I'm not sure what happened here - the server closed the connection everytime I hit submit and I couldn't find the bug in the list of reports after that.
Comment 4 Yifan Jiang 2018-03-05 01:58:13 UTC
On openSUSE:Factory/gtk3, the fix seems being there after a recent upgrade:

Wed Feb 14 11:18:25 UTC 2018 - dimstar@opensuse.org

- Update to version 3.22.27:
  ...
  + GTK+ is now using ~/.config/gtk-3.0/settings.ini when using
    Wayland without dconf.
Comment 5 Fabian Vogt 2018-03-05 08:15:33 UTC
(In reply to Yifan Jiang from comment #4)
> On openSUSE:Factory/gtk3, the fix seems being there after a recent upgrade:
> 
> Wed Feb 14 11:18:25 UTC 2018 - dimstar@opensuse.org
> 
> - Update to version 3.22.27:
>   ...
>   + GTK+ is now using ~/.config/gtk-3.0/settings.ini when using
>     Wayland without dconf.

Ok, that means the change does not work.
Comment 6 Fabian Vogt 2019-02-06 18:39:20 UTC
Any news here? This is still an issue on Tumbleweed and Leap 15.1 as of today.

This is the main blocker of using wayland for GTK applications with Plasma currently.
Comment 7 Yifan Jiang 2019-02-12 06:24:19 UTC
Hi Chingkai,

Would you help to track on this issue please? Thank you!
Comment 8 QK ZHU 2019-02-21 07:19:50 UTC
I just tested on TW and Leap 15.1 (both with with Plasma Wayland session), settings.ini can change GTK3 applications' theme.

Steps:
1. Boot into Plasma Wayland session and install evince and gnome-terminal
2. evince and gnome-terminal use a non-dark theme
3. Change gtk application's theme which located in `~/.config/gtk-3.0/settings.ini` from `Breeze` to `Adwaita-dark`
> #gtk-theme-name=Breeze
> gtk-theme-name=Adwaita-dark
4. Launch evince and gnome-terminal and they use a dark theme now

So if I understand correctly the update Yifan mentioned in Comment 4 does fix this issue.
Comment 9 Fabian Vogt 2019-02-21 11:45:27 UTC
(In reply to QK ZHU from comment #8)
> I just tested on TW and Leap 15.1 (both with with Plasma Wayland session),
> settings.ini can change GTK3 applications' theme.
> 
> Steps:
> 1. Boot into Plasma Wayland session and install evince and gnome-terminal
> 2. evince and gnome-terminal use a non-dark theme
> 3. Change gtk application's theme which located in
> `~/.config/gtk-3.0/settings.ini` from `Breeze` to `Adwaita-dark`
> > #gtk-theme-name=Breeze
> > gtk-theme-name=Adwaita-dark
> 4. Launch evince and gnome-terminal and they use a dark theme now
> 
> So if I understand correctly the update Yifan mentioned in Comment 4 does
> fix this issue.

Currently a workaround for this bug is active, so you will not see this issue.
To disable the workaround, try "export GDK_BACKEND=wayland" before launching any GTK3 application.
Comment 10 Fabian Vogt 2019-04-12 07:32:54 UTC
Ping, any news here?
Comment 11 QK ZHU 2019-04-16 07:37:19 UTC
According to the discussion in 
- https://gitlab.gnome.org/GNOME/gtk/issues/1770#note_473223

gtk uses the new settings portal when needing settings, under Wayland, in a sandbox (or on non-GNOME wayland platforms). And upstream considered removing settings.ini in #note_473239

I tested on TW 20190412 with Plasma Wayland session, $GDK_BACKEND was exported to wayland and gtk theme can be changed successfully via `kcmshell5 kde-gtk-config` 

i.e. We should use settings portal rather than settings.ini
Comment 12 Fabian Vogt 2019-04-16 07:43:41 UTC
(In reply to QK ZHU from comment #11)
> According to the discussion in 
> - https://gitlab.gnome.org/GNOME/gtk/issues/1770#note_473223

The discussion was apparently closed without any conclusion.

> gtk uses the new settings portal when needing settings, under Wayland, in a
> sandbox (or on non-GNOME wayland platforms). And upstream considered
> removing settings.ini in #note_473239

The documentation says otherwise.

> I tested on TW 20190412 with Plasma Wayland session, $GDK_BACKEND was
> exported to wayland and gtk theme can be changed successfully via `kcmshell5
> kde-gtk-config` 

Please test on Leap as well. Maybe the GTK bug is fixed in Tumbleweed, but present in Leap. That's what I see at least.

> i.e. We should use settings portal rather than settings.ini

So xdg-desktop-portal-kde should read the settings.ini instead and expose that over DBus?
Comment 14 Fabian Vogt 2019-04-16 09:41:50 UTC
(In reply to Fabian Vogt from comment #12)
> (In reply to QK ZHU from comment #11)
> > i.e. We should use settings portal rather than settings.ini
> 
> So xdg-desktop-portal-kde should read the settings.ini instead and expose
> that over DBus?

This is what I suggested to the upstream devs of kde-gtk-config and xdg-desktop-portal-kde now - let's see what happens.
Comment 15 QK ZHU 2019-04-17 06:47:40 UTC
(In reply to Fabian Vogt from comment #12)
> 
> Please test on Leap as well. Maybe the GTK bug is fixed in Tumbleweed, but
> present in Leap. That's what I see at least.

Checked on Leap 15, same behavior with TW, settings.ini will be ignored on a wayland backend, but you can change the theme via `kde-gtk-config`.

---
xdg-desktop-portal-0.10-lp150.2.3.1.x86_64
xdg-desktop-portal-kde-5.12.5-lp150.1.1.x86_64
kde-gtk-config5-gtk3-5.12.5-lp150.1.1.x86_64
libgtk-3-0-3.22.30-lp150.3.6.1.x86_64
Comment 16 Fabian Vogt 2019-04-17 06:55:39 UTC
(In reply to QK ZHU from comment #15)
> (In reply to Fabian Vogt from comment #12)
> > 
> > Please test on Leap as well. Maybe the GTK bug is fixed in Tumbleweed, but
> > present in Leap. That's what I see at least.
> 
> Checked on Leap 15, same behavior with TW, settings.ini will be ignored on a
> wayland backend, but you can change the theme via `kde-gtk-config`.

Right - in that version kde-gtk-config links against gtk3 (hrmf) and writes the settings using dconf as well. It still means that the default configuration using settings.ini is not effective, so applications use Adwaita by default.