Re: [kde] Environemt for KDE programs started from the desktop icon



On Friday 18 January 2008, Frank Bures wrote:
I am having a weird problem with KDE 3.5.4.

I use modified .cshrc and .kshrc which I have been using on various
*NIXes for years. If I open a Konsole and do 'locale' I get correct
values for all relevant variables in all shells (ksh, csh, bash).
If I run 'k3b' (compiled from source) in any of those shells I get no
complains.

Now, if I open K3B by clicking on its Desktop icon, it complains about
unset locale variables, namely
"System locale charset is ANSI_X3.4-1968"

There is no option to change the shell k3b is running in by right clicking
the icon and opening Properties.

Question: How can I path the correct environmental settings onto the
K3B icon?

All programs launched through KDE, e.g. desktop icon, "run command", K-Menu,
are executed in the environment KDE itself runs in, i.e. the environment the
KDE start script "startkde" runs in.

One of the usual causes for the observed difference is that the shell running
startkde does not read the same shell configuration files since it is a login
shell and non-interactive and shells often differentiate which files they
read for different kinds of invocation.

For example bash reads /etc/profile and its local equivalent when it is
invoked as a login shell, but reads /etc/bash.bashrc and its local equivalent
when run as an interactive shell, non-login, shell, so any environment
customization in ~/.bashrc would be available in a Konsole window, but not
for the KDE session itself.

Cheers,
Kevin

--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

Attachment: signature.asc
Description: This is a digitally signed message part.

___________________________________________________
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] Environemt for KDE programs started from the desktop icon
    ... All programs launched through KDE, e.g. desktop icon, "run command", ... are executed in the environment KDE itself runs in, ... One of the usual causes for the observed difference is that the shell ...
    (KDE)
  • Re: [opensuse] what you can do with KDE3 that you cant do with KDE4.
    ... Workplace shell. ... XFile features: ... and in KDE you can define what directory an app will start in. ... I'm sire OS/2 was great in its time, ...
    (SuSE)
  • [kde] Re: How to set the KDE path?
    ... .bash_profile is for bash as the name implies. ... Would it not make sense for KDE to respect that? ... This is executed by a shell interpreter, ... The process itself then reads the environment through system API, ...
    (KDE)
  • Re: [kde] Konsole in English
    ... executes commands from the file /etc/profile, ... "When an interactive shell that is not a login shell is started, ... it is really the better way to do it since changing environment ... than KDE might be used. ...
    (KDE)
  • Re: [kde] startup, .profile, env.vars., etc.
    ... environmental variables set? ... starts a full KDE session. ... However the shell running startkde might read files during its startup, ... environment than having it started through KDM, GDM, etc. ...
    (KDE)