TIA,
Mr. Scary
I use FreeBSD as a desktop and write in both Russian (Cyrillic
characters) and English. I have spent many hours figuring out how to
properly do this. This is what I have come up with:
1. Add your desired keyboard layout to your X configuration. The guide
for configuring it is located at
http://www.x.org/X11R6.8.2/doc/XKB-Config.html
For reference, here is the keyboard section of my xorg.conf:
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbLayout" "us,ru"
Option "XkbOptions" "grp:toggle"
EndSection
The XkbLayout says to start with 'us' (English), but that 'ru' (Russian)
is an option. As far as I know, French is 'fr'. The second option of
"XkbOptions" "grp:toggle" says that the right Alt key, which is the
default, will switch between the two. That means that I start with
English when X starts and may switch between the two languages by simply
pressing the right Alt. There are other ways to toggle the two
languages, but I've found that the default is the least intrusive to
other programs, such as Emacs.
2. You need to make sure you have proper fonts installed. I struggled
with AbiWord and OpenOffice until I installed a set of TrueType fonts.
Please look under section "5.5 Using Fonts in X11" in the FreeBSD
handbook for setting up TrueType fonts. You may get a free (as in
price) set from http://corefonts.sourceforge.net/ . Just use the
program "cabextract" to get at the .ttf/.TTF files. From there, it is
as simple as the handbook says.
I hope this helps. FreeBSD is fully capable of using many other
languages besides English and handles it quite well.
Sincerely,
Mick Beaver
These fonts are available as a port via: x11-fonts/webfonts
--
Piotr Smyrak, piotr.smyrak.eko.org.pl
Thank you for your informative notes. I have read them and the ones
you reference but I have still not been able to unlock the French
characters I so desire.
Some of the notes I have read involve specifying an environment on a
per-user basis. This seems to me overly complicated. I want to be
able to toggle keyboard maps as your configuration implies.
I have tried editing xorg.conf (and restarting Xorg) as well as using
the setxkbmap utility without success.
This is definitely an area that the FreeBSD team needs to improve upon.
Mr. Scary
$ setxkbmap -rules xorg -model pc105 -layout fr
*does* change my keyboard mapping but it seems to just mix up the
mapping a little. There are no French accents available anywhere let
alone where they are supposed to be.
Mr. Scary.
First of all, you did not provide much information about your setup.
What windowing environment do you use? GNOME, KDE, a plain window manager?
> This is definitely an area that the FreeBSD team needs to improve upon.
Windowing environments are not part of FreeBSD, so it has nothing to do
with FreeBSD.
--
Piotr Smyrak, piotr.smyrak.eko.org.pl
The command I used should affect the console shouldn't it? So to me
this is a FreeBSD issue.
I use Fluxbox as my window manager and everything works well. Well
maybe except for a printer I am trying to install that causes all the
lights in my office to blink. :)
Thank you for your time.
Mr. Scary
Well i am French and i use a French keyboard under FreeBSD without any
problem. Accents and company are here. Now if you want to type accents
on an english keyboard it is a different story, you better use a compose
key to build the special character, try to serch Google on the subject.
For reference here is the relevant part of my xorg.conf
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "fr"
EndSection
As you can see, perfectly standard. Note that the French keyboard also
works on console, using this in /etc/rc.conf
keymap="fr.iso.acc"
font8x16="iso-8x16"
font8x14="iso-8x14"
font8x8="iso-8x8"
For completeness, if you use KDE as desktop manager, there is an
applet which allows to reparametrise the keyboard on the fly, such
as passing from French to American with one click. Probably there is the
same with Gnome.
See:
$ pkg_which `which setxkbmap`
xorg-clients-6.8.2
So well, not really. As I said, FreeBSD ports provide you with third party
applications, X* and everything that builds on top of this is also one
of them - though the X itself is sometime considered as "imported", but
I cannot speak for the project. But yes, console is part of FreeBSD.
Just follow Michel's example for both X and console and you should be set.
If you want to switch keymaps in console, read kbdcontrol(1).
I can only add to his post, that if you want to switch between various
keyboard layouts in X, set a comma separated list of them in XkbLayout,
and assign a key as a switch in XkbOptions. Mick Beaver gave you example
with right Alt, I use the Windows Menu key for this.
A section from my xorg.conf:
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "Xleds" "1 2 3"
Option "XkbModel" "pc104"
Option "XkbLayout" "pl,es"
Option "XkbOptions" "grp:menu_toggle"
Option "AutoRepeat" "500 30"
EndSection
If all you need is French keyboard setup, just place "fr" in XkbLayout as in
Michel's example.
> Thank you for your time.
You welcome. :-)
--
Piotr Smyrak, piotr.smyrak.eko.org.pl
The call to `which` here is superfluous, as pkg_which searches
your PATH.
Best Regards,
Christopher Nehren
--
I abhor a system designed for the "user", if that word is a coded
pejorative meaning "stupid and unsophisticated". -- Ken Thompson
If you ask questions of idiots, you get "Joel on Software".
Unix is user friendly. However, it isn't idiot friendly.
It seems that my problem is that I am trying to switch to a French
mapping using an English keyboard. My assumption was that there would
be no problem as this is trivially done in MS Windows. It seems odd
that it cannot be done without embarking on science project.
If you had followed the thread you would of discovered that this did
not work for me. Hence, the need to find another solution -> science
project.
Mr. Scary
>If you had followed the thread you would of discovered that this did
>not work for me. Hence, the need to find another solution -> science
>project.
If you consider searching for and reading documentation science, then
welcome to the wonderful world of Unix science.
mkb.