Solved HAL Swiss/French Keyboard

Hi all, I'm French and I'm trying to learn how to use FreeBSD with this French tutorial : http://openclassrooms.com/courses/a-la-decouverte-d-unix-freebsd

I have a problem because the tutorial is about FreeBSD 9.x and I'm on 10.0 so I had to adapt. The real big problem I have is that at this page : http://openclassrooms.com/courses/a-la-decouverte-d-unix-freebsd/l-environnement-graphique-x the author tells how to configure the French keyboard but not the Swiss/French keyboard I have using HAL... I don't find anything working on the internet... Nor editing xorg.conf, nor editing the fdi files 10-x11-input.fdi or x11-input.fdi...

I really need some help because this is driving me crazy ;)

Also, I'd like to install MATE as a desktop environment (didn't install one yet) so I can't use GNOME or KDE's config tools.
 
I think you should start by posting the content of these files and detailing what have you tried so far, what works and what does not.
 
Your article looks rather old, as it uses old pkg syntax. If you have plans to use Mate, just rebuild xorg with udev support and use Mate configuration to setup your keyboard layout. For the first run you can try to delete your xorg.conf entirely as new xorg have some decent auto configuration capability.
 
Your article looks rather old, as it uses old pkg syntax. If you have plans to use Mate, just rebuild xorg with udev support and use Mate configuration to setup your keyboard layout. For the first run you can try to delete your xorg.conf entirely as new xorg have some decent auto configuration capability.
Probably just a typo but Xorg doesn't have Linux udev support on FreeBSD. It does however have devd(8) support which is now on by default. :)
 
I have this in /etc/X11/xorg.conf.d/input.conf to have a french keyboard:
Code:
Section "InputClass"
        Identifier      "Keyboard Defaults"
        Driver          "keyboard"
        MatchIsKeyboard "on"
        Option          "XkbLayout" "fr"
        Option          "XkbVariant" "oss"
EndSection
 
Try:
Code:
Section "InputClass"
Identifier "Keyboard Defaults"
Driver "keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "ch"
Option "XkbVariant" "fr"
EndSection
Does this work?

Oops. acheron beat me to it. :)
 
abishai, thanks for the advice, I used Mate configuration and my keyboard is perfectly recognised :)

I think I'm going to upload the files just in case it can help someone, /etc/X11/xorg.conf :

Code:
Section "ServerLayout"
   Identifier  "X.org Configured"
   Screen  0  "Screen0" 0 0
   InputDevice  "Mouse0" "CorePointer"
   InputDevice  "Keyboard0" "CoreKeyboard"
   Option    "DontZap"  "off"
EndSection

Section "Files"
   ModulePath  "/usr/local/lib/xorg/modules"
   FontPath  "/usr/local/lib/X11/fonts/misc/"
   FontPath  "/usr/local/lib/X11/fonts/TTF/"
   FontPath  "/usr/local/lib/X11/fonts/OTF/"
   FontPath  "/usr/local/lib/X11/fonts/Type1/"
   FontPath  "/usr/local/lib/X11/fonts/100dpi/"
   FontPath  "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
   Load  "glx"
EndSection

Section "InputDevice"
   Identifier  "Keyboard0"
   Driver  "kbd"
   Option    "XkbLayout"   "ch"
EndSection

Section "InputDevice"
   Identifier  "Mouse0"
   Driver  "mouse"
   Option    "Protocol" "auto"
   Option    "Device" "/dev/sysmouse"
   Option    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
   Identifier  "Monitor0"
   VendorName  "Monitor Vendor"
   ModelName  "Monitor Model"
EndSection

Section "Device"
  ### Available Driver options are:-
  ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
  ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
  ### <percent>: "<f>%"
  ### [arg]: arg optional
  #Option  "NoAccel"     # [<bool>]
  #Option  "AccelMethod"     # <str>
  #Option  "Backlight"     # <str>
  #Option  "DRI"     # <str>
  #Option  "ColorKey"     # <i>
  #Option  "VideoKey"     # <i>
  #Option  "Tiling"     # [<bool>]
  #Option  "LinearFramebuffer"    # [<bool>]
  #Option  "SwapbuffersWait"     # [<bool>]
  #Option  "TripleBuffer"     # [<bool>]
  #Option  "XvPreferOverlay"     # [<bool>]
  #Option  "HotPlug"     # [<bool>]
  #Option  "ReprobeOutputs"     # [<bool>]
  #Option  "XvMC"     # [<bool>]
  #Option  "ZaphodHeads"     # <str>
  #Option  "TearFree"     # [<bool>]
  #Option  "PerCrtcPixmaps"     # [<bool>]
  #Option  "FallbackDebug"     # [<bool>]
  #Option  "DebugFlushBatches"    # [<bool>]
  #Option  "DebugFlushCaches"     # [<bool>]
  #Option  "DebugWait"     # [<bool>]
  #Option  "BufferCache"     # [<bool>]
   Identifier  "Card0"
   Driver  "vesa"
   BusID  "PCI:0:2:0"
EndSection

Section "Screen"
   Identifier "Screen0"
   Device  "Card0"
   Monitor  "Monitor0"
   SubSection "Display"
     Viewport  0 0
     Depth  1
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  4
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  8
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  15
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  16
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  24
   EndSubSection
EndSection

/usr/local/etc/hal/fdi/policy/x11-input.fdi (which doesn't do anything)
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.XkbOptions" type="string">terminate:ctrl_alt_bksp</merge>
  <merge key="input.xkb.Layout" type="string">ch</merge>
  <merge key="input.xkb.Variant" type="string">fr</merge>
  <merge key="input.xkb.Option" type="string">compose:rwin</merge>
  </match>
  </device>
</deviceinfo>

I tried putting something similar in a file 10-x11-input.fdi, I tried deleting some merge lines, I tried writing a 10-keymap.fdi which I deleted and I also tried changing my layout for things like ch(fr) or fr(ch)... I even tried putting the de layout which didn't work either.

But now everything is good :D

P.S : I hope that this time I didn't do wrong with the syntax é.è
 
I'm trying your solutions and I'll say if that works for me in case people don't want to use MATE and really need to configure HAL and the Xorg
 
So I tried it, I removed my files from /usr/local/etc/hal/fdi/policy, I edited my /etc/X11/xorg.conf.d/input.conf to what protocelt told me and edited my /home/.xinitrc to
Code:
exec twm
since I didn't want Mate to configure the keyboard.

I typed startx... And the X server crashed :D. So I don't know if this works (^o^)''
 
Back
Top