Tomas Carnecky
2007-Oct-12 11:10 UTC
[PATCH] Make runCommand() work with multiple screens.
--- src/screen.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/screen.c b/src/screen.c index 41f031e..9fa2a11 100644 --- a/src/screen.c +++ b/src/screen.c @@ -3282,8 +3282,13 @@ runCommand (CompScreen *s, if (fork () == 0) { + size_t len = strlen (s->display->displayString); + char displayString[len + 16]; + strcpy (displayString, s->display->displayString); + displayString[len - 1] = '0' + s->screenNum; + setsid (); - putenv (s->display->displayString); + putenv (displayString); execl ("/bin/sh", "/bin/sh", "-c", command, NULL); exit (0); } -- 1.5.3.4 --------------050603020208020104000903--
Tomas Carnecky
2007-Oct-12 12:23 UTC
[compiz] [PATCH] Make runCommand() work with multiple screens.
It's not perfect, assumes s->numScreens < 10 and that DISPLAY ends with '.?', but it works and I can start apps on the second screen. tom -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Make-runCommand-work-with-multiple-screens.patch Type: text/x-patch Size: 0 bytes Desc: not available Url : http://lists.freedesktop.org/archives/compiz/attachments/20071012/9fc03998/attachment.bin