setxkbmap in Nevada!

setxkbmap has been integrated into Solaris Nevada! It is a command which allows users to switch between different keyboard layouts on-the-fly. This command, maps the keyboard using the layout determined by different options specified on the command line. Although it still has some minor issues to be fixed in Nevada, it is a very useful program for those looking for an alternative of IIIMF on switching keyboard layout on-the-fly. Unlike IIIMF, setxkbmap is not character encoding dependent, it means that it works not only for UTF-8 but also for ISO and other locales.

setxkbmap sets the keyboard layout using the X keyboard Extention. The source for all of the components used can be found in /usr/X11/lib/X11/xkb/ directory.

The source of all keyboard maps is taken from /usr/X11/lib/X11/xkb/symbols/"kb_layout" where "kb_layout" is the name of the keyboard layout in the above directory.
e.g. es, fr, ru, cz, etc...

As I mentioned before there are some issues to be fixed:

- the most important is probably that setxkbmap has by default its path to the source of all xkb components in /usr/X11/share/X11/xkb directory like other Unix OS, but Solaris has its xkb source in a different directory (/usr/X11/lib/X11/xkb), I believe that this issue will be fixed soon but for now you must add the correct path manually (at least for the 'rules' file). You will need to do that just once because 'rules' file will be remembered until you restart your Xserver.

$ setxkbmap -rules /usr/X11/lib/X11/xkb/rules/xorg

- Another issue is that user don't have by default path to the 'setxkbmap' command, so in case you don't like typing /usr/X11/bin/setxkbmap each time you want to switch your kb layout; you can add /usr/X11/bin to your path.

Comments:

Hopes that the gnome-keyboard-indicator applet and the keyboard layout option tab could be alive again in Indiana.

Posted by guest on March 18, 2008 at 08:50 AM CET #

How you did this example? I try to enter setxkbmap ru, for example, but have ???? in gnome-terminal. I have LANG=C by deafault. May be need more options?

Posted by joe on March 29, 2008 at 01:12 AM CET #

I think you need to login to Russian locale (or better to any UTF-8 locale) in order to display Cyrillic characters properly.

Posted by Ales Cernosek on March 31, 2008 at 12:25 PM CEST #

Joe: Unfortunately C locale does not have support for some fonts (including Cyrillic fonts used by Russian layout) you can try any UTF-8 or ISO locales.

Posted by Javier Acosta on April 01, 2008 at 03:23 AM CEST #

I check Russian lang in Login panel, then all works fine with setxkbmap if I ever write "export LANG=C".
With LANG=C in CDE-panel, I write "export LANG=ru_RU.UTF-8" but get ?????.
But I need change kbd without CDE-login panel.

Posted by guest on April 01, 2008 at 03:26 AM CEST #

In order to have full fonts support for all Cyrillic symbols you will need to be logged into Xserver (Gnome, JDS, etc) under any Cyrillic locale (ru_RU.UTF-8, ru_RU.ISO8859-5, etc...)
If you export LANG from terminal you will not get full fonts support for your desktop.

Posted by Javier Acosta on April 03, 2008 at 08:43 AM CEST #

Ok, it's work. But only in gnome-apps and firefox.
Some way to work in xterm? I tried to run xterm with cyrrillic fonts but unaccessfully...

Posted by Joe on April 10, 2008 at 10:16 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Solaris l10n & i18n, locales, keyboards, fonts and related topics.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today