<<< Date Index >>>     <<< Thread Index >>>

Re: wrong charset



On Sat, May 09, 2009 at 04:09:01PM +0300, Jussi Peltola wrote:
> Remember that you can't change the xterm's locale with .profile, that
> will only change the locale within the shell the xterm runs, not in the
> xterm's environment itself.

Actually you (probably) can.  If xterm is started by a shell which is
running as the user (or from an X session that started from such a
shell), and the shell is Bash, then the shell would have sourced the
user's .bashrc file.  If you, in that file, source your .profile, then
anything you have there will take effect before X is started, and will
apply.  However, please note, DO NOT DO THAT.  If you're using SSH, it
will cause you problems.  Just put the locale settings in .bashrc
instead.

Now, this may still not be enough.  Chances are fair that the script
that starts X will be executed as /bin/sh, not /bin/bash.  In that
case, even if /bin/sh happens to be bash, the shell will not source
your rc files.  You'll need to add a line to the X start-up script
(typically something like /etc/X11/xinit/Xsession, or xinitrc) where
you source $HOME/.bashrc to get the same effect.

Unless you can not edit that file, or X starts in a very different
way on your device (which is very possible), you can make your .bashrc
file apply in that way.

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.

Attachment: pgpkih4ZSmt1f.pgp
Description: PGP signature