Keyboard layout problems

Hello,

I'm a long-time linux user just migrating to FreeBSD, so please be patient. :)

My problem is (well, one of my problems is) that I can't seem to set the keyboard layout permanently in X. I installed and configured FreeBSD just fine, installed X with some minimal problems (I'm still sorting those out, no major issues though), but this problem seems to elude me and it's starting to drive me crazy.

My keyboard layout should be Hungarian, and in console, it actually is. However any time I start X, it switches to us. I googled the issue and tried out like a million suggestions, but I still have no idea why it won't work.

As a real newbie to FreeBSD, I have no idea what kind of log output I should include here, so please bear with me, and tell me which ones you need to help me.

Thank you in advance!
 
depends on how you start X (do you use startx, xdm, gnome, kde etc..)

The one of simple solutions is, if you start X with startx, then simply add
Code:
setxkbmap hu &
to ~/.xinitrc
before executing your Window Manager

If you use some window manager you just need to add setxkbmap hu to configuration, so it would be executed every time your Window Manager is started


P.S.
Personally I even have link from ~/.xsession to ~/.xinitrc, this is useful if you use xdm, because it will execute xsession (if i remember corectly), gdm also can execute ~/.xsession.

Remember ~/.xinitrc and ~/.xsession are read and executed as sh scripts :)
 
I too have linked from ~/.xsession to ~/.xinitrc and found it to be more beneficial for then you are able to execute xsession.
 
Personnaly , i m french , to have french keyboard layout i added this line in xorg.conf :

Code:
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        [B]Option "Xkblayout" "fr"[/B]
EndSection

May be you have to do same with 'hu'
 
Weird part is, this is the stuff I did... First I tried with xorg.conf, no go. Then with .xinitrc, same problem.

But I'll start over from scratch, with more attention and maybe with more luck.

Thanks all!
 
I gather you're using freebsd7.2:
In a terminal:
Code:
echo 'hald_enable="YES"' >> /etc/rc.conf
echo 'dbus_enable="YES"' >> /etc/rc.conf
create a file x11-input.fdi:
Code:
# touch x11-input.fdi
then add this content in it:
Code:
# vi x11-input.fdi
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keyboard">
      <merge key="input.x11_options.XkbModel" type="string">pc105</merge>
      <merge key="input.x11_options.XkbLayout" type="string">hu</merge>
    </match>
  </device>
</deviceinfo>
copy it to /usr/local/etc/hal/fdi/policy

reboot
 
Back
Top