1

I am using the french bépo layout for my keyboard on a freshly installed Debian 12. Everything is fine once I am logged in, but unfortunately the GDM login screen is using a qwerty layout.

How can I change it so it also uses the bépo layout ?

Here is my current configuration :

❯ cat /etc/default/keyboard XKBLAYOUT="fr" BACKSPACE="guess" XKBMODEL="pc105" XKBVARIANT="bepo_afnor" XKBOPTIONS="" ❯ cat /etc/X11/xorg.conf.d/00-keyboard.conf Section "InputClass" Identifier "system-keyboard" MatchIsKeyboard "on" Option "XkbLayout" "fr" Option "XkbVariant" "bepo_afnor" EndSection ❯ localectl System Locale: LANG=fr_FR.UTF-8 VC Keymap: fr X11 Layout: fr X11 Model: pc105 X11 Variant: bepo_afnor 

As you can see, I already tried solutions mentioned in another question (regarding Arch Linux), but without success.

Here are more information on my gdm and its configuration :

 ❯ /usr/sbin/gdm3 --version GDM 43.0 ❯ ls -al /etc/gdm3 total 48 drwxr-xr-x 6 root root 4096 Oct 20 00:31 . drwxr-xr-x 138 root root 12288 Oct 22 21:21 .. -rw-r--r-- 1 root root 552 Oct 20 00:31 daemon.conf -rw-r--r-- 1 root root 1472 Jan 29 2023 greeter.dconf-defaults drwxr-xr-x 2 root root 4096 Oct 22 21:01 Init drwxr-xr-x 2 root root 4096 Oct 20 00:24 PostLogin drwxr-xr-x 2 root root 4096 Oct 18 15:44 PostSession drwxr-xr-x 2 root root 4096 Oct 18 15:44 PreSession -rwxr-xr-x 1 root root 5996 Jan 29 2023 Xsession ❯ ls -al /etc/gdm3/Init total 16 drwxr-xr-x 2 root root 4096 Oct 22 21:01 . drwxr-xr-x 6 root root 4096 Oct 20 00:31 .. -rwxr-xr-x 1 root root 2933 Oct 22 21:01 :1 -rwxr-xr-x 1 root root 2932 Oct 22 21:00 Default 
1

1 Answer 1

2
+250

I'm now summarizing various sources of information. Some sources were not in English, so I translated them and/or presented them as block quotes.

Preliminary:

3 Parts Working Together for a Graphical Desktop Environment Display Server Protocols

In the future, I would choose Wayland over X11 as display server protocols, and that's my opinion, because Wayland represents a more modern alternative that is more efficient and secure. However, Wayland still has its bugs.

GDM (GNOME Display Manager) will automatically use Wayland when supported, except when using the proprietary NVIDIA driver, in which case it will fall back to X11 due to instability.

Is X11 better than Wayland?

X11 vs. Wayland: A Linux Display Showdown The choice between X11 and Wayland is a personal one, with no clear winner. X11 offers tried-and-tested stability, flexibility, and wider application compatibility. Wayland, on the other hand, shines with its smoother visuals, better security, and potential for future innovation.

Display Managers:

  • GDM
  • LightDM
  • SDDM
  • LXDM
  • XDM
  • MDM
  • Qingy

Desktop Environments, these are some of the most commonly used desktop environments in Linux:

  • GNOME
  • KDE Plasma
  • Xfce
  • LXDE
  • LXQt
  • MATE
  • Cinnamon

From these 3 parts, you choose what works best together or harmonizes well.

My best experiences (only my):

  • Wayland, SDDM, KDE
  • X11, LightDM, Cinnamon
  • X11, LightDM, Xfce

I assume that your configuration is X11, GDM, and GNOME.

You could also try LightDM or SDDM and, as I mentioned, switch to Wayland.

Possible Solutions:

1. GRUB

What I wouldn't try at all is changing the layout in GRUB, as GRUB only affects the keyboard layout during the boot phase and not on the GDM login screen. However, you can give it a try.

2. Debug, Logs, Errors

What you definitely need now is the debug mode and the logs to identify the sources of errors. What isn't clear from the question is whether /etc/gdm3/Init/Default is being executed and ignored or if it isn't executed at all.

  • gdm3 debug mode

  • journalctl gdm debug

  • gdm layout change log debugging

  • gmd logs

  • gdm journalctl

  • gdm dmesg

  • Gnome Help Troubleshooting

If GDM is failing to work properly, it is always a good idea to include debug information. To enable debugging, set the debug/Enable key to true in the <etc>/gdm/custom.conf file and restart GDM. Then use GDM to the point where it fails, and debug output will be sent to the system log file (<var>/log/messages or <var>/adm/messages depending on your Operating System).

Old posts:

Board Tip, Add Log Output for Verification:

To check if the Default script is actually being executed, add a simple logging line to the script.

For example, add something like the following at the beginning of the script:

sudo nano /etc/gdm3/Init/Default

#!/bin/sh echo "GDM Init Default script executed at $(date)" >> /var/log/gdm-init.log setxkbmap fr bepo_afnor 

This will create an entry in /var/log/gdm-init.log when the script is executed.

Make sure the script is executable:

sudo chmod +x /etc/gdm3/Init/Default

Restart GDM:

sudo systemctl restart gdm3

Check if /var/log/gdm-init.log exists and if there are any entries.

Possible GDM Error Logs:

sudo journalctl -xe | grep gdm

sudo journalctl -u gdm3

sudo grep gdm /var/log/syslog

cat /var/log/Xorg.0.log

GDM Debug Logs:

If you have debugging enabled in /etc/gdm3/daemon.conf

[debug] # More verbose logs # Additionally lets the X server dump core if it crashes Enable = true 

dmesg

Useful for checking if there were any issues during the boot process that could affect GDM.

dmesg | grep -i gdm

dmesg | grep -i keyboard

dmesg | grep -i layout

Where the "g_debug" output in GDM source code?

3. GDM Configuration Files and Scripting Integration Points

Check Scripting Integration Points section.

GDM has a number of configuration interfaces. These include scripting integration points, daemon configuration, greeter configuration, general session settings, integration with gnome-settings-daemon configuration, and session configuration. These types of integration are described in detail below.

The GDM script integration points can be found in the <etc>/gdm/ directory:

Xsession Init/ PostLogin/ PreSession/ PostSession/ 

greeter.dconf-defaults

Create or edit and add or modify the following

sudo nano /etc/gdm3/greeter.dconf-defaults

[org/gnome/desktop/input-sources] sources=[('xkb', 'fr+bepo_afnor')] 

sudo dconf update

Sometimes if you do changes to the keyboard layout it requires updating the initramfs

sudo update-initramfs -u

If the script /etc/gdm3/Init/Default is not being executed, it suggests that GDM may not be invoking it, as this might vary depending on the system configuration or changes in newer GDM versions.

3. Use the custom.conf Try adding the keyboard layout settings directly to GDM's configuration file

sudo nano /etc/gdm3/custom.conf

[daemon] DefaultSession=gnome XKBLayout=fr XKBVariant=bepo_afnor 

4. Check GDM's Environment Script

GDM load setting from /etc/X11/Xsession and other scripts in /etc/X11/Xsession.d

Edit and add:

sudo nano /etc/X11/Xsession.d/00-keyboard.conf

setxkbmap fr bepo_afnor

5. Force Layout in Xsetup

Edit and add:

sudo nano /etc/gdm3/Xsetup

setxkbmap fr bepo_afnor

sudo systemctl restart gdm3

6. keyboardlayout XKB_DEFAULTS, setxkbmap

XKB options can be overridden by the tools provided by some desktop environments such as GNOME and Plasma.

7. dpkg-reconfigure keyboard gdm and debian keyboard layout(new and old posts) check for:

8. gnome control center, check for:

  • gnome control center gdm login screen layout
  • region and language gdm3
  • change keyboard layout gdm3 login screen

gnome-control-center is a graphical user interface to configure various aspects of GNOME. When run without arguments, the shell displays the overview, which shows all available configuration panels. The overview allows to open individual panels by clicking on them.

9. Settings in /etc/default/keyboard

Set system-wide keyboard settings that are also used by GDM. Change the layout in /etc/default/keyboard for GDM.

10. Adjust Logind Configuration

Modify the keyboard layout settings in the logind configuration /etc/systemd/logind.conf

11. Modify GDM Xsession Scripts

Edit the file /etc/gdm3/Xsession and explicitly set the layout for the login session.

12. localectl set-x11-keymap

  • localectl list-x11-keymap-models
  • localectl list-x11-keymap-layouts
  • localectl list-x11-keymap-variants [layout]
  • localectl list-x11-keymap-options

The system keyboard layout will be applied to GDM. You can use localectl set-x11-keymap to specify the keyboard layout. See Keyboard configuration in Xorg Setting keyboard layout for details.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.