summaryrefslogtreecommitdiffstats
path: root/dcop/dcopclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dcop/dcopclient.cpp')
-rw-r--r--dcop/dcopclient.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp
index e446801c9..8006ecd52 100644
--- a/dcop/dcopclient.cpp
+++ b/dcop/dcopclient.cpp
@@ -277,7 +277,9 @@ static TQCString dcopServerFile(const TQCString &hostname, bool old)
{
char hostName[256];
hostName[0] = '\0';
- if (gethostname(hostName, sizeof(hostName)))
+ if (getenv("XAUTHLOCALHOSTNAME"))
+ fName += getenv("XAUTHLOCALHOSTNAME");
+ else if (gethostname(hostName, sizeof(hostName)))
{
fName += "localhost";
}