unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 35118@debbugs.gnu.org
Subject: [bug#35118] [PATCH 0/4] Add localed, fixing keyboard layout in GDM
Date: Wed,  3 Apr 2019 11:41:54 +0200	[thread overview]
Message-ID: <20190403094154.22664-1-ludo@gnu.org> (raw)

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

             reply	other threads:[~2019-04-03  9:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03  9:41 Ludovic Courtès [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190403094154.22664-1-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=35118@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).