GNU bug report logs - #35118
[PATCH 0/4] Add localed, fixing keyboard layout in GDM

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Wed, 3 Apr 2019 09:43:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Subject: bug#35118: closed (Re: [bug#35118] [PATCH 0/4] Add localed,
 fixing keyboard layout in GDM)
Date: Fri, 05 Apr 2019 13:48:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#35118: [PATCH 0/4] Add localed, fixing keyboard layout in GDM

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 35118 <at> debbugs.gnu.org.

-- 
35118: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35118
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: 35118-done <at> debbugs.gnu.org
Subject: Re: [bug#35118] [PATCH 0/4] Add localed, fixing keyboard layout in GDM
Date: Fri, 05 Apr 2019 15:47:36 +0200
Hello,

Pushed!

Ludovic Courtès <ludo <at> gnu.org> skribis:

> 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.  :-)

As discussed on IRC with Julien and others, I tried to actually fork
systemd and strip everything but src/locale.  Unfortunately that turned
out to be pretty tricky because of all the systemd-internal utilities
being used (allocation, string manipulation, etc.)

If someone is willing to give it a try, I can share what I have so far!

Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 0/4] Add localed, fixing keyboard layout in GDM
Date: Wed,  3 Apr 2019 11:41:54 +0200
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
<gdm-configuration>.

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




This bug report was last modified 6 years and 67 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.