[Spice-devel] [xspice 5/6] Enable the deferred-fps and exit-on-disconnect options

Jeremy White jwhite at codeweavers.com
Thu Mar 14 11:00:06 PDT 2013


Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
 scripts/Xspice |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/scripts/Xspice b/scripts/Xspice
index 32219b4..d7b3887 100755
--- a/scripts/Xspice
+++ b/scripts/Xspice
@@ -50,6 +50,8 @@ parser.add_argument('--config', default='spiceqxl.xorg.conf')
 # Don't use any options that are already used by Xorg (unless we must)
 # specifically, don't use -p and -s.
 parser.add_argument('--port', type=int, help='standard spice port')
+parser.add_argument('--exit-on-disconnect', action='store_true', help='Exit the X server when any client disconnects')
+parser.add_argument('--deferred-fps', type=int, help='If given, render to a buffer and send updates only this many times per second')
 parser.add_argument('--tls-port', type=int, help='spice tls port', default=0)
 add_boolean('--disable-ticketing', help="do not require a client password")
 add_boolean('--sasl', help="enable sasl")
@@ -79,9 +81,7 @@ add_boolean('--ipv6-only')
 
 #TODO
 #Option "SpiceAddr" ""
-#Option "SpiceDeferredFPS" "10"
 #add_boolean('--agent-mouse')
-#Option "SpiceExitOnDisconnect" "1"
 #Option "EnableImageCache" "True"
 #Option "EnableFallbackCache" "True"
 #Option "EnableSurfaces" "True"
@@ -172,10 +172,18 @@ var_args = ['port', 'tls_port', 'disable_ticketing',
     'x509_key_file', 'x509_key_password',
     'tls_ciphers', 'dh_file', 'password', 'image_compression',
     'jpeg_wan_compression', 'zlib_glz_wan_compression',
-    'streaming_video']
+    'streaming_video', 'deferred_fps', 'exit_on_disconnect']
 for arg in var_args:
     if getattr(args, arg):
-        os.environ['XSPICE_' + arg.upper()] = str(getattr(args, arg))
+        # The Qxl code doesn't respect booleans, so pass them as 0/1
+        a = getattr(args, arg)
+        if a == True:
+            a = "1"
+        elif a == False:
+            a = "0"
+        else:
+            a = str(a)
+        os.environ['XSPICE_' + arg.upper()] = a
 
 exec_args = [args.xorg, '-config', args.config]
 if cgdb and args.cgdb:
-- 
1.7.10.4





More information about the Spice-devel mailing list