I'm on freebsd 10.1,keyboard of X11 start in english layout,i have edited this file


<?xml version="1.0" encoding="iso-8859-1"?>
<deviceinfo version="0.2">
    <match key="info.capabilities" contains="input.keyboard">
      <merge key="input.x11_options.XkbModel" type="string">pc102</merge>
      <merge key="input.x11_options.XkbLayout" type="string">fr</merge>

But still start with us keyboard

  • are you actually running hal? Did you try to call setxkbmap from commandline?
    – arved
    Jun 11 '15 at 12:04
  • setxkbmap works fine of course,but you can set it only if DE is running not before,hal is running
    – elbarna
    Jun 11 '15 at 17:11
  • what DE are you running? maybe just use the GUI provided by your DE?
    – arved
    Jun 12 '15 at 9:09
  • Is your X server configured to use hal? The default now is to use FreeBSD's devd instead, which requires different configuration.
    – D_Bye
    Jun 12 '15 at 9:39
  • I have created this file /usr/local/etc/X11/keyboard.conf with those contents Section "InputClass" Identifier "Keyboard Defaults" Driver "keyboard" MatchIsKeyboard "on" Option "XkbLayout" "it" Option "XkbVariant" "altgr-intl" EndSection But still english layout
    – elbarna
    Jun 12 '15 at 19:33

Though I have not personally delved into the furthest extents of UTF-8 character encodings, but perhaps I may be familiar enough with concepts of POSIX locale configurations that I might be able to offer some simple points of reference for this configuration.

There is some advice in the FreeBSD handbook, as towards configuring the FreeBSD localization features, in terminal interfaces and in the X.org windowing service. In section 23.4 of the FreeBSD handbook, there is a short example of configuring TTYs and X.org for the Russian KOI8-R character code set [lang-setup]. Section 23.2 of the FreeBSD handbook also provides some more of detail about localization features in FreeBSD [l18n].

Cross-referencing one FreeBSD FAQ [faq] moreover, it seems that the following may be a recommended locale identity for the Italian language, as well as for locale-specific features such as for printing of numeric values, dates, etc.

it_IT.ISO8859-15 Italian (Italy)

Referring alternately to the list of files under /usr/share/locale, the following locale names could also be applied towards localization in the Italian language:



Considering that not all fonts might cover all of the Unicode code set (UCS), and considering the relative commonality of ISO-8559-1 encodings, perhaps it_IT.ISO8859-1 could be recommended as a locale setting, moreover a locale setting not requiring support for UTF-8 character encoding.

Referring back to the text of the initial example [lang-setup], I would estimate that the following might be a working configuration entry to add to /etc/xorg.conf This configuration entry would be added within the Keyboard section of the configuration file:

Option "XkbLayout" "it_IT"

Alternately, this might suffice as well, without the locale specifier suffixed to the language specifier:

Option "XkbLayout" "it"

So far as configuring X.org perhaps it might be enough to add that to xorg.conf and restart the X server? I hope this helps.

Personally, I'm not aware of what additional fonts might be required, or what additional package/ports selections as in the instance of the UTF-8 locale. I would assume that the ISO-8559-1 locale would be widely supported in applications.

Referring back to section 23.2 of the FreeBSD Handbook, the handbook includes further information as far as how to configure the LANG and MM_CHARSET environment variables, and configuration properties in the login.conf and /etc/rc.conf files, for localization [l18n].

  • 1
    there is no xorg.conf
    – elbarna
    Jun 15 '15 at 0:22
  • An xorg.conf template can be generated from the shell terminal, using the shell command Xorg -configure -- referencing the FreeBSD Handbook, section 6.5. If I recall correctly, that would generate an appropriate configuration the X.org window server, for the display, keyboard, and pointer hardware installed at the time. Subsequently, the Keyboard section in the configuration file may be modified with a text editor, and the file copied to /etc/xorg.conf
    – Sean Champ
    Jun 15 '15 at 0:28
  • 1
    I know this,but i want to do like linux,no xorg.conf and use /usr/local/etc/X11/xorg.conf.d
    – elbarna
    Jun 15 '15 at 0:36
  • I'd assume that the X server may at least need a Keyboard configuration. I'm not greatly familiar with how the X.org server computes its default configuration.
    – Sean Champ
    Jun 15 '15 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.