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
>From 3628dac23f6555489dc59c85afb009fdc225d7df Mon Sep 17 00:00:00 2001 From: Tomas Carnecky <[EMAIL PROTECTED]> Date: Fri, 12 Oct 2007 13:10:19 +0200 Subject: [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
_______________________________________________ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz