You are not logged in.

#1 2016-05-26 10:46:10

aureooms
Member
Registered: 2016-05-26
Posts: 7

Xorg/lxdm/i3-wm keyboard layout

I have a laptop and a Logitech wireless keyboard. Both the laptop keyboard and the wireless keyboard have belgian AZERTY layout.

When I boot the computer (BIOS password) both keyboards use a AZERTY layout.
Once lxdm is started here's what happens (before AND after login). As long as I use the wireless keyboard, the layout in use is QWERTY. As soon as I hit a key on the laptop's keyboard (any key) the layout switches to AZERTY and does not change back when I type with the wireless keyboard.

2 questions:
  - How can I change it so that the default layout is always AZERTY (both for lxdm and i3-wm), regardless of the keyboard used?
  - What is the cause of the layout change when I hit a key on the laptop's keyboard?

I've tried putting

setxkbmap be

in /etc/lxdm/LoginReady with no success.

Computer: Dell Inspiron
USB keyboard: Logitech K360
Login manager: lxdm 0.5.3-2
Window manager: i3-wm 4.12-1

Relevant configuration files:

/etc/lxdm/LoginReady

#!/bin/sh
#
# Note: this is a sample and will not be run as is.

setxkbmap be

/etc/lxdm/PreLogin

#!/bin/sh
#
# Note: this is a sample and will not be run as is.

/etc/lxdm/PostLogin

#!/bin/sh
#
# Note: this is a sample and will not be run as is.

/etc/lxdm/PreLogout

#!/bin/sh
#
# Note: this is a sample and will not be run as is.

/etc/lxdm/PreReboot

#!/bin/sh
#
# Note: this is a sample and will not be run as is.

/etc/lxdm/PreShutdown

#!/bin/sh
#
# Note: this is a sample and will not be run as is.

/etc/lxdm/Xsession

#!/bin/sh
#
# LXDM wrapper to run around X sessions.

echo "Running X session wrapper"

if [ $# -eq 1 -a -n "$1" ]; then
	LXSESSION=$1
else
# default session
	LXSESSION=/usr/bin/startlxde
fi

# Load profile
for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
    if [ -f "$file" ]; then
        echo "Loading profile from $file";
        . "$file"
    fi
done

# Load resources
for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do
    if [ -f "$file" ]; then
        echo "Loading resource: $file"
        xrdb -merge "$file"
    fi
done

# Load keymaps
for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do
    if [ -f "$file" ]; then
        echo "Loading keymap: $file"
        setxkbmap `cat "$file"`
        XKB_IN_USE=yes
    fi
done

# Load xmodmap if not using XKB
if [ -z "$XKB_IN_USE" ]; then
    for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do
        if [ -f "$file" ]; then
           echo "Loading modmap: $file"
           xmodmap "$file"
        fi
    done
fi

unset XKB_IN_USE

# Run all system xinitrc shell scripts
xinitdir="/etc/X11/xinit/xinitrc.d"
if [ -d "$xinitdir" ]; then
    for script in $xinitdir/*; do
        echo "Loading xinit script $script"
        if [ -x "$script" -a ! -d "$script" ]; then
            . "$script"
        fi
    done
fi

# Run user xsession shell script
script="$HOME/.xsession"
if [ -x "$script" -a ! -d "$script" ]; then
    echo "Loading xsession script $script"
    . "$script"
fi

echo "X session wrapper complete, running session $LXSESSION"

exec $LXSESSION

/etc/lxdm/lxdm.conf

[base]
## uncomment and set autologin username to enable autologin
# autologin=username

## uncomment and set timeout to enable timeout autologin,
## the value should >=5
# timeout=10

## default session or desktop used when no systemwide config
# session=/usr/bin/startlxde

## uncomment and set to set numlock on your keyboard
# numlock=0

## set this if you don't want to put xauth file at ~/.Xauthority
# xauth_path=/tmp

# not ask password for users who have empty password
# skip_password=1

## greeter used to welcome the user
greeter=/usr/lib/lxdm/lxdm-greeter-gtk

[server]
## arg used to start xserver, not fully function
arg=/usr/bin/X -background vt1
# iff you really want xserver listen to tcp
# tcp_listen=1
# if you want reset the xserver after logout
reset=1

[display]
## gtk theme used by greeter
gtk_theme=Clearlooks

## background of the greeter
# bg=/usr/share/backgrounds/default.png

## if show bottom pane
bottom_pane=1

## if show language select control
lang=1

## if show keyboard layout select control
keyboard=1

## the theme of greeter
theme=mono-dark

[input]

[userlist]
## if disable the user list control at greeter
disable=1

## whitelist user
white=

## blacklist user
black=

~/.xprofile

#!/bin/sh

# Add `~/.bin` to the `$PATH`
if [ -d "$HOME/.bin" ] ; then
	export PATH="$HOME/.bin:$PATH";
fi

# ruby gems
export PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"

if [ -d "$HOME/.ipe/styles" ] ; then
	export IPESTYLES="$HOME/.ipe/styles";
fi

/etc/profile

# /etc/profile

#Set our umask
umask 022

# Set our default path
PATH="/usr/local/sbin:/usr/local/bin:/usr/bin"
export PATH

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
	for profile in /etc/profile.d/*.sh; do
		test -r "$profile" && . "$profile"
	done
	unset profile
fi

# Source global bash config
if test "$PS1" && test "$BASH" && test -z ${POSIXLY_CORRECT+x} && test -r /etc/bash.bashrc; then
	. /etc/bash.bashrc
fi

# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP

# Man is much better than us at figuring this out
unset MANPATH

~/.Xresources

! Hybrid Terminal Colours. Uses the palette from Tomorrow-Night:
! https://github.com/chriskempson/tomorrow-theme/blob/master/vim/colors/Tomorrow-Night.vim
! vim: ft=xdefaults

*background: #222222
*foreground: #DDDDDD
! black
*color0: #282A2E
*color8: #373B41
! red
*color1: #A54242
*color9: #CC6666
! green
*color2: #8C9440
*color10: #B5BD68
! yellow
*color3: #DE935F
*color11: #F0C674
! blue
*color4: #5F819D
*color12: #81A2BE
! magenta
*color5: #85678F
*color13: #B294BB
! cyan
*color6: #5E8D87
*color14: #8ABEB7
! white
*color7: #707880
*color15: #C5C8C6

All files in /etc/X11/xinit/xinitrc.d:
/etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module.sh

#!/bin/bash

case "${DESKTOP_SESSION-}" in
  gnome) # Done by gnome-settings-daemon
  ;;
  *)
    # Extra check in case DESKTOP_SESSION is not set correctly
    if [[ -z ${GNOME_DESKTOP_SESSION_ID-} ]]; then
      if [[ -z ${GTK_MODULES-} ]]; then
        GTK_MODULES="canberra-gtk-module"
      else
        GTK_MODULES="$GTK_MODULES:canberra-gtk-module"
      fi
      export GTK_MODULES
    fi
  ;;
esac

/etc/X11/xinit/xinitrc.d/50-systemd-user.sh

#!/bin/sh

systemctl --user import-environment DISPLAY XAUTHORITY

if which dbus-update-activation-environment >/dev/null 2>&1; then
        dbus-update-activation-environment DISPLAY XAUTHORITY
fi

/etc/X11/xorg.conf.d/00-keyboard.conf does not seem to be referenced by /etc/lxdm/Xsession

# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "be"
EndSection

Non-existing files:
  - /etc/xprofile
  - ~/.profile
  - /etc/X11/Xresources
  - /etc/X11/Xkbmap
  - ~/.Xkbmap
  - /etc/X11/Xmodmap
  - ~/.Xmodmap
  - ~/.Xsession

Xorg process

$ ps -aux | grep Xorg
root     22864  5.1  1.5 256692 59560 tty1     Ssl+ 11:45   2:33 /usr/lib/xorg-server/Xorg -background none :0 vt01 -nolisten tcp -novtswitch -auth /var/run/lxdm/lxdm-:0.auth
aureooms 29633  0.0  0.0  10760  2140 pts/0    S+   12:35   0:00 grep --color=auto Xorg

Offline

Board footer

Powered by FluxBB