> Sent: Friday, August 23, 2019 at 7:25 PM
> From: "Pierre Labastie via blfs-support" 
> <[email protected]>
> To: [email protected]
> Cc: "Pierre Labastie" <[email protected]>
> Subject: Re: [blfs-support] gdm: how to use a non us keyboard?
>
> On 23/08/2019 04:14, Christopher Gregory via blfs-support wrote:
> > Hello,
> > 
> > There is a thread from earlier this year that I found regarding gdm and 
> > non-us keyboards.  Though some of it is systemd related, the same files 
> > should be able to be modified for e-logind:
> > 
> > https://forums.nomachine.com/topic/wrong-keyboard-layout-during-login-in-ubuntu
> > 
> > The main fix seems to be at the last post, but even in that post the person 
> > who posted the solution refers to a post they made further up.
> > 
> > Regards,
> > 
> > Christopher.
> > 
> >> Sent: Friday, August 23, 2019 at 10:14 AM
> >> From: "Ken Moffat via blfs-support" 
> >> <[email protected]>
> >> To: "BLFS Support List" <[email protected]>
> >> Cc: "Ken Moffat" <[email protected]>
> >> Subject: Re: [blfs-support] gdm: how to use a non us keyboard?
> >>
> >> On Thu, Aug 22, 2019 at 06:41:21PM +0200, Pierre Labastie via blfs-support 
> >> wrote:
> >>> Hi,
> >>>
> >>> I've completed the build of BLFS Sysv-elogind on LFS-9.0-rc1. Apart from 
> >>> what
> >>> I've already reported, things are going rather well, but I have a problem 
> >>> with
> >>> gdm: At first I thought it was not working, since I could not log in, 
> >>> while I
> >>> could "startx" gnome, or lxde without problem.
> >>>
> >>> Then, I noticed that when "startx'ing" gnome, the keyboard was set to us,
> >>> while I have:
> >>> Section "InputClass"
> >>>         Identifier "libinput keyboard catchall"
> >>>         MatchIsKeyboard "on"
> >>>         MatchDevicePath "/dev/input/event*"
> >>>         Driver "libinput"
> >>>         Option "XkbLayout" "fr"
> >>> in /etc/X11/xorg.conf.d/40-libinput.conf
> >>>
> >>> Inside gnome, I could add a keyboard using the settings manager, and 
> >>> switch to
> >>> the fr layout, but this made me think that the keyboard layout in gdm was
> >>> still us. So I typed my password as if I was on a us keyboard (well, not 
> >>> so
> >>> easy :), and bingo, gnome started...
> >>>
> >>> So gdm is working, but I've not found any way to have it use a French kb 
> >>> layout...
> >>>
> >>> I've tried adding "setxkbmap fr" at the end of /etc/gdm/Init/Default, but 
> >>> it
> >>> did not work.
> >>> So I do not know where to set this.
> >>>
> >>> Note that American or British users are not likely to be affected :)
> >>>
> >>> Pierre
> >>
> >> Actually, British users will affected a little (but clearly not as
> >> much as people with azerty or qwertz keyboards) - in Britain we have
> >> '£' where americans have '#', we swap '"' and '@', and '#' + '~',
> >> '|' + '\' move around (ISTR British '|' and '\' are on a key
> >> position which American keymaps lack).
> >>
> >> Good Luck with this, there are lots of old reports related to this,
> >> but things may have changed in newer versions of gnome.  The Arch
> >> wiki appears to suggest updating the Xorg configuration (or using
> >> localectl for systemd) and restarting X (presumably a reboot if in
> >> runlevel 5).
> >>
> >> I notice you have done this in 40-libinput.conf as the catchall, in
> >> my own builds I separate the keyboard definition to an earlier file.
> >>
> >> The example at Arch for Xorg, linked from the gdm page
> >> https://wiki.archlinux.org/index.php/GDM is
> >> https://wiki.archlinux.org/index.php/Xorg/Keyboard_configuration#Using_X_configuration_files
> >> with 00-keyboard.conf, so it gets read first, and uses
> >> Identifier "system-keyboard" - I can't believe that the name
> >> _ought_ to be important, but perhaps it is.
> >>
> >> On the desktop where I'm writing this with a British keyboard I
> >> have:
> >>
> >> 10-quirks.conf
> >>
> >> Default modifications for specific pointing devices or a specific
> >> accelerometer.
> >>
> >> 11-keyboard.conf
> >>
> >> My own keyboard settings (two extended variant gb maps with compose
> >> and group switching) - described as Identifier "keyboard-all" :
> >>
> >> Section "InputClass"
> >>         Identifier "keyboard-all"
> >>         Driver "libinput"
> >>         # for my own russian variant, specific to a gb keyboard, I put it 
> >> in gb
> >>         Option "XkbLayout" "gb,gb"
> >>         # I assume that the model will remain as evdev
> >>         Option "XkbModel" "evdev"
> >>         # add my own 'deader' gb variant - more dead keys
> >>         Option "XkbVariant" "deader,rusphon"
> >>         Option "XkbOptions" 
> >> "ctrl_alt_bksp,grp:lctrl_lwin_rctrl_menu,compose:caps"
> >>         MatchIsKeyboard "on"
> >> EndSection
> >>
> >> 40-libinput.conf
> >>
> >> which includes
> >>
> >> Section "InputClass"
> >>         Identifier "libinput keyboard catchall"
> >>         MatchIsKeyboard "on"
> >>         MatchDevicePath "/dev/input/event*"
> >>         Driver "libinput"
> >> EndSection
> >>
> >> All I can suggest is to move the keyboard definitions to an earlier
> >> file and restart X (which probably means rebooting from runlevel 5).
> >>
> >> Ah, I continued looking for anything which might be relevant (rather
> >> than the more common unsolved, or solved by an upgrade, results) and
> >> found an old (January 2015) comment in a mageia thread
> >>
> >> https://bugs.mageia.org/show_bug.cgi?id=14476 (Comment 23) :
> >>
> >> | The installer should (AFAIK) write the correct vconsole.conf file,
> >> | but it might not add a dropin file (that systemd manipulates) into
> >> | /etc/X11/xorg.conf.d/00-keyboard.conf (which is a file manipulated
> >> | by localed to provide the systemd services).
> >>
> >> And, of course, gdm assumes systemd will be running.
> >> So, 00-keyboard.conf might be required.
> >>
> >> ĸen
> >> -- 
> >> Adopted by dwarfs, brought up by dwarfs.  To dwarfs I'm a dwarf, sir.
> >> I can do the rite of k'zakra, I know the secrets of h'ragna, I can
> >> ha'lk my g'rakha correctly ... I am a dwarf
> >>            Captain Carrot Ironfoundersson (in The Fifth Elephant)
> >> -- 
> >> http://lists.linuxfromscratch.org/listinfo/blfs-support
> >> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> >> Unsubscribe: See the above information page
> >>
> 
> Thanks to you both for your answers. The thread mentioned by Christopher is
> interesting, but the solution seems to use:
> localectl set-x11-keymap xx
> Problem is that localectl is not available with Sysv-elogind... It certainly
> modifies the right config files, but which ones???
> 
> Also, I've tried lightdm and lxdm, and both use the fr keyboard with the
> configuration I have. Note that 40-libinput.conf is the only file in
> /etc/X11/xorg.conf.d, so there should be no problem with conf ordering (unless
> a file which comes earlier in alphabetical order in /usr/share/X11/xorg.conf.d
> may take precedence, but I do not think so).
> 
> So gdm does something different from other dm's. That's always the problem I
> have with gnome. They do things differently, but I am unable to know what 
> theYou can create a file 99-kb.conf in /usr/share/lightdm/lightdm.conf.d with 
> content:
> difference is.
> 
> I've also tried to run "gsettings list-recursively", which is supposed to give
> all the settings in gnome. The relevant keys seem to be in
> "org.gnome.desktop.input-sources"
> specifically the "sources" and "xkb-options" keys. But where is the doc about
> those keys? (how do I set them for all users, what is the format, etc). Ah, I
> think that's what I am able to do when tweaking settings in gnome, but I must
> be logged in the DE first, and it only makes the change for $USER, and it
> saves the settings in a binary file!
> 
> Pierre
> -- 
> http://lists.linuxfromscratch.org/listinfo/blfs-support
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
> 

Hello Pierre,

Firstly sorry for top posting before, it was soon after I woke up, and 
pre-coffee.

You may not have noticed this part of the solution in that thread:

You can create a file 99-kb.conf in /usr/share/lightdm/lightdm.conf.d with 
content:

[SeatDefaults]
greeter-setup-script=setxkbmap it

It makes lightdm run the setxkbmap command just before launching the login 
screen, overriding other configurations.


Try adding that 99-kb.conf to /etc/gdm

Once added, restart gdm

Regards,

Christopher.


-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to