all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: guix-devel@gnu.org
Cc: 25453@debbugs.gnu.org
Subject: bug#25453: Keyboard layout configuration
Date: Sun, 13 Jan 2019 22:36:21 +0100	[thread overview]
Message-ID: <87won81bqi.fsf_-_@gnu.org> (raw)
In-Reply-To: <87imyss44u.fsf@dismail.de> (Joshua Branson's message of "Sun, 13 Jan 2019 15:18:25 -0500")

Hello Joshua,

Thanks a lot for working on this!  I’d really like 1.0 to provide a
reasonable way to configure the keyboard layout once and for all.

I suggest we continue the discussion in the context of
<https://issues.guix.info/issue/25453>.

Joshua Branson <jbranso@dismail.de> skribis:

> I believe I have identified conceptually how to do some of these things.
>
> This project breaks down into four areas
>
> Getting the layout to work with:
>
> 1) grub
> 2) linux's initrd
> 3) console
> 4) X/wayland's layout
> 5) How to do the above

There’s also the question of how to “translate” keyboard layouts among
all of these.  Debian has a mechanism whereby you specify the layout in
a single place, and it then does the right thing for GRUB, Linux, X, and
so on.  I forgot how it works, but we should aim for something like
that.

> 1)  I was not able to get grub to generate an alternate keyboard layout.
>
> #+BEGIN_SRC sh :results output :exports both
> sudo grub-kbdcomp -o /boot/grub/dvorak.gkb dvorak
> #+END_SRC
>
> #+RESULTS:
> : /home/joshua/.guix-profile/bin/grub-kbdcomp: line 76: ckbcomp: command not found
> : ERROR: no valid keyboard layout found. Check the input.
>
> Do we have ckbcomp installed?  How do I install that?

I searched on packages.debian.org, and it’s in ‘console-setup’, which
happens to be the thing I was mentioning above:  :-)

  https://packages.debian.org/stretch/console-setup

It looks like Debian is actually upstream for this package, but it may
be usable on non-Debian systems as well.

> 2) Linux's initrd

We’d probably need to invoke ‘loadkeys’ or similar from the initrd, and
to embed only the specific layout files that we need.  See (gnu system
linux-initrd).

> 3) console
>    This shouldn't be all that hard to do.  We just have to add a
>    console-keymap-service.

Yes, #2 and #3 are actually the same thing (and redundant), except that
in #2 we have to be careful not to embed too much in the initrd.

> 4) X/Wayland's layout shouldn't be all that hard to do too.  X is just
> a simple xorg-start-command tweak.  I'm not certain how to do the same
> for wayland yet.

OK.

> 5) Now, how do I go about doing the above?  I thought about modifying
> %base-services and %desktop services, but some users won't use those
> variables.  So I am going to have to do some change at a deeper level.
> I believe that I found the reconfigure module in the guix source code,
> and I see the variable called "operating-system-user-services".  My
> intent is to modify this variable, and that should be how a good-old
> reconfigure will change your layout.

I think we’ll have to use ‘console-setup’.

The difficulty is that we want a single ‘keyboard-layout’ field (say) in
the OS config that would have an effect on GRUB, the Linux console,
Xorg, and Wayland, *if* they are used (setting the keyboard layout
shouldn’t require you to use Xorg, for instance.)

So I think we cannot use the standard Guix-y static approach where
services are instantiated directly with the right configuration.

Instead, Xorg & co. may need to look for a config file at a fixed
location, say /etc/guix/keyboard-layout.conf, pretty much the same way
it’s done on Debian & co.

Thoughts?

Ludo’.

  reply	other threads:[~2019-01-13 21:37 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 12:11 Brain storming cool Guix features Joshua Branson
2019-01-04 16:01 ` Ricardo Wurmus
2019-01-05 13:59   ` Joshua Branson
2019-01-05 17:06     ` Ricardo Wurmus
2019-01-13 20:18   ` Joshua Branson
2019-01-13 21:36     ` Ludovic Courtès [this message]
2019-01-13 22:49       ` bug#25453: Keyboard layout configuration nee
2019-01-13 22:49       ` nee
2019-01-15 22:21         ` Ludovic Courtès
2019-03-12 19:34           ` bug#25453: " Taylan Kammer
2019-03-12 19:34           ` Taylan Kammer
2019-03-15 18:19             ` nee
2019-03-21 22:23               ` Taylan Kammer
2019-03-20 23:07           ` Ludovic Courtès
2019-03-20 23:07           ` Ludovic Courtès
2019-01-15 22:21         ` Ludovic Courtès
2019-01-16 13:10         ` Ludovic Courtès
2019-01-16 13:10         ` Ludovic Courtès
2019-01-04 16:10 ` Brain storming cool Guix features Pierre Neidhardt
2019-01-04 16:14   ` John Soo
2019-01-04 16:58 ` znavko
2019-01-06 13:44   ` Amirouche Boubekki
2019-01-06 16:33     ` swedebugia
2019-01-06 20:04       ` Amirouche Boubekki
2019-01-07 16:48 ` L p R n d n
2019-01-07 18:16   ` Joshua Branson
2019-01-11 22:32   ` GRUB fallback mechanism [was Re: Brain storming cool Guix features] Leo Famulari
2019-01-12 12:59     ` swedebugia
2019-01-12 15:58       ` Ricardo Wurmus
2019-01-13 20:58         ` Ludovic Courtès
2019-01-14 14:15           ` L p R n d n

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

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

  git send-email \
    --in-reply-to=87won81bqi.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=25453@debbugs.gnu.org \
    --cc=guix-devel@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.