summaryrefslogtreecommitdiffstats
path: root/tdeinit
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-12-02 23:24:31 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-12-03 17:44:12 +0100
commiteaf53f100d36168c87ca1ee354a263e6ece14e5e (patch)
treef44f488aa8b36579a2f9d0402ed0137151e6fc78 /tdeinit
parent9b32cf927a6b6b9874b989021e31f837f6ab4c52 (diff)
downloadtdelibs-eaf53f100d36168c87ca1ee354a263e6ece14e5e.tar.gz
tdelibs-eaf53f100d36168c87ca1ee354a263e6ece14e5e.zip
Process the new location of the ICEauthority file
+ our internal implementation of IceAuthFileName tests whether the ICEauthority file exists in the folder specified by the XDG_RUNTIME_DIR variable + DCOP client tests whether the ICEauthority file for a specific user exists in the user's folder based on the XDG_RUNTIME_DIR variable + tdeinit uses the IceAuthFileName() function instead of building the file name This relates to bug 3027. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 38b2b0be7840d868c21093a406ab98a646212de1)
Diffstat (limited to 'tdeinit')
-rw-r--r--tdeinit/CMakeLists.txt2
-rw-r--r--tdeinit/tdeinit.cpp8
2 files changed, 3 insertions, 7 deletions
diff --git a/tdeinit/CMakeLists.txt b/tdeinit/CMakeLists.txt
index 346bfa20e..f6347899b 100644
--- a/tdeinit/CMakeLists.txt
+++ b/tdeinit/CMakeLists.txt
@@ -40,7 +40,7 @@ set( ${target}_SRCS
tde_add_executable( ${target}
SOURCES ${${target}_SRCS}
- LINK ltdlc-static tdeparts-shared ${XFT_LIBRARIES}
+ LINK kICE-static ltdlc-static tdeparts-shared ${XFT_LIBRARIES}
DESTINATION ${BIN_INSTALL_DIR}
)
diff --git a/tdeinit/tdeinit.cpp b/tdeinit/tdeinit.cpp
index 566a8bda0..78ed1e7c4 100644
--- a/tdeinit/tdeinit.cpp
+++ b/tdeinit/tdeinit.cpp
@@ -59,6 +59,7 @@
#include <klibloader.h>
#include <tdeapplication.h>
#include <tdelocale.h>
+#include <dcopglobal.h>
#ifdef HAVE_SYS_PRCTL_H
#include <sys/prctl.h>
@@ -852,12 +853,7 @@ static void init_tdeinit_socket()
exit(255);
}
}
- path = getenv("ICEAUTHORITY");
- if (path.isEmpty())
- {
- path = home_dir;
- path += "/.ICEauthority";
- }
+ path = IceAuthFileName();
if (access(path.data(), R_OK|W_OK) && (errno != ENOENT))
{
fprintf(stderr, "[tdeinit] Aborting. No write access to '%s'.\n", path.data());