diff options
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Args.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Args.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 801ee0b22..949892f25 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -40,6 +40,7 @@ is" without express or implied warranty. #include <stdio.h> #include <string.h> #include <errno.h> +#include <libgen.h> #ifdef __sun #include <strings.h> @@ -56,6 +57,7 @@ is" without express or implied warranty. #include "servermd.h" #include "opaque.h" +#include "Init.h" #include "Agent.h" #include "Display.h" #include "Args.h" @@ -124,7 +126,7 @@ extern int _XGetBitsPerPixel(Display *dpy, int depth); extern char dispatchExceptionAtReset; -const char *nxagentProgName; +char *nxagentProgName; char nxagentDisplayName[NXAGENTDISPLAYNAMELENGTH]; Bool nxagentSynchronize = False; @@ -187,7 +189,14 @@ int ddxProcessArgument(int argc, char *argv[], int i) * Ensure that the options are set to their defaults. */ - nxagentProgName = argv[0]; + char *basec = strdup(argv[0]); + nxagentProgName = strdup(basename(basec)); + free(basec); + + /* + * Check if we running as X2Go Agent + */ + checkX2goAgent(); static Bool resetOptions = True; @@ -1805,7 +1814,14 @@ N/A if (*nxagentWindowName == '\0') { - snprintf(nxagentWindowName, NXAGENTWINDOWNAMELENGTH, "NX"); + if(nxagentX2go) + { + snprintf(nxagentWindowName, NXAGENTWINDOWNAMELENGTH, "X2Go Agent"); + } + else + { + snprintf(nxagentWindowName, NXAGENTWINDOWNAMELENGTH, "NX Agent"); + } } /* |