Konsole in English

Ryo Furue furue at hawaii.edu
Thu Oct 29 03:25:47 GMT 2009


Hi James,

Thank you for your detailed response.  On most of the things we have
discussed, I now understand what you meant and what I was missing.

There are some remaining:

| > So, in our situation, we want
| > 
| >    <OUR GOAL>
| >    .bashrc        --- LANG=C
| >    .bash_profile  --- LANG=your_native_language
| > 
| > Correct?
| > 
| > Then, our ~/.bashrc would read
| > 
| >    LANG=C; export LANG
| > 
| > and our ~/.bash_profile would read
| > 
| >    if [ -f ~/.bashrc ]; then
| >  	. ~/.bashrc
| >    fi
| > 
| >    # override what's in .bashrc
| >    LANG=your_native_language; export LANG
| > 
| > Then, OUR GOAL is achieved.  Or am I missing something? 
| > 
| This is a kludge, but it would probably work.  What you are missing is 
| that you are now setting the default language on a user basis rather 
| than a global basis.  So, I do not see it as a good solution.  If you 
| then change your LANG setting in the place where your distro put it, it 
| doesn't work.

Sorry I don't understand what you mean by

  "If you then change your LANG setting in the place where your
  distro put it, it doesn't work."

I read your sentences at least four times, but sorry I don't
understand them.

In particular, I don't know what you mean by "the place where your
distro put it".  

Are you talking about changing system-wide files?

I've never proposed to do so.  I'm talking strictly about
changing .bashrc and .bash_profile under your own home directory.
Nothing else.  So, I don't understand why you bring up "distro".
I'm not proposing to change what the distro does.

In addition,

1) "you are now setting the default language
   on a user basis rather than a global basis."

2) "So, I do not see it as a good solution."

I don't see why (1) leads to (2).

I think that (1) is a good thing.  Each user chooses her own default
language.  It's desirable.  I don't know why you want to change the
system-wide default.

So, whether it's a "kludge" or not, I don't see a shortcoming in
my solution.

| NOTE: you can't just add the "--login" to "/bin/sh" because then it 
| would try to read the ".profile" file which probably doesn't exist on a 
| Linux system and it is necessary for such a script to have (slightly) 
| different syntax.

That's a good point.  (Drifting off-topic . . .)
As a matter of fact, I use ~/.profile, writing it in a syntax
compatible with the Bourne shell.  My .bash_profile does nothing
but source it.  This is possible because bash is a superset of
the Bourne shell.  In this way, the problem you point out
does not exist.  I recommend this practice to everybody.
(For simplicity of discussion, I pretended I used .bash_profile .) 

Further drifting off-topic . . . When I write shell scripts,
I use /bin/sh and stick to the Bourne shell syntax even though
I know /bin/sh is a symbolic link to /bin/bash . . . at least
it WAS, before.  Recently the distro I use (Debian testing) switched
to dash as /bin/sh.  Thanks to my precaution, my scripts continued
to work.

| You don't see that because I didn't say that.  My concern is that most 
| users don't want to circumvent the way their distro does things.  It 
| often leads to other problems.
[. . .]
| > I've had "export LANG=C" in my ~/.bashrc for years, without having
| > any problems at all.
| > 
| Then you haven't put anything in your ".bashrc" file that should only be 
| put in your ".bash_profile". 

That's right.

| Perhaps I should have made this clearer 
| that there are some commands that tend to mess things up if run
| multiple times and, therefore, need to be in ".bash_profile".
| 
| 	FOO="$FOO:bar"
| 	export FOO
| 
| really doesn't belong in ".bashrc".

I agree.  But I don't see why you bring up that example.
What is it an example for?

It's just occurred to me that you might be talking about different
sorts of users.  I edit BOTH .bashrc and .bash_profile FOR MYSELF.
So the kind of problems you point out does not happen to me.
(Or if I made mistakes and problems did occur, I know how
 to fix them.)  So, I'm talking about those users who know
what they are doing when editing their own dot files.

On the other hand, you seem to be talking about those users
who "don't want to circumvent the way their distro does
things". . . .

I still may be misunderstanding what you mean by "to circumvent the
way their distro does things", though.  I don't see editing .bashrc
and .bash_profile as circumventing the way the distro does things.
Because .bashrc and .bash_profile are writable by the user.
That means, editing those files are normal part of the personal
configuration.  You do whatever you want to them as long as
that solves your problems.

You change your wallpaper from the one your distro provides
to the one you like.  Are you circumventing the way the distro
does things?

If you propose to edit /etc/bashrc, then I agree that's
circumventing the way the distro does things.



| 
| -- 
| James Tyrer
| 
| Linux (mostly) From Scratch
| ___________________________________________________
| This message is from the kde mailing list.
| Account management:  https://mail.kde.org/mailman/listinfo/kde.
| Archives: http://lists.kde.org/.
| More info: http://www.kde.org/faq.html.
| 
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list