[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] libxl: set DISPLAY and XAUTHORITY if sdl is enabled



commit 21fb45ddaf9efd066bad87073d2ae459c9bb04bf
Author:     Olaf Hering <olaf@xxxxxxxxx>
AuthorDate: Mon Apr 20 13:40:32 2015 +0000
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu May 21 15:12:10 2015 +0100

    libxl: set DISPLAY and XAUTHORITY if sdl is enabled
    
    With this change the following domU.cfg will show the VM window on the
    local dom0 display, instead of the remote side (it via ssh -X login):
      vnc=0
      sdl=1
      display=":0"
      xauthority="/run/gdm/auth-for-olaf-nMXhOi/database"
    
    Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
    Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
    Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 docs/man/xl.cfg.pod.5  |    7 ++-----
 tools/libxl/libxl_dm.c |   10 ++++++++--
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
index a189091..0bbd3c3 100644
--- a/docs/man/xl.cfg.pod.5
+++ b/docs/man/xl.cfg.pod.5
@@ -577,15 +577,12 @@ Simple DirectMedia Layer). The default is to not enable 
this mode.
 =item C<display=DISPLAY>
 
 Specifies the X Window display that should be used when the sdl option
-is used. Note: passing this value to the device-model is not currently
-implemented, so providing this option will have no effect.
+is used.
 
 =item C<xauthority=XAUTHORITY>
 
 Specifies the path to the X authority file that should be used to
-connect to the X server when the sdl option is used. Note: passing
-this value to the device-model is not currently implemented, so
-providing this option will have no effect.
+connect to the X server when the sdl option is used.
 
 =item C<opengl=BOOLEAN>
 
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 95660b8..3dd7c04 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -196,7 +196,10 @@ static int libxl__build_device_model_args_old(libxl__gc 
*gc,
         if (!libxl_defbool_val(sdl->opengl)) {
             flexarray_append(dm_args, "-disable-opengl");
         }
-        /* XXX sdl->{display,xauthority} into $DISPLAY/$XAUTHORITY */
+        if (sdl->display)
+            flexarray_append_pair(dm_envs, "DISPLAY", sdl->display);
+        if (sdl->xauthority)
+            flexarray_append_pair(dm_envs, "XAUTHORITY", sdl->xauthority);
     }
     if (keymap) {
         flexarray_vappend(dm_args, "-k", keymap, NULL);
@@ -562,7 +565,10 @@ static int libxl__build_device_model_args_new(libxl__gc 
*gc,
 
     if (sdl) {
         flexarray_append(dm_args, "-sdl");
-        /* XXX sdl->{display,xauthority} into $DISPLAY/$XAUTHORITY */
+        if (sdl->display)
+            flexarray_append_pair(dm_envs, "DISPLAY", sdl->display);
+        if (sdl->xauthority)
+            flexarray_append_pair(dm_envs, "XAUTHORITY", sdl->xauthority);
     }
 
     if (keymap) {
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.