|
Bugzilla – Full Text Bug Listing |
| Summary: | Setting X11 keyboard layout from command line doesn't work | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.4 | Reporter: | Hauke Hhaaa <haukeh> |
| Component: | YaST2 | Assignee: | Jiří Suchomel <jsuchome> |
| Status: | RESOLVED INVALID | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P5 - None | ||
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | i686 | ||
| OS: | openSUSE 11.4 | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | y2logs.tgz after Y2DEBUG=ALL yast2 keyboard set layout=german | ||
|
Description
Hauke Hhaaa
2011-08-08 16:54:09 UTC
Reassigned to maintainer of yast2-country (which happens to also be maintainer of yast2-ldap) I assume setting language is working well: what does 'locale' say when for non-root user? Are German packages installed? The problematic part is keyboard, I'll try to reproduce. About LDAP: was /etc/ldap.conf modified? What does 'pam-config -q --ldap' say? And what about 'pam-config -q --sss'? Are any new packages installed (pam_ldap or sssd)? What does it look like when you run yast2 ldap-client? (with UI) (In reply to comment #2) > The problematic part is keyboard, I'll try to reproduce. OK, X11 keyboard layout is not set when you run YaST in text mode. Try calling the command in xterm of your graphical environment. I assume that the console keyboard layout got changed to German, right? (BTW, it would help to open different bug for that LDAP part) Hi, thank you for your quick reply. When I login via ssh "locale" prints the following: LANG=de_DE@euro LC_CTYPE="de_DE" LC_NUMERIC="de_DE" LC_TIME="de_DE" LC_COLLATE="de_DE" LC_MONETARY="de_DE" LC_MESSAGES="de_DE" LC_PAPER="de_DE" LC_NAME="de_DE" LC_ADDRESS="de_DE" LC_TELEPHONE="de_DE" LC_MEASUREMENT="de_DE" LC_IDENTIFICATION="de_DE" LC_ALL=de_DE When I log in locally, the following is shown: LANG=de_DE.UTF-8 LC_CTYPE="de_DE.UTF-8" LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL= I think this are the language packages: bundle-lang-common-de.noarch bundle-lang-gnome-de.noarch bundle-lang-gnome-extras-de.noarch bundle-lang-kde-de.noarch When I set the language via the text mode yast2 gui, then the language is set correctly, but not when I set via "yast2 keyboard set layout=german" and "yast2 language set lang=de_DE". PS. I've opened another bug report for the LDAP problem: https://bugzilla.novell.com/show_bug.cgi?id=711258 When executing "yast2 keyboard set layout=german" in konsole under KDE 4 as root, the layout is set correctly for root and the other user the X session belongs to. /etc/X11/xorg.conf.d/90-keytable.conf still contains: Option "XkbLayout" "us" A workaround how to change the layout (without yast) by editing a file or so would be great, because I have to change the language/layout on a huge amount of clients with a script, so no clicking and no X session are possible to do so. I'm thankful for any hint ;-) I think that language configuration works correctly. No, for keyboard: Normally, YaST is calling setxkbmap to set the layout, but if called in text mode, it ends with "Cannot open display "default display" Steffen, is there any way to set X11 keyboard laout from text mode? You need to write the KEYTABLE variable to do this. The mapping is specified in /etc/X11/xdm/Keyboard.map. /etc/X11/xorg.conf.d/90-keytable.conf is generated by /etc/X11/xdm/keytable, which is started by /etc/init.d/xdm init script. (In reply to comment #7) > You need to write the KEYTABLE variable to do this. The mapping is specified in > /etc/X11/xdm/Keyboard.map. /etc/X11/xorg.conf.d/90-keytable.conf is generated > by /etc/X11/xdm/keytable, which is started by /etc/init.d/xdm init script. So where should I write the KEYTABLE variable? I guess that not to /etc/X11/xorg.conf.d/90-keytable.conf, which would be rewritten by /etc/init.d/xdm. Sorry, this information somehow got lost. KEYTABLE is a variable in /etc/sysconfig/keyboard. Oh, but this is written by YaST. So, it should be enough to write it (as YaST does) and restart xdm. Hauke, is the correct keyboard layout present after reboot? (or rcxdm restart) I just tested and for me the keyboard layout change really works after reboot. Great! Setting 'KEYTABLE="de"' in /etc/sysconfig/keyboard and "rcxdm restart" worked :-) At least for the KDM4. Do assume right that all settings in /etc/sysconfig/ are the basis for overwriting other values in /etc files? Is there a way to trigger the regeneration of the files in /etc when I have changed a value in a /etc/sysconfig/ file? (In reply to comment #12) > Great! > > Setting 'KEYTABLE="de"' in /etc/sysconfig/keyboard and "rcxdm restart" worked > :-) You do not have to write it value manually. The point is, that your 'yast2 keyboard set layout=german' command should write it, so it is indeed capable of setting the keyboard layout right. You haven't seen it before because xdm restart (or reboot) is needed. AFAIK xdm script always reads the sysconfig value on start, so that should answer your other question. So, I'm closing this as invalid, because using yast from command line actually works. Hi, unfortunately the issue is not resolved. "yast2 keyboard set layout=german" doesn't set the needed value in /etc/sysconfig/keyboard. I did it by hand, because yast2 didn't set it. After my manual editing (setting 'KEYTABLE="de"' in /etc/sysconfig/keyboard), "rcxdm restart" enabled the correct keyboard layout. Maybe my post (that it worked, by manual edit) was misleading. Forgot to reopen. I did not close it based on your description, but on my own testing. When I call "yast2 keyboard set layout=german" KEYTABLE value in /etc/sysconfig/keyboard is changed to "de-latin1-nodeadkeys.map.gz", I imediatelly have changes the keyboard layout on console and after reboot, also X11 keyboard layout is German. So, are you sure your /etc/sysconfig/keyboard is not touched when you run yast2 keyboard? Please run 'Y2DEBUG=ALL yast2 keyboard summary' and attach new YaST2 log files. Change the keyboard layout to something different before (e.g. US), so it can actually do some change. Yes, I'm sure. KEYTABLE="de" I set by hand in /etc/sysconfig/keyboard. 1. grep "^KEYTABLE=" /etc/sysconfig/keyboard KEYTABLE="de" 2. yast2 keyboard set layout=german 3. grep "^KEYTABLE=" /etc/sysconfig/keyboard KEYTABLE="de" To be sure, I set KEYTABLE="" by hand in /etc/sysconfig/keyboard. 1. grep "^KEYTABLE=" /etc/sysconfig/keyboard KEYTABLE="" 2. yast2 keyboard set layout=german 3. grep "^KEYTABLE=" /etc/sysconfig/keyboard KEYTABLE="" So the value keeps untouched. Y2DEBUG=ALL yast2 keyboard summary Aktuelle Tastaturbelegung: german That looks good, but I don't know where "german" comes from while KEYTABLE="". On the other hand yast2 sysconfig set KEYTABLE="de" changes the KEYTABLE to "de" correctly. Sorry, I wanted to say: run Y2DEBUG=ALL yast2 keyboard set layout=german and attach fresh y2logs just after that. Created attachment 446199 [details]
y2logs.tgz after Y2DEBUG=ALL yast2 keyboard set layout=german
Here the y2logs.tgz after "Y2DEBUG=ALL yast2 keyboard set layout=german".
PS. The tests I do in a VirtualBox machine. Would it help you, if I export the machine and upload it somewhere for you?
(In reply to comment #20) > PS. The tests I do in a VirtualBox machine. Would it help you, if I export the > machine and upload it somewhere for you? Yes, that may be interesting, I'm also testing it VirtualBox. Well, it looks like it ends because YaST things no change has to be done. Please first change your layout to something different (yast2 keyboard set layout=english-us), than try to call your change command for german. Watch sysconfig file changes between these calls. Do not just change manually your KEYTABLE variable, YaST looks for other values (YAST_KEYBOARD). Great, now it works! Many thanks for your help :-) Running 1. yast2 keyboard set layout=english-us 2. yast2 keyboard set layout=german sets the keyboard layout correctly in /etc/sysconfig/keyboard. Is it possible that the error ocurred, because my first setting "yast2 keyboard set layout=german" was with the old version of yast2? (In reply to comment #23) > Is it possible that the error ocurred, because my first setting "yast2 keyboard > set layout=german" was with the old version of yast2? Actually I think it worked from the first time, but at that time you did not know you need to restart xdm. Later, when you wrote that sysconfig/keyboard was not modified by YaST, this was caused by your manual changes to that file, see comment 22. Finally, this can be closed as invalid (= no bug). |