How can I set the layout in console?

Hi I'm coming from Linux. I want to use the ñ keys, my layout is latinamerican, it work when I log in it work in X for example when I use Firefox but when I am in a console for example urxvt(1) the ñ key doesn't work.

I created a file called keyboard-latam-basic.conf under xorg.conf.d

keyboard-latam-basic.conf

Code:
Section "InputClass"
  Identifier  "KeyboardDefaults"
  Driver  "keyboard"
  MatchIsKeyboard "on"
  Option  "XkbModel" "pc102"
  Option  "XkbLayout" "latam"
  Option  "XkbVariant" "basic"
EndSection


My etc/rc.conf:
Code:
hostname="dam"
keymap="latinamerican.kbd"
ifconfig_re0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO"$
dumpdev="AUTO"
dbus_enable="yes"

So the ñ key works well in the login and X but not when I use a console.

If I type locale I get this:

Code:
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=



Please help
Thanks!
 
Hi I read that I also read this
https://forums.freebsd.org/threads/how-to-change-keyboard-mapping-in-the-console.50104/

When I add this to /boot/loader.conf when I boot it say something about driver VGA
Code:
kern.vty="vt"

I came from Linux but it can not be that hard to have the right layout in freebsdFreeBSD, this is so much easy in Linux also with locale in Linux I have for example es_AR.UTF-8 AR for Argentina I don't see this in FreeBSD, anyway I want the ñ key in the console!

If I press the ñ key in the console nothing happens, but for example if I edit a file with nano(1) in the console an press the ñ key it work normally. The strange thing is that if I login I have the ñ key but not after login.

Now if I type locale I get this:


Code:
LANG=es_ES.UTF-8
LC_CTYPE="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_ALL=es_ES.UTF-8



This is part of my /etc/login.conf
Code:
#
# Note that since a colon ':' is used to separate c$
# a \c escape sequence must be used to embed a lite$
# value or name of a capability (see the ``CGETNUM $
# AND SEMANTICS'' section of getcap(3) for more esc$

default:\
  :passwd_format=sha512:\
  :copyright=/etc/COPYRIGHT:\
  :welcome=/etc/motd:\
  :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\
  :path=/sbin /bin /usr/sbin /usr/bin /usr/ga$
  :nologin=/var/run/nologin:\
  :cputime=unlimited:\
  :datasize=unlimited:\
  :stacksize=unlimited:\
  :memorylocked=64K:\
  :memoryuse=unlimited:\
  :filesize=unlimited:\
  :coredumpsize=unlimited:\
  :openfiles=unlimited:\
  :maxproc=unlimited:\
  :sbsize=unlimited:\
  :vmemoryuse=unlimited:\
  :swapuse=unlimited:\
  :pseudoterminals=unlimited:\
  :priority=0:\
  :ignoretime@:\
  :umask=022:\
  :charset=UTF-8:\
  :lang=es_ES.UTF-8:
#
# A collection of common class names - forward them$
# (login would normally do this anyway, b
 
Hi, damfreebsd
Everything is easier on something you're already familiar with. ;)
What I think you need to do, is when you make any changes to login.conf(5), you will need to run cap_mkdb(1), before the changes are recognized. You'll probably need to at least logout ^d and log back on/in, in order to get/see any changes you've made.

HTH

--Chris
 
I solved after reading a lot I deleted all about UTF-8 and add this:
Code:
:charset=iso-8859-1:\
lang=es_ES.ISO8859-15:
to /etc/login.conf

Also I added the same to .login_conf, rebooted and now I have ñ key on urxvt(1)
but I have a question. The Spanish layout is a bit different from the latinamerican layout
is there a lang=latam_ES.ISO8859-15?
 
Hello, damfreebsd !
Glad you seem to have mostly sorted it out! I recently read a note in /usr/src/UPDATING related to locale(1). If you're on a reasonably new version of FreeBSD, it should apply to you. Do also have a look at the man(1) page for locale(1). It should also provide some good pointers. :)
As to you're specific question; I have only ever used en_US keymap. These magic settings are all located in /usr/local/share/locale/. Feel free to have a look in there, for anything that looks like it might be a match for waht you're after. Testing them should be especially easy for you, now that you know how to change them. :)

Hope this helped, and all the best to you, damfreebsd !

--Chris
 
In case you did not already spot these:
Code:
/usr/share/vt/keymaps/latinamerican.acc.kbd
/usr/share/vt/keymaps/latinamerican.kbd
vt(4) keymap files, selected in /etc/rc.conf.

Juha
 
Back
Top