View previous topic :: View next topic |
Author |
Message |
Dabuti n00b
Joined: 14 Oct 2010 Posts: 9
|
Posted: Thu Oct 14, 2010 5:27 pm Post subject: [keyboard] problema en bash, rarisimo |
|
|
Buenas a todos, me ocurre algo rarísimo tengo 2 pc's con gentoo un sobremesa y un portatil, practicamente uso lo mismo en ambos, el caso que en el poratil no consigo poder escribir acentos eñes simbolo de € etc en bash tty pero si que leo todo a la perfeccion, otra cosa curiosa es que cuando pide el login en la tty puedo escribir estos caracteres especiales, pero una vez logeado no. Si alguien sabe de que puede ser se lo agradecería mucho, llevo mas de 1 mes intentando solucionarlo y nada :S |
|
Back to top |
|
|
cameta Veteran
Joined: 04 Aug 2004 Posts: 1329
|
Posted: Thu Oct 14, 2010 6:54 pm Post subject: |
|
|
Que tienes en:
/etc/conf.d/keymaps
/etc/rc.conf
y que te dice el comando
locale _________________ Si algo falla LEE el jodido manual, Si sigue fallando LEE BIEN el jodido manual. |
|
Back to top |
|
|
Dabuti n00b
Joined: 14 Oct 2010 Posts: 9
|
Posted: Thu Oct 14, 2010 8:23 pm Post subject: |
|
|
cameta wrote: | Que tienes en:
/etc/conf.d/keymaps
/etc/rc.conf
y que te dice el comando
locale |
/etc/conf.d/keymaps
Code: |
tux2duo ~ # cat /etc/conf.d/keymaps
# /etc/conf.d/keymaps
# Use KEYMAP to specify the default console keymap. There is a complete tree
# of keymaps in /usr/share/keymaps to choose from.
KEYMAP="es euro2"
CONSOLEFONT="lat9w-16"
# Should we first load the 'windowkeys' console keymap? Most x86 users will
# say "yes" here. Note that non-x86 users should leave it as "no".
SET_WINDOWKEYS="yes"
FIX_EURO="yes"
# The maps to load for extended keyboards. Most users will leave this as is.
EXTENDED_KEYMAPS=""
EXTENDED_KEYMAPS="backspace keypad euro"
# Tell dumpkeys(1) to interpret character action codes to be
# from the specified character set.
# This only matters if you set UNICODE="yes" in /etc/rc.conf.
# For a list of valid sets, run `dumpkeys --help`
#DUMPKEYS_CHARSET="ISO-8859-15"
|
/etc/rc.conf
Code: |
tux2duo ~ # cat /etc/rc.conf
# /etc/rc.conf: Global startup script configuration settings
# UNICODE specifies whether you want to have UNICODE support in the console.
# If you set to yes, please make sure to set a UNICODE aware CONSOLEFONT and
# KEYMAP in the /etc/conf.d/consolefont and /etc/conf.d/keymaps config files.
UNICODE="yes"
# Set EDITOR to your preferred editor.
# You may use something other than what is listed here.
EDITOR="/bin/nano"
#EDITOR="/usr/bin/vim"
#EDITOR="/usr/bin/emacs"
CONSOLEFONT="lat9w-16"
# DISPLAYMANAGER has moved to /etc/conf.d/xdm
# XSESSION is a new variable to control what window manager to start
# default with X if run with xdm, startx or xinit. The default behavior
# is to look in /etc/X11/Sessions/ and run the script in matching the
# value that XSESSION is set to. The support scripts are smart enough to
# look in all bin directories if it cant find a match in /etc/X11/Sessions/,
# so setting it to "enlightenment" can also work. This is basically used
# as a way for the system admin to configure a default system wide WM,
# allthough it will work if the user export XSESSION in his .bash_profile, etc.
#
# NOTE: 1) this behaviour is overridden when a ~/.xinitrc exists, and startx
# is called.
# 2) even if ~/.xsession exists, if XSESSION can be resolved, it will
# be executed rather than ~/.xsession, else KDM breaks ...
#
# Defaults depending on what you install currently include:
#
# Gnome - will start gnome-session
# kde-<version> - will start startkde (look in /etc/X11/Sessions/)
# Xfce4 - will start a XFCE4 session
# Xsession - will start a terminal and a few other nice apps
XSESSION="Gnome"
|
locale:
Code: |
tux2duo ~ # locale
LANG=es_ES.UTF-8
LC_CTYPE=es_ES.UTF-8
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE=C
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=
|
|
|
Back to top |
|
|
cameta Veteran
Joined: 04 Aug 2004 Posts: 1329
|
Posted: Thu Oct 14, 2010 8:48 pm Post subject: |
|
|
Yo tengo esto
Code: | # /etc/rc.conf: Global startup script configuration settings
# UNICODE specifies whether you want to have UNICODE support in the console.
# If you set to yes, please make sure to set a UNICODE aware CONSOLEFONT and
# KEYMAP in the /etc/conf.d/consolefont and /etc/conf.d/keymaps config files.
UNICODE="yes"
# Set EDITOR to your preferred editor.
# You may use something other than what is listed here.
EDITOR="/bin/nano"
#EDITOR="/usr/bin/vim"
#EDITOR="/usr/bin/emacs"
# DISPLAYMANAGER has moved to /etc/conf.d/xdm
# XSESSION is a new variable to control what window manager to start
# default with X if run with xdm, startx or xinit. The default behavior
# is to look in /etc/X11/Sessions/ and run the script in matching the
# value that XSESSION is set to. The support scripts are smart enough to
# look in all bin directories if it cant find a match in /etc/X11/Sessions/,
# so setting it to "enlightenment" can also work. This is basically used
# as a way for the system admin to configure a default system wide WM,
# allthough it will work if the user export XSESSION in his .bash_profile, etc.
#
# NOTE: 1) this behaviour is overridden when a ~/.xinitrc exists, and startx
# is called.
# 2) even if ~/.xsession exists, if XSESSION can be resolved, it will
# be executed rather than ~/.xsession, else KDM breaks ...
#
# Defaults depending on what you install currently include:
#
# Gnome - will start gnome-session
# kde-<version> - will start startkde (look in /etc/X11/Sessions/)
# Xfce4 - will start a XFCE4 session
# Xsession - will start a terminal and a few other nice apps
#XSESSION="Gnome"
|
Code: | # /etc/conf.d/keymaps
# Use KEYMAP to specify the default console keymap. There is a complete tree
# of keymaps in /usr/share/keymaps to choose from.
KEYMAP="es"
# Should we first load the 'windowkeys' console keymap? Most x86 users will
# say "yes" here. Note that non-x86 users should leave it as "no".
SET_WINDOWKEYS="no"
# The maps to load for extended keyboards. Most users will leave this as is.
EXTENDED_KEYMAPS=""
#EXTENDED_KEYMAPS="backspace keypad euro"
# Tell dumpkeys(1) to interpret character action codes to be
# from the specified character set.
# This only matters if you set UNICODE="yes" in /etc/rc.conf.
# For a list of valid sets, run `dumpkeys --help`
DUMPKEYS_CHARSET=""
|
_________________ Si algo falla LEE el jodido manual, Si sigue fallando LEE BIEN el jodido manual. |
|
Back to top |
|
|
Dabuti n00b
Joined: 14 Oct 2010 Posts: 9
|
Posted: Thu Oct 14, 2010 9:09 pm Post subject: |
|
|
He probado a poner todo igual que el tuyo, pero nada sigue igual. Ya te digo que el teclado salvo en las tty y el emulador de terminal de las X escribe todos los caracteres bien, nose... es super extraño no consigo encontrar el problema |
|
Back to top |
|
|
cameta Veteran
Joined: 04 Aug 2004 Posts: 1329
|
Posted: Thu Oct 14, 2010 9:47 pm Post subject: |
|
|
Este par de archivos son para configurar el teclado cuando te encuentras fuera del entorno Grafico.
Dentro del entorno grafico hay que hacer esto:
Configurando su teclado
Para configurar y usar un teclado internacional, puede copiar el contenido de /usr/share/doc/hal-*/*/use-estonian-layout.fdi.bz2 a /etc/hal/fdi/policy/10-xinput-configuration.fdi:
Listado de Código 4.2: Usando un fichero de configuración existente
# bzcat /usr/share/doc/hal-*/*/use-estonian-layout.fdi.bz2 >
/etc/hal/fdi/policy/10-xinput-configuration.fdi
Ahora puede simplemente editar 10-xinput-configuration.fdi y cambiar el modelo de teclado Estonio (ee) al suyo, como Gran Betraña (gb) o Polonia (pl) <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keymap">
<append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
</match>
<match key="info.capabilities" contains="input.keys">
<merge key="input.xkb.rules" type="string">base</merge>
<!-- If we're using Linux, we use evdev by default (falling back to
keyboard otherwise). -->
<merge key="input.xkb.model" type="string">keyboard</merge>
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
string="Linux">
<merge key="input.xkb.model" type="string">evdev</merge>
</match>
<merge key="input.xkb.layout" type="string">es</merge>
<merge key="input.xkb.variant" type="string" />
</match>
</device>
</deviceinfo>
Cuando haya terminado, ejecute /etc/init.d/hald restart como root para asegurarse de que HAL toma los cambios de su fichero de configuración.
Te queda algo como esto: _________________ Si algo falla LEE el jodido manual, Si sigue fallando LEE BIEN el jodido manual. |
|
Back to top |
|
|
cameta Veteran
Joined: 04 Aug 2004 Posts: 1329
|
Posted: Thu Oct 14, 2010 9:47 pm Post subject: |
|
|
Code: | <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keymap">
<append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
</match>
<match key="info.capabilities" contains="input.keys">
<merge key="input.xkb.rules" type="string">base</merge>
<!-- If we're using Linux, we use evdev by default (falling back to
keyboard otherwise). -->
<merge key="input.xkb.model" type="string">keyboard</merge>
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
string="Linux">
<merge key="input.xkb.model" type="string">evdev</merge>
</match>
<merge key="input.xkb.layout" type="string">es</merge>
<merge key="input.xkb.variant" type="string" />
</match>
</device>
</deviceinfo> |
_________________ Si algo falla LEE el jodido manual, Si sigue fallando LEE BIEN el jodido manual. |
|
Back to top |
|
|
Dabuti n00b
Joined: 14 Oct 2010 Posts: 9
|
Posted: Thu Oct 14, 2010 10:01 pm Post subject: |
|
|
cameta wrote: | Code: | <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keymap">
<append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
</match>
<match key="info.capabilities" contains="input.keys">
<merge key="input.xkb.rules" type="string">base</merge>
<!-- If we're using Linux, we use evdev by default (falling back to
keyboard otherwise). -->
<merge key="input.xkb.model" type="string">keyboard</merge>
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
string="Linux">
<merge key="input.xkb.model" type="string">evdev</merge>
</match>
<merge key="input.xkb.layout" type="string">es</merge>
<merge key="input.xkb.variant" type="string" />
</match>
</device>
</deviceinfo> |
|
Ahí no tengo problema ninguno, en el entorno gráfico funciona perfectamente, mi problema es en modo consola, en las tty (uso bash) leo todo correctamente, pero no puedo escribir caracteres especiales como € ñ ç á é etc... |
|
Back to top |
|
|
cameta Veteran
Joined: 04 Aug 2004 Posts: 1329
|
Posted: Fri Oct 15, 2010 10:10 am Post subject: |
|
|
Sólo se me ocurre que al tratarse de un portatil el mapa es no le sirve.
Prueba con el mapa es-cp850 en /etc/conf.d/keymaps a ver que ocurre.
KEYMAP="es-cp850"
Pon tambíen una foto del teclado de tu portatil si puedes. Eso puede darnos pistas a ver si no es un teclado qwerty. _________________ Si algo falla LEE el jodido manual, Si sigue fallando LEE BIEN el jodido manual. |
|
Back to top |
|
|
Dabuti n00b
Joined: 14 Oct 2010 Posts: 9
|
Posted: Sat Oct 16, 2010 10:28 am Post subject: |
|
|
cameta wrote: | Sólo se me ocurre que al tratarse de un portatil el mapa es no le sirve.
Prueba con el mapa es-cp850 en /etc/conf.d/keymaps a ver que ocurre.
KEYMAP="es-cp850"
Pon tambíen una foto del teclado de tu portatil si puedes. Eso puede darnos pistas a ver si no es un teclado qwerty. |
No hay manera , te pongo la foto por aquí del teclado:
http://amd264.dyndns.org/DSC00018.jpg
La verdad que no se me ocurre nada más que hacer. Si te viene alguna idea o alguna información que quieras saber y pueda ayudar... avisa please
Gracias. |
|
Back to top |
|
|
quilosaq Veteran
Joined: 22 Dec 2009 Posts: 1524
|
Posted: Sat Oct 16, 2010 3:15 pm Post subject: |
|
|
Mira si te configura bien el teclado haciéndolo manualmente. |
|
Back to top |
|
|
Dabuti n00b
Joined: 14 Oct 2010 Posts: 9
|
Posted: Sat Oct 16, 2010 5:46 pm Post subject: |
|
|
quilosaq wrote: | Mira si te configura bien el teclado haciéndolo manualmente. |
Si, carga el mapa /usr/share/keymaps/i386/qwerty/es.map.gz y lo hace correctamente :S |
|
Back to top |
|
|
quilosaq Veteran
Joined: 22 Dec 2009 Posts: 1524
|
Posted: Sat Oct 16, 2010 6:39 pm Post subject: |
|
|
Comprueba que tienes configurado tu sistema para que el el servicio keymaps se cargue durante el arranqueSi no lo está lo añades con Code: | # rc-update add keymaps boot |
|
|
Back to top |
|
|
Dabuti n00b
Joined: 14 Oct 2010 Posts: 9
|
Posted: Sat Oct 16, 2010 8:50 pm Post subject: |
|
|
quilosaq wrote: | Comprueba que tienes configurado tu sistema para que el el servicio keymaps se cargue durante el arranqueSi no lo está lo añades con Code: | # rc-update add keymaps boot |
|
Si que lo carga :S
Code: |
tux2duo dabuti # rc-status boot
Runlevel: boot
alsasound [ started ]
bootmisc [ started ]
checkfs [ started ]
checkroot [ started ]
clock [ started ]
consolefont [ started ]
hostname [ started ]
keymaps [ started ]
localmount [ started ]
modules [ started ]
net.lo [ started ]
rmnologin [ started ]
urandom [ started ]
|
|
|
Back to top |
|
|
quilosaq Veteran
Joined: 22 Dec 2009 Posts: 1524
|
Posted: Sat Oct 16, 2010 10:25 pm Post subject: |
|
|
¿Te ocurre sólo cuando entras como root o también con cualquier otro usuario? |
|
Back to top |
|
|
Dabuti n00b
Joined: 14 Oct 2010 Posts: 9
|
Posted: Sat Oct 16, 2010 11:01 pm Post subject: |
|
|
quilosaq wrote: | ¿Te ocurre sólo cuando entras como root o también con cualquier otro usuario? |
Con cualquier usuario, justo cuando pide el login: puedo escribir todo tipo de caracteres pero una vez logeado sea el usuario que sea, no puedo escribir los caracteres especiales € acentos ñ etc... |
|
Back to top |
|
|
quilosaq Veteran
Joined: 22 Dec 2009 Posts: 1524
|
Posted: Sat Oct 16, 2010 11:09 pm Post subject: |
|
|
Yo diría que tienes algún script, que se ejecuta automáticamente, y que está cargando un mapa de teclado erróneo. ¿Qué archivos tienes en /etc/profile.d? |
|
Back to top |
|
|
Dabuti n00b
Joined: 14 Oct 2010 Posts: 9
|
Posted: Sun Oct 17, 2010 10:46 am Post subject: |
|
|
quilosaq wrote: | Yo diría que tienes algún script, que se ejecuta automáticamente, y que está cargando un mapa de teclado erróneo. ¿Qué archivos tienes en /etc/profile.d? |
Pues... poca cosa:
Code: |
tux2duo ~ # ls /etc/profile.d/
bash-completion.sh java-config-2.csh java-config-2.sh
|
|
|
Back to top |
|
|
quilosaq Veteran
Joined: 22 Dec 2009 Posts: 1524
|
Posted: Sun Oct 17, 2010 2:20 pm Post subject: |
|
|
Corrijo mi último mensaje. No puede ser debido a la ejecución incorrecta de un loadkeys porque loadkeys necesita permisos de root y en este caso le pasa a todos los usuarios.
¿Qué carácter te sale cuando pulsas la tecla ñ? ¿Y componiendo la á? |
|
Back to top |
|
|
esteban_conde Veteran
Joined: 04 Jun 2003 Posts: 1670
|
Posted: Sun Oct 17, 2010 6:42 pm Post subject: |
|
|
Quote: | esteban@localhost ~ $ loadkeys es
Loading /usr/share/keymaps/i386/olpc/es.map.gz
conjeturando iso-8859-1 diaeresis
Couldn't get a file descriptor referring to the console |
quilosaq wrote: | No puede ser debido a la ejecución incorrecta de un loadkeys porque loadkeys necesita permisos de root |
Si te fijas el comando de arriba lo he ejecutado como usuario. _________________ Saludos a tod@s, Esteban. |
|
Back to top |
|
|
quilosaq Veteran
Joined: 22 Dec 2009 Posts: 1524
|
Posted: Sun Oct 17, 2010 8:14 pm Post subject: |
|
|
Tienes razón esteban_conde, si que se puede ejecutar como usuario normal aunque he visto casos en los que da mensajes de error si ya hay un mapa de teclado cargado. |
|
Back to top |
|
|
|