NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.46k stars 12.95k forks source link

GNOME Shell extensions: gsettings does not find the schema. #92265

Open alexeymuranov opened 4 years ago

alexeymuranov commented 4 years ago

Describe the bug

On NixOS (20.03), gsettings tool cannot be used to configure parameters of GNOME Shell extensions, even when they are installed in system profile.

An example with caffeine:

$ gsettings set org.gnome.shell.extensions.caffeine show-indicator false
No such schema “org.gnome.shell.extensions.caffeine”

This seems to be a common problem for all extensions.

To Reproduce

  1. Install some GNOME Shell extension in system profile. An example for caffeine:

    # /etc/nixos/configuration.nix
    { config, pkgs, ... }:
    { # ...
    environment.systemPackages = [ #...
     pkgs.gnomeExtensions.caffeine
    ];
    }
  2. Log in with GNOME 3 desktop.

  3. Activate GNOME Shell extensions in Gnome Tweaks. (Not sure if this step is important.)

  4. Try to change parameters of some extensions using gsettings. An example with caffeine:

    $ gsettings set org.gnome.shell.extensions.caffeine show-indicator false
    No such schema “org.gnome.shell.extensions.caffeine”

Expected behavior

gsettings should change parameters as requested. Required schema should be found automatically.

Additional context

  1. On Ubuntu (20.04), gsettings automatically finds the schema for extensions installed system-wide (with apt).

  2. Apparently, gsettings is expected not to find the schema for extensions installed into user directory automatically: No such schema “org.gnome.shell.extensions.dash-to-dock”.

Notify maintainers

Metadata

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.50-hardened, NixOS, 20.03.2437.d6260a33e43 (Markhor)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.6`
 - channels(alexey): `""`
 - channels(root): `"nixos-20.03.2437.d6260a33e43"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
worldofpeace commented 4 years ago

On Ubuntu (20.04), gsettings automatically finds the schema for extensions installed system-wide (with apt).

gsettings schemas aren't installed system wide on nixos.

jtojnar commented 3 years ago

See also https://github.com/NixOS/nixpkgs/issues/33277 and the discussion in https://github.com/NixOS/nixpkgs/pull/54083

https://github.com/NixOS/nixpkgs/pull/86451#discussion_r419019540

kevincox commented 3 years ago

I think this is the same root cause for gnome-control-center failing to start which is a major issue for desktop usability.

% gnome-control-center

(gnome-control-center:13069): GLib-GIO-ERROR **: 16:04:23.959: Settings schema 'org.gnome.GPaste' is not installed
zsh: trace trap (core dumped)  gnome-control-center
jtojnar commented 3 years ago

That is a different issue with the same underlying cause. Eventually, I want to patch gnome-control-center as described in https://github.com/NixOS/nixpkgs/pull/43992#issuecomment-407058615 but until that is done we will need to partially revert https://github.com/NixOS/nixpkgs/commit/f63d94eba340c05cd241c478deb518204514fce8. Edit: opened https://github.com/NixOS/nixpkgs/pull/96925

ktor commented 3 years ago

Here is a solution that I've copied from zettlr package: https://github.com/NixOS/nixpkgs/pull/104668/files#diff-79504e99066ccb817007c83ef128705bf2aa35fc97dee10e57d3241f61b364a5R27

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

alexeymuranov commented 3 years ago

still an issue

seandheath commented 1 year ago

I'm running into this with the gnomeExtensions.easyeffects-preset-selector package. The extension launches but every time it is clicked it sends an error:

image

It looks like this affects a few other gsettings programs, any fix?

jtojnar commented 1 year ago

That is unrelated to this issue. The extension needs to be patched in https://github.com/NixOS/nixpkgs/blob/a9bf34a2e57e94c8ef1d37eeb7000ed0f18188f5/pkgs/desktops/gnome/extensions/extensionOverrides.nix Similarly to what is done in https://nixos.org/manual/nixpkgs/stable/#ssec-gnome-common-issues-unwrappable-package-gsettings-c