Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Nov 2011 21:02:55 +0100
From:      Michael Cardell Widerkrantz <mc@hack.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: X server and xinit works excellent....almost.
Message-ID:  <86pqh1njww.fsf@kropotkin.hack.org>
References:  <4EB88225.9020702@bredband.net> <alpine.BSF.2.00.1111080806260.70888@wonkity.com> <20111108205600.7a8e0205.freebsd@edvax.de> <alpine.BSF.2.00.1111081321010.72738@wonkity.com> <alpine.BSF.2.00.1111081331150.72921@wonkity.com> <20111108215114.24d336e6.freebsd@edvax.de> <4EBA5EBD.7020501@bredband.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Samuel Magnusson <samuel.magnusson5@bredband.net>, 2011-11-09 12:06 (+0100):

> Which made me remember that I had the exact same
> problem with my swedish keyboardmappings the very first time I started
> X. I just couldn't get it to work and nearly gave up before I tried
> the setxkbmap method and put them into .xinitrc, which saved me.
> Although I had put the exact same "rules" and "layout" options in
> xorg.conf and double checked the format and spelling hundreds of
> times. The problem was still there now: when I commented it out in
> .xinitrc I got the US keyboard in xterm in spite of the xorg.conf
> settings. 

XKB is a bit of a mystery compared to good old xmodmap. A while ago I
tried to understand it. The result is a small guide on how you can use
XKB to define your own keyboard mapping and load it without having to be
root. I used my own version of a Swedish keyboard on a Happy Hacking
Keyboard as an example:

  http://hack.org/mc/writings/xkb.html

> The thing that really made it was the  Option  "AutoAddDevice" "off",
> which I had failed to notice. 

Yes, this is really important, especially if you don't want that
dreadful HAL on your system. Considering that the default is on and HAL
isn't a dependency for the X server, many users were surprised when they
didn't have any working mouse nor keyboard!

I don't use HAL and it seems even the X.org project has moved away from
HAL even if such modern X.org X servers are not yet in ports.

> It doesn't warn that if it is NOT disabled the InputDevice sections
> won't work at all. And "no devices will be added" sounds like a bad
> thing, so you rather leave this option enabled...

Perhaps you can file a Problem Report (PR) with a suggested text? I
suggest you add the text to the handbook since I assume the X.org
project won't touch manual pages for the ancient X servers we use in
FreeBSD.

> Now I'm curious:
>
> Is it then so that in the "new style" Xorg the XML-method will
> override HAL, and this is the new default way of providing opitons
> that formerly were in the InputDevice sections in xorg.conf?

What new style XML method?

AFAIK the more modern X.org X servers uses the Linux udev instead of
HAL. Those servers are not yet available on FreeBSD but presumably it
would be possible to use devd for the same purpose.

> And should HAL have discovered my swedish keyboard automatically in
> the first place, so there was something going wrong there?

How would HAL know that the keyboard had a Swedish layout? No such
information is sent through USB or PS/2 when you attach a keyboard. This
is up to your own language settings, either with what you have entered
in the form of setxkbmap or xkbcomp in your .xinitrc/.xsession or your
settings in the desktop environment of your choice.

-- 
http://hack.org/mc/
Plain text e-mails, please. HTML messages sent to me are silently deleted.
OpenPGP welcome, 0xE4C92FA5.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86pqh1njww.fsf>