[pkg-fso-commits] [SCM] Automatic Display Manager branch, master, updated. debian/0.8-1-7-ga30dbc0

Enrico Zini enrico at enricozini.org
Fri Jul 8 17:47:15 UTC 2011


The following commit has been merged in the master branch:
commit 89bba9b655850bec927df51489282b0800faef92
Author: Enrico Zini <enrico at enricozini.org>
Date:   Fri Jul 8 18:46:33 2011 +0100

    Start the right X according to $DISPLAY

diff --git a/test-xstart.c b/test-xstart.c
index cd96dc5..d017ea6 100644
--- a/test-xstart.c
+++ b/test-xstart.c
@@ -23,6 +23,8 @@
 #include "test.h"
 #include "common.h"
 #include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 
 int main(int argc, char* argv[])
 {
@@ -31,7 +33,11 @@ int main(int argc, char* argv[])
     struct nodm_xserver srv;
     nodm_xserver_init(&srv);
 
-    const char* server_argv[] = { "/usr/bin/X", ":1", NULL };
+    const char* server_argv[] = {
+        getenv("DISPLAY") == NULL ? "/usr/bin/X" : "/usr/bin/Xnest",
+        ":1",
+        NULL
+    };
     srv.argv = server_argv;
     srv.name = ":1";
 

-- 
Automatic Display Manager



More information about the pkg-fso-commits mailing list