Can't access keybindings via PyGObject
I apologise if this is simply the result of my own ignorance, but as I can't find any other mention of this issue on the web and no one seems to have answers in the few places I've asked, I'm starting to think it's a bug.
Accessing GNOME's keybindings doesn't appear to be possible from within a flatpak app, despite pygobject being pre-installed as part of the GNOME Platform. For a toy example, I offer the following:
The manifest:
app-id: org.gnome.dothething
runtime: org.gnome.Platform
runtime-version: '40'
sdk: org.gnome.Sdk
command: dothething
modules:
- name: dothething
buildsystem: simple
build-commands:
- install -D dothething /app/bin/dothething
sources:
- type: file
path: dothething
The dothething
script:
#!/usr/bin/env python
from gi.repository import Gio
print(Gio.Settings(schema="org.gnome.shell.keybindings"))
Running this results in the following:
$ flatpak-builder --run build-dir org.gnome.dothething.yaml dothething
(process:2): GLib-GIO-ERROR **: 22:30:53.783: Settings schema 'org.gnome.shell.keybindings' is not installed
I'm still very new to flatpaks, and this has all been part of the process of packaging a far more complex Python application, but if I'm understanding how things are supposed to work, shouldn't the Platform be able to do this? If so, what am I missing? I tried adding --talk-name=org.gnome.shell.keybindings
to the finishing arguments but that was purely a guess and didn't work anyway :-( In fact, here's a complete list of all of the finishing args I've been trying:
finish-args:
- --share=ipc
- --socket=x11
- --share=network
- --socket=pulseaudio
- --device=all
- --filesystem=host
- --filesystem=home
- --filesystem=xdg-run/dconf
- --env=DCONF_USER_CONFIG_DIR=.config/dconf
- --env=GIO_EXTRA_MODULES=/app/lib/gio/modules/
- --talk-name=org.freedesktop.Flatpak
- --talk-name=org.gnome.shell.keybindings
So, did I find a bug, or am I just really new at this?