X server and xinit works excellent....almost.

Samuel Magnusson samuel.magnusson5 at bredband.net
Wed Nov 9 20:52:32 UTC 2011


Polytropon wrote 2011-11-09 19:15:
> On Wed, 09 Nov 2011 12:06:37 +0100, Samuel Magnusson wrote:
>> 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?
> I hope not! :-)
>
> As far as I understood the _current_ mechanism, the precedence
> is 1st xorg.conf, 2nd XML stuff, 3rd autodetect.
>
> You have X without HAL and DBUS? Use xorg.conf because this
> has worked for many years to centralize X configuration.
>
> You have X with HAL and DBUS, but don't want to use it? Reflect
> this choice in xorg.conf and continue with previous settings.
>
> You have X with HAL and DBUS, but some things aren't detected
> properly? Dive into the fun of XML and enter your settings in
> the appropriate files, whichever they currently may be. :-)
>
> There _are_ things that cannot be autodetected, and HAL needs
> to be configured to "notice" a localization "deviation" from
> the standard, which is en_US. That's what you are going to use
> the XML stuff for.

I like that precedence list, because the old way seems much clearer and 
simpler to me. If autodetection only does half the detecting and then 
lays the burden of a new and more complicated manual configuration, then 
not much is gained. And why on earth could they not just have left what 
needed to be manually configured in the xorg.conf and make it override 
the HAL default mode? That would be the logical and easy way, in my 
inexperienced opinion. So as I understand it from my mistakes this 
precedence list is only true under certain circumstances, and I fell in 
a nice little devilish newbie-trap. :)

When I first installed Xorg I began by following the handbook, which 
means that I unwittingly did this to my poor rc.conf:

hald_enable="YES"
dbus_enable="YES"

That meant that I would HAVE to go into the XML-stuff (to get swedish 
keys) , because I could configure the InputDevice section until blue in 
my face (which I also did), and still nothing would happen witht the 
keyboard layout. Because with HAL and DBUS enabled this InputDevice 
section is bypassed unless I also specify  Option "AutoAddDevices" 
"false". Which I understand gives the same result as not enabling HAL 
and DBUS in the first place. Its just an unnecessary circle, first 
enabling, then disabling.

I have to give cred to the FreeBSD handbook because it is actually quite 
correct and clear on this point (as no other text I found was) and tells 
what to do if wanting to do it the old way. But for some reason that I 
cannot recall now, I didn't understand it right away and strayed away 
from the handbook to among other things the X.org website and the man 
pages and other introductory books, which doesn't warn about this at 
all. It just assumes that xorg.conf sections works as usual. But it 
didn't to my hald-enabled system. I never returned to the handbook, 
because I stumbled on the working method with setxkbmap which did 
override the HAL default layout. I left it as a big question mark to 
maybe get back to it later.

When I started this thread I had no idea that my problem with zap could 
be related to the same keyboard problem I had encountered earlier.
...so I'm learning. :)

> Can you tell me _how_ anything in software is supposed to
> know what characters are printed on the key caps of the
> keyboard? I'm not sure keyboard vendors do code localization
> variants into their USB identification numbers...
>
No I can't. :) I realized the unprobability of this when hitting the 
send button. And your comment is also a good argument for keeping the 
simpler keyboard configuration in xorg.conf, isn't it?  Couldn't 
autodetection of the keyboard work together with xorg.conf just like 
when giving the command "X -configure"  and /root/xorg.config.new is 
created? For example that detected my monitor, my graphics card and my 
installed drivers, and it put those as entrys in the file so it is easy 
to edit and add options if necessary. HAL could just put "pc105" into 
the normal InputDevice section and let me fill in the Layout... What is 
there more than "pc105" to autodetect then that I would need HAL to make 
my life easier? I guess these are decisions to be made by X.org though, 
and not by me.. I just wonder. :)

Anyway, can you stand one more "just curious"-question from me?
When I used the vesa and nouveau drivers they were automatically 
kldloaded when the X server read the xorg.conf file. But the nVidia 
driver I have to kldload manually because otherwise the X server doesn't 
find it. Of course I will put it in loader.conf, but is it normal?  
Should it not be loaded authomatically as the others?


More information about the freebsd-questions mailing list