[Spice-devel] [PATCH xf86-video-qxl v2 10/11] Xspice: require display parameter, and set if earlier in environment

Alon Levy alevy at redhat.com
Sun Sep 8 05:11:52 PDT 2013


Signed-off-by: Alon Levy <alevy at redhat.com>
---
 scripts/Xspice | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/Xspice b/scripts/Xspice
index 5375624..ba04951 100755
--- a/scripts/Xspice
+++ b/scripts/Xspice
@@ -213,6 +213,10 @@ display=""
 for arg in xorg_args:
     if arg.startswith(":"):
         display = arg
+if not display:
+    print "Error: missing display on line (i.e. :3)"
+    raise SystemExit
+os.environ ['DISPLAY'] = display
 
 exec_args = [args.xorg, '-config', args.config]
 if cgdb and args.cgdb:
@@ -231,7 +235,6 @@ if retpid != 0:
 else:
     if args.xsession:
         environ = os.environ
-        environ ['DISPLAY'] = display
         os.spawnlpe(os.P_NOWAIT, args.xsession, environ)
 
     try:
-- 
1.8.3.1



More information about the Spice-devel mailing list