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

Turkish Keyboard

Discussion in 'X.Org' started by Majorix, Apr 15, 2012.

  1. Majorix

    Majorix New Member

    Messages:
    149
    Thanks Received:
    5
    I have set this line in /etc/rc.conf:
    Code:
    keymap=tr.iso9.q


    Layout is fine when not in X. However, starting with the call to SLiM, GDM or XDM, I am reset to US keyboard layout.

    Using LXDE but this is also the case in Gnome.

    What can I do?
     
  2. Beeblebrox

    Beeblebrox Member

    Messages:
    899
    Thanks Received:
    111
    Desktop environments keep their own settings as opposed to xorg (X11).
    One solution is to place in .xinitrc of the user:
    Code:
    setxkbmap -layout tr


    Gnome also has its own GUI under System -> Preferences -> Keyboard -> Layouts -> Add
     
  3. Majorix

    Majorix New Member

    Messages:
    149
    Thanks Received:
    5
    Well, if I set this in .xinitrc and reboot, the problem persists. However if I write this in a terminal GUI after I am in X, the layout changes back to Turkish and everything is fine.

    So, is there maybe a way to add a command to be executed automatically AFTER I am on X? I always run in single-user mode, if you need to know.

    Thanks!
     
  4. Beeblebrox

    Beeblebrox Member

    Messages:
    899
    Thanks Received:
    111
    Can you please clarify what you mean by:
    There's no way you could go graphical while in "single user mode" as expressed in FreeBSD terminology.
     
  5. Majorix

    Majorix New Member

    Messages:
    149
    Thanks Received:
    5
    You see, I am still new to FreeBSD and the terms :D Just ignore that part of the post, sorry for the confusion.
     
  6. Beeblebrox

    Beeblebrox Member

    Messages:
    899
    Thanks Received:
    111
    Sure thing.
    When you modified .xinitrc it was the one in your user's home folder (~/), right?
    $ vi /home/majorix/.xinitrc
    Not /root or some other user's home (which there are none as you are the only "user")
     
  7. Majorix

    Majorix New Member

    Messages:
    149
    Thanks Received:
    5
    Yes, it is in MY home folder, not root's. I believe SLiM (which I am currently using) needs it to be in the user's home folder, otherwise it wouldn't run.
     
  8. kpa

    kpa Well-Known Member

    Messages:
    4,086
    Thanks Received:
    804
    I believe the commands should go to ~/.xsession if you log in with xdm(1) or any other similar X session manager.
     
  9. Majorix

    Majorix New Member

    Messages:
    149
    Thanks Received:
    5
    I don't know, I have used this page and it gave me the idea that I needed to edit .xinitrc.
     
  10. Beeblebrox

    Beeblebrox Member

    Messages:
    899
    Thanks Received:
    111
    That page has several things all mixed-up for optimal confusion.

    1. FreeBSD uses sh / csh / tcsh family of shells which uses setenv whereas,
    $ export VARIABLE=value
    is for or bourne, bash, and related shells. Bash is not installed by default it's in the ports if you want to use it. However, you will also have to set your shell as bash for the "export=" command to work.
    2. Both ~/.xinitrc and ~/.xsession override environment settings - that's why they don't carry over to graphical window. The syntax of either one does not use setenv or export. You just place the command similar to xorg.conf syntax. Therefore in ~/.xinitrc:
    Code:
    setxkbmap -layout tr

    and NOT
    Code:
    export setxkbmap layout=tr

    Also, Handbook Verse 24.3.6
     
  11. Majorix

    Majorix New Member

    Messages:
    149
    Thanks Received:
    5
    I did NOT use export or setenv. What I have in .xinitrc is identical to what you wrote in your first post.

    I still don't have a solution to this :(
     
  12. Beeblebrox

    Beeblebrox Member

    Messages:
    899
    Thanks Received:
    111
    You're not providing much info so I'm just shooting in the dark...

    1. You did place in /etc/X11/xorg.conf such entry, right?
    Code:
    Section "InputDevice"
    	Identifier  "Keyboard0"
    	Driver      "kbd"
    	Option      "XkbModel" "pc105"
            Option      "XkbLayout" "tr"
    EndSection


    2. Have you tried the gnome GUI [Keyboard -> Layouts -> Add] from post #2?
     
  13. Majorix

    Majorix New Member

    Messages:
    149
    Thanks Received:
    5
    @Beeblebrox:
    I had no xorg.conf, so I just created one and filled in the values in your post. However this only restricted X from starting.

    I decided to try another idea. I found this to work:
    HTML:
    % cat /usr/local/etc/hal/fdi/policy/x11-input.fdi
    <?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">tr</merge>
        </match>
      </device>
    </deviceinfo>
    
    Hope this helps others who have the same problem.