You are not logged in.

#1 2009-01-27 16:01:35

sk4os
Member
Registered: 2009-01-22
Posts: 6

[Solved]Diferents LOCALES variables betwin terminal and Xorg

Hello:

Im trying to change my keyboard to spanish (es) in Xorg, in terminal it is OK.

When im in the terminal (not in Xorg):

$locale

LANG=es_ES.utf8
LC_CTYPE="es_ES"
LC_NUMERIC="es_ES"
LC_TIME="es_ES"
LC_COLLATE="es_ES"
LC_MONETARY="es_ES"
LC_MESSAGES="es_ES"
LC_PAPER="es_ES"
LC_NAME="es_ES"
LC_ADDRESS="es_ES"
LC_TELEPHONE="es_ES"
LC_MEASUREMENT="es_ES"
LC_IDENTIFICATION="es_ES"
LC_ALL=es_ES

But in Xorg:

bash-3.2$ locale         
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE=C
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

My /etc/rc.conf is:

LOCALE="es_ES.utf8"                                                         
HARDWARECLOCK="UTC"                                                         
USEDIRECTISA="no"                                                           
TIMEZONE="Madrid/Europe"                                                    
KEYMAP="es"                                                                 
CONSOLEFONT=                                                                
CONSOLEMAP=                                                                 
USECOLOR="yes"

/etc/locale.gen:

es_ES.UTF-8 UTF-8                                                                
es_ES ISO-8859-1                                                                 
es_ES@euro ISO-8859-15

And /etc/X11/xorg.conf

Section "ServerLayout"

# Serial Mouse not detected
# USB Mouse not detected   
    Identifier     "Xorg Configured"
    Screen      0  "Screen0" 0 0    
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "touchpad" "CorePointer"  
EndSection    

Section "Files"

# Additional fonts: Locale, Gimp, TTF...
#       FontPath     "/usr/share/lib/X11/fonts/latin2/75dpi"
#       FontPath     "/usr/share/lib/X11/fonts/latin2/100dpi"
# True type and type1 fonts are also handled via xftlib, see /etc/X11/XftConfig!
                                                                                
    #RgbPath         "/usr/share/X11/rgb"                                       
    ModulePath      "/usr/lib/xorg/modules"                                     
    FontPath        "/usr/share/fonts/misc:unscaled"                            
    FontPath        "/usr/share/fonts/misc"                                     
    FontPath        "/usr/share/fonts/75dpi:unscaled"                           
    FontPath        "/usr/share/fonts/75dpi"                                    
    FontPath        "/usr/share/fonts/100dpi:unscaled"                          
    FontPath        "/usr/share/fonts/100dpi"                                   
    FontPath        "/usr/share/fonts/PEX"                                      
    FontPath        "/usr/share/fonts/cyrillic"                                 
    FontPath        "/usr/share/fonts/Type1"                                    
    FontPath        "/usr/share/fonts/ttf/western"                              
    FontPath        "/usr/share/fonts/ttf/decoratives"                          
    FontPath        "/usr/share/fonts/truetype"                                 
    FontPath        "/usr/share/fonts/truetype/openoffice"                      
    FontPath        "/usr/share/fonts/truetype/ttf-bitstream-vera"              
    FontPath        "/usr/share/fonts/latex-ttf-fonts"                          
    FontPath        "/usr/share/fonts/defoma/CID"                               
    FontPath        "/usr/share/fonts/defoma/TrueType"                          
EndSection                                                                      

Section "Module"
    Load           "ddc"  # ddc probing of monitor
    Load           "dbe"                          
    Load           "extmod"                       
    Load           "glx"                          
    Load           "bitmap" # bitmap-fonts        
    #Load           "type1"                       
    Load           "freetype"                     
    #Load           "record"                      
    Load           "synaptics"                    
EndSection                                        

Section "ServerFlags"
    Option         "AllowMouseOpenFail" "true"
    Option         "Xinerama" "0"             
EndSection                                    

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "keyboard" 
    Option         "CoreKeyboard"
    Option         "XkbLayout" "es" 
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc105"
                                     
EndSection

I also have this warning:  Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.
Thanks for the help and sorry for my english:lol:

Last edited by sk4os (2009-01-28 01:14:44)

Offline

#2 2009-01-27 18:19:00

Surgat_
Member
Registered: 2007-08-08
Posts: 317

Re: [Solved]Diferents LOCALES variables betwin terminal and Xorg

I think it's due to the Hotplugging extension to Xorg. You have to write a file in /etc/hal/fdi/policy/10-keymap.fdi like this:

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

Me pasó a mí también wink

Offline

#3 2009-01-28 01:13:44

sk4os
Member
Registered: 2009-01-22
Posts: 6

Re: [Solved]Diferents LOCALES variables betwin terminal and Xorg

Muchas gracias, pensé que nunca lo solucionaria!
Thanks you, that solved the problem!

Offline

#4 2009-01-28 20:35:22

timttmy
Member
From: UK
Registered: 2008-12-01
Posts: 53

Re: [Solved]Diferents LOCALES variables betwin terminal and Xorg

I had the same problem but with a gb layout, and I have put up with it for months (I have googled for a fix on and off). It was the last piece of my arch linux puzzle to figure out, and thanks to this thread and most of all Surgat_ it is complete. smile
Thank You.


This Is My Truth, Tell Me Yours

Offline

#5 2014-05-09 21:27:25

jawbonegroove
Member
From: pdx / usa
Registered: 2013-07-05
Posts: 7

Re: [Solved]Diferents LOCALES variables betwin terminal and Xorg

Not sure how I ended up with this problem (sony vaio sve), and 5 years later, but thanks Surgat_!

I was getting compile and gtk warnings, and I found my locale variables were being set to "3" in xorg.

Offline

Board footer

Powered by FluxBB