You are not logged in.
Pages: 1
Hi all,
I can't seem to set the locale (pt-PT) in all virtual consoles with the latest iniscripts version.
Read the discussion about the DAEMON_LOCALE variable but not sure how it works. Chose the default "no" under /etc/rc.conf
I had to fallback to iniscripts 2010.07-2 in order to get things running properly.
Any tips/ideas on this?
Regards,
- aurocha
Offline
# DAEMON_LOCALE: Set the locale during daemon startup and during the boot
# process. If set to 'no', the C locale will be used.
So, this should be pt-PT.UTF-8 as well if you want boot messages to be output in a locale other than 'C'.
If virtual consoles aren't being set, then /etc/profile is not being read properly on login. How are you logging in and what does 'echo $LANG' output after logging in?
Offline
Hi falconindy,
And thank your for quick reply.
After logging in, the locale is set to C, not pt_PT-UTF8, as it should.
But i'll test more throughly later today as I'm currently working right now.
Regards,
- aurocha
Offline
Hi all,
Ok, had the opportunity to test, by installing initscripts 2011.02.1-1. Doesn't work.
Below, my rc.conf:
#
# /etc/rc.conf - Main Configuration for Arch Linux
#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime", any other value will result
# in the hardware clock being left untouched (useful for virtualization)
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="pt_PT.utf8"
DAEMON_LOCALE="no"
HARDWARECLOCK="localtime"
TIMEZONE="Europe/Lisbon"
KEYMAP="pt-latin9 compose.latin1"
CONSOLEFONT="lat9v-16"
CONSOLEMAP=
USECOLOR="yes"
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(powernow-k8 !snd_pcm_oss !snd_seq_oss)
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="stream"
# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# - prefix an entry in INTERFACES with a ! to disable it
# - no hyphens in your interface names - Bash doesn't like it
#
# DHCP: Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
#Static IP example
eth0="dhcp"
INTERFACES=(eth0)
WIRELESS_INTERFACE="wlan0"
WIRED_INTERFACE="eth0"
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)
# - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
# NETWORKS=()
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
# - prefix a daemon with a ! to disable it
# - prefix a daemon with a @ to start it up in the background
#
SPLASH="splashy"
# Desabilitados: !net-profiles, !network, !sensors
DAEMONS=(acpid syslog-ng dbus cpufreq smartd alsa net-auto-wired net-auto-wireless dnsmasq iptables crond laptop-script)
The variable Lang seems to be correctly set, the problem seems the keyboard configuration.
Splashy is killed during the boot process.
I'll disable it to see what's happening.
But this is the error that made me switch back to initscripts 2010.07-02.
Any ideas on this regard?
Below, output from a "export" on a console under gnome su'ed - root (su - root)
declare -x DISPLAY=":0.0"
declare -x G_BROKEN_FILENAMES="1"
declare -x HOME="/root"
declare -x J2REDIR="/usr/lib/jvm/java-6-openjdk/jre"
declare -x J2SDKDIR="/usr/lib/jvm/java-6-openjdk"
declare -x JAVA_HOME="/usr/lib/jvm/java-6-openjdk"
declare -x LANG="pt_PT.utf8"
declare -x LOGNAME="root"
declare -x MOZ_PLUGIN_PATH="/usr/lib/mozilla/plugins"
declare -x OLDPWD
declare -x PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/vendor_perl:/usr/bin/core_perl"
declare -x PROMPT_COMMAND="echo -ne \"\\033]0;\${USER}@\${HOSTNAME%%.*}:\${PWD/\$HOME/~}\\007\""
declare -x PS1="\\u: \\w # "
declare -x PS2="> "
declare -x PS3="> "
declare -x PS4="+ "
declare -x PWD="/root"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x TERM="xterm"
declare -x USER="root"
declare -x XAUTHORITY="/home/aurocha/.Xauthority"
declare -x XDG_CACHE_HOME="/root/.cache"
declare -x XDG_CONFIG_DIRS="/etc/xdg"
declare -x XDG_CONFIG_HOME="/root/.config"
declare -x XDG_DATA_DIRS="/usr/share/:/usr/local/share/"
declare -x XDG_DATA_HOME="/root/.local/share"
Any ideas on this regard?
- aurocha
Last edited by aurocha (2011-02-21 20:06:51)
Offline
Ok,
I've been testing in order to make thingks work
Found out that, under rc.conf, in the keymap section I can't use $KEYMAP="pt-latin9 console-latin1" as I was used to.
This is what I did, this is my current rc.conf:
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime", any other value will result
# in the hardware clock being left untouched (useful for virtualization)
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="pt_PT.utf8"
DAEMON_LOCALE="no"
HARDWARECLOCK="localtime"
TIMEZONE="Europe/Lisbon"
KEYMAP="pt-latin9"
CONSOLEFONT="lat9w-16"
CONSOLEMAP=
USECOLOR="yes"
And then I load compose.latin or compose.latin1 viva /etc/rc.local with
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
loadkeys -q compose.latin
Now this weirdness happens
Everytime I use an accentuated character like ã or ç - used in the portuguese language, I'm getting the corresponding escape sequence as an error.
Like:
root: ~ # ç
-bash: $'\303\247': command not found
root: ~ # ã
-bash: $'\303\243': command not found
root: ~ #
I also noticed that /etc/rc.sysinit has this and "~" here:
if [[ ${LOCALE,,} =~ utf ]]; then
stat_busy "Setting Consoles to UTF-8 mode"
# UTF-8 consoles are default since 2.6.24 kernel
# this code is needed not only for older kernels,
# but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8.
for i in /dev/tty[0-9]*; do
/usr/bin/kbd_mode -u < ${i}
printf "\033%%G" > ${i}
There, in the 1st line, is that tilde supposed to be there?
Any comments/help anyone wants to give is apprecited.
Regards,
- aurocha
Offline
if [[ ${LOCALE,,} =~ utf ]]; then stat_busy "Setting Consoles to UTF-8 mode" # UTF-8 consoles are default since 2.6.24 kernel # this code is needed not only for older kernels, # but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8. for i in /dev/tty[0-9]*; do /usr/bin/kbd_mode -u < ${i} printf "\033%%G" > ${i}
There, in the 1st line, is that tilde supposed to be there?
Any comments/help anyone wants to give is apprecited.Regards,
- aurocha
this is what I got on my fresh Arch install (in /etc/rc.sysinit ofc):
if echo "$LOCALE" | /bin/grep -qi utf ; then
stat_busy "Setting Consoles to UTF-8 mode"
# UTF-8 consoles are default since 2.6.24 kernel
# this code is needed not only for older kernels,
# but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8.
for i in /dev/tty[0-9]*; do
/usr/bin/kbd_mode -u < ${i}
printf "\033%%G" > ${i}
done
Maybe yours are old files with decprecated or hacky stuff in them;dnk what else to say, sorry
Offline
if [[ ${LOCALE,,} =~ utf ]]; then
stat_busy "Setting Consoles to UTF-8 mode"
# UTF-8 consoles are default since 2.6.24 kernel
# this code is needed not only for older kernels,
# but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8.
for i in /dev/tty[0-9]*; do
/usr/bin/kbd_mode -u < ${i}
printf "\033%%G" > ${i}
done
This is a fully up-to-date install with testing enabled.
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
i was searching how the DAEMON_LOCALE is working and found in /etc/rc.d/functions that it should not contain the exact locale "pt-PT.UTF-8" as mentioned in #2, but it should be "yes" or "YES"
/etc/rc.d/functions
if [[ $DAEMON_LOCALE =~ yes|YES && -n $LOCALE ]]; then
export LANG="${LOCALE}"
else
export LANG=C
fi
now it's correctly working for me, hope it will help
Offline
Why does this happen?
-bash: $'\303\247': command not found
~ $ ã
-bash: $'\303\243': command not found
~ $
There, the keycode is shown instead of the actual character it represents. That's odd behaviour.
The locale is utf-8. The font is default. The keymap is the correct one (pt-latin9)
Any ideas?
Regards,
- aurocha
Offline
Why does this happen?
-bash: $'\303\247': command not found ~ $ ã -bash: $'\303\243': command not found ~ $
There, the keycode is shown instead of the actual character it represents. That's odd behaviour.
The locale is utf-8. The font is default. The keymap is the correct one (pt-latin9)Any ideas?
Regards,- aurocha
nope, but i found a workaround:
In /etc/mkinitcpio.conf add keymap to Hooks
HOOKS="base udev autodetect pata scsi sata dmraid keymap filesystems"
Make sure in /etc/rc.conf that you have KEYMAP="pt-latin9"
KEYMAP="pt-latin9"
CONSOLEFONT="lat9v-16"
Run mkinitcpio -g /boot/kernel26.img
mkinitcpio -g /boot/kernel26.img
Edit /etc/rc.conf and leave KEYMAP=
KEYMAP=
CONSOLEFONT="lat9v-16"
Reboot
Offline
Hi,
I'll try that today and report back.
Regards,
- aurocha
Offline
Pages: 1