Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[keyboard] problema en bash, rarisimo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Spanish
View previous topic :: View next topic  
Author Message
Dabuti
n00b
n00b


Joined: 14 Oct 2010
Posts: 9

PostPosted: Thu Oct 14, 2010 5:27 pm    Post subject: [keyboard] problema en bash, rarisimo Reply with quote

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
View user's profile Send private message
cameta
Veteran
Veteran


Joined: 04 Aug 2004
Posts: 1321

PostPosted: Thu Oct 14, 2010 6:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
Dabuti
n00b
n00b


Joined: 14 Oct 2010
Posts: 9

PostPosted: Thu Oct 14, 2010 8:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
cameta
Veteran
Veteran


Joined: 04 Aug 2004
Posts: 1321

PostPosted: Thu Oct 14, 2010 8:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Dabuti
n00b
n00b


Joined: 14 Oct 2010
Posts: 9

PostPosted: Thu Oct 14, 2010 9:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
cameta
Veteran
Veteran


Joined: 04 Aug 2004
Posts: 1321

PostPosted: Thu Oct 14, 2010 9:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
cameta
Veteran
Veteran


Joined: 04 Aug 2004
Posts: 1321

PostPosted: Thu Oct 14, 2010 9:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Dabuti
n00b
n00b


Joined: 14 Oct 2010
Posts: 9

PostPosted: Thu Oct 14, 2010 10:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
cameta
Veteran
Veteran


Joined: 04 Aug 2004
Posts: 1321

PostPosted: Fri Oct 15, 2010 10:10 am    Post subject: Reply with quote

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
View user's profile Send private message
Dabuti
n00b
n00b


Joined: 14 Oct 2010
Posts: 9

PostPosted: Sat Oct 16, 2010 10:28 am    Post subject: Reply with quote

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
View user's profile Send private message
quilosaq
Veteran
Veteran


Joined: 22 Dec 2009
Posts: 1522

PostPosted: Sat Oct 16, 2010 3:15 pm    Post subject: Reply with quote

Mira si te configura bien el teclado haciéndolo manualmente.
Code:
# loadkeys es
Back to top
View user's profile Send private message
Dabuti
n00b
n00b


Joined: 14 Oct 2010
Posts: 9

PostPosted: Sat Oct 16, 2010 5:46 pm    Post subject: Reply with quote

quilosaq wrote:
Mira si te configura bien el teclado haciéndolo manualmente.
Code:
# loadkeys es


Si, carga el mapa /usr/share/keymaps/i386/qwerty/es.map.gz y lo hace correctamente :S
Back to top
View user's profile Send private message
quilosaq
Veteran
Veteran


Joined: 22 Dec 2009
Posts: 1522

PostPosted: Sat Oct 16, 2010 6:39 pm    Post subject: Reply with quote

Comprueba que tienes configurado tu sistema para que el el servicio keymaps se cargue durante el arranque
Code:
rc-status boot
Si no lo está lo añades con
Code:
# rc-update add keymaps boot
Back to top
View user's profile Send private message
Dabuti
n00b
n00b


Joined: 14 Oct 2010
Posts: 9

PostPosted: Sat Oct 16, 2010 8:50 pm    Post subject: Reply with quote

quilosaq wrote:
Comprueba que tienes configurado tu sistema para que el el servicio keymaps se cargue durante el arranque
Code:
rc-status boot
Si 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
View user's profile Send private message
quilosaq
Veteran
Veteran


Joined: 22 Dec 2009
Posts: 1522

PostPosted: Sat Oct 16, 2010 10:25 pm    Post subject: Reply with quote

¿Te ocurre sólo cuando entras como root o también con cualquier otro usuario?
Back to top
View user's profile Send private message
Dabuti
n00b
n00b


Joined: 14 Oct 2010
Posts: 9

PostPosted: Sat Oct 16, 2010 11:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
quilosaq
Veteran
Veteran


Joined: 22 Dec 2009
Posts: 1522

PostPosted: Sat Oct 16, 2010 11:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
Dabuti
n00b
n00b


Joined: 14 Oct 2010
Posts: 9

PostPosted: Sun Oct 17, 2010 10:46 am    Post subject: Reply with quote

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
View user's profile Send private message
quilosaq
Veteran
Veteran


Joined: 22 Dec 2009
Posts: 1522

PostPosted: Sun Oct 17, 2010 2:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
esteban_conde
Veteran
Veteran


Joined: 04 Jun 2003
Posts: 1670

PostPosted: Sun Oct 17, 2010 6:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
quilosaq
Veteran
Veteran


Joined: 22 Dec 2009
Posts: 1522

PostPosted: Sun Oct 17, 2010 8:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Spanish All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum