ia64/xen-unstable

view tools/examples/vnc/Xvnc-xen @ 19648:f0e2df69a8eb

x86 hvm: Allow cross-vendor migration

Intercept #UD and emulate SYSCALL/SYSENTER/SYSEXIT as necessary.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue May 26 15:01:36 2009 +0100 (2009-05-26)
parents 445b12a7221a
children
line source
1 #!/bin/bash
2 #============================================================================
3 # This script should be installed in /usr/X11R6/bin/Xvnc-xen.
4 #============================================================================
5 #
6 # Start Xvnc and use vncconnect to connect back to a vncviewer listening in
7 # domain 0. The host and port to connect to are given by
8 #
9 # VNC_VIEWER=<host>:<port>
10 #
11 # in the kernel command line (/proc/cmdline).
12 #
13 # The '--vnc' option to 'xm create' will start a vncviewer and
14 # pass its address in VNC_VIEWER for this script to find.
15 #
16 # Usage:
17 # Xvnc-xen [args]
18 #
19 # Any arguments are passed to Xvnc.
20 #
21 #============================================================================
23 # Prefix for messages.
24 M="[$(basename $0)]"
26 # Usage: vnc_addr
27 # Print <host>:<port> for the vncviewer given in
28 # the kernel command line.
29 vnc_addr () {
30 sed -n -e "s/.*VNC_VIEWER=\([^ ]*\).*/\1/p" /proc/cmdline
31 }
33 # Usage: vnc_connect
34 # If a vncviewer address was given on the kernel command line,
35 # run vncconnect for it.
36 vnc_connect () {
37 local addr=$(vnc_addr)
39 if [ -n "${addr}" ] ; then
40 echo "$M Connecting to ${addr}."
41 vncconnect ${addr}
42 else
43 echo "$M No VNC_VIEWER in kernel command line."
44 echo "$M Create the domain with 'xm create --vnc <display>'."
45 return 1
46 fi
47 }
49 # Start the vnc server.
50 Xvnc "$@" >/dev/null 2>&1 &
52 # Connect back to the viewer in domain-0.
53 vnc_connect