Bug 251073

Summary: support expanding variable in the definition of environment when the session is started
Product: [Applications] konsole Reporter: Harald Nikolisin <hochglanz>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: CONFIRMED ---    
Severity: wishlist CC: adaptee, cpigat242, dckorah
Priority: NOR    
Version: 2.4.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Harald Nikolisin 2010-09-13 12:37:54 UTC
Version:           2.4.2 (using KDE 4.4.4) 
OS:                Linux

It's not possible to extend $PATH (as an example) with changing environment variables in the profile management dialog

Reproducible: Always

Steps to Reproduce:
1. create a profile
2. open the profile management dialog and go to the change environment dialog.
3. write "PATH=something:$PATH

Actual Results:  
PATH=something:"$PATH" ($PATH not resolved)

Expected Results:  
PATH=something:$PATH ($PATH resolved)
Comment 1 Jekyll Wu 2011-11-11 05:17:18 UTC
I see the expectation, but I think that environment dialog is generally for setting simple envirment variables which are tightly related with Konsole itself, such as $TERM or KONSOLE_PROFILE_NAME. For the $PATH example, I think it is more convenient or natuaral to setup in the shell.
Comment 2 Harald Nikolisin 2011-11-11 09:19:34 UTC
My use-case of the Konsole profiles is to distinguish different delevopment environments, e.g.

Konsole profile "VisOld" sets OSG=~/src/osg-2.4
Konsole profile "VisNew" sets OSG=~/src/osg-3.0

nothing related to the Konsole behaviour itself (like $TERM).
This approach works actually quite well - so far so good. 

But in both profiles I want e.g. extend the LD_LIBRARY_PATH with $OSG
I don't want to extend the LD_LIBRARY_PATH in all-purpose files like .bashrc, .profile etc...
I also do not want to extend the variable manually cause this is error-prone...

Therefore the environment dialog in the Konsole profiles is definitely the best place to extend variables.
I understand that the severity is "Wishlist" because it is not really a bug - but on the other side is hardy acceptable that the environment dialog allows only partially to set the environment and ignores sometimes variable manipulations.
Comment 3 Jekyll Wu 2012-01-31 17:05:08 UTC
Ok. I would like to give it a try sometime but I can't promise anything :)
Comment 4 dckorah 2014-11-06 12:30:08 UTC
I really would like to have this working, where switching a profile would update the environment variable. I must say though; I really wonder if it would be possible to update the environment variables once a shell session is running.

On the KONSOLE_PROFILE_NAME variable; it does not change once the shell-profile is switched on an already running session.

I really dont want to suggest what I am about to.. I really would like this to be fixed; but .. If this feature is not possible, please can I suggest making it obvious from the UI so that a user would not breed false expectations in his mind.