[SOLVED] dual keyboard input (2 language) in X (xorg.conf)
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need to set 2 language options for Xorg, I did this on Suse 11.1, but when they changed to remove the xorg config file, and other changes I am now back to using Slackware.
Currently running Slackware 13.1 full install from DVD.
System is AMD 64 Phenom II quad-core.
But the keyboard layout switch function does not work.
Already installed Thai fonts and added the font directories to the config file as well. They display fine, not sure what I am doing wrong here though. It seems Slackware does not come with any default Thai lang. support but that should not prevent this from working.
Thanks for pointing the "switch" out. Still a no-go though. Maybe something else I am forgetting....?
How do I use other key combos? Is there a list of command names that are excepted in the xorg.conf? Ultimately if the regular alt-shift works that is fine, but it would be better to use "~" instead (only 1 key)
Is the Rules option necessary [Option "XkbRules" "xorg"] because it is not in the default xorg.conf file. Also Layout language should be two letter abbreviation but is is Capital or lowercase?
If need be, you could put that line into your /etc/X11/xinit/xinitrc file (whichever one you're using, or the .xinitrc in your home directory if you have one there) or into your ~/.xsession file if you have one, rather than making a new script somewhere.
You'd need to check the manpage(s) for X to see which location is the "proper" one; on my machine, I have items like that in my /etc/X11/xinit/xinitrc file, but I tend to sometimes not do things exactly as they are intended to be done, so if you want to do it the 'right' way, read a little bit to see where that *should* go.
If need be, you could put that line into your /etc/X11/xinit/xinitrc file (whichever one you're using, or the .xinitrc in your home directory if you have one there) or into your ~/.xsession file if you have one, rather than making a new script somewhere.
You'd need to check the manpage(s) for X to see which location is the "proper" one; on my machine, I have items like that in my /etc/X11/xinit/xinitrc file, but I tend to sometimes not do things exactly as they are intended to be done, so if you want to do it the 'right' way, read a little bit to see where that *should* go.
Well now a new problem:
when I use the command line:
setxkbmap -rules xorg -model pc104 -layout "us,th" \ -option "grp:alt_shift_toggle"
Also adding this to any of the initrc files under X11 does not work (script does not initiate for some reason, I will put it somewhere else once it works )
now I am back to square one, unless I find a command that gives me full function (I like using the arrow keys for scrolling) Maybe I will have to buy a new keyboard (new logitech, instead of this no name one), but think this one should work since my wife used it in Windows with dual function capability.
If only I could recover the lost Hard Disk with my old configuration, I might have a clue (I saved backups of my config files since it was hard to remember, but lost the drive due to it being an external and the PS failed).
Any suggestions or places to find more info on my problem would be greatly appreciated.....
Last edited by slackman77; 09-28-2010 at 07:14 AM.
I don't have a solution to the bit about the arrow keys not working. But a suggestion maybe, would be to add a -variant option? Perhaps your arrow keys are mapped and working, but they aren't mapped to the right keys.. Pure speculation!
But have a look at section 2.2 and 2.3 at that guide linked to by Druuna above. Also in there, it shows the -layout options in lowercase, so if that document is accurate, you're fine there.
What kind of keyboard is this anyhow? Have you got a make & model of it?
I'm also curious - are the back-slashes necessary in that commandline? Or is it just that you were entering it on a commandline in two lines, rather than a single line?
Nice! I'm sure someone besides yourself will find this helpful - hopefully the OP!.
Best regards!
Last edited by GrapefruiTgirl; 09-29-2010 at 05:10 AM.
Reason: I had thought the above post was by the OP - as such my comments didn't quite make sense.
in one of my startup scripts (e.g. ~/.config/lxsession/LXDE/autostart in LXDE) and everything works fine. No "-model" or "-rules" entries.
where are your startup scripts? I just created an rc.d script but it only works in regular user mode and not in root for some reason?? Not really a problem but I would much rather things work through the xorg.conf the way they are "supposed to"??
So for now I have a temporary fix (prob. not politically correct):
made rc script I named "rc.thai" in the /etc/rc.d/ directory the rc.thai script calls the "setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,th" command and then I added the rc.thai script to the end of my rc.M file (my default run level)
This works but like I said it is a bit too much trouble, it would have saved me a whole lot of effort if the xorg.conf file editing actually worked, still puzzled as to why it doesn't....
Anyway thanks for the help everyone. I think we should leave this open to more inputs though as the real root of the problem (xorg.conf) still does not work with this option. I wonder if anyone else running Slackware 13.1 has this problem.....?
Well, I guess that your way is just as good as any other. There's more than one way to skin a cat in linux. I personally like to make any customization in my user config files (that way I don't lose it after reinstall), so if I were using KDE (like you probably), I would write that line in some script and put it in ~/.kde/Autostart
As for xorg... This is from my old xorg.conf (slack 12.2 I believe) and that worked for me. As I can see only thing thats different from your is addition of keyboard model and identifier is Keyboard1 instead of Keyboard0.
@OP
X use hal in Slackware, so you have to use /etc/hal/fdi/policy/10-keymap.fdi for the keyboard configuration. If you don't have that file, copy it from /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi and edit the varous <merge key=...> tags, to look like:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.