unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#35118] [PATCH 0/4] Add localed, fixing keyboard layout in GDM
@ 2019-04-03  9:41 Ludovic Courtès
  2019-04-03  9:44 ` [bug#35118] [PATCH 1/4] services: dbus: Add 'wrapped-dbus-service' Ludovic Courtès
  2019-04-05 13:47 ` bug#35118: [PATCH 0/4] Add localed, fixing keyboard layout in GDM Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Ludovic Courtès @ 2019-04-03  9:41 UTC (permalink / raw)
  To: 35118

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-05 13:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03  9:41 [bug#35118] [PATCH 0/4] Add localed, fixing keyboard layout in GDM Ludovic Courtès
2019-04-03  9:44 ` [bug#35118] [PATCH 1/4] services: dbus: Add 'wrapped-dbus-service' Ludovic Courtès
2019-04-03  9:44   ` [bug#35118] [PATCH 2/4] gnu: Add localed, extracted from systemd Ludovic Courtès
2019-04-03  9:44   ` [bug#35118] [PATCH 3/4] services: dbus: 'wrapped-dbus-service' accepts a list of variables Ludovic Courtès
2019-04-03  9:44   ` [bug#35118] [PATCH 4/4] services: Add 'localed' service type and have GDM extend it Ludovic Courtès
2019-04-05 13:47 ` bug#35118: [PATCH 0/4] Add localed, fixing keyboard layout in GDM Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).