Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: bmarkus on January 22, 2013, 07:05:41 AM

Title: Setting keyboard layout for Xorg
Post by: bmarkus on January 22, 2013, 07:05:41 AM
If you want to change keyboard layout for Xorg in piCore, create xorg.conf file in /usr/local/share/X11 (or edit if already exists) and add a section like this:

Code: [Select]
Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    Option "XkbLayout" "hu"
    Option "XkbModel" "pc105"
EndSection

It is setting a Hungarian layout for a pc105 keyboard. Replace it with your own settings and add xorg.conf to backup to make it persistent.

You can put a small config file, for example mykbd.conf with the same content to /usr/local/share/X11/xorg.conf.d alternatively.

It is fixing the layout issue, but special keys and key combinations still doesn't work. It is the next step.
Title: Re: Setting keyboard layout for Xorg
Post by: curaga on January 22, 2013, 09:20:39 AM
Huh, why not the standard /etc/X11 dir?
Title: Re: Setting keyboard layout for Xorg
Post by: bmarkus on January 22, 2013, 09:25:47 AM
Huh, why not the standard /etc/X11 dir?

Is it matter if doesn't worK :)

Just joking. It was picked up by configure as default at compile time. Anyhow, I have to rebuild it soon.
Title: Re: Setting keyboard layout for Xorg
Post by: Laskody on February 11, 2022, 06:37:41 PM
Hi! I am asking you for help. I have TC 13 with Xorg. I want to set the keyboard to Hungarian. I created the file: xorg.conf as described and added to backup. But it doesn't work, the keyboard stays in English. is it different with tc13?
location:

/usr/local/share/X11/xorg.conf

and the content is the same as bmarkus wrote.

Thanks!


Title: Re: Setting keyboard layout for Xorg
Post by: Juanito on February 12, 2022, 12:24:09 AM
You need to put your config inside the directory /usr/local/share/X11/xorg.conf.d/
Title: Re: Setting keyboard layout for Xorg
Post by: Laskody on February 12, 2022, 04:12:13 AM
Thank you!
I made and add to backup, but after reboot it is still in english.

is the filename xorg.conf a problem in the xorg.conf.d directory?

kmap is installed and the command was added to bootlocal.sh
loadkmap < /usr/share/kmap/qwerty/hu101.kmap
Title: Re: Setting keyboard layout for Xorg
Post by: Laskody on February 12, 2022, 04:43:09 AM
I renamed it to 20-keyboard.conf but nothings happens  :-\
Title: Re: Setting keyboard layout for Xorg
Post by: Rich on February 12, 2022, 08:54:35 AM
Hi Laskody
The  loadkmap < /usr/share/kmap/qwerty/hu101.kmap   command belongs in bootsync.sh, not bootlocal.sh.

On the subject of kmaps:
kmaps only affects the console and Xvesa, not Xorg.

I renamed it to 20-keyboard.conf but nothings happens  :-\
What does this command return:
Code: [Select]
grep "\.conf" /var/log/Xorg.0.log
Title: Re: Setting keyboard layout for Xorg
Post by: Laskody on February 12, 2022, 03:53:04 PM
Using system config directory: "usr/local/share/X11/xorg.conf.d"
Title: Re: Setting keyboard layout for Xorg
Post by: Laskody on February 13, 2022, 05:35:08 AM
When I run the command in the terminal:
Code: [Select]
setxkbmap -layout "hu"

Switches the language to Hungarian and its works.

how could i automate it at boot?
Title: Re: Setting keyboard layout for Xorg
Post by: Laskody on February 13, 2022, 05:46:41 AM
Solved! I renamed the file:
00-keyboard.conf in the xorg.conf.d directory and editet as:

Code: [Select]
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "hu"
        Option "XkbModel" "pc104"
        Option "XkbVariant" ",dvorak"
        Option "XkbOptions" "grp:win_space_toggle"
EndSection