On 29/08/2019 16:39, Bruce Dubbs via blfs-dev wrote:
> On 8/29/19 8:40 AM, Pierre Labastie via blfs-dev wrote:
>> Hi,
>>
>> With the shortly coming release, I think it is time I give some information
>> about my findings relative to the setting of the keyboard layout for gdm.
>> Note
>> that I have not come to a definitive answer, far from it!
>>
>> The main conclusion is that gdm uses gnome-shell, and that gnome-shell uses
>> systemd-localed for getting the keymap when it detects it is on a login
>> screen... So there are two approaches:
>> - add systemd- localed to the system. DJ has provided a patch, but I have
>> been
>> unable to use it: or at least localectl does not launch systemd-localed, and
>> if I launch it manually before calling localectl, I get either "Function not
>> Implemented (for the set-keymap functions) or n/a for both vc-keymap and
>> x11-keymap... Note that systemd-localed runs for a short while, then exits...
>> But I think it would be the cleanest approach if we could make it work!
>> - tweak gnome-shell so that it uses the gsettings database (Bruce has
>> provided
>> a sed for that, which works). But this leads to another problem, how to
>> change
>> user settings for the "gdm" user. I have a workaround, which works to a
>> certain degree, but is not satisfactory, since it does not change the
>> screen-keyboard layout: copy the user dconf database to gdm user's home. I
>> still have to try Christopher's suggestions to override gsettings. It it
>> works
>> it is cleaner I think. Now, I have a system where both keyboard layout and
>> screen-keyboard are azerty, but I am unable to know what put it in this state
>> (tried too many things). So there is a third solution, but I do not know
>> what!
>> It certainly does not use either the gsettings override nor the user db... It
>> might be the following that I have tried (inspired by
>> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/desktop_migration_and_administration_guide/customizing-login-screen)
>>
>>
>> I created /etc/dconf/profile/gdm with:
>> user-db:user
>> system-db:gdm
>> file-db:/usr/share/gdm/greeter-dconf-defaults
>>
>> Then I created a small gdm database in /etc/dconf/db/gdm.d/01-keyboard
>> [org/gnome/desktop/input-sources]
>> sources=[('xkb','fr)]
>>
>> Then I run dconf update... At first, it did nothing, but I was still using a
>> non-sed'ed gnome-shell. Then, when I changed to a sed'ed one, I got the
>> French
>> layout...
>>
>> Something to try, but the gsettings override might be easier, if it works.
>
> I hope you are staying interested in this, but for the book, I don't think it
> is relevant. The intricacies of the interaction between gnome and systemd are
> what's wrong with the design of systemd and gnome.
Well, it took time for me because of my poor knowledge of gnome too. I've made
some progress now, and in the end there are two things relevant:
- the sed in gnome-shell (already in the book), to prevent gdm from using
localed (which is not installed).
- the change in the settings for gdm. And I think I've just reached a not too
bad solution: add this to the gdm instructions:
cat > data/dconf/defaults/01-keyboard << EOF
[org/gnome/desktop/input-sources]
sources=[('xkb','<replaceable>fr</replaceable>')]
EOF
and then compile as usual. The keyboard setting is then included in the
default settings of gdm, and both the screen-keyboard and the keyboard-layout
obey it.
>
> From the book's perspective I think we need to either remove gdm from the
> System V book or put in a big caveat that gdm does not work with non-us
> keyboards in the System V environment and to use another display manager or
> the command line to initiate gnome.
Well, maybe not... Note that gnome wayland seems to run ok now.
BTW, we still have to decide whether we make /etc/localtime a symlink.
Actually, why is it important to have the clock set to local time when /usr is
not mounted?
Pierre
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page