Commit 3f7b3001 authored by Ulrich Sibiller's avatar Ulrich Sibiller

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
parent 36e583cf
...@@ -285,7 +285,22 @@ int ddxProcessArgument(int argc, char *argv[], int i) ...@@ -285,7 +285,22 @@ int ddxProcessArgument(int argc, char *argv[], int i)
if (nxagentOptionsFilename) 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);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment