1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Keyboard layout problems

Discussion in 'X.Org' started by Dinchamion, Nov 23, 2009.

  1. Dinchamion

    Dinchamion New Member

    Messages:
    11
    Thanks Received:
    0
    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!
     
  2. graudeejs

    graudeejs Well-Known Member

    Messages:
    4,594
    Thanks Received:
    633
    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 :)
     
    siggi and donxc thanked for this.
  3. Mordy

    Mordy New Member

    Messages:
    1
    Thanks Received:
    0
    I too have linked from ~/.xsession to ~/.xinitrc and found it to be more beneficial for then you are able to execute xsession.
     
  4. SPlissken

    SPlissken New Member

    Messages:
    150
    Thanks Received:
    6
    Personnaly , i m french , to have french keyboard layout i added this line in xorg.conf :

    Code:
    Section "InputDevice"
            Identifier  "Keyboard0"
            Driver      "kbd"
            Option "Xkblayout" "fr"
    EndSection
    
    


    May be you have to do same with 'hu'
     
  5. Dinchamion

    Dinchamion New Member

    Messages:
    11
    Thanks Received:
    0
    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!
     
  6. FRANCOIS

    FRANCOIS New Member

    Messages:
    34
    Thanks Received:
    3
    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
     
  7. graudeejs

    graudeejs Well-Known Member

    Messages:
    4,594
    Thanks Received:
    633
    You still haven't answered if you're using any desktop enviroment, or custom desktop.

    And how do you start X?