Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNOME keyboard shortcuts settings incomplete #19590

Closed
jluttine opened this issue Oct 16, 2016 · 12 comments · Fixed by #59765
Closed

GNOME keyboard shortcuts settings incomplete #19590

jluttine opened this issue Oct 16, 2016 · 12 comments · Fixed by #59765
Labels
0.kind: bug 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: nixos
Projects

Comments

@jluttine
Copy link
Member

Issue description

In GNOME keyboard shortcut settings, the list of categories based on https://help.gnome.org/users/gnome-help/stable/keyboard-shortcuts-set.html.en and on my own experience with GNOME on other distros should be:

  • Launchers
  • Navigation
  • Screenshots
  • Sound and Media
  • System
  • Typing
  • Universal Access
  • Windows

However, only the following categories are available:

  • Launchers
  • Screenshots
  • Sound and Media
  • System
  • Typing
  • Universal Access

So I'm missing Navigation and Windows.

Steps to reproduce

Install gnome package and use GNOME. Open keyboard settings (press Super, type "keyboard", choose Keyboard). See the list of categories on the left panel.

Technical details

  • System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)
$ nixos-version
17.03pre92039.adfcc2d (Gorilla)
  • Nix version: (run nix-env --version)
$ nix-env --version
nix-env (Nix) 1.11.4
  • Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)
$ nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion
"17.03pre92039.adfcc2d"
@jgeerds jgeerds added 6.topic: nixos 6.topic: GNOME GNOME desktop environment and its underlying platform labels Oct 16, 2016
@robertodr
Copy link
Contributor

I am affected too. Moreover Super + L doesn't lock the screen.

@das-g
Copy link
Member

das-g commented Sep 26, 2017

Moreover Super + L doesn't lock the screen.

I got that, too. Seems like that might be due to not using GDM.

@bjornfor
Copy link
Contributor

Another possible source of Super+L not working (if you're using GDM): #21439 (comment)

@jtojnar
Copy link
Contributor

jtojnar commented Dec 3, 2017

Apparently the Control Center derivation only provides some keybindings:

$ ls $(nix-build -A gnome3.gnome_control_center)/share/gnome-control-center/keybindings
00-multimedia.xml
01-input-sources.xml
01-launchers.xml
01-screenshot.xml
01-system.xml
50-accessibility.xml

the others are part of other packages like GNOME Shell $(nix-build -A gnome3.gnome_control_center)/share/gnome-control-center/keybindings/50-gnome-shell-system.xml or GPaste.

The Control Center loads the bindings here, basically using XDG_DATA_DIRS to locate them. But even explicitly passing the path env XDG_DATA_DIRS="$(nix-build -A gnome3.gnome_shell)/share" gnome-control-center keyboard does not make the Windows section appear – though, strace confirms the file being read.

Edit: Nevermind, it looks like the navigation and windows keybindings come from mutter.

@cocreature
Copy link
Contributor

@jtojnar Hey, have you somehow managed to get it to work using XDG_DATA_DIRS? (Not quite sure how to interpret your edit).

I tried messing around with that but so far I’ve only been able to break gnome-control-center:

(gnome-control-center:7609): GLib-GIO-ERROR **: 20:54:08.687: Settings schema 'org.gnome.shell.keybindings' is not installed

Trace/breakpoint trap

@jtojnar
Copy link
Contributor

jtojnar commented Jul 1, 2018

Try XDG_DATA_DIRS="$(nix-build -A gnome3.mutter)/share:$XDG_DATA_DIRS" gnome-control-center keyboard. The error you are seeing is caused by missing GNOME shell SCHEMAS, which will most likely be in the current variable.

@cocreature
Copy link
Contributor

It looks like the error I was seeing was related to fish shell not having XDG_DATA_DIRS setup properly and gnome-control-center keyboard was failing even if I didn’t attempt to change anything. I switched to bash and that particular problem disappeared, however I am now getting a different error message:

> XDG_DATA_DIRS=$(nix-build -A gnome3.mutter '<nixpkgs>')/share:$XDG_DATA_DIRS gnome-control-center keyboard

(gnome-control-center:1889): GLib-GIO-ERROR **: 19:26:41.468: Settings schema 'org.gnome.mutter.wayland.keybindings' is not installed

Trace/breakpoint trap

However, this schema seems to exist in mutter, so I sadly have no idea what is going on here:

> cat $(nix-build -A gnome3.mutter '<nixpkgs>')/share/gnome-control-center/keybindings/50-mutter-wayland.xml
<?xml version="1.0" encoding="UTF-8" ?>
<KeyListEntries schema="org.gnome.mutter.wayland.keybindings"
                group="system"
                name="System"
                wm_name="Mutter"
                package="mutter">

	<KeyListEntry name="restore-shortcuts" description="Restore the keyboard shortcuts"/>

</KeyListEntries>

@jtojnar
Copy link
Contributor

jtojnar commented Jul 1, 2018 via email

@cocreature
Copy link
Contributor

@jtojnar Thanks a ton! I finally got it to work using that!

@glasserc
Copy link
Contributor

I was able to get it to work using env XDG_DATA_DIRS=(nix-build -A gnome3.mutter '<nixpkgs>')/share:$XDG_DATA_DIRS gnome-control-center keyboard.

@liff
Copy link
Contributor

liff commented Apr 2, 2019

The mutter keybindings are not available in control center in NixOS when services.xserver.desktopManager.gnome3.enable = true. Explicitly adding mutter to environment.systemPackages fixes it.

Should mutter perhaps be added to gnome3.corePackages?

@jtojnar
Copy link
Contributor

jtojnar commented Apr 2, 2019

I think adding it to dependencies of g-c-c is more in line with Nix. We can do it after we merge 3.32.

jtojnar added a commit to jtojnar/nixpkgs that referenced this issue Apr 17, 2019
GNOME automation moved this from To Do to Done Apr 17, 2019
das-g pushed a commit to das-g/nixpkgs that referenced this issue Apr 18, 2019
fixes NixOS#19590 for release-19.03

(cherry picked from commit 1e6fec0)
coreyoconnor pushed a commit to coreyoconnor/nixpkgs that referenced this issue Apr 18, 2019
fixes NixOS#19590 for release-19.03

(cherry picked from commit 1e6fec0)
jtojnar added a commit to jtojnar/nixpkgs that referenced this issue Jun 14, 2019
NixOS#59765 fixed the keybndings issue NixOS#19590 only partially, we still need to
make the gschemas available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: nixos
Projects
GNOME
  
Done
10 participants