You are not logged in.

#1 2015-11-08 09:40:55

rvmaksim
Member
Registered: 2015-10-25
Posts: 5

Problem with language switching

I configure keyboard rule like:

/etc/X11/xorg.conf.d/00-keyboard.conf

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbModel" "pc104"
        Option "XkbLayout" "en,ru"
        Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
EndSection

Language switching work in Display Manger, but when I login to WM i3wm or other(for example xfce) I can not switch language by alt+shift

localectl print:

   System Locale: LANG=en_US.UTF-8
       VC Keymap: n/a
      X11 Layout: en,ru
       X11 Model: pc104
     X11 Options: grp:alt_shift_toggle,grp_led:scroll

log /var/log/Xorg.0.log is empty

Now I use workaround put initializing setxkbmap to .profile

~/.profile

if [ "$(command -v setxkbmap)"  ]
then
    setxkbmap -model pc104 -layout us,ru -option grp:alt_shift_toggle,grp_led:scroll
fi

But I can not understand why does not work 00-keyboard.conf in my WM
Thanks!


System: Linux 4.2.3-1-ARCH #1 SMP PREEMPT Sat Oct 3 18:52:50 CEST 2015 x86_64 GNU/Linux
Window Manager: i3wm
Display Manger: gdm

Last edited by rvmaksim (2015-11-08 22:17:21)

Offline

#2 2015-11-08 20:07:05

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Problem with language switching

Here is my /etc/X11/xorg.conf.d/<something>.conf that works. You can look at the syntax by looking at /usr/share/X11/xorg.conf.d/10-evdev.conf.
Note: Don't forget to use code tags.

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option      "XkbLayout" "be"
        Option      "XkbModel"  "pc105"
        Option      "XkbVariant" "oss"
        # Option      "XkbLayout" "fr"
        # Option      "XkbModel"  "pc105"
Option  "XkbOptions" "terminate:ctrl_alt_bksp,compose:rwin,kpdl:dot"
EndSection

Please also clarify your problem. Your language is not set correctly or is it just that you can't switch language? Language switching is managed by the Desktop environment. You can find the option in XFCE setting, for example. If you use a simple windows manager, you will have to launch a script that switch the language.

Last edited by olive (2015-11-08 20:16:18)

Offline

#3 2015-11-08 22:21:26

rvmaksim
Member
Registered: 2015-10-25
Posts: 5

Re: Problem with language switching

@olive Thanks!

My problem `can't switch language`.
If you said that I should use script then what does mean `Option "XkbOptions" "grp:alt_shift_toggle` in conf file? I thought this is managed by X11(xorg) ...

Last edited by rvmaksim (2015-11-08 22:21:52)

Offline

#4 2015-11-08 22:55:57

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Problem with language switching

rvmaksim wrote:

@olive Thanks!

My problem `can't switch language`.
If you said that I should use script then what does mean `Option "XkbOptions" "grp:alt_shift_toggle` in conf file? I thought this is managed by X11(xorg) ...

Sorry, I wrote too fast. It seems indeed that what you are trying is valid. I just tested it and it works for me. But it's true that DE can also handled that. So, since you use Xorg, are you sure the handling of the keyboard is disabled in the DE? (in XFCE Settings Manager -> Keyboard -> Layout -> Use system default).

Offline

#5 2015-11-09 09:54:38

rvmaksim
Member
Registered: 2015-10-25
Posts: 5

Re: Problem with language switching

I use i3 and I can not find any tools that may handling keyboard settings

env | grep DESKTOP
XDG_SESSION_DESKTOP=i3
XDG_CURRENT_DESKTOP=i3
DESKTOP_SESSION=i3

Update:

Maybe problem in this exec --no-startup-id /usr/lib/gnome-settings-daemon/gnome-settings-daemon I run gnome-settings-daemon on start i3.

Update 2:
Remove gnome-settings-daemon from config did not help

Last edited by rvmaksim (2015-11-09 09:59:44)

Offline

Board footer

Powered by FluxBB