command line retrieve list of kbd layouts and variants (to use with setxkbmap)

Giuseppe Penone giuspen at gmail.com
Fri Jul 27 08:50:36 PDT 2012


the problem of parsing /usr/share/X11/xkb/rules/base.xml is that the
location of the file may vary from distribution to distribution
according to the prefix.
anyway since the manual is supposed to change syntax I will go that way...
I'll probably implement a procedure to locate the base.xml file
at first.
for the records I'm working on the lxde panel keyboard layouts handler
applet.
thanks and regards,
Giuseppe.




On Fri, Jul 27, 2012 at 5:18 PM, Alan Coopersmith <
alan.coopersmith at oracle.com> wrote:

> If you're trying to parse them, why not use the original files such as
> /usr/share/X11/xkb/rules/base.xml instead of the man page that's generated
> from them?    The XML & XKB files have a far more reliable format than the
> man page, which can change at any time, since we don't expect people to try
> to parse it.
>
>         -Alan Coopersmith-              alan.coopersmith at oracle.com
>          Oracle Solaris Engineering - http://blogs.oracle.com/alanc
>
> On 07/27/12 04:30 AM, Giuseppe Penone wrote:
> > I realize that doing
> >
> > man -P cat xkeyboard-config
> >
> > all the output goes to stdout and can be parsed with a script or c code.
> >
> > Cheers,
> > Giuseppe.
> >
> >
> > On Fri, Jul 27, 2012 at 9:24 AM, Giuseppe Penone <giuspen at gmail.com
> > <mailto:giuspen at gmail.com>> wrote:
> >
> >     Great thank you, just bad that there's not a "--help" command, it
> would be
> >     great to parse the output from c code.
> >     Cheers,
> >     Giuseppe.
> >
> >
> >
> >
> >         man xkeyboard-config :)
> >
> >         Cheers,
> >           Peter
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > xorg at lists.x.org: X.Org support
> > Archives: http://lists.freedesktop.org/archives/xorg
> > Info: http://lists.x.org/mailman/listinfo/xorg
> > Your subscription address: alan.coopersmith at oracle.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20120727/4852a683/attachment.html>


More information about the xorg mailing list