WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Script and xdm config to connect vnc in a domain back to

To: xen-changelog@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Script and xdm config to connect vnc in a domain back to
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Fri, 18 Mar 2005 10:52:26 +0000
Delivery-date: Fri, 25 Mar 2005 12:10:31 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-changelog>
List-help: <mailto:xen-changelog-request@lists.sourceforge.net?subject=help>
List-id: <xen-changelog.lists.sourceforge.net>
List-post: <mailto:xen-changelog@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.sourceforge.net?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-admin@xxxxxxxxxxxxxxxxxxxxx
ChangeSet 1.1775.1.8, 2005/03/18 10:52:26+00:00, mjw@xxxxxxxxxxxxxxxxxxx

        Script and xdm config to connect vnc in a domain back to
        a viewer running in domain-0.
        
        Signed-off-by: Mike Wray <mike.wray@xxxxxx>



 Xservers |    5 +++++
 Xvnc-xen |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+)


diff -Nru a/tools/examples/vnc/Xservers b/tools/examples/vnc/Xservers
--- /dev/null   Wed Dec 31 16:00:00 196900
+++ b/tools/examples/vnc/Xservers       2005-03-25 07:09:05 -05:00
@@ -0,0 +1,5 @@
+# Configuration lines to go in /etc/X11/xdm/Xservers to
+# start Xvnc and connect back to a vncviewer in domain-0.
+# See 'man xdm' under 'LOCAL SERVER SPECIFICATION' for format details.
+
+:1 Xvnc local /usr/X11R6/bin/Xvnc-xen :1
\ No newline at end of file
diff -Nru a/tools/examples/vnc/Xvnc-xen b/tools/examples/vnc/Xvnc-xen
--- /dev/null   Wed Dec 31 16:00:00 196900
+++ b/tools/examples/vnc/Xvnc-xen       2005-03-25 07:09:05 -05:00
@@ -0,0 +1,53 @@
+#!/bin/bash
+#============================================================================
+# This script should be installed in /usr/X11R6/bin/Xvnc-xen.
+#============================================================================
+#
+# Start Xvnc and use vncconnect to connect back to a vncviewer listening in
+# domain 0. The host and port to connect to are given by
+#
+#    VNC_VIEWER=<host>:<port>
+#
+# in the kernel command line (/proc/cmdline). 
+#
+# The '--vnc' option to 'xm create' will start a vncviewer and
+# pass its address in VNC_VIEWER for this script to find.
+#
+# Usage:
+#        Xvnc-xen [args]
+#
+# Any arguments are passed to Xvnc.
+#
+#============================================================================
+
+# Prefix for messages.
+M="[$(basename $0)]"
+
+# Usage: vnc_addr
+# Print <host>:<port> for the vncviewer given in
+# the kernel command line.
+vnc_addr () {
+    sed -n -e "s/.*VNC_VIEWER=\([^ ]*\).*/\1/p" /proc/cmdline
+}
+
+# Usage: vnc_connect
+# If a vncviewer address was given on the kernel command line,
+# run vncconnect for it.
+vnc_connect () {
+    local addr=$(vnc_addr)
+
+    if [ -n "${addr}" ] ; then
+        echo "$M Connecting to ${addr}."
+        vncconnect ${addr}
+    else
+        echo "$M No VNC_VIEWER in kernel command line."
+        echo "$M Create the domain with 'xm create --vnc <display>'."
+        return 1
+    fi
+}
+
+# Start the vnc server.
+Xvnc "$@" >/dev/null 2>&1 &
+
+# Connect back to the viewer in domain-0.
+vnc_connect


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>