Bug 155340 - environment is not inherited in new konsoles
Summary: environment is not inherited in new konsoles
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-09 17:45 UTC by Gaël de Chalendar (aka Kleag)
Modified: 2008-04-24 16:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gaël de Chalendar (aka Kleag) 2008-01-09 17:45:36 UTC
Version:           2.0 (using KDE 4.00.80 (KDE 4.0.80 >= 20080104), compiled sources)
Compiler:          gcc
OS:                Linux (i686) release 2.6.22.12-desktop586-1mdv

When launching a konsole from another one (r758617), the environment is not inherited. For example if you do
> export A=a
> konsole &

the the env var A is not defined in the new console.

This is maybe related to #154710 where the working directory is not used. But the probability is low is I don't suppose that konqueror modifies its  $PWD env var ?
Comment 1 Robert Knight 2008-01-09 18:28:19 UTC
This is a side-effect of Konsole being a single-process application in KDE 4.  If you start Konsole from within an existing Konsole window then a stub-process starts, contacts the existing konsole process, asks it to create a new window and then exits.
Comment 2 Robert Knight 2008-01-22 12:19:18 UTC
Bug #156365 is caused by the same problem.
Comment 3 Robert Knight 2008-04-12 10:18:39 UTC
Fixed by SVN commit r795982
Comment 4 Gaël de Chalendar (aka Kleag) 2008-04-24 10:07:16 UTC
Yes, new konsole windows inherit thei env from their parent, now. Thanks. But when creating a new console in a new tab, the environment should be the one of the previous tab and not the one of the parent process, too. 

For that, should I open a new bug/wish or should this one be reopened ?
Comment 5 Robert Knight 2008-04-24 16:43:33 UTC
> the environment should be the one of the previous tab 

That is not easily possible I'm afraid.  The shell stores the current environment and does not expose this information in a generic fashion to the outside world.  

If the environment is important then I suggest looking into writing scripts to load and save the environment from within the shell.