keymap selection improvement suggestion
Forum: DSL Ideas and Suggestions
Topic: keymap selection improvement suggestion
started by: sander
Posted by sander on Jan. 23 2008,20:22Hi,
Let me first say that I'm impressed by DSL, it's astonishing how much can be crammed in a mere 50 Mb, while still being user friendly. There's one thing that's been bothering me for a while though: keymap selection. There are several ways in DSL to change the keymap, and for non-X consoles they work nicely, but the X part is a bit obscure. I'm an experienced enough Linux user to make the keymap switching work, but the current situation is, in my oppinion, a bit more confusing for newbies than it needs to be, and I believe this can be easily changed. Let me first describe the current situation.
The first way to change the keymap is through "DSL -> Setup -> keyboard". This pops up a menu from which I can select a different keymap, for instance dvorak. When I switch to a non-X console, the new map works fine. However, within X, it doesn't. DSL gives no hints here as to why it isn't working.
The second way to change the keymap is through "DSL -> System -> Control Panel -> Keyboard". This pops up the same menu as the one under "DSL -> Setup -> Keyboard", but this time DSL tells me that "You must restart X windows for the new keyboard to take effect." That's better, but unfortunately it doesn't indicate how to restart X. Browsing through the DSL menu, I couldn't find an option to restart X. The thing in the DSL menu that comes closest is probably "DSL -> Exit -> Switch Window Manager", which will, when you choose the same window manager, basically just restart X. This is not an obvious way to do it though.
A third way to switch keymaps on most distributions is to use setxkbmap from the commandline. setxkbmap is in fact available on DSL, but when I run it, it tells me "XKB extension not present on :0.0".
I think the easiest way to improve the situation is to make both "DSL -> Setup -> Keyboard" and "DSL -> System -> Control Panel -> Keyboard" tell the user that he has to restart X, and to add an option "DSL -> Exit -> Restart X" that does just that.
Another option would be to enable the XKB extension, which would allow keymap changes through setxkbmap without the need to restart X. I guess that this doesn't fit in the DSL philosophy though. Hence I suggest to remove setxkbmap from DSL, since having it available but not functioning is only confusing.
I'd like to hear what others thing about this!
Posted by roberts on Jan. 23 2008,21:22/usr/bin/kbdconfig is not an X program. It is now run by whiptail, a light version of dialog. It has been around from the beginning of DSL. It is available via the menu under X via a hosting aterm.
Later when I wanted a better UI I began to use Lua/Fltk as a wrapper to many command line/dialog/whiptail programs. This is where I added the popup to restart X windows. Perhaps it is time to not have so many entry porints to the same script. Perhaps it is best to simplify the menu by removing those items available in the control panel.
There was a discussion that the Mac OSX does not have command line utilities on menu available in X. While I don't agree with that extreme, I am always trying to simplify and make the system easier to use.
The restart X could be an enhancement to the single entry point of the control panel option.
Posted by sander on Jan. 24 2008,08:20
I know /usr/bin/kbdconfig isn't an X program, what I meant to say is that it does change the X configuration, sorry if I wasn't clear.
I agree with that.
Btw, what is your oppinion about setxkbmap? I believe it should either be made to work (then /usr/bin/kbdconfig could also utilize it so that the X keymap can be changed without restarting X), or be removed from DSL completely, since having a non-working app available is only confusing.
Posted by roberts on Jan. 24 2008,18:11Seeing that xkb, as implemented in Knoppix, is located in /etc/X11/xkb is 1.6MB uncompressed and therefore not a viable option. Therefore I will remove setxkbmap. Thanks for your detailed observation.
Posted by sander on Jan. 25 2008,08:29Oh, one more thing: when I run kbdconfig from a shell as a normal user I get a bunch of error messages, so I guess this should probably go into /usr/sbin instead of /usr/bin.
Posted by mikshaw on Jan. 25 2008,15:05The sbin directories are in dsl's path already, so I don't think that would make much difference
Posted by sander on Feb. 04 2008,09:44I see the situation has improved much in 4.2.5, but I'm still missing an obvious way to just restart X. Maybe this could be added to the "DLS -> Exit" submenu?
Posted by bkil on Feb. 28 2008,18:28Howdy!
I had the same observation. My solution to switching layout (Dvorak here too ) was to create two xmodmap scripts and link them to the desktop by hand. Not the best aesthetically, but does the job in an instant, and without the need for a restart. Would it be possible to convert keymaps to xmodmaps on the fly...?
Posted by mikshaw on Feb. 29 2008,02:41
There are many ways you can choose from multiple options; usually an easy way is to write a couple of lines of script. For choosing one of two xmodmap files to use, you could include a prompt in .xinitrc:
There are probably better ways, but this is the first thing that came to mind