Commit bd154850 authored by Robert Knight's avatar Robert Knight
Browse files

Define environment variable in new sessions which is set to the initial...

Define  environment variable in new sessions which is set to the initial working directory of the profile used for the session.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=791952
parent 61d1e13d
......@@ -382,7 +382,14 @@ void SessionManager::applyProfile(Session* session, const Profile::Ptr info , bo
session->setInitialWorkingDirectory(info->defaultWorkingDirectory());
if ( apply.shouldApply(Profile::Environment) )
session->setEnvironment(info->property<QStringList>(Profile::Environment));
{
// add environment variable containing home directory of current profile
// (if specified)
QStringList environment = info->property<QStringList>(Profile::Environment);
environment << QString("PROFILEHOME=%1").arg(info->defaultWorkingDirectory());
session->setEnvironment(environment);
}
if ( apply.shouldApply(Profile::Icon) )
session->setIconName(info->icon());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment