Re: [Partially solved] Re: Locale errors

2009-04-14 Thread Florian Kulzer
On Tue, Apr 14, 2009 at 13:35:09 -0400, Celejar wrote:
> On Tue, 14 Apr 2009 18:56:43 +0200 Florian Kulzer wrote:
> > On Tue, Apr 14, 2009 at 12:38:56 -0400, Celejar wrote:
> > > On Mon, 13 Apr 2009 08:40:04 +0100 Bob Cox wrote:
> > 
> > [...]
> > 
> > > > Just a thought: you have anything in /etc/environment ?
> > > 
> > > Very interesting; my /etc/environment contains:
> > > 
> > > LANG="en_US.UTF-8"
> > > 
> > > [I have no idea how that got there; I'm pretty sure I didn't enter it
> > > manually.]
> > 
> > Is your system old enough so that the file could be a legacy from
> > previous runs of "dpkg-reconfigure locales"? 
> 
> Very possible; this install is more than two years old.
> 
> > > When I comment out the line, the locale output under sudo -i
> > > is correct, with no extra quotes.
> > 
> > AFAIK, /etc/environment is depreciated in favor of /etc/default/locale.
> > It seems that the new file automatically gets configured without the
> > problematic quotes around the locale names. Your problem suggests that
> > "sudo -i" still uses settings from /etc/environment, which might be a
> > bug. (I am not sure about the official Debian policy regarding
> > /etc/environment and /etc/default/locale.)
> 
> So should I report this against sudo?

I am not sure. It turns out that I did not remember an item in
NEWS.Debian.gz of the locales package correctly. Here is what it
actually says: 

locales (2.3.6-7) unstable; urgency=low

  * Locale variables are now stored in /etc/default/locale and no more
/etc/environment. The reason is that Debian Policy forbids modifying
configuration files of other packages, and /etc/environment is a
configuration file for PAM.
Make sure to remove old definitions from /etc/environment, this file
is no more modified for the reason explained above.

 -- Denis Barbier   Tue, 11 Apr 2006 21:24:13 +0200

That sounds like /etc/environment is only depreciated for locales, but
not necessarily for other packages. The fact that "sudo -i" honors the
contents of /etc/environment is consistent with the information in its
manpage.

-- 
Regards,| http://users.icfo.es/Florian.Kulzer
  Florian   |


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [Partially solved] Re: Locale errors

2009-04-14 Thread Celejar
On Tue, 14 Apr 2009 18:56:43 +0200
Florian Kulzer  wrote:

> On Tue, Apr 14, 2009 at 12:38:56 -0400, Celejar wrote:
> > On Mon, 13 Apr 2009 08:40:04 +0100 Bob Cox wrote:
> 
> [...]
> 
> > > Just a thought: you have anything in /etc/environment ?
> > 
> > Very interesting; my /etc/environment contains:
> > 
> > LANG="en_US.UTF-8"
> > 
> > [I have no idea how that got there; I'm pretty sure I didn't enter it
> > manually.]
> 
> Is your system old enough so that the file could be a legacy from
> previous runs of "dpkg-reconfigure locales"? 

Very possible; this install is more than two years old.

> > When I comment out the line, the locale output under sudo -i
> > is correct, with no extra quotes.
> 
> AFAIK, /etc/environment is depreciated in favor of /etc/default/locale.
> It seems that the new file automatically gets configured without the
> problematic quotes around the locale names. Your problem suggests that
> "sudo -i" still uses settings from /etc/environment, which might be a
> bug. (I am not sure about the official Debian policy regarding
> /etc/environment and /etc/default/locale.)

So should I report this against sudo?

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [Partially solved] Re: Locale errors

2009-04-14 Thread Florian Kulzer
On Tue, Apr 14, 2009 at 12:38:56 -0400, Celejar wrote:
> On Mon, 13 Apr 2009 08:40:04 +0100 Bob Cox wrote:

[...]

> > Just a thought: you have anything in /etc/environment ?
> 
> Very interesting; my /etc/environment contains:
> 
> LANG="en_US.UTF-8"
> 
> [I have no idea how that got there; I'm pretty sure I didn't enter it
> manually.]

Is your system old enough so that the file could be a legacy from
previous runs of "dpkg-reconfigure locales"? 

> When I comment out the line, the locale output under sudo -i
> is correct, with no extra quotes.

AFAIK, /etc/environment is depreciated in favor of /etc/default/locale.
It seems that the new file automatically gets configured without the
problematic quotes around the locale names. Your problem suggests that
"sudo -i" still uses settings from /etc/environment, which might be a
bug. (I am not sure about the official Debian policy regarding
/etc/environment and /etc/default/locale.)

-- 
Regards,| http://users.icfo.es/Florian.Kulzer
  Florian   |


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [Partially solved] Re: Locale errors

2009-04-14 Thread Celejar
On Mon, 13 Apr 2009 13:10:54 +0200
Vincent Lefevre  wrote:

> On 2009-04-12 23:14:52 -0400, Celejar wrote:
> > And here we have the problem!  I noticed that when I log in as root
> > directly, either to a getty or via 'su', then I don't see the problem.
> > It only appears in root shells obtained with 'sudo -i'.  'locale' in
> > the latter case gives:
> > 
> > ~# 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.UTF-8"
> > LC_CTYPE=""en_US.UTF-8""
> > LC_NUMERIC=""en_US.UTF-8""
> > LC_TIME=""en_US.UTF-8""
> > LC_COLLATE=""en_US.UTF-8""
> > LC_MONETARY=""en_US.UTF-8""
> > LC_MESSAGES=""en_US.UTF-8""
> > LC_PAPER=""en_US.UTF-8""
> > LC_NAME=""en_US.UTF-8""
> > LC_ADDRESS=""en_US.UTF-8""
> > LC_TELEPHONE=""en_US.UTF-8""
> > LC_MEASUREMENT=""en_US.UTF-8""
> > LC_IDENTIFICATION=""en_US.UTF-8""
> > LC_ALL=
> 
> Could you run the following command as root?
> 
>   grep -r 'LANG="en_US.UTF-8"' /etc /root
> 
> Perhaps one of the config files has LANG="en_US.UTF-8", which should
> be normally interpreted by the shell, but some other tool dealing with
> the environment (perhaps PAM-related) does that wrong.

As I noted in another message in this thread, the problem seems to be
with my /etc/environment:

~# grep -r 'LANG="en_US.UTF-8"' /etc /root

...

/etc/environment:LANG="en_US.UTF-8"

Commenting this line out solves the problem.  I have no idea how that
line (or the file itself - apt-file and dpkg -S don't show anything) got
there; I'm pretty sure that some script wrote it, and that I didn't
enter it manually.  Is this a bug in pam_env, sudo, or something else?

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [Partially solved] Re: Locale errors

2009-04-14 Thread Celejar
On Mon, 13 Apr 2009 08:40:04 +0100
Bob Cox  wrote:

> On Sun, Apr 12, 2009 at 20:24:27 -0700, Kelly Clowers 
> (kelly.clow...@gmail.com) wrote: 
> 
> > On Sun, Apr 12, 2009 at 20:14, Celejar  wrote:
> > 
> > 
> > 
> > > So you seem to be correct; for some reason, in the sudo shell, the LC*
> > > variables are getting extra quotes.  Any idea why?  [There's nothing
> > > that looks interesting in root's '.bashrc'; it's basically empty.]
> > 
> > Something to do with the preservation or lack thereof  of environmental
> > variables in sudo? Try putting the env vars in root's .bashrc, maybe?
> > 
> > I don't really know, I use straight "sudo $command" not "sudo -i"
> 
> Just a thought: you have anything in /etc/environment ?

Very interesting; my /etc/environment contains:

LANG="en_US.UTF-8"

[I have no idea how that got there; I'm pretty sure I didn't enter it
manually.]

When I comment out the line, the locale output under sudo -i
is correct, with no extra quotes.

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [Partially solved] Re: Locale errors

2009-04-14 Thread Vincent Lefevre
On 2009-04-14 09:45:18 +0200, Vincent Lefevre wrote:
> If you replace LANG="C" by LANG=C in /etc/environment, can you still
> observe the same problem?

In fact, it seems that pam_env (used by "sudo -i") assumes that
double-quotes are part of the value, hence the problem. See

  https://bugs.launchpad.net/ubuntu/+source/pam/+bug/251795

Other information with:

  http://www.google.com/search?q=%22%2Fetc%2Fenvironment%22+quotes

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [Partially solved] Re: Locale errors

2009-04-14 Thread Vincent Lefevre
On 2009-04-13 19:21:23 -0400, Rick Thomas wrote:
> The problem is that if I remove the lines setting LANG and LANGUAGE from 
> /root/.bashrc
> I get the following when I enter superuser via "sudo -i" ...
>
>> rbtho...@greybox:~$ sudo -i
>> greybox:~# 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="C"
>> LANGUAGE="C"
>> LC_CTYPE=""C""
>> LC_NUMERIC=""C""
>> LC_TIME=""C""
>> LC_COLLATE=""C""
>> LC_MONETARY=""C""
>> LC_MESSAGES=""C""
>> LC_PAPER=""C""
>> LC_NAME=""C""
>> LC_ADDRESS=""C""
>> LC_TELEPHONE=""C""
>> LC_MEASUREMENT=""C""
>> LC_IDENTIFICATION=""C""
>> LC_ALL=
>> greybox:~#

Thanks. I understand the problem a bit better. So, it seems that if
LANG is not set at "sudo -i" time, something sets it to "C" (with
the double-quotes) instead of just C. The additional double-quotes
in the LC_ lines in locale output is just a consequence: this means
that these environment variables are not set and the default values
(from other settings, e.g. LANG) is "C" (with the double-quotes).

To be sure, after the "sudo -i", can you type the following?

  env | grep LANG

Note that you can reproduce the problem with:

$ export LANG='"C"'
$ locale

Now, you have to find why LANG gets this wrong value (ditto for
LANGUAGE, but this doesn't have a consequence on the other variables).

If you replace LANG="C" by LANG=C in /etc/environment, can you still
observe the same problem?

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [Partially solved] Re: Locale errors

2009-04-13 Thread Rick Thomas


On Apr 13, 2009, at 6:39 PM, Vincent Lefevre wrote:


On 2009-04-13 15:14:36 -0400, Rick Thomas wrote:

rbtho...@greybox:~$ locale
LANG=C
LANGUAGE=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
rbtho...@greybox:~$

The problem started after a recent bunch of upgrades.  I have no good
way of telling which one caused it.


The above output is normal. I don't understand your problem.


The problem is that if I remove the lines setting LANG and LANGUAGE  
from /root/.bashrc

I get the following when I enter superuser via "sudo -i" ...


rbtho...@greybox:~$ sudo -i
greybox:~# 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="C"
LANGUAGE="C"
LC_CTYPE=""C""
LC_NUMERIC=""C""
LC_TIME=""C""
LC_COLLATE=""C""
LC_MONETARY=""C""
LC_MESSAGES=""C""
LC_PAPER=""C""
LC_NAME=""C""
LC_ADDRESS=""C""
LC_TELEPHONE=""C""
LC_MEASUREMENT=""C""
LC_IDENTIFICATION=""C""
LC_ALL=
greybox:~#



However, if I enter superuser via "sudo su -" I get ...


rbtho...@greybox:~$ sudo su -
greybox:~# locale
LANG=C
LANGUAGE=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
greybox:~#



Curiouser and curiouser...


Rick


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org




Re: [Partially solved] Re: Locale errors

2009-04-13 Thread Vincent Lefevre
On 2009-04-13 15:14:36 -0400, Rick Thomas wrote:
> rbtho...@greybox:~$ locale
> LANG=C
> LANGUAGE=C
> LC_CTYPE="C"
> LC_NUMERIC="C"
> LC_TIME="C"
> LC_COLLATE="C"
> LC_MONETARY="C"
> LC_MESSAGES="C"
> LC_PAPER="C"
> LC_NAME="C"
> LC_ADDRESS="C"
> LC_TELEPHONE="C"
> LC_MEASUREMENT="C"
> LC_IDENTIFICATION="C"
> LC_ALL=
> rbtho...@greybox:~$
>
> The problem started after a recent bunch of upgrades.  I have no good  
> way of telling which one caused it.

The above output is normal. I don't understand your problem.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [Partially solved] Re: Locale errors

2009-04-13 Thread Rick Thomas


On Apr 13, 2009, at 3:40 AM, Bob Cox wrote:

On Sun, Apr 12, 2009 at 20:24:27 -0700, Kelly Clowers (kelly.clow...@gmail.com 
) wrote:



On Sun, Apr 12, 2009 at 20:14, Celejar  wrote:



So you seem to be correct; for some reason, in the sudo shell, the  
LC*

variables are getting extra quotes.  Any idea why?  [There's nothing
that looks interesting in root's '.bashrc'; it's basically empty.]


Something to do with the preservation or lack thereof  of  
environmental

variables in sudo? Try putting the env vars in root's .bashrc, maybe?

I don't really know, I use straight "sudo $command" not "sudo -i"


Just a thought: you have anything in /etc/environment ?

On one box here I have:

$ cat /etc/environment
LANG=en_GB.UTF-8
LANGUAGE=en_GB.UTF-8
LC_ALL=en_GB.UTF-8
LC_TYPE=en_GB.UTF-8

(which, as far as it goes, matches the output of the 'locale'  
command).


I *think* I added that by hand to fix a similar problem to the one  
being

discussed but cannot remember now.


I modified /etc/environment long ago (long before this problem  
started) as follows.


rbtho...@greybox:~$ cat /etc/environment
LANG="C"
LANGUAGE="C"
rbtho...@greybox:~$ diff /etc/environment /etc/environment.ORIG
1,2c1,2
< LANG="C"
< LANGUAGE="C"
---
> LANG="en_US"
> LANGUAGE="en_US:en_GB:en"

For comparison...

rbtho...@greybox:~$ locale
LANG=C
LANGUAGE=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
rbtho...@greybox:~$

The problem started after a recent bunch of upgrades.  I have no good  
way of telling which one caused it.



On Apr 13, 2009, at 7:10 AM, Vincent Lefevre wrote:


Could you run the following command as root?

 grep -r 'LANG="en_US.UTF-8"' /etc /root

Perhaps one of the config files has LANG="en_US.UTF-8", which should
be normally interpreted by the shell, but some other tool dealing with
the environment (perhaps PAM-related) does that wrong.




Note that the changes to /root/.bashrc are added by me to work around  
the problem.



rbtho...@greybox:~$ sudo -i
greybox:~# grep -r 'LANG=' /etc /root
/etc/default/gdm:#LANG=
/etc/default/locale:#LANG=en_US
/etc/default/locale:LANG=C
grep: /etc/alternatives/gnome-text-editor: No such file or directory
grep: /etc/alternatives/java.1.gz: No such file or directory
/etc/init.d/pcscd:value=$(egrep "^[^#]*LANG=" $ENV_FILE | tail -n1 |  
cut -d= -f2)

/etc/init.d/pcscd:eval LANG=$value
/etc/init.d/exim4:LANG=C
/etc/init.d/mountoverflowtmp:   if LANG=C LC_ALL=C mount | \
grep: /etc/rc0.d/K20inetd: No such file or directory
/etc/rc0.d/K20exim4:LANG=C
/etc/rc0.d/K50pcscd:value=$(egrep "^[^#]*LANG=" $ENV_FILE | tail -n1 |  
cut -d= -f2)

/etc/rc0.d/K50pcscd:eval LANG=$value
/etc/rc0.d/K63mountoverflowtmp: if LANG=C LC_ALL=C mount | \
grep: /etc/rc1.d/K20inetd: No such file or directory
/etc/rc1.d/K20exim4:LANG=C
grep: /etc/rc1.d/K20festival: No such file or directory
/etc/rc1.d/K50pcscd:value=$(egrep "^[^#]*LANG=" $ENV_FILE | tail -n1 |  
cut -d= -f2)

/etc/rc1.d/K50pcscd:eval LANG=$value
grep: /etc/rc2.d/S20inetd: No such file or directory
/etc/rc2.d/S20exim4:LANG=C
grep: /etc/rc2.d/S20festival: No such file or directory
/etc/rc2.d/S50pcscd:value=$(egrep "^[^#]*LANG=" $ENV_FILE | tail -n1 |  
cut -d= -f2)

/etc/rc2.d/S50pcscd:eval LANG=$value
grep: /etc/rc3.d/S20inetd: No such file or directory
/etc/rc3.d/S20exim4:LANG=C
grep: /etc/rc3.d/S20festival: No such file or directory
/etc/rc3.d/S50pcscd:value=$(egrep "^[^#]*LANG=" $ENV_FILE | tail -n1 |  
cut -d= -f2)

/etc/rc3.d/S50pcscd:eval LANG=$value
grep: /etc/rc4.d/S20inetd: No such file or directory
/etc/rc4.d/S20exim4:LANG=C
grep: /etc/rc4.d/S20festival: No such file or directory
/etc/rc4.d/S50pcscd:value=$(egrep "^[^#]*LANG=" $ENV_FILE | tail -n1 |  
cut -d= -f2)

/etc/rc4.d/S50pcscd:eval LANG=$value
grep: /etc/rc5.d/S20inetd: No such file or directory
/etc/rc5.d/S20exim4:LANG=C
grep: /etc/rc5.d/S20festival: No such file or directory
/etc/rc5.d/S50pcscd:value=$(egrep "^[^#]*LANG=" $ENV_FILE | tail -n1 |  
cut -d= -f2)

/etc/rc5.d/S50pcscd:eval LANG=$value
grep: /etc/rc6.d/K20inetd: No such file or directory
/etc/rc6.d/K20exim4:LANG=C
/etc/rc6.d/K50pcscd:value=$(egrep "^[^#]*LANG=" $ENV_FILE | tail -n1 |  
cut -d= -f2)

/etc/rc6.d/K50pcscd:eval LANG=$value
/etc/rc6.d/K63mountoverflowtmp: if LANG=C LC_ALL=C mount | \
/etc/rcS.d/S37mountoverflowtmp: if LANG=C LC_ALL=C mount | \
/etc/environment:LANG="C"
grep: /etc/fonts/conf.d/30-debconf-no-bitmaps.conf: No such file or  
directory

/etc/environment.ORIG:LANG="en_US"
/etc/gdm/XKeepsCrashing:  LANG=C
grep: /etc/ssl/certs/ 
Verisign_Class_1_Public_Primary_OCSP_Responder.pem: No such file or  
directory
grep: /etc/ssl/certs/ 
Verisign_Class_2_Public_Primary_OCSP_Responder.pem: No such file or  
directory
grep: /etc/ssl/certs/ 
Verisign_Class_3_Public_Primary_OCSP_Responder.pem: No such file or  
directory
grep: /etc/ssl/certs/Verisign_Secure_

Re: [Partially solved] Re: Locale errors

2009-04-13 Thread Vincent Lefevre
On 2009-04-12 23:14:52 -0400, Celejar wrote:
> And here we have the problem!  I noticed that when I log in as root
> directly, either to a getty or via 'su', then I don't see the problem.
> It only appears in root shells obtained with 'sudo -i'.  'locale' in
> the latter case gives:
> 
> ~# 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.UTF-8"
> LC_CTYPE=""en_US.UTF-8""
> LC_NUMERIC=""en_US.UTF-8""
> LC_TIME=""en_US.UTF-8""
> LC_COLLATE=""en_US.UTF-8""
> LC_MONETARY=""en_US.UTF-8""
> LC_MESSAGES=""en_US.UTF-8""
> LC_PAPER=""en_US.UTF-8""
> LC_NAME=""en_US.UTF-8""
> LC_ADDRESS=""en_US.UTF-8""
> LC_TELEPHONE=""en_US.UTF-8""
> LC_MEASUREMENT=""en_US.UTF-8""
> LC_IDENTIFICATION=""en_US.UTF-8""
> LC_ALL=

Could you run the following command as root?

  grep -r 'LANG="en_US.UTF-8"' /etc /root

Perhaps one of the config files has LANG="en_US.UTF-8", which should
be normally interpreted by the shell, but some other tool dealing with
the environment (perhaps PAM-related) does that wrong.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [Partially solved] Re: Locale errors

2009-04-13 Thread Vincent Lefevre
I don't know if this is directly related, but I've just reported
the following bug:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523882
  sudo -i doesn't unset some environment variables

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [Partially solved] Re: Locale errors

2009-04-13 Thread Vincent Lefevre
On 2009-04-13 01:07:44 -0400, Rick Thomas wrote:
> I ran into this too.   Same problem -- extra set of quotes in the  
> environment variables after doing "sudo -i" .

I don't have this problem.

Note that my files /etc/environment and /etc/default/locale are empty,
and /root/.bashrc and /root/.profile don't change the environment
variables related to the locales.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [Partially solved] Re: Locale errors

2009-04-13 Thread Bob Cox
On Sun, Apr 12, 2009 at 20:24:27 -0700, Kelly Clowers (kelly.clow...@gmail.com) 
wrote: 

> On Sun, Apr 12, 2009 at 20:14, Celejar  wrote:
> 
> 
> 
> > So you seem to be correct; for some reason, in the sudo shell, the LC*
> > variables are getting extra quotes.  Any idea why?  [There's nothing
> > that looks interesting in root's '.bashrc'; it's basically empty.]
> 
> Something to do with the preservation or lack thereof  of environmental
> variables in sudo? Try putting the env vars in root's .bashrc, maybe?
> 
> I don't really know, I use straight "sudo $command" not "sudo -i"

Just a thought: you have anything in /etc/environment ?

On one box here I have:

$ cat /etc/environment
LANG=en_GB.UTF-8
LANGUAGE=en_GB.UTF-8
LC_ALL=en_GB.UTF-8
LC_TYPE=en_GB.UTF-8

(which, as far as it goes, matches the output of the 'locale' command).

I *think* I added that by hand to fix a similar problem to the one being
discussed but cannot remember now.

-- 
Bob Cox.  Stoke Gifford, near Bristol, UK.
Please reply to the list only.  Do NOT send copies directly to me.
Debian on the NSLU2: http://bobcox.com/slug/


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [Partially solved] Re: Locale errors

2009-04-12 Thread Rick Thomas
I ran into this too.   Same problem -- extra set of quotes in the  
environment variables after doing "sudo -i" .


I put



LANG=C
LANGUAGE=C
export LANG
export LANGUAGE


at the end of /root/.bashrc and the problem went away.  But now that  
two of us have seen it, I think there's a bug in "sudo -i".


Rick

On Apr 12, 2009, at 11:24 PM, Kelly Clowers wrote:


On Sun, Apr 12, 2009 at 20:14, Celejar  wrote:



So you seem to be correct; for some reason, in the sudo shell, the  
LC*

variables are getting extra quotes.  Any idea why?  [There's nothing
that looks interesting in root's '.bashrc'; it's basically empty.]


Something to do with the preservation or lack thereof  of  
environmental

variables in sudo? Try putting the env vars in root's .bashrc, maybe?

I don't really know, I use straight "sudo $command" not "sudo -i"


Cheers,
Kelly Clowers


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org




--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org




Re: [Partially solved] Re: Locale errors

2009-04-12 Thread Kelly Clowers
On Sun, Apr 12, 2009 at 20:14, Celejar  wrote:



> So you seem to be correct; for some reason, in the sudo shell, the LC*
> variables are getting extra quotes.  Any idea why?  [There's nothing
> that looks interesting in root's '.bashrc'; it's basically empty.]

Something to do with the preservation or lack thereof  of environmental
variables in sudo? Try putting the env vars in root's .bashrc, maybe?

I don't really know, I use straight "sudo $command" not "sudo -i"


Cheers,
Kelly Clowers


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



[Partially solved] Re: Locale errors

2009-04-12 Thread Celejar
On Sun, 12 Apr 2009 21:14:50 -0500
"Boyd Stephen Smith Jr."  wrote:

> In <20090412201956.993b4446.cele...@gmail.com>, Celejar wrote:
> >~# man cp
> >man: can't set the locale; make sure $LC_* and $LANG are correct
> >
> >Or, while running aptitude:
> >
> >perl: warning: Setting locale failed.
> >perl: warning: Please check that your locale settings:
> > LANGUAGE = (unset),
> > LC_ALL = (unset),
> > LANG = ""en_US.UTF-8""
> >are supported and installed on your system.
> >perl: warning: Falling back to the standard locale ("C").
> >/usr/bin/mandb: can't set the locale; make sure $LC_* and $LANG are
> > correct
> >
> >I've tried 'dpkg-reconfigure locales'
> 
> I've seen it before, and the dpkg-reconfigure usually addresses it.
> 
> >, and even purging and
> >reinstalling locales, to no effect.
> 
> That usually doesn't help if the dpkg-reconfigure doesn't.
> 
> >Is anyone else seeing
> >this?  Is this a bug, or some misconfiguration on my system?  Note that
> >my regular user account works fine.
> 
> I usually run local-gen manually then log out and log back in and things 
> work.

Doesn't help.
 
> Actually, looking at your error message in more detail, it looks like your 
> LANG variable is set improperly.  For some reason your LANG variable is set 
> to '"en_US.UTF-8"'--including the double-quotes.  It should be set to 
> 'en_US.UTF-8'.  Double check your root shell startup files and see if 
> something could be wrong there.

And here we have the problem!  I noticed that when I log in as root
directly, either to a getty or via 'su', then I don't see the problem.
It only appears in root shells obtained with 'sudo -i'.  'locale' in
the latter case gives:

~# 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.UTF-8"
LC_CTYPE=""en_US.UTF-8""
LC_NUMERIC=""en_US.UTF-8""
LC_TIME=""en_US.UTF-8""
LC_COLLATE=""en_US.UTF-8""
LC_MONETARY=""en_US.UTF-8""
LC_MESSAGES=""en_US.UTF-8""
LC_PAPER=""en_US.UTF-8""
LC_NAME=""en_US.UTF-8""
LC_ADDRESS=""en_US.UTF-8""
LC_TELEPHONE=""en_US.UTF-8""
LC_MEASUREMENT=""en_US.UTF-8""
LC_IDENTIFICATION=""en_US.UTF-8""
LC_ALL=

While 'locale' in the former case gives:

# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

So you seem to be correct; for some reason, in the sudo shell, the LC*
variables are getting extra quotes.  Any idea why?  [There's nothing
that looks interesting in root's '.bashrc'; it's basically empty.]

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org