Environemt for KDE programs started from the desktop icon

Kevin Krammer kevin.krammer at gmx.at
Fri Jan 18 20:12:16 GMT 2008


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde/attachments/20080118/2b5aa49e/attachment.sig>
-------------- next 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.


More information about the kde mailing list