Pagina 1 di 1

Keymap tastiera in inglese nonostante modifiche profile.d

Inviato: mar 17 nov 2009, 1:16
da sberla54
Ciao ragazzi.

Questa nuova Slackware 13 mi sta deludendo e facendo innervosire come un pazzo. Vi giuro che, fra i problemi di Kde4, la mancanza di alcuni programmi che mi servono assolutamente (e non riesco ad installare ne' da sorgente ne' da precompilato per 12.2) mi sta facendo venir voglia di mettere su una distro commerciale fino al prossimo rilascio di Slack.

A parte questo, sotto Fluxbox non riesco a settare il keymap della tastiera in italiano.

Ho modificato cosi' lang.sh:

Codice: Seleziona tutto

#!/bin/sh
# Set the system locale.  (no, we don't have a menu for this ;-)
# For a list of locales which are supported by this machine, type:
#   locale -a

# en_US is the Slackware default locale:
#export LANG=en_US
export LANG=it_IT@euro

# 'C' is the old Slackware (and UNIX) default, which is 127-bit
# ASCII with a charmap setting of ANSI_X3.4-1968.  These days,
# it's better to use en_US or another modern $LANG setting to
# support extended character sets.
#export LANG=C

# There is also support for UTF-8 locales, but be aware that
# some programs are not yet able to handle UTF-8 and will fail to
# run properly.  In those cases, you can set LANG=C before
# starting them.  Still, I'd avoid UTF unless you actually need it.
#export LANG=en_US.UTF-8

# Another option for en_US:
#export LANG=en_US.ISO8859-1

# One side effect of the newer locales is that the sort order
# is no longer according to ASCII values, so the sort order will
# change in many places.  Since this isn't usually expected and
# can break scripts, we'll stick with traditional ASCII sorting.
# If you'd prefer the sort algorithm that goes with your $LANG
# setting, comment this out.
export LC_COLLATE=C

# End of /etc/profile.d/lang.sh
e cosi' lang.csh:

Codice: Seleziona tutto

#!/bin/csh
# Set the system locale.  (no, we don't have a menu for this ;-)
# For a list of locales which are supported by this machine, type:
#   locale -a

# en_US is the Slackware default locale:
#setenv LANG en_US
setenv LANG it_IT

# 'C' is the old Slackware (and UNIX) default, which is 127-bit
# ASCII with a charmap setting of ANSI_X3.4-1968.  These days,
# it's better to use en_US or another modern $LANG setting to
# support extended character sets.
#setenv LANG C

# There is also support for UTF-8 locales, but be aware that
# some programs are not yet able to handle UTF-8 and will fail to
# run properly.  In those cases, you can set LANG=C before
# starting them.  Still, I'd avoid UTF unless you actually need it.
#setenv LANG en_US.UTF-8

# Another option for en_US:
#setenv LANG en_US.ISO8859-1

# One side effect of the newer locales is that the sort order
# is no longer according to ASCII values, so the sort order will
# change in many places.  Since this isn't usually expected and
# can break scripts, we'll stick with traditional ASCII sorting.
# If you'd prefer the sort algorithm that goes with your $LANG
# setting, comment this out.
setenv LC_COLLATE C

# End of /etc/profile.d/lang.csh
Nonostante questo non vedo nessun cambiamento e continuo ad avere la tastiera americana.

Ho provato anche loadkeys it ma mi da un errore strano che ora non ho sotto mano.

Qualche idea?
Questa non m'era proprio mai capitata....non riesco ad usare Fluxbox cosi'....e' un supplizio...

Grazie!

Re: Keymap tastiera in inglese nonostante modifiche profile.d

Inviato: mar 17 nov 2009, 1:21
da JohnnyMnemonic
Con la 13 e il nuovo xorg non c'è più bisogno di un file di configurazione, cioè di xorg.conf, per l'ambiente grafico.
Però se non sbaglio si può creare per forzare qualche opzione, magari è il tuo caso specificando la tastiera italiana, anche se non so dirti di preciso quali parti vanno messe per una configurazione minimale

Re: Keymap tastiera in inglese nonostante modifiche profile.d

Inviato: mar 17 nov 2009, 1:36
da sberla54
Questa cosa che m'hai detto m'ha fatto venire in mente che, forse, poteva essere colpa mia, che invece un xorg.conf l'avevo inserito, ricopiandolo da Slack 12.2....non me ne ricordo neanche il motivo...forse avevo avuto qualche problema iniziale che avevo erroneamente attribuito alla mancanza di xorg.conf.

Avevo messo questo:

Codice: Seleziona tutto

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 1.0  (buildmeister@builder57)  Sun Dec 14 20:59:00 PST 2008

# File generated by xf86config.
###########################################################################
#
# xorg.conf - 24.12.2008 - slackware 12.2 - sberla54
#
# contiene:
# driver video nvidia closed - rotellina - IMPS2 - refresh custom - risoluzione 1280x1024
# tastiera ita 105 - definizione mouse 800dpi per RX300
# testato con driver nvidia NVIDIA-Linux-x86-180.17-pkg1.run
# 
###########################################################################
#
# Copyright (c) 1999 by The XFree86 Project, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# 
# Except as contained in this notice, the name of the XFree86 Project shall
# not be used in advertising or otherwise to promote the sale, use or other
# dealings in this Software without prior written authorization from the
# XFree86 Project.
#
# **********************************************************************
# Refer to the XF86Config(4/5) man page for details about the format of 
# this file.
# **********************************************************************
# NOTE:  This is a NEW IMPROVED version of XF86Config-fbdev that uses the vesa
# driver instead of the fbdev driver.  Thanks to Kenneth Fanyo who pointed
# this out to me. :)
# This XF86Config file is designed for use with the VESA framebuffer.
# This generic interface should work with nearly all video cards
# (although not every card will support every resolution).
# With the new driver, it should no longer be required to have frame buffer
# support in the kernel, or to run it on the console.
#
# Enjoy! :)
# -- volkerdi@slackware.com
#
# **********************************************************************
# Module section -- this  section  is used to specify
# which dynamically loadable modules to load.
# **********************************************************************
#
# **********************************************************************
# Files section.  This allows default font and rgb paths to be set
# **********************************************************************
# **********************************************************************
# Server flags section.
# **********************************************************************
# **********************************************************************
# Input devices
# **********************************************************************
# **********************************************************************
# Core keyboard's InputDevice section
# **********************************************************************
# Setto la tastiera con la mappatura italiana a 105 tasti.
# **********************************************************************
# Core Pointer's InputDevice section
# **********************************************************************
# **********************************************************************
# Monitor section
# **********************************************************************
# Valori di default rilevati dall'installazione:
#Section "Monitor"
#
#    Identifier  "My Monitor"
#    HorizSync   31.5 - 50.0
#    VertRefresh 40-90
#
#EndSection
# **********************************************************************
# Graphics device section
# **********************************************************************
# Any number of graphics device sections may be present
# **********************************************************************
# Screen sections
# **********************************************************************
# **********************************************************************
# ServerLayout sections.
# **********************************************************************
# Any number of ServerLayout sections may be present.  Each describes
# the way multiple screens are organised.  A specific ServerLayout
# section may be specified from the X server command line with the
# "-layout" option.  In the absence of this, the first section is used.
# When now ServerLayout section is present, the first Screen section
# is used alone.

Section "ServerLayout"

# The Identifier line must be present
# Each Screen line specifies a Screen section name, and optionally
# the relative position of other screens.  The four names after
# primary screen name are the screens to the top, bottom, left and right
# of the primary screen.  In this example, screen 2 is located to the
# right of screen 1.
# Each InputDevice line specifies an InputDevice section name and
# optionally some options to specify the way the device is to be
# used.  Those options include "CorePointer", "CoreKeyboard" and
# "SendCoreEvents".
    Identifier     "Simple Layout"
    Screen         "Screen 1" 0 0
    InputDevice    "Mouse1" "CorePointer"
    InputDevice    "Keyboard1" "CoreKeyboard"
EndSection

Section "Files"

# The location of the RGB database.  Note, this is the name of the
# file minus the extension (like ".txt" or ".db").  There is normally
# no need to change the default.
# Multiple FontPath entries are allowed (which are concatenated together),
# as well as specifying multiple comma-separated entries in one FontPath
# command (or a combination of both methods)
# 
# If you don't have a floating point coprocessor and emacs, Mosaic or other
# programs take long to start up, try moving the Type1 and Speedo directory
# to the end of this list (or comment them out).
# 
# ModulePath can be used to set a search path for the X server modules.
# The default path is shown here.
#    ModulePath "/usr/lib/xorg/modules"
    RgbPath         "/usr/share/X11/rgb"
    FontPath        "/usr/share/fonts/local/"
    FontPath        "/usr/share/fonts/misc/"
    FontPath        "/usr/share/fonts/OTF/"
    FontPath        "/usr/share/fonts/TTF/"
    FontPath        "/usr/share/fonts/Type1/"
    FontPath        "/usr/share/fonts/CID/"
    FontPath        "/usr/share/fonts/Speedo/"
    FontPath        "/usr/share/fonts/75dpi/:unscaled"
    FontPath        "/usr/share/fonts/100dpi/:unscaled"
    FontPath        "/usr/share/fonts/75dpi/"
    FontPath        "/usr/share/fonts/100dpi/"
    FontPath        "/usr/share/fonts/cyrillic/"
EndSection

Section "Module"

# This loads the DBE extension module.
# This loads the miscellaneous extensions module, and disables
# initialisation of the XFree86-DGA extension within that module.
# This loads the font modules
# This loads the GLX module
    Load           "dbe"  	# Double buffer extension
    SubSection     "extmod"
        Option         "omit xfree86-dga"   # don't initialise the DGA extension
    EndSubSection
    Load           "type1"
    Load           "freetype"
    #Load        "speedo"
    Load           "glx"
EndSection

Section "InputDevice"
    Identifier     "Keyboard1"
    Driver         "kbd"
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "it"
EndSection

Section "InputDevice"

# Identifier and driver
    Identifier     "Mouse1"
    Driver         "mouse"
    Option         "Protocol" "IMPS/2"
# Riconoscimento rotellina:
    Option         "ZAxisMapping" "4 5"
    Option         "Device" "/dev/mouse"
# Risoluzione del Logitech RX300
    Option         "Resolution" "800"
EndSection

Section "Monitor"
    Identifier     "My Monitor"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 75.0
EndSection

Section "Device"

    #VideoRam    4096
    # Insert Clocks lines here if appropriate
    Identifier     "VESA Framebuffer"
    Driver         "nv"
EndSection

Section "Screen"
    Identifier     "Screen 1"
    Device         "VESA Framebuffer"
    Monitor        "My Monitor"
    DefaultDepth    24
    SubSection     "Display"
        Depth       8
        Modes      "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
    SubSection     "Display"
        Depth       16
        Modes      "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
    SubSection     "Display"
        Depth       24
        Modes      "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
    SubSection     "Display"
        Depth       32
        Modes      "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
EndSection
Nel quale era presente anche una sezione relativa al layout della tastiera, ammesso che sia corretto per la nuova Slack:

Codice: Seleziona tutto

Section "InputDevice"
    Identifier     "Keyboard1"
    Driver         "kbd"
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "it"
EndSection
Pero' niente...il problema rimaneva.

Ora ho provato a toglierlo e ad avviare Fluxbox senza xorg.conf ma il layout e' ancora americano :(

A me mi pare di sognare O_O
Vedere la Slackware che fa delle pippe come queste O_O

Che sia colpa di qualche impostazione di Fluxbox?
Il terminale pre-window manager ha il layout corretto...

Re: Keymap tastiera in inglese nonostante modifiche profile.d

Inviato: mar 17 nov 2009, 1:49
da phobos3576
sberla54 ha scritto:A me mi pare di sognare O_O
Vedere la Slackware che fa delle pippe come queste O_O

Che sia colpa di qualche impostazione di Fluxbox?
Il terminale pre-window manager ha il layout corretto...
Sicuramente è colpa di FluxBox.

Su KDE4 io ho persino tolto la sezione relativa alla tastiera su xorg.conf e tutto funziona perfettamente, compreso il layout in italiano; ovviamente, ho impostato il LOCALE=it in lang.sh e lang.csh.

Ma su FluxBox esiste un centro di controllo che ti permetta di impostare anche la KeyMap in italiano?

Re: Keymap tastiera in inglese nonostante modifiche profile.d

Inviato: mar 17 nov 2009, 3:06
da Dani
setxkbmap it
Per evitare di dover ripetere il comando ad ogni avvio del server grafico puoi aprire ~/.fluxbox/startup ed aggiungere "setxkbmap it &" prima di "exec /usr/bin/fluxbox".

Re: Keymap tastiera in inglese nonostante modifiche profile.d

Inviato: mar 17 nov 2009, 9:18
da brainvision
Ma non bastava aggiungere l'opzione

Codice: Seleziona tutto

        Option "AllowEmptyInput "FALSE"
nella sezione Server Layout? Così facendo i device e le loro impostazioni che inseriamo in xorg.conf verranno effettivamente utilizzati..

Re: Keymap tastiera in inglese nonostante modifiche profile.d

Inviato: mar 17 nov 2009, 10:00
da conraid
Sberla non so se il problema è il "solito", ma un po' di escremeditazione leggendo la documentazione ufficiale non fa mai male ;-)

visto che l'ho tradotta
http://www.slacky.eu/wikislack/index.ph ... ti_in_Xorg

e dimmi se funziona

Per la console

Codice: Seleziona tutto

$ cat /etc/rc.d/rc.keymap
#!/bin/sh
# Load the keyboard map.  More maps are in /usr/share/kbd/keymaps.
if [ -x /usr/bin/loadkeys ]; then
 /usr/bin/loadkeys it.map
fi
controlla di averlo così

Re: Keymap tastiera in inglese nonostante modifiche profile.d

Inviato: mar 17 nov 2009, 13:24
da sberla54
setxkbmap it
Per evitare di dover ripetere il comando ad ogni avvio del server grafico puoi aprire ~/.fluxbox/startup ed aggiungere "setxkbmap it &" prima di "exec /usr/bin/fluxbox".
Grande! Questo funziona!
L'ho inserito in .xinitrc, dove inserisco tutto cio' che deve partire all'avvio di Fluxbox.
Grazie!
Ma come mai questa novita? Non ho mai dovuto fare nulla di simile...

Piccolo OT: tu i comandi che devono avviarsi assieme a Fluxbox le metti in ~/.fluxbox/startup?
Ed in .xinitrc cos'hai?
Per la console
Codice: Seleziona tutto
$ cat /etc/rc.d/rc.keymap
#!/bin/sh
# Load the keyboard map. More maps are in /usr/share/kbd/keymaps.
if [ -x /usr/bin/loadkeys ]; then
/usr/bin/loadkeys it.map
fi
controlla di averlo così
Sisi Conraid, ce l'ho cosi!

Ma non bastava aggiungere l'opzione
Codice: Seleziona tutto
Option "AllowEmptyInput "FALSE"
nella sezione Server Layout? Così facendo i device e le loro impostazioni che inseriamo in xorg.conf verranno effettivamente utili
Altro piccolo OT: ma voi xorg.conf lo avete messo o non lo avete messo?
Ed ora, quindi, qual'e' il file che configura Xorg? Come fa ad andare senza un file di configurazione? O_O

Re: Keymap tastiera in inglese nonostante modifiche profile.d

Inviato: mar 17 nov 2009, 13:40
da conraid
sberla54 ha scritto: Altro piccolo OT: ma voi xorg.conf lo avete messo o non lo avete messo?
Ed ora, quindi, qual'e' il file che configura Xorg? Come fa ad andare senza un file di configurazione? O_O
mmm... ti sei perso qualche passaggio mi sa :-)

Grazie ad HAL, e se leggi quel documento che ti ho linkato vedi che basta modificare i file di hal per mettere la tastiera in italiano, se vuoi usare xorg.conf devi disabilitare HAL (da xorg.conf stesso)

xorg.conf serve per impostare cose altrimenti ancora non possibile, come forzare i driver nvidia per esempio

per la tastiera in italiano prova a creare un file /etc/hal/fdi/policy/10osvendor/10-keymap.fdi così

Codice: Seleziona tutto

<?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>

      <!-- Restore Ctrl-Alt-Bksp Xserver Zapping -->
      <merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>

      <merge key="input.xkb.layout" type="string">it</merge>
      <merge key="input.xkb.variant" type="string" />
    </match>
  </device>
naturlmente togli il comando setxkbmap it e riavvia

fammi sapere

Re: Keymap tastiera in inglese nonostante modifiche profile.d

Inviato: mar 17 nov 2009, 15:14
da mohaa
Due possibilà

Con HAL

Codice: Seleziona tutto

$ mkdir -p /etc/hal/fdi/policy/10osvendor
$ cp -p /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/10osvendor
Apri il nuovo file (/etc/hal/fdi/policy/10osvendor/10-keymap.fdi) con un qualsiai editor e cambia questo (circa linea 20)

Codice: Seleziona tutto

      <merge key="input.xkb.layout" type="string">us</merge>
      <merge key="input.xkb.variant" type="string" />
in questo

Codice: Seleziona tutto

      <merge key="input.xkb.layout" type="string">it</merge>
      <merge key="input.xkb.variant" type="string" />
o in questo se hai una tastiera alternativa

Codice: Seleziona tutto

      <merge key="input.xkb.layout" type="string">fr</merge>
      <merge key="input.xkb.variant" type="string">una_qualsiasi_alternativa</merge>
Con xorg.conf

Codice: Seleziona tutto

$ un_qualsiasi_editor /etc/X11/xorg.conf
Nella parte ServerLayout e solo in quella, inserire :

Codice: Seleziona tutto

  Option         "AllowEmptyInput" "false"
  Option         "AutoAddDevices" "false"
servono tutte e due
Dopodiche, si modifica xorg.conf per inserci la tastiera che desidera.

PS1 : declino ogni responsabilità per i damage rilativi all'uso di questi umili consigli
PS2 : il tutto viene fatto dal'utente root (vedere PS1)

Re: Keymap tastiera in inglese nonostante modifiche profile.d

Inviato: mer 18 nov 2009, 2:32
da Dani
sberla54 ha scritto: Ma come mai questa novita? Non ho mai dovuto fare nulla di simile...

Piccolo OT: tu i comandi che devono avviarsi assieme a Fluxbox le metti in ~/.fluxbox/startup?
Ed in .xinitrc cos'hai?
Non so se è una novità perchè il mio ~/.fluxbox/startup l'ho importato dalle precedenti installazioni di slackware.
Comunque i comandi da avviare assieme a fluxbox li metto in startup, .xinitrc non lo modifico perchè viene generato da xwmconfig quando cambio desktop.