diff options
author | Oleksandr Shneyder <o.schneyder@phoca-gmbh.de> | 2015-02-10 19:26:42 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-02-10 19:40:56 +0100 |
commit | 4f5dc807a7a421aa0c5f52b84cd33ff41505de38 (patch) | |
tree | f662a95c99142a2aa8962133059d015eec4d07e8 /nx-X11 | |
parent | d26930d59838e2a8305c66b67aaa163db157920c (diff) | |
download | nx-libs-4f5dc807a7a421aa0c5f52b84cd33ff41505de38.tar.gz nx-libs-4f5dc807a7a421aa0c5f52b84cd33ff41505de38.tar.bz2 nx-libs-4f5dc807a7a421aa0c5f52b84cd33ff41505de38.zip |
Add -norootlessexit cmdline option to nxagent (203_nxagent_disable-rootless-exit.full.patch).
This change enables to launch an nxagent in rootless mode
that waits forever for Xclients to appear.
This feature got added when X2Go introduced Published Applications
support.
Diffstat (limited to 'nx-X11')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Args.c | 7 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Handlers.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Options.c | 1 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Options.h | 7 |
4 files changed, 16 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index ecf04e226..6666393e4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -672,6 +672,12 @@ int ddxProcessArgument(int argc, char *argv[], int i) return 1; } + if (!strcmp(argv[i], "-norootlessexit")) { + nxagentChangeOption(NoRootlessExit, True); + return 1; + } + + if (!strcmp(argv[i], "-noonce")) { nxagentOnce = False; @@ -1855,6 +1861,7 @@ void ddxUseMsg() ErrorF("The NX system adds the following arguments:\n"); ErrorF("-forcenx force use of NX protocol messages assuming communication through nxproxy\n"); ErrorF("-timeout int auto-disconnect timeout in seconds (minimum allowed: 60)\n"); + ErrorF("-norootlessexit don't exit if there are no clients in rootless mode\n"); #ifdef RENDER ErrorF("-norender disable the use of the render extension\n"); ErrorF("-nocomposite disable the use of the composite extension\n"); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c index 332816fe0..1fc6bbf8b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c @@ -219,7 +219,7 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask) if (nxagentOption(Rootless) && nxagentLastWindowDestroyed && nxagentRootlessDialogPid == 0 && - now > nxagentLastWindowDestroyedTime + 30 * 1000) + now > nxagentLastWindowDestroyedTime + 30 * 1000 && !nxagentOption(NoRootlessExit)) { #ifdef WARNING fprintf(stderr, "nxagentBlockHandler: No application running. Closing the session.\n"); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.c b/nx-X11/programs/Xserver/hw/nxagent/Options.c index ca5be0b5f..7eac3d8a2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Options.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Options.c @@ -56,6 +56,7 @@ void nxagentInitOptions() nxagentOptions.Persistent = 1; nxagentOptions.Rootless = UNDEFINED; nxagentOptions.Fullscreen = UNDEFINED; + nxagentOptions.NoRootlessExit = False; nxagentOptions.X = 0; nxagentOptions.Y = 0; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.h b/nx-X11/programs/Xserver/hw/nxagent/Options.h index 40cb1790e..0e4869926 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Options.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Options.h @@ -381,6 +381,13 @@ typedef struct _AgentOptions int ImageRateLimit; + /* + * True if agent should not exit if there are no + * clients in rootless mode + */ + + int NoRootlessExit; + } AgentOptionsRec; typedef AgentOptionsRec *AgentOptionsPtr; |