aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/src
diff options
context:
space:
mode:
Diffstat (limited to 'nxcomp/src')
-rw-r--r--nxcomp/src/Loop.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp
index eb7373f9f..59dd43a10 100644
--- a/nxcomp/src/Loop.cpp
+++ b/nxcomp/src/Loop.cpp
@@ -9842,19 +9842,29 @@ char *GetClientPath()
//
// Try to guess the location of the client.
//
-
- clientEnv = "/usr/NX/bin/nxclient";
+ // FIXME: replace hardcoded paths by built-time variables if possible
#ifdef __APPLE__
clientEnv = "/Applications/NX Client for OSX.app/Contents/MacOS/nxclient";
- #endif
-
- #ifdef __CYGWIN32__
+ #else
+ # if defined(__CYGWIN32__)
clientEnv = "C:\\Program Files\\NX Client for Windows\\nxclient";
+ # else
+
+ clientEnv = "/usr/NX/bin/nxclient";
+
+ struct stat fileStat;
+
+ if ((stat(clientEnv, &fileStat) == -1) && (EGET() == ENOENT))
+ {
+ clientEnv = "/usr/bin/nxdialog";
+ }
+
+ # endif
#endif
}