LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-06-2015, 05:49 AM   #1
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Custom xorg.conf keyboard layout not working


Hi,

I just installed Slackware 14.1 32-bit for a client, and I have a strange problem. The X server works well, I installed GDM and switched to runlevel 4.

In France, folks usually use an AZERTY keyboard layout. To do this, I copy the 90-keyboard-layout.conf configuration file stub over from /usr/share/X11/xorg.conf.d and put it in /etc/X11/xorg.conf.d. Then I edit it like this:

Code:
Section "InputClass"
  Identifier "keyboard-all"
  MatchIsKeyboard "on"
  MatchDevicePath "/dev/input/event*"
  Driver "evdev"
  Option "XkbLayout" "fr"
  #Option "XkbVariant" ""
  Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
So the next time the X.org server starts, all graphical applications use the french AZERTY layout.

Only this time it doesn't seem to work. My graphical session stubbornly uses the american QWERTY layout. I double-checked and triple-checked everything, and I'm puzzled.

Any idea what's wrong here?

Note: of course the client can define a custom keyboard layout from within his Xfce session. Unfortunately that won't affect GDM, which still uses QWERTY. The clean solution here is to define the custom keyboard layout in X.org's configuration.
 
Old 06-06-2015, 06:28 AM   #2
commandlinegamer
Member
 
Registered: Dec 2007
Posts: 163

Rep: Reputation: 51
Just tried it here (changed "gb" to fr") and works fine though it's KDM, not GDM. Maybe the latter has a configuration file which needs to be edited.

Last edited by commandlinegamer; 06-06-2015 at 06:29 AM.
 
Old 06-06-2015, 06:41 AM   #3
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by commandlinegamer View Post
Just tried it here (changed "gb" to fr") and works fine though it's KDM, not GDM. Maybe the latter has a configuration file which needs to be edited.
No, not really. What puzzles me more: I must have done at least a couple hundred of similar installations, and this is the first time this sort of problem appears.
 
Old 06-06-2015, 07:00 AM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
I'm not a Slackware user, but I wonder if GDM is using /etc/X11/gdm/locale.alias perhaps?
 
Old 06-11-2015, 05:30 AM   #5
sneetsher
LQ Newbie
 
Registered: Jun 2015
Posts: 2

Rep: Reputation: Disabled
2-3 yrs ago, gnome changed the way it manages the layouts. The layout configuration support multiple input methods (not just xkb) and it is stored in dconf/gsettings database.

1. Create a a dconf override file

/usr/share/glib-2.0/schemas/90_default-layout.gschema.override

[org.gnome.desktop.input-sources]
sources=[('xkb', 'fr')]
xkb-options=['terminate:ctrl_alt_bksp']

2. Re-compile dconf schemas

glib-compile-schemas /usr/share/glib-2.0/schemas

3. Reset user settings:

gsettings reset org.gnome.desktop.input-sources sources
gsettings reset org.gnome.desktop.input-sources xkb-options

If you don't want this setting to be changed per user bases, create a lock file in /etc/dconf/db/*.d/locks

Last edited by sneetsher; 06-11-2015 at 05:33 AM.
 
Old 06-13-2015, 04:31 AM   #6
solarfields
Senior Member
 
Registered: Feb 2006
Location: slackalaxy.com
Distribution: Slackware, CRUX
Posts: 1,449

Rep: Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997
it is possible that XFCE itself is somehow messing it up? If you go to System > Layout, is the "Use system defaults" checked or unchecked?
 
Old 06-13-2015, 06:38 AM   #7
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
OK, I double-checked again, and I'm still puzzled.

It's not Xfce's fault, the client double-checked Xfce's custom keyboard layout settings.

And it's not GDM's fault either, since I tried removing GDM. After a reboot, XDM displayed with the same problem, US QWERTY keyboard.

Now I'm clueless.
 
Old 06-13-2015, 09:01 AM   #8
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

The configuration below allows to toggle between layouts "FR" and "US" with the combination alt+shift. Furthermore, the scroll-lock led indicates which layout is used: Off=FR, ON=US.

I guess this could help you to verify that the system uses (or not) the configuration in xorg.conf.d

Code:
Section "InputClass"
        Identifier "keyboard-all"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "XkbLayout" "fr,us"
        #Option "XkbVariant" ""
        Option "XkbOptions" "terminate:ctrl_alt_bksp,grp:alt_shift_toggle,grp_led:scroll"
EndSection
--
SeB
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install a custom keyboard layout ventsyv Linux - Desktop 5 08-29-2014 11:31 AM
Custom Keyboard Layout? Shammyhealz Linux - Newbie 3 10-05-2012 08:50 AM
[SOLVED] Help with custom keyboard layout lucmove Linux - Hardware 7 09-07-2009 03:01 PM
xorg.conf does not control keyboard layout foxy123 Linux - Software 2 07-23-2006 07:39 AM
Xorg.conf, using en_GB keyboard layout kxHGB Linux - General 5 10-15-2004 03:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration