[Bug 1281580] Re: glib-compile-schemas doesn't compile relocatable schemas

David Hedlund 1281580 at bugs.launchpad.net
Sun Aug 6 18:13:50 UTC 2023


I filed the MATE counterpart for this bug at https://github.com/mate-
desktop/mate-desktop/issues/562

#  Workaround for some entries: Exclude "[:PATH]"
**Disclaimer: This solution cannot be used for custom keyboard shortcuts (org.mate.control-center.keybinding), not even a single custom keyboard shortcut. Also, this method should not work for schemas that require sub-paths, even if they are not custom.**

* Run this in a terminal:
```
sudo tee /usr/share/glib-2.0/schemas/zzz.gschema.override > /dev/null << 'EOF'

# green mate-panel background color. type='color' must be set in addition
[org.mate.panel.toplevel.background]
color='#00ff00'
type='color'

# Terminal: Don't use color theme
[org.mate.terminal.profile]
use-theme-colors=false
EOF

sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
```
* No error was reported by glib-compile-schemas
* Log out, and log in from MATE
* Run this
```
# Check the values:
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ color
# Output:
# '#00ff00'
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ type
# Output:
# 'color'
gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/default/ use-theme-colors
# Output:
# false

####################
# Reset to the new system wide default settings:
gsettings reset-recursively org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/
gsettings reset org.mate.terminal.profile:/org/mate/terminal/profiles/default/ use-theme-colors

# Check the values again to compare them with their previous output:
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ color
# '#00ff00'
gsettings get org.mate.panel.toplevel.background:/org/mate/panel/toplevels/top/background/ type
# Output:
# 'color'
gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/default/ use-theme-colors
# Output:
# true
```
* As you can see, the values are changed.


# Distributions
Ubuntu MATE 22.04:
```
$ apt-cache show libglib2.0-bin | head -8
Package: libglib2.0-bin
Architecture: amd64
Version: 2.72.4-0ubuntu2.2
Multi-Arch: foreign
Priority: optional
Section: misc
Source: glib2.0
Origin: Ubuntu
```

Ubuntu MATE 23.04:
```
$ apt-cache show libglib2.0-bin | head -8
Package: libglib2.0-bin
Architecture: amd64
Version: 2.76.1-1
Multi-Arch: foreign
Priority: optional
Section: misc
Source: glib2.0
Origin: Ubuntu
```


** Bug watch added: github.com/mate-desktop/mate-desktop/issues #562
   https://github.com/mate-desktop/mate-desktop/issues/562

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

Title:
  glib-compile-schemas doesn't compile relocatable schemas

Status in GLib:
  Expired
Status in glib2.0 package in Ubuntu:
  Confirmed

Bug description:
  Dear Developers,

  I am using the Ubuntu 14.04 development release with the GNOME Shell 3.10 and, because my wife is using this system as well, I defined some settings in a gschema.override file.
  Everything is working right, except applying settings related to custom key-bindings.

  I added following lines my gschema.override file:
  [org.gnome.settings-daemon.plugins.media-keys]
  www='<Super><Alt>w'
  email='<Super>e'
  custom-keybindings = ['/org/gnome/settings-daemon/plugins/media-keys/custom-keybinding/custom0']

  [org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/]
  name = 'Launch Gedit'
  command = 'gedit'
  binding = '<Super>g'

  I put my gschema.override file in the '/usr/share/glib-2.0/schemas' directory. After I added these lines, I ran 'glib-compile-schemas /usr/share/glib2.0/schemas' and no error was reported.
  For testing purposes I created a new user, logged out, and logged in with the new user. In the best case, the custom key-binding were applied automatically, but this has not happened. Other defined key-bindings were applied correctly.
  In the gnome-control-center's key-bindings tab, the table containing  custom shortcuts is empty, containing one row with empty columns.

  Running 'gsettings list-recursively org.gnome.settings-
  daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-
  daemon/plugins/media-keys/custom-keybindings/custom0/' shows, the
  name, command, and binding key pairs contain empty ('') values.

  If I manually run following commands, the custom key-binding is created correctly:
  gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name "Launch Gedit"
  gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command "gedit"
  gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding "<Super>g"

  Am I doing anything wrong when I want to add a custom key-bindings in
  my schema file, or  is 'glib-compile-schemas' really not applying this
  part from the schema file?

  Attila

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: libglib2.0-bin 2.39.4-0ubuntu1
  ProcVersionSignature: Ubuntu 3.13.0-8.28-generic 3.13.2
  Uname: Linux 3.13.0-8-generic i686
  ApportVersion: 2.13.2-0ubuntu4
  Architecture: i386
  CurrentDesktop: GNOME
  Date: Tue Feb 18 13:58:37 2014
  InstallationDate: Installed on 2013-12-13 (67 days ago)
  InstallationMedia: BeLin 3.02 i386
  SourcePackage: glib2.0
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/glib/+bug/1281580/+subscriptions




More information about the foundations-bugs mailing list