From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:58634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBcQF-0001dw-Ik for guix-patches@gnu.org; Wed, 03 Apr 2019 05:43:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBcQB-00058c-I7 for guix-patches@gnu.org; Wed, 03 Apr 2019 05:43:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56774) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hBcQA-00055Q-BR for guix-patches@gnu.org; Wed, 03 Apr 2019 05:43:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hBcQA-00054l-6A for guix-patches@gnu.org; Wed, 03 Apr 2019 05:43:02 -0400 Subject: [bug#35118] [PATCH 0/4] Add localed, fixing keyboard layout in GDM Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:58465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBcPH-0001a8-Fl for guix-patches@gnu.org; Wed, 03 Apr 2019 05:42:08 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 3 Apr 2019 11:41:54 +0200 Message-Id: <20190403094154.22664-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 35118@debbugs.gnu.org Hello Guix! This patch adds localed, a D-Bus service for keyboard layout and “locales” (not quite actually): https://www.freedesktop.org/wiki/Software/systemd/localed/ The only motivation was to fix keyboard layout in GDM: until now, GDM would always install a US English layout, regardless of how we configured Xorg. It did that because it tried to ask localed about the current keyboard layout, but since that daemon was unavailable, it would assume that the current layout is US English and tell XKB to install it. You would think that it would simply ask X to know what the current layout is—after all, X knows that first-hand. But no! Instead, there’s this localed daemon that normally goes ahead and greps /etc/X11/xorg.d/00-keyboard.conf in search of “XkbLayout” and similar options. This patch modifies localed so that it gets this information directly from environment variables set by our ‘localed’ service; their values is inherited from the ‘xorg-configuration’ field of . This is all pretty ugly. Regarding localed itself, I think we should maintain our own fork since we really just need a couple of files from systemd. That would require disentangling the code from systemd’s own support functions (like its D-Bus API wrapper). That should be easy for someone who’s ever played with D-Bus in C, but that’s not me. :-) Another option, of course, is to write a D-Bus implementation in Guile and do the whole thing in Guile. Shave a yak! Anyway, in the meantime, this thing does the job. Thoughts? Ludo’. Ludovic Courtès (4): services: dbus: Add 'wrapped-dbus-service'. gnu: Add localed, extracted from systemd. services: dbus: 'wrapped-dbus-service' accepts a list of variables. services: Add 'localed' service type and have GDM extend it. gnu/local.mk | 1 + gnu/packages/freedesktop.scm | 148 +++++++- .../patches/localed-xorg-keyboard.patch | 322 ++++++++++++++++++ gnu/services/dbus.scm | 48 +++ gnu/services/desktop.scm | 52 +-- gnu/services/xorg.scm | 89 ++++- 6 files changed, 612 insertions(+), 48 deletions(-) create mode 100644 gnu/packages/patches/localed-xorg-keyboard.patch -- 2.21.0