Re: [kde] Konsole in English



James and Dotan,

| > Which file is that? I know that it is probably .profile or
| > .bash_profile but I cannot test because this is a work machine. I need
| > to know which file _only_ affects Konsole and other terminal
| > emulators, but WILL NOT affect other KDE and non-KDE GUI applications
| >
| You are correct that this won't work.
|
| First, it isn't really correct to change the environment in the
| ".bashrc" file.

I don't see why. Remember Dotan's requirements. The menus of
konsole should be in a different language; the command lines should
be in English. .bashrc is a very good place to achieve that.

| The environment should be changed with the
| ".bash_profile" script.

If you want them to be effective everywhere, yes.
But, if you want them to be effective only on the command line of bash
(and its children), then .bashrc is the place. This is one of the
reasons why we have two files, .bashrc and .bash_profile,
in the first place.

Suppose that we export LANG=C in .bashrc . There is one problem
remaining. Env. vars. are inherited by children. So, if you
invoke konsole from the command line, like so,

$ konsole &

then it sees LANG=C and its menus will be in English.

To comprehensively solve this problem, you might want to
always invoke konsole as

$ LANG=your_native_language konsole

or

$ env LANG=your_native_language konsole

To make this automatic, you can edit your konsole.desktop file and replace

Exec=konsole

with

Exec=env LANG=your_native_language konsole

This is an alternative to the following method:

| What you can do is to start Konsole with a scrip (e.g. konsole_english):
|
| ------8<------8<------8<------8<------8<------8<------8<------8<------
| #! /bin/bash
|
| LANG="C"
| export LANG
|
| exec konsole
|
| ------8<------8<------8<------8<------8<------8<------8<------8<------
|
| and modify the:
|
| $KDEDIR/share/applications/kde4/konsole.desktop
|
| file to read (for example)
|
| Exec=konsole_english

Regards,
Ryo
___________________________________________________
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.



Relevant Pages

  • Re: [kde] Konsole in English
    ... konsole should be in a different language; ... .bashrc is a very good place to achieve that. ... executes commands from the file /etc/profile, ... "When an interactive shell that is not a login shell is started, ...
    (KDE)
  • Re: .bashrc vs .bash_profile: sourcing scripts
    ... > I am running RH9 and use bash through Konsole all the time. ... during account creation. ... terminal or xterm does not execute .bash_profile but does source .bashrc. ... the new session inherits environment variables which have been ...
    (comp.unix.shell)
  • Which files do what: .bashrc and friends
    ... When starting Konsole ... if I want a certain command to be run ...
    (Debian-User)
  • .bashrc vs .bash_profile: sourcing scripts
    ... I am running RH9 and use bash through Konsole all the time. ... I have found that whenever I open Konsole or su from a Konsole session ... This has led me to source .bashrc from .bash_profile and comment out ...
    (comp.unix.shell)
  • Re: [opensuse] KDE 4.2 konsole options
    ... Does anyone know where these profile ... Except that ShowMenuBar appears to be bugged - even without command line args, ... --noframe is redundant as KDE 4 konsole never shows the extra frame, ...
    (SuSE)