summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-main.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2011-10-21 13:57:11 +0100
committerDaniel P. Berrange <berrange@redhat.com>2012-01-31 14:27:17 +0000
commit5bc4c0b342f0ebe330f0db61a0a40cf009d2b1ba (patch)
tree4e048cf87b6edff107b25904c6bd47eb5c2a3e06 /src/virt-viewer-main.c
parenta94100eaebd9ac23a164640e270a7ffaea98943e (diff)
downloadvirt-viewer-5bc4c0b342f0ebe330f0db61a0a40cf009d2b1ba.tar.gz
virt-viewer-5bc4c0b342f0ebe330f0db61a0a40cf009d2b1ba.tar.xz
virt-viewer-5bc4c0b342f0ebe330f0db61a0a40cf009d2b1ba.zip
Support for virDomainOpenGraphics API
Add a new flag --attach, which instructs virt-viewer to attach to the target display using virDomainOpenGraphics, instead of initiating a VNC/SPICE connection directly.
Diffstat (limited to 'src/virt-viewer-main.c')
-rw-r--r--src/virt-viewer-main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/virt-viewer-main.c b/src/virt-viewer-main.c
index c8e1082..bb967bb 100644
--- a/src/virt-viewer-main.c
+++ b/src/virt-viewer-main.c
@@ -52,6 +52,7 @@ int main(int argc, char **argv)
gboolean verbose = FALSE;
gboolean debug = FALSE;
gboolean direct = FALSE;
+ gboolean attach = FALSE;
gboolean waitvm = FALSE;
gboolean reconnect = FALSE;
gboolean fullscreen = FALSE;
@@ -64,6 +65,8 @@ int main(int argc, char **argv)
N_("Display verbose information"), NULL },
{ "direct", 'd', 0, G_OPTION_ARG_NONE, &direct,
N_("Direct connection with no automatic tunnels"), NULL },
+ { "attach", 'a', 0, G_OPTION_ARG_NONE, &attach,
+ N_("Attach to the local display using libvirt"), NULL },
{ "connect", 'c', 0, G_OPTION_ARG_STRING, &uri,
N_("Connect to hypervisor"), "URI"},
{ "wait", 'w', 0, G_OPTION_ARG_NONE, &waitvm,
@@ -121,7 +124,7 @@ int main(int argc, char **argv)
virt_viewer_app_set_debug(debug);
- viewer = virt_viewer_new(uri, args[0], zoom, direct, waitvm, reconnect, verbose, NULL);
+ viewer = virt_viewer_new(uri, args[0], zoom, direct, attach, waitvm, reconnect, verbose, NULL);
if (viewer == NULL)
goto cleanup;