[X2Go-Commits] [nx-libs] 13/24: Add -norootlessexit cmdline option to nxagent (203_nxagent_disable-rootless-exit.full.patch).
git-admin at x2go.org
git-admin at x2go.org
Tue Feb 10 21:50:54 CET 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit 4f5dc807a7a421aa0c5f52b84cd33ff41505de38
Author: Oleksandr Shneyder <o.schneyder at phoca-gmbh.de>
Date: Tue Feb 10 19:26:42 2015 +0100
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.
---
.../203_nxagent_disable-rootless-exit.full.patch | 63 --------------------
debian/patches/series | 1 -
nx-X11/programs/Xserver/hw/nxagent/Args.c | 7 +++
nx-X11/programs/Xserver/hw/nxagent/Handlers.c | 2 +-
nx-X11/programs/Xserver/hw/nxagent/Options.c | 1 +
nx-X11/programs/Xserver/hw/nxagent/Options.h | 7 +++
6 files changed, 16 insertions(+), 65 deletions(-)
diff --git a/debian/patches/203_nxagent_disable-rootless-exit.full.patch b/debian/patches/203_nxagent_disable-rootless-exit.full.patch
deleted file mode 100644
index 74579f4..0000000
--- a/debian/patches/203_nxagent_disable-rootless-exit.full.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Description: Add -norootlessexit cmdline option to nxagent
-Author: Oleksandr Shneyder <o.schneyder at phoca-gmbh.de>
-
---- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
-+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
-@@ -672,6 +672,12 @@
- return 1;
- }
-
-+ if (!strcmp(argv[i], "-norootlessexit")) {
-+ nxagentChangeOption(NoRootlessExit, True);
-+ return 1;
-+ }
-+
-+
- if (!strcmp(argv[i], "-noonce"))
- {
- nxagentOnce = False;
-@@ -1855,6 +1861,7 @@
- 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");
---- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
-+++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
-@@ -219,7 +219,7 @@
-
- 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");
---- a/nx-X11/programs/Xserver/hw/nxagent/Options.c
-+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.c
-@@ -56,6 +56,7 @@
- nxagentOptions.Persistent = 1;
- nxagentOptions.Rootless = UNDEFINED;
- nxagentOptions.Fullscreen = UNDEFINED;
-+ nxagentOptions.NoRootlessExit = False;
-
- nxagentOptions.X = 0;
- nxagentOptions.Y = 0;
---- a/nx-X11/programs/Xserver/hw/nxagent/Options.h
-+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.h
-@@ -381,6 +381,13 @@
-
- int ImageRateLimit;
-
-+ /*
-+ * True if agent should not exit if there are no
-+ * clients in rootless mode
-+ */
-+
-+ int NoRootlessExit;
-+
- } AgentOptionsRec;
-
- typedef AgentOptionsRec *AgentOptionsPtr;
diff --git a/debian/patches/series b/debian/patches/series
index 746c6ad..424c3e9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
-203_nxagent_disable-rootless-exit.full.patch
204_nxagent_repaint-solidpict.full.patch
205_nxagent_refresh-adsl.full.patch
206_nxagent_clipboard-as-nxoption.full.patch
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
index ecf04e2..6666393 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 332816f..1fc6bbf 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 ca5be0b..7eac3d8 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 40cb179..0e48699 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;
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list