diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2017-07-24 23:45:48 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2017-07-25 00:02:31 +0200 |
commit | 3f7b3001988bf921e6cd860f03a6256b1451ee3d (patch) | |
tree | ef77450e741602ed50c478e2f3495c5d03431599 /nx-X11 | |
parent | 36e583cf52a0a19183bdee69431c306d8e7df5b7 (diff) | |
download | nx-libs-3f7b3001988bf921e6cd860f03a6256b1451ee3d.tar.gz nx-libs-3f7b3001988bf921e6cd860f03a6256b1451ee3d.tar.bz2 nx-libs-3f7b3001988bf921e6cd860f03a6256b1451ee3d.zip |
treat options parameter as option string if it starts with nx/nx
This way one can easily pass options to nxagent run as Xnest
replacement without having to create a temporary options file. Please
note that it is not of much use for normal sessions. Options passed
like this cannot be changed after startup so a reconnect may not work
as expected.
Fixes ArcticaProject/nx-libs#476
Diffstat (limited to 'nx-X11')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Args.c | 17 |
1 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 d5cbfbce3..e4fa350bc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -285,7 +285,22 @@ int ddxProcessArgument(int argc, char *argv[], int i) if (nxagentOptionsFilename) { - nxagentProcessOptionsFile(); + /* if the "filename" starts with an nx marker treat it + as an option _string_ instead of a filename */ + if (strncasecmp(nxagentOptionsFilename, "nx/nx,", 6) == 0 || + strncasecmp(nxagentOptionsFilename, "nx/nx:", 6) == 0) + { + nxagentParseOptionString(nxagentOptionsFilename + 6); + } + else if (strncasecmp(nxagentOptionsFilename, "nx,", 3) == 0 || + strncasecmp(nxagentOptionsFilename, "nx:", 3) == 0) + { + nxagentParseOptionString(nxagentOptionsFilename + 3); + } + else + { + nxagentProcessOptionsFile(nxagentOptionsFilename); + } } } |