summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2012-12-17 01:48:56 +0100
committerSlávek Banko <slavek.banko@axis.cz>2012-12-17 01:55:13 +0100
commitdf1b666cc51eccaae0ec19377c113ff9b6616133 (patch)
tree840846ef43b0793c5831ca2ebb19b503f0206fe0
parent5359dcf36f4ab496b5c7fd724bbe37fba3672f37 (diff)
downloadtdelibs-df1b666cc51eccaae0ec19377c113ff9b6616133.tar.gz
tdelibs-df1b666cc51eccaae0ec19377c113ff9b6616133.zip
Fix variables passed to kde4 applications
This resolves Bug 1366
-rw-r--r--CMakeLists.txt2
-rw-r--r--config.h.cmake3
-rw-r--r--kio/kio/kservice.cpp2
3 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9315a4b25..15d2ac4d6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,6 +82,8 @@ OPTION( WITH_GAMIN "Enable FAM/GAMIN support" ${WITH_ALL_OPTIONS} )
OPTION( WITH_ASPELL "Enable aspell support" OFF )
OPTION( WITH_HSPELL "Enable hspell support" OFF )
+set( KDE4_DEFAULT_HOME ".kde" CACHE PATH "KDE4 home directory passed as KDEHOME to kde4 applications" )
+
##### set PKG_CONFIG_PATH #######################
diff --git a/config.h.cmake b/config.h.cmake
index da0a2b72c..e50d7184f 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -707,6 +707,9 @@
/* The compiled in system configuration prefix */
#define KDESYSCONFDIR "@CONFIG_INSTALL_DIR@"
+/* The default KDE4 home directory */
+#define KDE4_DEFAULT_HOME "@KDE4_DEFAULT_HOME@"
+
/* what C++ compiler was used for compilation */
#define KDE_COMPILER_VERSION "@KDE_COMPILER_VERSION@"
diff --git a/kio/kio/kservice.cpp b/kio/kio/kservice.cpp
index 49641032b..5a179dc56 100644
--- a/kio/kio/kservice.cpp
+++ b/kio/kio/kservice.cpp
@@ -198,7 +198,7 @@ KService::init( KDesktopFile *config )
m_strExec = config->readPathEntry( "Exec" );
if (kde4application && !m_strExec.startsWith("/")) {
- m_strExec = "KDEHOME=$HOME/.trinity XDG_DATA_DIRS=/usr/share KDEDIRS=/usr/ XDG_CONFIG_DIRS=/etc/xdg/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$PATH "+m_strExec;
+ m_strExec = "KDEHOME=$HOME/" KDE4_DEFAULT_HOME " XDG_DATA_DIRS=/usr/share KDEDIRS=/usr/ XDG_CONFIG_DIRS=/etc/xdg/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$PATH "+m_strExec;
} else if (config->readBoolEntry("X-KDE-SubstituteUID")) {
int space = m_strExec.find(" ");
if (space==-1)