diff --git a/AUTHORS b/AUTHORS
index d3bd41f..64673f8 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -11,6 +11,8 @@ The Virt Viewer application is maintained by
 
 With additional patches & translations from:
 
+Andrea Bolognani <abologna@redhat.com>
+Ben Mathews <beniam@yahoo.com>
 Charles Arnold <carnold@suse.com>
 Christophe Fergeau <cfergeau@redhat.com>
 Christophe de Dinechin <cdupontd@redhat.com>
@@ -32,9 +34,11 @@ Lukáš Venhoda <lvenhoda@redhat.com>
 Marc-André Lureau <marcandre.lureau@redhat.com>
 Martin Kletzander <mkletzan@redhat.com>
 Michal Privoznik <mprivozn@redhat.com>
+Paul Donohue <virt-tools@PaulSD.com>
 Pavel Grunt <pgrunt@redhat.com>
 Pavel Hrdina <phrdina@redhat.com>
 Pavel Raiskup <praiskup@redhat.com>
+Qiu Wenbo <qiuwenbo@kylinos.com.cn>
 Rex Dieter <rdieter@math.unl.edu>
 Richard W.M. Jones <rjones@redhat.com>
 Ronnie Sahlberg <ronniesahlberg@gmail.com>
diff --git a/ChangeLog b/ChangeLog
index 6607be6..8c81c51 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,541 @@
+2019-03-01  Daniel P. Berrangé  <berrange@redhat.com>
+
+	Update NEWS for 8.0 release
+
+	rpm: use the mingw hicolor icon theme not native
+
+	Add glib2-devel for mingw build
+	The native glib2-devel package is needed for mingw builds in order to
+	get the glib-compile-schemas binary.
+
+2019-02-22  Eduardo Lima (Etrunko)  <etrunko@redhat.com>
+
+	iso-dialog: Move type definitions from header to source file
+	There is no reason for this object to define a private structure, so it
+	is fine to make everything private to the dialog itself.
+
+	Update usage of GObject private structures
+	New functions and macros have been added in glib 2.38 to better handle
+	this case.
+
+	https://gitlab.gnome.org/GNOME/glib/blob/c8de2b11bbbf5705ee20bf68d0c11e455b441312/NEWS
+
+	The old method is being deprecated as of version 2.58.
+
+	https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits
+
+2019-02-19  Daniel P. Berrangé  <berrange@redhat.com>
+
+	msi: record full build environment in MSI installer
+	For proper compliance with the GPL and other licenses we need to be
+	clear about exactly what toolchain and dependent packages we used in
+	order to build the MSI installer we distribute.
+
+	Historically we've done this by including a "deps.txt" file which
+	provides a list of all the mingw{32,64}-* RPMs on the host system.
+
+	This is not sufficient information, however, because the build system
+	will in fact use various native packages too from the toolchain too,
+	notably including any program run by "configure" which covers various
+	shell utilities, and pkg-config, and then of course make & msitools
+	itself.
+
+	Rather than try to figure out which subset of host RPMs are used,
+	just list every single host RPM that is installed.
+
+	A key implication of this is that formal release builds should always
+	be done in a pristine build root populated with the minimal content
+	required for the build.
+
+	Declare VirtViewerFile variable at start of method
+	virt_viewer_session_vnc_auth_credential uses gotos which jump over the
+	declaration of 'file', meaning its contents are uninitialized in the
+	jump target.
+
+	Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
+
+	Fix prototype of function with no arguments
+	Modern C standard requires the function to be "void"
+
+	Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
+
+	Fix signed/unsigned mixup in format args
+	Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
+
+2019-02-13  Eduardo Lima (Etrunko)  <etrunko@redhat.com>
+
+	window: Use proper define from glib for ignoring deprecated warning
+	Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
+
+2019-02-12  Daniel P. Berrangé  <berrange@redhat.com>
+
+	Disable deprecation warnings for gtk_window_fullscreen_on_monitor
+	We use GLIB_VERSION_MAX_ALLOWED to prevent use of functions from
+	GTK >= 3.12. When we do conditional compilation based on a GTK
+	version check, we must thus suppress the warning:
+
+	  CC       libvirt_viewer_la-virt-viewer-window.lo
+	../../src/virt-viewer-window.c: In function 'virt_viewer_window_enter_fullscreen':
+	../../src/virt-viewer-window.c:608:9: error: 'gtk_window_fullscreen_on_monitor' is deprecated: Not available before 3.18 [-Werror=deprecated-declarations]
+	         gtk_window_fullscreen_on_monitor(GTK_WINDOW(priv->window),
+	         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	In file included from /usr/include/gtk-3.0/gtk/gtkdialog.h:32,
+	                 from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:30,
+	                 from /usr/include/gtk-3.0/gtk/gtk.h:31,
+	                 from ../../src/virt-viewer-window.c:28:
+	/usr/include/gtk-3.0/gtk/gtkwindow.h:391:10: note: declared here
+	 void     gtk_window_fullscreen_on_monitor(GtkWindow *window,
+	          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	cc1: all warnings being treated as errors
+
+2019-02-04  Marc-André Lureau  <marcandre.lureau@redhat.com>
+
+	build-sys: lower spice-gtk requirement to 0.35 again
+	Compile out QMP channel support if spice-gtk version < 0.36.
+
+	(note: I didn't bother adding configure switch to enable it
+	explicitly, this could be added later if necessary)
+
+	Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
+
+2019-02-01  Paul Donohue  <virt-tools@PaulSD.com>
+
+	Report gtk_accel_map_change_entry() failures
+	Message-Id: <1533340753-24176-2-git-send-email-virt-tools@PaulSD.com>
+	Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
+
+2019-02-01  Marc-André Lureau  <marcandre.lureau@redhat.com>
+
+	spice: hook into QMP port
+	If the "org.qemu.monitor.qmp.0" port is available:
+	- enable the VM UI
+	- get and follow the VM state
+	- send the requested VM actions
+
+	This requires spice-gtk version 0.36 with SpiceQmpPort helper.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	spice: hook into port channel to create VTE terminals
+	QEMU defines a few Spice port channel names in
+	docs/spice-port-fqdn.txt that can be interacted with a terminal.
+
+	Create VirtViewerDisplayVte display for all known terminal channel,
+	and redirect read/write signals.
+
+	Note that if VTE support is disabled, or if the VTE console isn't
+	shown, spice-gtk will still process those port channels (discarding
+	the read if VTE is disabled).
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	session: do not take VTE display into account for geometry changes
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+2019-01-28  Jonathon Jongsma  <jjongsma@redhat.com>
+
+	Fix regression when showing disconnect error
+	Commit 65ef66e42 introduced a regression due to lack of type-safety on
+	signals. We mistakenly passed a GError rather than a string error
+	message to the signal.
+
+	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
+
+2019-01-18  Eduardo Lima (Etrunko)  <etrunko@redhat.com>
+
+	Add missing G_MODULE_EXPORT to signal handler
+	Fixes the Windows case where the dialog fails to show with the following
+	message:
+
+	warning: "Could not find signal handler 'virt_viewer_window_menu_change_cd_activate'"
+
+2018-12-21  Daniel P. Berrangé  <berrange@redhat.com>
+
+	Add src/virt-viewer-display-vte.c to POTFILES
+
+2018-12-21  Marc-André Lureau  <marcandre.lureau@redhat.com>
+
+	app: add "vm-running" property
+	Add "vm-running" property and modify "menu-vm-pause" check button
+	state when the running state changes.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	app: add "machine" UI
+	Add a new "Machine" menu, which allows to Pause/Reset/Power Down a VM.
+
+	The menu is only visible if "vm-ui" app property is set.
+
+	When the application quits, it will also send a quit action to the VM.
+
+	This is a similar behaviour/UI as qemu -display gtk.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	app: create a window for VTE displays
+	virt_viewer_app_display_added() now handles VTE displays. They should
+	be skipped for monitor configuration, and they don't emit "show-hint".
+
+	(a VTE display has a monitor nth == -1, which is now a valid value)
+
+	The associated window will be hidden when virt-viewer is started.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	spice: add unix-path in .vv file support
+	This will allow to connect to a Spice server using a unix socket path,
+	for example:
+
+	[virt-viewer]
+	type=spice
+	unix-path=/var/run/user/1000/qemu/test/spice.sock
+
+	Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
+
+	display: allow display without associated monitor number
+	The VTE display will have monitor id -1.
+
+	Eventually, having a base "console" class without monitor id could
+	avoid this allowance.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	app: append VTE consoles to display submenu
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	app: set subtitle using VTE name
+	Currently, subtitle indicate the monitor number, ex: "Fedora (1)".
+
+	Custom subtitle use %d to place the monitor number.
+
+	Let's make this placeholder more generic to place the name of the
+	console, ex: "Fedora (Serial)".
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	session: skip monitor changes if there is no sized monitors
+	spice-gtk discards configurations without any sized monitors.
+
+	Also shuts extra warnings when shifting the monitors.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	display: ignore display that do not have toplevel window
+	virt_viewer_display_get_preferred_monitor_geometry() may be called
+	during application initialization (when the VTE console is being
+	shown, virt_viewer_session_update_displays_geometry() is called when
+	the visibility menu item is toggled). But the other displays may not
+	yet be associated with a window, ignore them.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	window/zoom: deal with VTE display differently
+	VTE display doesn't use the desktop / window aspect ratio, let's just
+	call directly the functions handling zoom.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	Add a VirtViewerDisplayVte display kind
+	This is not a graphical display, so the application will have to deal
+	with it with care.
+
+	You may argue that we need a large refactoring to introduce a more
+	generic "console" object, that could be either graphical or textual.
+	For now, this does work well enough for me.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	build-sys: check for VTE library
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	window: set sensitivity based on display capability
+	A following patch is adding a new display (VTE) that won't have the
+	send_key() or screenshot() callbacks. Activating those menu/actions
+	would lead to nothing or a crash. I chose to keep the UI consistent
+	for all display, but disable the menu sensitivity.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	window: do not reset sensitivity of menu-send in rebuild
+	The sensitivy of "menu-send" is getting more complex in the following
+	patch. Let's have the logic in a single place,
+	virt_viewer_window_set_menus_sensitive().
+
+	rebuild_combo_menu() is called in 2 cases:
+
+	1. notify::enable-accel: there is no need to update the sensitivy of
+	   "menu-send"
+
+	2. on construction: default to false since display == NULL. It will be
+	   later updated when virt_viewer_window_set_menus_sensitive(). The
+	   default sensitivity is covered by previous .ui patch change.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+2018-12-06  Christophe Fergeau  <cfergeau@redhat.com>
+
+	ovirt: Fix initial connection
+	After commit df42f78d46 "remote-viewer: factor our
+	remote_viewer_initial_connect()", the initial connection code only gets
+	run in the !ovirt case. When ovirt is in use, the initial connection
+	never happens, meaning all we get when using ovirt:// is a blank
+	virt-viewer window.
+
+	This commit fixes that by moving creation of the ovirt session to
+	remote_viewer_initial_connect, and unconditionnally calling the
+	remote_viewer_initial_connect rather than only doing it in the !ovirt
+	case.
+
+	https://bugzilla.redhat.com/show_bug.cgi?id=1655537
+
+2018-12-05  Ben Mathews  <beniam@yahoo.com>
+
+	Set window title to VM name
+	The attached patch address an issue with virt-view not setting the
+	titlebar text to be the title of the VM (previously discussed on:
+	https://www.redhat.com/archives/virt-tools-list/2018-September/msg00064.html).
+
+2018-12-04  Jonathon Jongsma  <jjongsma@redhat.com>
+
+	Silence coverity warning about dead code
+	For some reason, coverity was complaining that the definition of
+	cred_type_to_str was dead code, even though it wasn't. Changing the
+	storage to static silences the warning. Since that's a benficial change
+	anyway, let's change it. At the same time, make the pointer constant as
+	well and move it outside of the loop since it doesn't need to be inside
+	the loop.
+
+	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
+
+	Avoid potential memory leak in spice session
+	If j == -1, the memory allocated for rect will leak. So move the
+	allocation after the test.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+2018-11-13  Andrea Bolognani  <abologna@redhat.com>
+
+	spec: Drop %{extra_release}
+	It was mainly meant to be used for automatic builds through
+	Test::AutoBuild, so it can be removed now.
+
+	prepare-release: Drop references to Test::AutoBuild
+	They are misleading, and no longer relevant anyway.
+
+	maint: Rename autobuild.sh to prepare-release.sh
+	The script was originally used by the Test::AutoBuild
+	project to perform periodic automatic builds; however, that
+	effort has been abandoned a long time ago, and these days
+	virt-viewer CI builds are happening on the Jenkins-based
+	CentOS CI environment under the libvirt umbrella[1], where
+	build recipes are maintained separately from the projects
+	themselves.
+
+	The script is still used to prepare releases, so it can't
+	be dropped from the repository: rename it so that its
+	purpose is more clearly communicated instead.
+
+	[1] https://ci.centos.org/view/libvirt/
+
+2018-11-09  Jonathon Jongsma  <jjongsma@redhat.com>
+
+	Relax Gtk+ requirement slightly
+	We previously bumped the gtk+ requirement to 3.18 for the function
+	gtk_window_fullscreen_on_monitor(). But this function is only necessary
+	in Wayland. So add some preprocessor version checks to allow it to
+	compile on older distributions if they don't care about wayland support.
+
+	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
+
+2018-10-16  Qiu Wenbo  <qiuwenbo@kylinos.com.cn>
+
+	win32: fix command line encoding on windows platform
+	On Windows, the arguments we get in GApplication::ocal_command_line
+	come from g_win32_get_command_line(), and g_option_context_parse_strv()
+	documentation says:
+	« On Windows, the strings are expected to be in UTF-8. This is in
+	contrast to g_option_context_parse() which expects them to be in the
+	system codepage, which is how they are passed as argv to main(). See
+	g_win32_get_command_line() for a solution. »
+
+	This was causing issues on Windows when running:
+	remote-viewer -t "你好" spice://<target-host>:5900
+
+2018-10-15  Jonathon Jongsma  <jjongsma@redhat.com>
+
+	Fullscreen displays on wrong monitors in Wayland
+	In fullscreen mode, we attempt to enable a guest display for each client
+	monitor and then place a fullscreen window for each display on the
+	appropriate monitor. Previously, we were using gtk_window_move() to move
+	the window to the proper monitor, and then calling
+	gtk_window_fullscreen() to enter fullscreen mode on that monitor.
+	However, under wayland, gtk_window_move() no longer has any effect for
+	toplevel windows, so all displays were showing up on top of eachother on
+	the same client monitor.
+
+	Fortunately, Gtk+ 3.18 added a new gtk_window_fullscreen_on_monitor()
+	API that works on Wayland. In theory this allows us to remove the call
+	to gtk_window_move() from the code. But to avoid potentially changing
+	behavior on xorg or older systems, I left the existing logic.
+
+	This requires a dependency bump for gtk+ from 3.12 to 3.18. Gtk 3.18 is
+	provided by the following distributions (or newer):
+	 - RHEL 7.4
+	 - Fedora 23
+	 - Ubuntu 16.04LTS
+
+	Resolves: rhbz#1584561
+
+	Acked-by: Christophe Fergeau <cfergeau@redhat.com>
+
+2018-09-25  Marc-André Lureau  <marcandre.lureau@redhat.com>
+
+	display: make klass->close() optional
+	Spice and VTE display do not need to implement it.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	window: move default sensitivity in .ui
+	Instead of modifying it in object initialization.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	window: use virt_viewer_window_set_menus_sensitive()
+	virt_viewer_window_set_menus_sensitive() is the common function to set
+	sensitivity on menu items.
+
+	It was lacking "toolbar_send_key", so add it there too.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	app: simplify toggling visibility
+	There is a hack to maintain the toggle state to a desired state within
+	the "toggled" handler.
+
+	However it is only necessary for the ask-quit case. In this case, we
+	want to maintain the item active, which is simpler to handle than the
+	general case. Simplify the code by folding
+	virt_viewer_app_window_set_visible() and removing the static
+	"reentering" hack, only maintaining "active" on the last item.
+
+	Note that the hack was needed since there is no way to hook a signal
+	handler on "clicked" before "toggled" is emitted and handled by Gtk,
+	to avoid the recursion.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	Remove class signal handlers
+	We don't use class signal handlers, remove the extra pointers.
+
+	g_signal_override_class_handler() could be used instead when needed.
+
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+	remote-viewer: add handling of spice+unix and spice+tls schemes
+	- spice+unix:// was added in spice-gtk v0.28
+	- spice+tls:// was added in spice-gtk v0.35
+
+	This allows launchers to start remote-viewer when they encounter a
+	Spice URI with +unix or +tls.
+
+	Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
+	Acked-by: Victor Toso <victortoso@redhat.com>
+
+2018-09-18  Jonathon Jongsma  <jjongsma@redhat.com>
+
+	Spice: listen for new 'SpiceSession::disconnected' signal
+	Previously we were emitting the VirtViewerSession::session-disconnected
+	when we got the Spice::session::channel-destroy signal for the last
+	channel. However, since the channels are still valid at this point, and
+	because VirtViewerApp quits the application in response to the
+	session-disconnected signal, that means that the channels were never
+	being properly freed. This was particularly problematic for the usbredir
+	channel, which must disconnect any connected USB devices as part of its
+	destruction. By using the new SpiceSession::disconnected signal instead,
+	we can ensure that all channels have been disconnected and properly
+	destroyed before quitting the application.
+
+2018-09-12  Eduardo Lima (Etrunko)  <etrunko@redhat.com>
+
+	ovirt-foreign-menu: New function storage_domain_validate()
+	It may be useful to know why the storage domain has not been listed,
+	given that there are different reasons for that. To make it easier to
+	provide more detailed debug messages, we move code from the callback
+	function to this new one.
+
+	Acked-by: Christophe Fergeau <cfergeau@redhat.com>
+
+	build: Update govirt and rest requirements
+	With these new values, 0.3.3 for libgovirt and 0.8 for librest, we can
+	remove checks for OVIRT_REST_CALL_ERROR_CANCELLED and correspondent
+	rest_proxy_auth_cancel().
+
+	Distros that already ship these versions, such as Fedora, RHEL 7.4
+	onwards, and Ubuntu since 17.10.
+
+	Acked-by: Christophe Fergeau <cfergeau@redhat.com>
+
+2018-09-03  Victor Toso  <me@victortoso.com>
+
+	app: Always add guest name comment
+	Even when the user adds comments, we should place the guest's name
+	unless it is present already.
+
+	Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1623756
+
+	Acked-by: Christophe Fergeau <cfergeau@redhat.com>
+
+2018-08-31  Christophe Fergeau  <cfergeau@redhat.com>
+
+	ovirt: Filter everything which does not end in .iso
+	oVirt REST API does not provide a way to know what is a valid ISO image
+	which can be assigned to a running VM. I've seen floppy disk images
+	(.vfd) in a domain, which is already filtered. Now I've seen an ISO
+	domain with .qcow2 files in it, which can't be assigned to a VM either.
+	This commit filters every file which does not have a .iso extension as
+	it's unlikely to be possible to use it.
+
+	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
+
+2018-08-07  Christophe Fergeau  <cfergeau@redhat.com>
+
+	ovirt: Improve handling of g_strv_contains()
+	The ovirt code uses g_strv_contains() with fallback code in
+	glib-compat.h when we are using a glib version where it's not available.
+	However, when we use a glib version where g_strv_contains is available,
+	we get a compilation warning since we are compiling GLIB_VERSION_MAX_ALLOWED
+	set to 2.38.
+
+	This commit wraps both the compat code and the g_strv_contains() call in
+	a strv_contains() helper where we can hide the magic needed to avoid
+	deprecation warnings.
+
+	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
+
+	window: Adjust get_image_format() prototype
+	This adds an unused parameter, but lets us get rid of this new warning
+	with gcc 8:
+
+	virt-viewer-window.c: In function 'get_image_format':
+	virt-viewer-window.c:930:33: warning: cast between incompatible function types from 'GHashTable * (*)(void)' {aka 'struct _GHashTable * (*)(void)'} to 'void * (*)(void *)' [-Wcast-function-type]
+	     g_once(&image_formats_once, (GThreadFunc)init_image_formats, NULL);
+
+	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
+
+2018-08-06  Christophe Fergeau  <cfergeau@redhat.com>
+
+	app: Remove VirtViewerApp::has-focus
+	This is no longer needed since 140cb84
+	'remote-viewer: remove --spice-controller'
+
+	Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
+
 2018-07-27  Daniel P. Berrangé  <berrange@redhat.com>
 
+	rpm: import spec changes from fedora
+
+	Post release version bump to 8.0
+
 	Add NEWS for 7.0 release
 
 	Bump min spice to 0.35 and address deprecation warnings
diff --git a/Makefile.in b/Makefile.in
index 76c3538..5a8bf9f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -89,11 +89,10 @@ build_triplet = @build@
 host_triplet = @host@
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
-	$(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@@ -138,7 +137,7 @@ am__recursive_targets = \
   $(RECURSIVE_CLEAN_TARGETS) \
   $(am__extra_recursive_targets)
 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
-	cscope distdir dist dist-all distcheck
+	cscope distdir distdir-am dist dist-all distcheck
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
 	$(LISP)config.h.in
 # Read a list of newline-separated strings from the standard input,
@@ -323,6 +322,7 @@ POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 RANLIB = @RANLIB@
+REST_REQUIRED = @REST_REQUIRED@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -336,6 +336,8 @@ STRIP = @STRIP@
 UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+VTE_CFLAGS = @VTE_CFLAGS@
+VTE_LIBS = @VTE_LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WINDOWS_PRODUCTVERSION = @WINDOWS_PRODUCTVERSION@
 WINDRES = @WINDRES@
@@ -456,8 +458,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	    echo ' $(SHELL) ./config.status'; \
 	    $(SHELL) ./config.status;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -603,7 +605,10 @@ distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	$(am__remove_distdir)
 	test -d "$(distdir)" || mkdir "$(distdir)"
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/NEWS b/NEWS
index 1fb4e94..0914804 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,22 @@
   Virt Viewer News
   ================
 
+8.0: Mar  1, 2019
+-----------------
+
+  - Fix warnings with latest GCC versions
+  - More strictly filter out non-ISO images in ovirt menu
+  - Require libgovirt >= 0.3.3
+  - Require librest >= 0.8
+  - Support UNIX and TLS URI schemes for spice
+  - Fix full screen monitor placement under wayland
+  - Fix command line encoding on Windows
+  - Ensure VM name is set in window title
+  - Support unix-path in .vv files
+  - Support text console windows via VTE
+  - Add machine power control menu options
+  - Record full build env in MSI installer
+
 7.0: Jul 27, 2018
 -----------------
 
diff --git a/aclocal.m4 b/aclocal.m4
index fa4994b..6b2c13f 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
 
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -507,6 +507,196 @@ sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 fi])
 
 
+
+dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
+# serial 42 IT_PROG_INTLTOOL
+AC_DEFUN([IT_PROG_INTLTOOL], [
+AC_PREREQ([2.50])dnl
+AC_REQUIRE([AM_NLS])dnl
+
+case "$am__api_version" in
+    1.[01234])
+	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
+    ;;
+    *)
+    ;;
+esac
+
+INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+if test -n "$1"; then
+    AC_MSG_CHECKING([for intltool >= $1])
+    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
+    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
+	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
+fi
+
+AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
+AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
+AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
+fi
+
+if test -z "$AM_DEFAULT_VERBOSITY"; then
+  AM_DEFAULT_VERBOSITY=1
+fi
+AC_SUBST([AM_DEFAULT_VERBOSITY])
+
+INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
+INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
+INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
+AC_SUBST(INTLTOOL_V_MERGE)
+AC_SUBST(INTLTOOL__v_MERGE_)
+AC_SUBST(INTLTOOL__v_MERGE_0)
+
+INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
+intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
+intltool__v_merge_options_0='-q'
+AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
+AC_SUBST(intltool__v_merge_options_)
+AC_SUBST(intltool__v_merge_options_0)
+
+  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
+     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
+      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
+else
+      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
+fi
+      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
+    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+
+_IT_SUBST(INTLTOOL_DESKTOP_RULE)
+_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
+_IT_SUBST(INTLTOOL_KEYS_RULE)
+_IT_SUBST(INTLTOOL_PROP_RULE)
+_IT_SUBST(INTLTOOL_OAF_RULE)
+_IT_SUBST(INTLTOOL_PONG_RULE)
+_IT_SUBST(INTLTOOL_SERVER_RULE)
+_IT_SUBST(INTLTOOL_SHEET_RULE)
+_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
+_IT_SUBST(INTLTOOL_UI_RULE)
+_IT_SUBST(INTLTOOL_XAM_RULE)
+_IT_SUBST(INTLTOOL_KBD_RULE)
+_IT_SUBST(INTLTOOL_XML_RULE)
+_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
+_IT_SUBST(INTLTOOL_CAVES_RULE)
+_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
+_IT_SUBST(INTLTOOL_THEME_RULE)
+_IT_SUBST(INTLTOOL_SERVICE_RULE)
+_IT_SUBST(INTLTOOL_POLICY_RULE)
+
+# Check the gettext tools to make sure they are GNU
+AC_PATH_PROG(XGETTEXT, xgettext)
+AC_PATH_PROG(MSGMERGE, msgmerge)
+AC_PATH_PROG(MSGFMT, msgfmt)
+AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+
+AC_PATH_PROG(INTLTOOL_PERL, perl)
+if test -z "$INTLTOOL_PERL"; then
+   AC_MSG_ERROR([perl not found])
+fi
+AC_MSG_CHECKING([for perl >= 5.8.1])
+$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
+if test $? -ne 0; then
+   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
+else
+   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
+   AC_MSG_RESULT([$IT_PERL_VERSION])
+fi
+if test "x$2" != "xno-xml"; then
+   AC_MSG_CHECKING([for XML::Parser])
+   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+       AC_MSG_RESULT([ok])
+   else
+       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
+   fi
+fi
+
+# Substitute ALL_LINGUAS so we can use it in po/Makefile
+AC_SUBST(ALL_LINGUAS)
+
+IT_PO_SUBDIR([po])
+
+])
+
+
+# IT_PO_SUBDIR(DIRNAME)
+# ---------------------
+# All po subdirs have to be declared with this macro; the subdir "po" is
+# declared by IT_PROG_INTLTOOL.
+#
+AC_DEFUN([IT_PO_SUBDIR],
+[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
+dnl
+dnl The following CONFIG_COMMANDS should be executed at the very end
+dnl of config.status.
+AC_CONFIG_COMMANDS_PRE([
+  AC_CONFIG_COMMANDS([$1/stamp-it], [
+    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
+       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
+    fi
+    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
+    >"$1/stamp-it.tmp"
+    [sed '/^#/d
+	 s/^[[].*] *//
+	 /^[ 	]*$/d
+	'"s|^|	$ac_top_srcdir/|" \
+      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
+    ]
+    [sed '/^POTFILES =/,/[^\\]$/ {
+		/^POTFILES =/!d
+		r $1/POTFILES
+	  }
+	 ' "$1/Makefile.in" >"$1/Makefile"]
+    rm -f "$1/Makefile.tmp"
+    mv "$1/stamp-it.tmp" "$1/stamp-it"
+  ])
+])dnl
+])
+
+# _IT_SUBST(VARIABLE)
+# -------------------
+# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
+#
+AC_DEFUN([_IT_SUBST],
+[
+AC_SUBST([$1])
+m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
+]
+)
+
+# deprecated macros
+AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
+# A hint is needed for aclocal from Automake <= 1.9.4:
+# AC_DEFUN([AC_PROG_INTLTOOL], ...)
+
+
 # nls.m4 serial 5 (gettext-0.18)
 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
 dnl Foundation, Inc.
@@ -884,7 +1074,7 @@ AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
         [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
 ])dnl PKG_HAVE_DEFINE_WITH_MODULES
 
-# Copyright (C) 2002-2017 Free Software Foundation, Inc.
+# Copyright (C) 2002-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -896,10 +1086,10 @@ AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.15'
+[am__api_version='1.16'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.15.1], [],
+m4_if([$1], [1.16.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -915,14 +1105,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15.1])dnl
+[AM_AUTOMAKE_VERSION([1.16.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -974,7 +1164,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2017 Free Software Foundation, Inc.
+# Copyright (C) 1997-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1005,7 +1195,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1196,13 +1386,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
@@ -1210,49 +1399,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
   # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
+  # TODO: see whether this extra hack can be removed once we start
+  # requiring Autoconf 2.70 or later.
+  AS_CASE([$CONFIG_FILES],
+          [*\'*], [eval set x "$CONFIG_FILES"],
+          [*], [set x $CONFIG_FILES])
   shift
-  for mf
+  # Used to flag and report bootstrapping failures.
+  am_rc=0
+  for am_mf
   do
     # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named 'Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
+    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile which includes
+    # dependency-tracking related rules and includes.
+    # Grep'ing the whole file directly is not great: AIX grep has a line
     # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running 'make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "$am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
+    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+      || continue
+    am_dirpart=`AS_DIRNAME(["$am_mf"])`
+    am_filepart=`AS_BASENAME(["$am_mf"])`
+    AM_RUN_LOG([cd "$am_dirpart" \
+      && sed -e '/# am--include-marker/d' "$am_filepart" \
+        | $MAKE -f - am--depfiles]) || am_rc=$?
   done
+  if test $am_rc -ne 0; then
+    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
+    for automatic dependency tracking.  Try re-running configure with the
+    '--disable-dependency-tracking' option to at least be able to build
+    the package (albeit without support for automatic dependency tracking).])
+  fi
+  AS_UNSET([am_dirpart])
+  AS_UNSET([am_filepart])
+  AS_UNSET([am_mf])
+  AS_UNSET([am_rc])
+  rm -f conftest-deps.mk
 }
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
@@ -1261,18 +1442,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 # -----------------------------
 # This macro should only be invoked once -- use via AC_REQUIRE.
 #
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each '.P' file that we will
-# need in order to bootstrap the dependency handling code.
+# This code is only required when automatic dependency tracking is enabled.
+# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
+# order to bootstrap the dependency handling code.
 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 [AC_CONFIG_COMMANDS([depfiles],
      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1359,8 +1539,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 # For better backward compatibility.  To be removed once Automake 1.9.x
 # dies out for good.  For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
 # We need awk for the "check" target (and possibly the TAP driver).  The
 # system "awk" is bad on some platforms.
@@ -1427,7 +1607,7 @@ END
 Aborting the configuration process, to ensure you take notice of the issue.
 
 You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
 
 If you want to complete the configuration process using your problematic
 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -1469,7 +1649,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1490,7 +1670,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2017 Free Software Foundation, Inc.
+# Copyright (C) 2003-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1511,7 +1691,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1519,49 +1699,42 @@ AC_SUBST([am__leading_dot])])
 
 # AM_MAKE_INCLUDE()
 # -----------------
-# Check to see how make treats includes.
+# Check whether make has an 'include' directive that can support all
+# the idioms we need for our automatic dependency tracking code.
 AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
+cat > confinc.mk << 'END'
 am__doit:
-	@echo this is the am__doit target
+	@echo this is the am__doit target >confinc.out
 .PHONY: am__doit
 END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
 am__include="#"
 am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
+  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
+      ['0:this is the am__doit target'],
+      [AS_CASE([$s],
+          [BSD], [am__include='.include' am__quote='"'],
+          [am__include='include' am__quote=''])])
+  if test "$am__include" != "#"; then
+    _am_result="yes ($s style)"
+    break
+  fi
+done
+rm -f confinc.* confmf.*
+AC_MSG_RESULT([${_am_result}])
+AC_SUBST([am__include])])
+AC_SUBST([am__quote])])
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2017 Free Software Foundation, Inc.
+# Copyright (C) 1997-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1600,7 +1773,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1629,7 +1802,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1676,7 +1849,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1695,7 +1868,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1776,7 +1949,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2017 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1836,7 +2009,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1864,7 +2037,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2017 Free Software Foundation, Inc.
+# Copyright (C) 2006-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1883,7 +2056,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2017 Free Software Foundation, Inc.
+# Copyright (C) 2004-2018 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -2014,7 +2187,6 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
-m4_include([m4/intltool.m4])
 m4_include([m4/libtool.m4])
 m4_include([m4/ltoptions.m4])
 m4_include([m4/ltsugar.m4])
diff --git a/build-aux/compile b/build-aux/compile
index de0005d..99e5052 100755
--- a/build-aux/compile
+++ b/build-aux/compile
@@ -1,9 +1,9 @@
-#!/bin/sh
+#! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2016-01-11.22; # UTC
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -340,7 +340,7 @@ exit $ret
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
 # time-stamp-time-zone: "UTC0"
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 717b228..256083a 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1,8 +1,8 @@
-#!/bin/sh
+#! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2017 Free Software Foundation, Inc.
+#   Copyright 1992-2018 Free Software Foundation, Inc.
 
-timestamp='2017-08-08'
+timestamp='2018-03-08'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2017-08-08'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -27,7 +27,7 @@ timestamp='2017-08-08'
 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 #
 # Please send patches to <config-patches@gnu.org>.
 
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
 
 Output the configuration name of the system \`$me' is run on.
 
-Operation modes:
+Options:
   -h, --help         print this help, then exit
   -t, --time-stamp   print date of last modification, then exit
   -v, --version      print version number, then exit
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2017 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -107,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 dummy=$tmp/dummy ;
 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
 case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
+ ,,)    echo "int x;" > "$dummy.c" ;
 	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	  if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
 	     CC_FOR_BUILD="$c"; break ;
 	  fi ;
 	done ;
@@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-case "${UNAME_SYSTEM}" in
+case "$UNAME_SYSTEM" in
 Linux|GNU|GNU/*)
 	# If the system lacks a compiler, then just pick glibc.
 	# We could probably try harder.
 	LIBC=gnu
 
-	eval $set_cc_for_build
-	cat <<-EOF > $dummy.c
+	eval "$set_cc_for_build"
+	cat <<-EOF > "$dummy.c"
 	#include <features.h>
 	#if defined(__UCLIBC__)
 	LIBC=uclibc
@@ -149,13 +149,20 @@ Linux|GNU|GNU/*)
 	LIBC=gnu
 	#endif
 	EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+	# If ldd exists, use it to detect musl libc.
+	if command -v ldd >/dev/null && \
+		ldd --version 2>&1 | grep -q ^musl
+	then
+	    LIBC=musl
+	fi
 	;;
 esac
 
 # Note: order is significant - the case branches are not exclusive.
 
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
 	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -169,30 +176,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# portion of the name.  We always set it to "unknown".
 	sysctl="sysctl -n hw.machine_arch"
 	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
-	    /sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || \
+	    "/sbin/$sysctl" 2>/dev/null || \
+	    "/usr/sbin/$sysctl" 2>/dev/null || \
 	    echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
+	case "$UNAME_MACHINE_ARCH" in
 	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
 	    sh5el) machine=sh5le-unknown ;;
 	    earmv*)
-		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
-		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
-		machine=${arch}${endian}-unknown
+		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine="${arch}${endian}"-unknown
 		;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
 	# to ELF recently (or will in the future) and ABI.
-	case "${UNAME_MACHINE_ARCH}" in
+	case "$UNAME_MACHINE_ARCH" in
 	    earm*)
 		os=netbsdelf
 		;;
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
+		eval "$set_cc_for_build"
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
 		then
@@ -208,10 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		;;
 	esac
 	# Determine ABI tags.
-	case "${UNAME_MACHINE_ARCH}" in
+	case "$UNAME_MACHINE_ARCH" in
 	    earm*)
 		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
-		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
 		;;
 	esac
 	# The OS release
@@ -219,49 +226,55 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# thus, need a distinct triplet. However, they do not need
 	# kernel version information, so it can be replaced with a
 	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
+	case "$UNAME_VERSION" in
 	    Debian*)
 		release='-gnu'
 		;;
 	    *)
-		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
 		;;
 	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}${abi}"
+	echo "$machine-${os}${release}${abi}"
 	exit ;;
     *:Bitrig:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
 	exit ;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
 	exit ;;
     *:LibertyBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+	exit ;;
+    *:MidnightBSD:*:*)
+	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
 	exit ;;
     *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
 	exit ;;
     *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
 	exit ;;
     macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
 	exit ;;
     *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
 	exit ;;
     *:Sortix:*:*)
-	echo ${UNAME_MACHINE}-unknown-sortix
+	echo "$UNAME_MACHINE"-unknown-sortix
 	exit ;;
     *:Redox:*:*)
-	echo ${UNAME_MACHINE}-unknown-redox
+	echo "$UNAME_MACHINE"-unknown-redox
 	exit ;;
+    mips:OSF1:*.*)
+        echo mips-dec-osf1
+        exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -313,28 +326,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
 	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
 	exitcode=$?
 	trap '' 0
 	exit $exitcode ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
 	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
+	echo "$UNAME_MACHINE"-unknown-amigaos
 	exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
+	echo "$UNAME_MACHINE"-unknown-morphos
 	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
@@ -346,7 +350,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	echo powerpc-ibm-os400
 	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
+	echo arm-acorn-riscix"$UNAME_RELEASE"
 	exit ;;
     arm*:riscos:*:*|arm*:RISCOS:*:*)
 	echo arm-unknown-riscos
@@ -373,19 +377,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
     s390x:SunOS:*:*)
-	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
 	exit ;;
     sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
 	exit ;;
     i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-	echo i386-pc-auroraux${UNAME_RELEASE}
+	echo i386-pc-auroraux"$UNAME_RELEASE"
 	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	eval $set_cc_for_build
+	eval "$set_cc_for_build"
 	SUN_ARCH=i386
 	# If there is a compiler, see if it is configured for 64-bit objects.
 	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
@@ -398,13 +402,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		SUN_ARCH=x86_64
 	    fi
 	fi
-	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
@@ -413,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		;;
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
 	exit ;;
     sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
+	echo m68k-sun-sunos"$UNAME_RELEASE"
 	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
 	case "`/bin/arch`" in
 	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
+		echo m68k-sun-sunos"$UNAME_RELEASE"
 		;;
 	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
+		echo sparc-sun-sunos"$UNAME_RELEASE"
 		;;
 	esac
 	exit ;;
     aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
+	echo sparc-auspex-sunos"$UNAME_RELEASE"
 	exit ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
@@ -442,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-	echo m68k-milan-mint${UNAME_RELEASE}
+	echo m68k-milan-mint"$UNAME_RELEASE"
 	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-	echo m68k-hades-mint${UNAME_RELEASE}
+	echo m68k-hades-mint"$UNAME_RELEASE"
 	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-	echo m68k-unknown-mint${UNAME_RELEASE}
+	echo m68k-unknown-mint"$UNAME_RELEASE"
 	exit ;;
     m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
+	echo m68k-apple-machten"$UNAME_RELEASE"
 	exit ;;
     powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
+	echo powerpc-apple-machten"$UNAME_RELEASE"
 	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
 	exit ;;
     RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
+	echo mips-dec-ultrix"$UNAME_RELEASE"
 	exit ;;
     VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
+	echo vax-dec-ultrix"$UNAME_RELEASE"
 	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
+	echo clipper-intergraph-clix"$UNAME_RELEASE"
 	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
+	eval "$set_cc_for_build"
+	sed 's/^	//' << EOF > "$dummy.c"
 #ifdef __cplusplus
 #include <stdio.h>  /* for printf() prototype */
 	int main (int argc, char *argv[]) {
@@ -488,23 +492,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 #endif
 	#if defined (host_mips) && defined (MIPSEB)
 	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
 	#endif
 	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
 	#endif
 	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
 	#endif
 	#endif
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
 	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
+	echo mips-mips-riscos"$UNAME_RELEASE"
 	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
@@ -530,17 +534,17 @@ EOF
     AViiON:dgux:*:*)
 	# DG/UX returns AViiON for all architectures
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
 	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+	       [ "$TARGET_BINARY_INTERFACE"x = x ]
 	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
+		echo m88k-dg-dgux"$UNAME_RELEASE"
 	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
 	    fi
 	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
+	    echo i586-dg-dgux"$UNAME_RELEASE"
 	fi
 	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
@@ -557,7 +561,7 @@ EOF
 	echo m68k-tektronix-bsd
 	exit ;;
     *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
 	exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
 	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
@@ -569,14 +573,14 @@ EOF
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
 	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
 	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
 	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
+		eval "$set_cc_for_build"
+		sed 's/^		//' << EOF > "$dummy.c"
 		#include <sys/systemcfg.h>
 
 		main()
@@ -587,7 +591,7 @@ EOF
 			exit(0);
 			}
 EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
 		then
 			echo "$SYSTEM_NAME"
 		else
@@ -601,7 +605,7 @@ EOF
 	exit ;;
     *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
 	else
 		IBM_ARCH=powerpc
@@ -610,18 +614,18 @@ EOF
 		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
 			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
 	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
 	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
 	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
 	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
 	echo romp-ibm-bsd4.4
 	exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
 	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
@@ -636,28 +640,28 @@ EOF
 	echo m68k-hp-bsd4.4
 	exit ;;
     9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
+	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+	case "$UNAME_MACHINE" in
+	    9000/31?)            HP_ARCH=m68000 ;;
+	    9000/[34]??)         HP_ARCH=m68k ;;
 	    9000/[678][0-9][0-9])
 		if [ -x /usr/bin/getconf ]; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-		    case "${sc_cpu_version}" in
+		    case "$sc_cpu_version" in
 		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
 		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
 		      532)                      # CPU_PA_RISC2_0
-			case "${sc_kernel_bits}" in
+			case "$sc_kernel_bits" in
 			  32) HP_ARCH=hppa2.0n ;;
 			  64) HP_ARCH=hppa2.0w ;;
 			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
 			esac ;;
 		    esac
 		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^		//' << EOF >$dummy.c
+		if [ "$HP_ARCH" = "" ]; then
+		    eval "$set_cc_for_build"
+		    sed 's/^		//' << EOF > "$dummy.c"
 
 		#define _HPUX_SOURCE
 		#include <stdlib.h>
@@ -690,13 +694,13 @@ EOF
 		    exit (0);
 		}
 EOF
-		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
 		fi ;;
 	esac
-	if [ ${HP_ARCH} = hppa2.0w ]
+	if [ "$HP_ARCH" = hppa2.0w ]
 	then
-	    eval $set_cc_for_build
+	    eval "$set_cc_for_build"
 
 	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
 	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
@@ -715,15 +719,15 @@ EOF
 		HP_ARCH=hppa64
 	    fi
 	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
 	exit ;;
     ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
+	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux"$HPUX_REV"
 	exit ;;
     3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
+	eval "$set_cc_for_build"
+	sed 's/^	//' << EOF > "$dummy.c"
 	#include <unistd.h>
 	int
 	main ()
@@ -748,11 +752,11 @@ EOF
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
 		{ echo "$SYSTEM_NAME"; exit; }
 	echo unknown-hitachi-hiuxwe2
 	exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
 	echo hppa1.1-hp-bsd
 	exit ;;
     9000/8??:4.3bsd:*:*)
@@ -761,7 +765,7 @@ EOF
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
 	echo hppa1.0-hp-mpeix
 	exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
 	echo hppa1.1-hp-osf
 	exit ;;
     hp8??:OSF1:*:*)
@@ -769,9 +773,9 @@ EOF
 	exit ;;
     i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	    echo "$UNAME_MACHINE"-unknown-osf1mk
 	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
+	    echo "$UNAME_MACHINE"-unknown-osf1
 	fi
 	exit ;;
     parisc*:Lites*:*:*)
@@ -796,128 +800,109 @@ EOF
 	echo c4-convex-bsd
 	exit ;;
     CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
 	      -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
 	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
 	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     5000:UNIX_System_V:4.*:*)
 	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
 	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
 	exit ;;
     sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	echo sparc-unknown-bsdi"$UNAME_RELEASE"
 	exit ;;
     *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
 	exit ;;
     *:FreeBSD:*:*)
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	case ${UNAME_PROCESSOR} in
+	case "$UNAME_PROCESSOR" in
 	    amd64)
 		UNAME_PROCESSOR=x86_64 ;;
 	    i386)
 		UNAME_PROCESSOR=i586 ;;
 	esac
-	echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
 	exit ;;
     i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
+	echo "$UNAME_MACHINE"-pc-cygwin
 	exit ;;
     *:MINGW64*:*)
-	echo ${UNAME_MACHINE}-pc-mingw64
+	echo "$UNAME_MACHINE"-pc-mingw64
 	exit ;;
     *:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
+	echo "$UNAME_MACHINE"-pc-mingw32
 	exit ;;
     *:MSYS*:*)
-	echo ${UNAME_MACHINE}-pc-msys
-	exit ;;
-    i*:windows32*:*)
-	# uname -m includes "-pc" on this system.
-	echo ${UNAME_MACHINE}-mingw32
+	echo "$UNAME_MACHINE"-pc-msys
 	exit ;;
     i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
+	echo "$UNAME_MACHINE"-pc-pw32
 	exit ;;
     *:Interix*:*)
-	case ${UNAME_MACHINE} in
+	case "$UNAME_MACHINE" in
 	    x86)
-		echo i586-pc-interix${UNAME_RELEASE}
+		echo i586-pc-interix"$UNAME_RELEASE"
 		exit ;;
 	    authenticamd | genuineintel | EM64T)
-		echo x86_64-unknown-interix${UNAME_RELEASE}
+		echo x86_64-unknown-interix"$UNAME_RELEASE"
 		exit ;;
 	    IA64)
-		echo ia64-unknown-interix${UNAME_RELEASE}
+		echo ia64-unknown-interix"$UNAME_RELEASE"
 		exit ;;
 	esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
-	exit ;;
-    8664:Windows_NT:*)
-	echo x86_64-pc-mks
-	exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i586-pc-interix
-	exit ;;
     i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
+	echo "$UNAME_MACHINE"-pc-uwin
 	exit ;;
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
 	echo x86_64-unknown-cygwin
 	exit ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit ;;
     prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     *:GNU:*:*)
 	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
 	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+	echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
 	exit ;;
     i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
+	echo "$UNAME_MACHINE"-pc-minix
 	exit ;;
     aarch64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     aarch64_be:Linux:*:*)
 	UNAME_MACHINE=aarch64_be
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -931,63 +916,63 @@ EOF
 	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
 	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     arc:Linux:*:* | arceb:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     arm*:Linux:*:*)
-	eval $set_cc_for_build
+	eval "$set_cc_for_build"
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
 	    | grep -q __ARM_EABI__
 	then
-	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	    echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	else
 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
 		| grep -q __ARM_PCS_VFP
 	    then
-		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
 	    else
-		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
 	    fi
 	fi
 	exit ;;
     avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     cris:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
 	exit ;;
     crisv32:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
 	exit ;;
     e2k:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     frv:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     hexagon:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     i*86:Linux:*:*)
-	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
 	exit ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     k1om:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
+	eval "$set_cc_for_build"
+	sed 's/^	//' << EOF > "$dummy.c"
 	#undef CPU
 	#undef ${UNAME_MACHINE}
 	#undef ${UNAME_MACHINE}el
@@ -1001,70 +986,70 @@ EOF
 	#endif
 	#endif
 EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
+	test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
 	;;
     mips64el:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     openrisc*:Linux:*:*)
-	echo or1k-unknown-linux-${LIBC}
+	echo or1k-unknown-linux-"$LIBC"
 	exit ;;
     or32:Linux:*:* | or1k*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     padre:Linux:*:*)
-	echo sparc-unknown-linux-${LIBC}
+	echo sparc-unknown-linux-"$LIBC"
 	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-${LIBC}
+	echo hppa64-unknown-linux-"$LIBC"
 	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
-	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
-	  *)    echo hppa-unknown-linux-${LIBC} ;;
+	  PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+	  PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+	  *)    echo hppa-unknown-linux-"$LIBC" ;;
 	esac
 	exit ;;
     ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-${LIBC}
+	echo powerpc64-unknown-linux-"$LIBC"
 	exit ;;
     ppc:Linux:*:*)
-	echo powerpc-unknown-linux-${LIBC}
+	echo powerpc-unknown-linux-"$LIBC"
 	exit ;;
     ppc64le:Linux:*:*)
-	echo powerpc64le-unknown-linux-${LIBC}
+	echo powerpc64le-unknown-linux-"$LIBC"
 	exit ;;
     ppcle:Linux:*:*)
-	echo powerpcle-unknown-linux-${LIBC}
+	echo powerpcle-unknown-linux-"$LIBC"
 	exit ;;
     riscv32:Linux:*:* | riscv64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+	echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
 	exit ;;
     sh64*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     tile*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+	echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
 	exit ;;
     x86_64:Linux:*:*)
-	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
 	exit ;;
     xtensa*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1078,34 +1063,34 @@ EOF
 	# I am not positive that other SVR4 systems won't match this,
 	# I just have to hope.  -- rms.
 	# Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
 	exit ;;
     i*86:OS/2:*:*)
 	# If we were able to find `uname', then EMX Unix compatibility
 	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
+	echo "$UNAME_MACHINE"-pc-os2-emx
 	exit ;;
     i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
+	echo "$UNAME_MACHINE"-unknown-stop
 	exit ;;
     i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
+	echo "$UNAME_MACHINE"-unknown-atheos
 	exit ;;
     i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
+	echo "$UNAME_MACHINE"-pc-syllable
 	exit ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
+	echo i386-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	echo "$UNAME_MACHINE"-pc-msdosdjgpp
 	exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+    i*86:*:4.*:*)
+	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+		echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
 	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+		echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
 	fi
 	exit ;;
     i*86:*:5:[678]*)
@@ -1115,12 +1100,12 @@ EOF
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
 	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
 	exit ;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+		echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
 	elif /bin/uname -X 2>/dev/null >/dev/null ; then
 		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
 		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1130,9 +1115,9 @@ EOF
 			&& UNAME_MACHINE=i686
 		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
 			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+		echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
 	else
-		echo ${UNAME_MACHINE}-pc-sysv32
+		echo "$UNAME_MACHINE"-pc-sysv32
 	fi
 	exit ;;
     pc:*:*:*)
@@ -1152,9 +1137,9 @@ EOF
 	exit ;;
     i860:*:4.*:*) # i860-SVR4
 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	  echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
 	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	  echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
 	fi
 	exit ;;
     mini*:CTIX:SYS*5:*)
@@ -1174,9 +1159,9 @@ EOF
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
 	  && { echo i486-ncr-sysv4; exit; } ;;
@@ -1185,28 +1170,28 @@ EOF
 	test -r /etc/.relid \
 	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
-	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	echo m68k-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
 	exit ;;
     TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	echo sparc-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	echo rs6000-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	echo powerpc-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
+	echo mips-dde-sysv"$UNAME_RELEASE"
 	exit ;;
     RM*:ReliantUNIX-*:*:*)
 	echo mips-sni-sysv4
@@ -1217,7 +1202,7 @@ EOF
     *:SINIX-*:*:*)
 	if uname -p 2>/dev/null >/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
+		echo "$UNAME_MACHINE"-sni-sysv4
 	else
 		echo ns32k-sni-sysv
 	fi
@@ -1237,23 +1222,23 @@ EOF
 	exit ;;
     i*86:VOS:*:*)
 	# From Paul.Green@stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
+	echo "$UNAME_MACHINE"-stratus-vos
 	exit ;;
     *:VOS:*:*)
 	# From Paul.Green@stratus.com.
 	echo hppa1.1-stratus-vos
 	exit ;;
     mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
+	echo m68k-apple-aux"$UNAME_RELEASE"
 	exit ;;
     news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
 	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-		echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv"$UNAME_RELEASE"
 	else
-		echo mips-unknown-sysv${UNAME_RELEASE}
+		echo mips-unknown-sysv"$UNAME_RELEASE"
 	fi
 	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
@@ -1272,39 +1257,39 @@ EOF
 	echo x86_64-unknown-haiku
 	exit ;;
     SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
+	echo sx4-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
+	echo sx5-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
+	echo sx6-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-7:SUPER-UX:*:*)
-	echo sx7-nec-superux${UNAME_RELEASE}
+	echo sx7-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-8:SUPER-UX:*:*)
-	echo sx8-nec-superux${UNAME_RELEASE}
+	echo sx8-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-8R:SUPER-UX:*:*)
-	echo sx8r-nec-superux${UNAME_RELEASE}
+	echo sx8r-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-ACE:SUPER-UX:*:*)
-	echo sxace-nec-superux${UNAME_RELEASE}
+	echo sxace-nec-superux"$UNAME_RELEASE"
 	exit ;;
     Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	echo powerpc-apple-rhapsody"$UNAME_RELEASE"
 	exit ;;
     *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
 	exit ;;
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	eval $set_cc_for_build
+	eval "$set_cc_for_build"
 	if test "$UNAME_PROCESSOR" = unknown ; then
 	    UNAME_PROCESSOR=powerpc
 	fi
-	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+	if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
 	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
 		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
 		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
@@ -1332,7 +1317,7 @@ EOF
 	    # that Apple uses in portable devices.
 	    UNAME_PROCESSOR=x86_64
 	fi
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
@@ -1340,22 +1325,25 @@ EOF
 		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
 	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
 	exit ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit ;;
     NEO-*:NONSTOP_KERNEL:*:*)
-	echo neo-tandem-nsk${UNAME_RELEASE}
+	echo neo-tandem-nsk"$UNAME_RELEASE"
 	exit ;;
     NSE-*:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
+	echo nse-tandem-nsk"$UNAME_RELEASE"
 	exit ;;
     NSR-*:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
+	echo nsr-tandem-nsk"$UNAME_RELEASE"
+	exit ;;
+    NSV-*:NONSTOP_KERNEL:*:*)
+	echo nsv-tandem-nsk"$UNAME_RELEASE"
 	exit ;;
     NSX-*:NONSTOP_KERNEL:*:*)
-	echo nsx-tandem-nsk${UNAME_RELEASE}
+	echo nsx-tandem-nsk"$UNAME_RELEASE"
 	exit ;;
     *:NonStop-UX:*:*)
 	echo mips-compaq-nonstopux
@@ -1364,7 +1352,7 @@ EOF
 	echo bs2000-siemens-sysv
 	exit ;;
     DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
 	exit ;;
     *:Plan9:*:*)
 	# "uname -m" is not consistent, so use $cputype instead. 386
@@ -1375,7 +1363,7 @@ EOF
 	else
 	    UNAME_MACHINE="$cputype"
 	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
+	echo "$UNAME_MACHINE"-unknown-plan9
 	exit ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
@@ -1396,14 +1384,14 @@ EOF
 	echo pdp10-unknown-its
 	exit ;;
     SEI:*:*:SEIUX)
-	echo mips-sei-seiux${UNAME_RELEASE}
+	echo mips-sei-seiux"$UNAME_RELEASE"
 	exit ;;
     *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
 	exit ;;
     *:*VMS:*:*)
 	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
+	case "$UNAME_MACHINE" in
 	    A*) echo alpha-dec-vms ; exit ;;
 	    I*) echo ia64-dec-vms ; exit ;;
 	    V*) echo vax-dec-vms ; exit ;;
@@ -1412,32 +1400,44 @@ EOF
 	echo i386-pc-xenix
 	exit ;;
     i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+	echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
 	exit ;;
     i*86:rdos:*:*)
-	echo ${UNAME_MACHINE}-pc-rdos
+	echo "$UNAME_MACHINE"-pc-rdos
 	exit ;;
     i*86:AROS:*:*)
-	echo ${UNAME_MACHINE}-pc-aros
+	echo "$UNAME_MACHINE"-pc-aros
 	exit ;;
     x86_64:VMkernel:*:*)
-	echo ${UNAME_MACHINE}-unknown-esx
+	echo "$UNAME_MACHINE"-unknown-esx
 	exit ;;
     amd64:Isilon\ OneFS:*:*)
 	echo x86_64-unknown-onefs
 	exit ;;
 esac
 
+echo "$0: unable to guess system type" >&2
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+    mips:Linux | mips64:Linux)
+	# If we got here on MIPS GNU/Linux, output extra information.
+	cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+	;;
+esac
+
 cat >&2 <<EOF
-$0: unable to guess system type
 
 This script (version $timestamp), has failed to recognize the
 operating system you are using. If your script is old, overwrite *all*
 copies of config.guess and config.sub with the latest versions from:
 
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
 If $0 has already been updated, send the following data and any
 information you think might be pertinent to config-patches@gnu.org to
@@ -1460,16 +1460,16 @@ hostinfo               = `(hostinfo) 2>/dev/null`
 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
 
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM  = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
 EOF
 
 exit 1
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "timestamp='"
 # time-stamp-format: "%:y-%02m-%02d"
 # time-stamp-end: "'"
diff --git a/build-aux/config.sub b/build-aux/config.sub
index f4bafc1..20f7cf2 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1,8 +1,8 @@
-#!/bin/sh
+#! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2017 Free Software Foundation, Inc.
+#   Copyright 1992-2018 Free Software Foundation, Inc.
 
-timestamp='2017-04-02'
+timestamp='2018-05-05'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2017-04-02'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -33,7 +33,7 @@ timestamp='2017-04-02'
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
 
 Canonicalize a configuration name.
 
-Operation modes:
+Options:
   -h, --help         print this help, then exit
   -t, --time-stamp   print date of last modification, then exit
   -v, --version      print version number, then exit
@@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2017 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -94,7 +94,7 @@ while test $# -gt 0 ; do
 
     *local*)
        # First pass through any local machine types.
-       echo $1
+       echo "$1"
        exit ;;
 
     * )
@@ -110,28 +110,48 @@ case $# in
     exit 1;;
 esac
 
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
-  kopensolaris*-gnu* | cloudabi*-eabi* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  android-linux)
-    os=-linux-android
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
+# Spilt fields of configuration type
+IFS="-" read -r field1 field2 field3 field4 <<EOF
+$1
+EOF
+
+# Separate into logical components for further validation
+case $1 in
+	*-*-*-*)
+		basic_machine=$field1-$field2
+		os=-$field3-$field4
+		;;
+	*-*-*)
+		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+		# parts
+		maybe_os=$field2-$field3
+		case $maybe_os in
+			nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
+			| linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+			| storm-chaos* | os2-emx* | rtmk-nova*)
+				basic_machine=$field1
+				os=-$maybe_os
+				;;
+			android-linux)
+				basic_machine=$field1-unknown
+				os=-linux-android
+				;;
+			*)
+				basic_machine=$field1-$field2
+				os=-$field3
+				;;
+		esac
+		;;
+	*-*)
+		basic_machine=$field1
+		os=-$field2
+		;;
+	*)
+		basic_machine=$1
+		os=
+		;;
 esac
 
 ### Let's recognize common machines as not being operating systems so
@@ -178,44 +198,44 @@ case $os in
 		;;
 	-sco6)
 		os=-sco5v6
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
 		;;
 	-sco5)
 		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
 		;;
 	-sco4)
 		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
 		;;
 	-sco3.2.[4-9]*)
 		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
 		;;
 	-sco3.2v[4-9]*)
 		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
 		;;
 	-sco5v6*)
 		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
 		;;
 	-sco*)
 		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
 		;;
 	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
 		;;
 	-isc)
 		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
 		;;
 	-clix*)
 		basic_machine=clipper-intergraph
 		;;
 	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
 		;;
 	-lynx*178)
 		os=-lynxos178
@@ -227,10 +247,7 @@ case $os in
 		os=-lynxos
 		;;
 	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
 		;;
 	-psos*)
 		os=-psos
@@ -252,12 +269,12 @@ case $basic_machine in
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| am33_2.0 \
 	| arc | arceb \
-	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \
 	| avr | avr32 \
 	| ba \
 	| be32 | be64 \
 	| bfin \
-	| c4x | c8051 | clipper \
+	| c4x | c8051 | clipper | csky \
 	| d10v | d30v | dlx | dsp16xx \
 	| e2k | epiphany \
 	| fido | fr30 | frv | ft32 \
@@ -296,10 +313,11 @@ case $basic_machine in
 	| mt \
 	| msp430 \
 	| nds32 | nds32le | nds32be \
+	| nfp \
 	| nios | nios2 | nios2eb | nios2el \
 	| ns16k | ns32k \
 	| open8 | or1k | or1knd | or32 \
-	| pdp10 | pdp11 | pj | pjl \
+	| pdp10 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pru \
 	| pyramid \
@@ -316,7 +334,6 @@ case $basic_machine in
 	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
 	| visium \
 	| wasm32 \
-	| we32k \
 	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
 		basic_machine=$basic_machine-unknown
@@ -337,7 +354,11 @@ case $basic_machine in
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
+		;;
+	m9s12z | m68hcs12z | hcs12z | s12z)
+		basic_machine=s12z-unknown
+		os=-none
 		;;
 	ms1)
 		basic_machine=mt-unknown
@@ -366,7 +387,7 @@ case $basic_machine in
 	  ;;
 	# Object if more than one company name word.
 	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
 		exit 1
 		;;
 	# Recognize the basic CPU types with company name.
@@ -382,7 +403,7 @@ case $basic_machine in
 	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
-	| c8051-* | clipper-* | craynv-* | cydra-* \
+	| c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| e2k-* | elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@@ -423,6 +444,7 @@ case $basic_machine in
 	| mt-* \
 	| msp430-* \
 	| nds32-* | nds32le-* | nds32be-* \
+	| nfp-* \
 	| nios-* | nios2-* | nios2eb-* | nios2el-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
 	| open8-* \
@@ -461,7 +483,7 @@ case $basic_machine in
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
 	386bsd)
-		basic_machine=i386-unknown
+		basic_machine=i386-pc
 		os=-bsd
 		;;
 	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
@@ -495,7 +517,7 @@ case $basic_machine in
 		basic_machine=x86_64-pc
 		;;
 	amd64-*)
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	amdahl)
 		basic_machine=580-amdahl
@@ -540,7 +562,7 @@ case $basic_machine in
 		os=-linux
 		;;
 	blackfin-*)
-		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		os=-linux
 		;;
 	bluegene*)
@@ -548,13 +570,13 @@ case $basic_machine in
 		os=-cnk
 		;;
 	c54x-*)
-		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	c55x-*)
-		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	c6x-*)
-		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	c90)
 		basic_machine=c90-cray
@@ -643,7 +665,7 @@ case $basic_machine in
 		basic_machine=rs6000-bull
 		os=-bosx
 		;;
-	dpx2* | dpx2*-bull)
+	dpx2*)
 		basic_machine=m68k-bull
 		os=-sysv3
 		;;
@@ -652,7 +674,7 @@ case $basic_machine in
 		os=$os"spe"
 		;;
 	e500v[12]-*)
-		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		os=$os"spe"
 		;;
 	ebmon29k)
@@ -744,9 +766,6 @@ case $basic_machine in
 	hp9k8[0-9][0-9] | hp8[0-9][0-9])
 		basic_machine=hppa1.0-hp
 		;;
-	hppa-next)
-		os=-nextstep3
-		;;
 	hppaosf)
 		basic_machine=hppa1.1-hp
 		os=-osf
@@ -759,26 +778,26 @@ case $basic_machine in
 		basic_machine=i370-ibm
 		;;
 	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
 		os=-sysv32
 		;;
 	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
 		os=-sysv4
 		;;
 	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
 		os=-sysv
 		;;
 	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
 		os=-solaris2
 		;;
 	i386mach)
 		basic_machine=i386-mach
 		os=-mach
 		;;
-	i386-vsta | vsta)
+	vsta)
 		basic_machine=i386-unknown
 		os=-vsta
 		;;
@@ -797,19 +816,16 @@ case $basic_machine in
 		os=-sysv
 		;;
 	leon-*|leon[3-9]-*)
-		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+		basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
 		;;
 	m68knommu)
 		basic_machine=m68k-unknown
 		os=-linux
 		;;
 	m68knommu-*)
-		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		os=-linux
 		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
 	magnum | m3230)
 		basic_machine=mips-mips
 		os=-sysv
@@ -841,10 +857,10 @@ case $basic_machine in
 		os=-mint
 		;;
 	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
 		;;
 	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
 		;;
 	monitor)
 		basic_machine=m68k-rom68k
@@ -863,7 +879,7 @@ case $basic_machine in
 		os=-msdos
 		;;
 	ms1-*)
-		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
 		;;
 	msys)
 		basic_machine=i686-pc
@@ -905,7 +921,7 @@ case $basic_machine in
 		basic_machine=v70-nec
 		os=-sysv
 		;;
-	next | m*-next )
+	next | m*-next)
 		basic_machine=m68k-next
 		case $os in
 		    -nextstep* )
@@ -950,6 +966,9 @@ case $basic_machine in
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
+	nsv-tandem)
+		basic_machine=nsv-tandem
+		;;
 	nsx-tandem)
 		basic_machine=nsx-tandem
 		;;
@@ -985,7 +1004,7 @@ case $basic_machine in
 		os=-linux
 		;;
 	parisc-*)
-		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		os=-linux
 		;;
 	pbd)
@@ -1001,7 +1020,7 @@ case $basic_machine in
 		basic_machine=i386-pc
 		;;
 	pc98-*)
-		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	pentium | p5 | k5 | k6 | nexgen | viac3)
 		basic_machine=i586-pc
@@ -1016,16 +1035,16 @@ case $basic_machine in
 		basic_machine=i786-pc
 		;;
 	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	pentium4-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	pn)
 		basic_machine=pn-gould
@@ -1035,23 +1054,23 @@ case $basic_machine in
 	ppc | ppcbe)	basic_machine=powerpc-unknown
 		;;
 	ppc-* | ppcbe-*)
-		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle)
 		basic_machine=powerpcle-unknown
 		;;
 	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	ppc64)	basic_machine=powerpc64-unknown
 		;;
-	ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+	ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	ppc64le | powerpc64little)
 		basic_machine=powerpc64le-unknown
 		;;
 	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	ps2)
 		basic_machine=i386-ibm
@@ -1105,17 +1124,10 @@ case $basic_machine in
 	sequent)
 		basic_machine=i386-sequent
 		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
 	sh5el)
 		basic_machine=sh5le-unknown
 		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparclite-wrs | simso-wrs)
+	simso-wrs)
 		basic_machine=sparclite-wrs
 		os=-vxworks
 		;;
@@ -1134,7 +1146,7 @@ case $basic_machine in
 		os=-sysv4
 		;;
 	strongarm-* | thumb-*)
-		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
 		;;
 	sun2)
 		basic_machine=m68000-sun
@@ -1248,9 +1260,6 @@ case $basic_machine in
 		basic_machine=a29k-wrs
 		os=-vxworks
 		;;
-	wasm32)
-		basic_machine=wasm32-unknown
-		;;
 	w65*)
 		basic_machine=w65-wdc
 		os=-none
@@ -1259,6 +1268,9 @@ case $basic_machine in
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
+	x64)
+		basic_machine=x86_64-pc
+		;;
 	xbox)
 		basic_machine=i686-pc
 		os=-mingw32
@@ -1267,20 +1279,12 @@ case $basic_machine in
 		basic_machine=xps100-honeywell
 		;;
 	xscale-* | xscalee[bl]-*)
-		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
 		;;
 	ymp)
 		basic_machine=ymp-cray
 		os=-unicos
 		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
-		;;
-	z80-*-coff)
-		basic_machine=z80-unknown
-		os=-sim
-		;;
 	none)
 		basic_machine=none-none
 		os=-none
@@ -1309,10 +1313,6 @@ case $basic_machine in
 	vax)
 		basic_machine=vax-dec
 		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
-		;;
 	pdp11)
 		basic_machine=pdp11-dec
 		;;
@@ -1322,9 +1322,6 @@ case $basic_machine in
 	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-		basic_machine=sparc-sun
-		;;
 	cydra)
 		basic_machine=cydra-cydrome
 		;;
@@ -1344,7 +1341,7 @@ case $basic_machine in
 		# Make sure to match an already-canonicalized machine name.
 		;;
 	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
 		exit 1
 		;;
 esac
@@ -1352,10 +1349,10 @@ esac
 # Here we canonicalize certain aliases for manufacturers.
 case $basic_machine in
 	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
 		;;
 	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
 		;;
 	*)
 		;;
@@ -1363,11 +1360,11 @@ esac
 
 # Decode manufacturer-specific aliases for certain operating systems.
 
-if [ x"$os" != x"" ]
+if [ x$os != x ]
 then
 case $os in
-	# First match some system type aliases
-	# that might get confused with valid system types.
+	# First match some system type aliases that might get confused
+	# with valid system types.
 	# -solaris* is a basic system type, with this one exception.
 	-auroraux)
 		os=-auroraux
@@ -1378,18 +1375,19 @@ case $os in
 	-solaris)
 		os=-solaris2
 		;;
-	-svr4*)
-		os=-sysv4
-		;;
 	-unixware*)
 		os=-sysv4.2uw
 		;;
 	-gnu/linux*)
 		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
 		;;
-	# First accept the basic system types.
+	# es1800 is here to avoid being matched by es* (a different OS)
+	-es1800*)
+		os=-ose
+		;;
+	# Now accept the basic system types.
 	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
+	# Each alternative MUST end in a * to match a version number.
 	# -sysv* is not here because it comes later, after sysvr4.
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
@@ -1399,25 +1397,26 @@ case $os in
 	      | -aos* | -aros* | -cloudabi* | -sortix* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
 	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \
 	      | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 	      | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
 	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -morphos* | -superux* | -rtmk* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
 	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
-	      | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
+	      | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
+	      | -midnightbsd*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1434,12 +1433,12 @@ case $os in
 	-nto*)
 		os=`echo $os | sed -e 's|nto|nto-qnx|'`
 		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	-sim | -xray | -os68k* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* \
 	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 		;;
 	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
+		os=`echo "$os" | sed -e 's|mac|macos|'`
 		;;
 	-linux-dietlibc)
 		os=-linux-dietlibc
@@ -1448,10 +1447,10 @@ case $os in
 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
 		;;
 	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
 		;;
 	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
 		;;
 	-opened*)
 		os=-openedition
@@ -1462,12 +1461,6 @@ case $os in
 	-wince*)
 		os=-wince
 		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
 	-utek*)
 		os=-bsd
 		;;
@@ -1492,7 +1485,7 @@ case $os in
 	-nova*)
 		os=-rtmk-nova
 		;;
-	-ns2 )
+	-ns2)
 		os=-nextstep2
 		;;
 	-nsk*)
@@ -1514,7 +1507,7 @@ case $os in
 	-oss*)
 		os=-sysv3
 		;;
-	-svr4)
+	-svr4*)
 		os=-sysv4
 		;;
 	-svr3)
@@ -1529,34 +1522,44 @@ case $os in
 	-ose*)
 		os=-ose
 		;;
-	-es1800*)
-		os=-ose
-		;;
-	-xenix)
-		os=-xenix
-		;;
 	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 		os=-mint
 		;;
-	-aros*)
-		os=-aros
-		;;
 	-zvmoe)
 		os=-zvmoe
 		;;
 	-dicos*)
 		os=-dicos
 		;;
+	-pikeos*)
+		# Until real need of OS specific support for
+		# particular features comes up, bare metal
+		# configurations are quite functional.
+		case $basic_machine in
+		    arm*)
+			os=-eabi
+			;;
+		    *)
+			os=-elf
+			;;
+		esac
+		;;
 	-nacl*)
 		;;
 	-ios)
 		;;
 	-none)
 		;;
+	-*-eabi)
+		case $basic_machine in
+		    arm*)
+			;;
+		esac
+		;;
 	*)
 		# Get rid of the `-' at the beginning of $os.
 		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
 		exit 1
 		;;
 esac
@@ -1652,9 +1655,6 @@ case $basic_machine in
 	*-be)
 		os=-beos
 		;;
-	*-haiku)
-		os=-haiku
-		;;
 	*-ibm)
 		os=-aix
 		;;
@@ -1694,7 +1694,7 @@ case $basic_machine in
 	m88k-omron*)
 		os=-luna
 		;;
-	*-next )
+	*-next)
 		os=-nextstep
 		;;
 	*-sequent)
@@ -1709,9 +1709,6 @@ case $basic_machine in
 	i370-*)
 		os=-mvs
 		;;
-	*-next)
-		os=-nextstep3
-		;;
 	*-gould)
 		os=-sysv
 		;;
@@ -1821,15 +1818,15 @@ case $basic_machine in
 				vendor=stratus
 				;;
 		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
 		;;
 esac
 
-echo $basic_machine$os
+echo "$basic_machine$os"
 exit
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "timestamp='"
 # time-stamp-format: "%:y-%02m-%02d"
 # time-stamp-end: "'"
diff --git a/build-aux/depcomp b/build-aux/depcomp
index 30379e2..65cbf70 100755
--- a/build-aux/depcomp
+++ b/build-aux/depcomp
@@ -1,9 +1,9 @@
-#!/bin/sh
+#! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@ scriptversion=2016-01-11.22; # UTC
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -783,7 +783,7 @@ exit 0
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
 # time-stamp-time-zone: "UTC0"
diff --git a/build-aux/install-sh b/build-aux/install-sh
index 0360b79..8175c64 100755
--- a/build-aux/install-sh
+++ b/build-aux/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-11.20; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -271,15 +271,18 @@ do
     fi
     dst=$dst_arg
 
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
+    # If destination is a directory, append the input filename.
     if test -d "$dst"; then
       if test "$is_target_a_directory" = never; then
         echo "$0: $dst_arg: Is a directory" >&2
         exit 1
       fi
       dstdir=$dst
-      dst=$dstdir/`basename "$src"`
+      dstbase=`basename "$src"`
+      case $dst in
+	*/) dst=$dst$dstbase;;
+	*)  dst=$dst/$dstbase;;
+      esac
       dstdir_status=0
     else
       dstdir=`dirname "$dst"`
@@ -288,6 +291,11 @@ do
     fi
   fi
 
+  case $dstdir in
+    */) dstdirslash=$dstdir;;
+    *)  dstdirslash=$dstdir/;;
+  esac
+
   obsolete_mkdir_used=false
 
   if test $dstdir_status != 0; then
@@ -324,34 +332,43 @@ do
             # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
             ;;
           *)
+            # Note that $RANDOM variable is not portable (e.g. dash);  Use it
+            # here however when possible just to lower collision chance.
             tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-            trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
 
+            trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+            # Because "mkdir -p" follows existing symlinks and we likely work
+            # directly in world-writeable /tmp, make sure that the '$tmpdir'
+            # directory is successfully created first before we actually test
+            # 'mkdir -p' feature.
             if (umask $mkdir_umask &&
-                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+                $mkdirprog $mkdir_mode "$tmpdir" &&
+                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
             then
               if test -z "$dir_arg" || {
                    # Check for POSIX incompatibilities with -m.
                    # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
                    # other-writable bit of parent directory when it shouldn't.
                    # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-                   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                   test_tmpdir="$tmpdir/a"
+                   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
                    case $ls_ld_tmpdir in
                      d????-?r-*) different_mode=700;;
                      d????-?--*) different_mode=755;;
                      *) false;;
                    esac &&
-                   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-                     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+                     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
                      test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
                    }
                  }
               then posix_mkdir=:
               fi
-              rmdir "$tmpdir/d" "$tmpdir"
+              rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
             else
               # Remove any dirs left behind by ancient mkdir implementations.
-              rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+              rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
             fi
             trap '' 0;;
         esac;;
@@ -427,8 +444,8 @@ do
   else
 
     # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_rm.$$_
+    dsttmp=${dstdirslash}_inst.$$_
+    rmtmp=${dstdirslash}_rm.$$_
 
     # Trap to clean up those temp files at exit.
     trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
@@ -493,7 +510,7 @@ do
 done
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
 # time-stamp-time-zone: "UTC0"
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
index 30be9c8..7f3523d 100644
--- a/build-aux/ltmain.sh
+++ b/build-aux/ltmain.sh
@@ -2124,7 +2124,7 @@ fi
 # a configuration failure hint, and exit.
 func_fatal_configuration ()
 {
-    func__fatal_error ${1+"$@"} \
+    func_fatal_error ${1+"$@"} \
       "See the $PACKAGE documentation for more information." \
       "Fatal configuration error."
 }
diff --git a/build-aux/missing b/build-aux/missing
index b7e571e..625aeb1 100755
--- a/build-aux/missing
+++ b/build-aux/missing
@@ -1,9 +1,9 @@
-#!/bin/sh
+#! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2016-01-11.22; # UTC
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -101,9 +101,9 @@ else
   exit $st
 fi
 
-perl_URL=http://www.perl.org/
-flex_URL=http://flex.sourceforge.net/
-gnu_software_URL=http://www.gnu.org/software
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
 
 program_details ()
 {
@@ -207,7 +207,7 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
 exit $st
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
 # time-stamp-time-zone: "UTC0"
diff --git a/build-aux/test-driver b/build-aux/test-driver
index de1e61d..b8521a4 100755
--- a/build-aux/test-driver
+++ b/build-aux/test-driver
@@ -1,9 +1,9 @@
-#!/bin/sh
+#! /bin/sh
 # test-driver - basic testsuite driver script.
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 2011-2017 Free Software Foundation, Inc.
+# Copyright (C) 2011-2018 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@ scriptversion=2016-01-11.22; # UTC
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -140,7 +140,7 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
 # time-stamp-time-zone: "UTC0"
diff --git a/config.h.in b/config.h.in
index eb82ae7..e040793 100644
--- a/config.h.in
+++ b/config.h.in
@@ -62,9 +62,6 @@
 /* Define to 1 if you have the `ovirt_api_search_vms' function. */
 #undef HAVE_OVIRT_API_SEARCH_VMS
 
-/* Have rest_proxy_auth_cancel and OVIRT_REST_CALL_ERROR_CANCELLED? */
-#undef HAVE_OVIRT_CANCEL
-
 /* Define to 1 if you have the `ovirt_cluster_get_data_center' function. */
 #undef HAVE_OVIRT_CLUSTER_GET_DATA_CENTER
 
@@ -113,6 +110,9 @@
 /* Have virDomainOpenGraphicsFD? */
 #undef HAVE_VIR_DOMAIN_OPEN_GRAPHICS_FD
 
+/* Have vte? */
+#undef HAVE_VTE
+
 /* Define to 1 if you have the <windows.h> header file. */
 #undef HAVE_WINDOWS_H
 
diff --git a/configure b/configure
index 9d53896..39f74f5 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for virt-viewer 7.0.
+# Generated by GNU Autoconf 2.69 for virt-viewer 8.0.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='virt-viewer'
 PACKAGE_TARNAME='virt-viewer'
-PACKAGE_VERSION='7.0'
-PACKAGE_STRING='virt-viewer 7.0'
+PACKAGE_VERSION='8.0'
+PACKAGE_STRING='virt-viewer 8.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -643,6 +643,10 @@ HAVE_OVIRT_FALSE
 HAVE_OVIRT_TRUE
 OVIRT_LIBS
 OVIRT_CFLAGS
+HAVE_VTE_FALSE
+HAVE_VTE_TRUE
+VTE_LIBS
+VTE_CFLAGS
 HAVE_SPICE_GTK_FALSE
 HAVE_SPICE_GTK_TRUE
 SPICE_PROTOCOL_LIBS
@@ -750,7 +754,6 @@ am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
 AMDEP_TRUE
-am__quote
 am__include
 DEPDIR
 OBJEXT
@@ -763,6 +766,7 @@ CC
 OS_WIN32_FALSE
 OS_WIN32_TRUE
 WIXL_ARCH
+REST_REQUIRED
 GOVIRT_REQUIRED
 SPICE_PROTOCOL_REQUIRED
 SPICE_GTK_REQUIRED
@@ -844,7 +848,8 @@ PACKAGE_VERSION
 PACKAGE_TARNAME
 PACKAGE_NAME
 PATH_SEPARATOR
-SHELL'
+SHELL
+am__quote'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
@@ -864,6 +869,7 @@ enable_nls
 with_libvirt
 with_gtk_vnc
 with_spice_gtk
+with_vte
 with_ovirt
 with_osid
 with_buildid
@@ -897,6 +903,8 @@ SPICE_GTK_CFLAGS
 SPICE_GTK_LIBS
 SPICE_PROTOCOL_CFLAGS
 SPICE_PROTOCOL_LIBS
+VTE_CFLAGS
+VTE_LIBS
 OVIRT_CFLAGS
 OVIRT_LIBS'
 
@@ -1439,7 +1447,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures virt-viewer 7.0 to adapt to many kinds of systems.
+\`configure' configures virt-viewer 8.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1509,7 +1517,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of virt-viewer 7.0:";;
+     short | recursive ) echo "Configuration of virt-viewer 8.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1549,6 +1557,7 @@ Optional Packages:
   --without-libvirt       Ignore presence of libvirt and disable it
   --without-gtk-vnc       Ignore presence of gtk-vnc and disable it
   --without-spice-gtk     Ignore presence of spice-gtk and disable it
+  --without-vte           Ignore presence of vte and disable it
   --without-ovirt         Ignore presence of librest and disable oVirt support
   --with-osid=id          Set OS ID for use in .vv files
   --with-buildid=id       Set additional build version details
@@ -1596,6 +1605,8 @@ Some influential environment variables:
               C compiler flags for SPICE_PROTOCOL, overriding pkg-config
   SPICE_PROTOCOL_LIBS
               linker flags for SPICE_PROTOCOL, overriding pkg-config
+  VTE_CFLAGS  C compiler flags for VTE, overriding pkg-config
+  VTE_LIBS    linker flags for VTE, overriding pkg-config
   OVIRT_CFLAGS
               C compiler flags for OVIRT, overriding pkg-config
   OVIRT_LIBS  linker flags for OVIRT, overriding pkg-config
@@ -1666,7 +1677,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-virt-viewer configure 7.0
+virt-viewer configure 8.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2031,7 +2042,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by virt-viewer $as_me 7.0, which was
+It was created by virt-viewer $as_me 8.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2412,7 +2423,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 ac_config_headers="$ac_config_headers config.h"
 
-am__api_version='1.15'
+am__api_version='1.16'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -2898,7 +2909,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='virt-viewer'
- VERSION='7.0'
+ VERSION='8.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2928,8 +2939,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
 # For better backward compatibility.  To be removed once Automake 1.9.x
 # dies out for good.  For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 mkdir_p='$(MKDIR_P)'
 
 # We need awk for the "check" target (and possibly the TAP driver).  The
@@ -2980,7 +2991,7 @@ END
 Aborting the configuration process, to ensure you take notice of the issue.
 
 You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
 
 If you want to complete the configuration process using your problematic
 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -3106,8 +3117,8 @@ AM_BACKSLASH='\'
 
 
 # Keep these two definitions in agreement.
-GLIB2_REQUIRED="2.38"
-GLIB2_ENCODED_VERSION="GLIB_VERSION_2_38"
+GLIB2_REQUIRED="2.40"
+GLIB2_ENCODED_VERSION="GLIB_VERSION_2_40"
 
 # Keep these two definitions in agreement.
 GTK_REQUIRED="3.12"
@@ -3119,7 +3130,9 @@ LIBVIRT_GLIB_REQUIRED="0.1.8"
 GTK_VNC_REQUIRED="0.4.0"
 SPICE_GTK_REQUIRED="0.35"
 SPICE_PROTOCOL_REQUIRED="0.12.7"
-GOVIRT_REQUIRED="0.3.2"
+GOVIRT_REQUIRED="0.3.3"
+REST_REQUIRED="0.8"
+
 
 
 
@@ -4012,45 +4025,45 @@ DEPDIR="${am__leading_dot}deps"
 
 ac_config_commands="$ac_config_commands depfiles"
 
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
 am__doit:
-	@echo this is the am__doit target
+	@echo this is the am__doit target >confinc.out
 .PHONY: am__doit
 END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
 am__include="#"
 am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }
+  case $?:`cat confinc.out 2>/dev/null` in #(
+  '0:this is the am__doit target') :
+    case $s in #(
+  BSD) :
+    am__include='.include' am__quote='"' ;; #(
+  *) :
+    am__include='include' am__quote='' ;;
+esac ;; #(
+  *) :
      ;;
-   esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
+esac
+  if test "$am__include" != "#"; then
+    _am_result="yes ($s style)"
+    break
+  fi
+done
+rm -f confinc.* confmf.*
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+$as_echo "${_am_result}" >&6; }
 
 # Check whether --enable-dependency-tracking was given.
 if test "${enable_dependency_tracking+set}" = set; then :
@@ -14783,6 +14796,132 @@ fi
 
 
 
+# Check whether --with-vte was given.
+if test "${with_vte+set}" = set; then :
+  withval=$with_vte;
+fi
+
+
+if test "x$with_vte" != "xno" && test "x$with_vte" != "xyes"; then :
+  if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vte-2.91\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "vte-2.91") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  with_vte=yes
+else
+  with_vte=no
+fi
+fi
+
+if test "x$with_vte" = "xyes"; then :
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VTE" >&5
+$as_echo_n "checking for VTE... " >&6; }
+
+if test -n "$VTE_CFLAGS"; then
+    pkg_cv_VTE_CFLAGS="$VTE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vte-2.91\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "vte-2.91") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_VTE_CFLAGS=`$PKG_CONFIG --cflags "vte-2.91" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$VTE_LIBS"; then
+    pkg_cv_VTE_LIBS="$VTE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vte-2.91\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "vte-2.91") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_VTE_LIBS=`$PKG_CONFIG --libs "vte-2.91" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        VTE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "vte-2.91" 2>&1`
+        else
+	        VTE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "vte-2.91" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$VTE_PKG_ERRORS" >&5
+
+	as_fn_error $? "Package requirements (vte-2.91) were not met:
+
+$VTE_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables VTE_CFLAGS
+and VTE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables VTE_CFLAGS
+and VTE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+	VTE_CFLAGS=$pkg_cv_VTE_CFLAGS
+	VTE_LIBS=$pkg_cv_VTE_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+$as_echo "#define HAVE_VTE 1" >>confdefs.h
+
+
+fi
+ if test "x$with_vte" = "xyes"; then
+  HAVE_VTE_TRUE=
+  HAVE_VTE_FALSE='#'
+else
+  HAVE_VTE_TRUE='#'
+  HAVE_VTE_FALSE=
+fi
+
+
+
 # Check whether --with-ovirt was given.
 if test "${with_ovirt+set}" = set; then :
   withval=$with_ovirt;
@@ -14812,12 +14951,12 @@ if test -n "$OVIRT_CFLAGS"; then
     pkg_cv_OVIRT_CFLAGS="$OVIRT_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"govirt-1.0 >= \$GOVIRT_REQUIRED\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "govirt-1.0 >= $GOVIRT_REQUIRED") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"govirt-1.0 >= \$GOVIRT_REQUIRED rest-0.7 >= REST_REQUIRED\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "govirt-1.0 >= $GOVIRT_REQUIRED rest-0.7 >= REST_REQUIRED") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_OVIRT_CFLAGS=`$PKG_CONFIG --cflags "govirt-1.0 >= $GOVIRT_REQUIRED" 2>/dev/null`
+  pkg_cv_OVIRT_CFLAGS=`$PKG_CONFIG --cflags "govirt-1.0 >= $GOVIRT_REQUIRED rest-0.7 >= REST_REQUIRED" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -14829,12 +14968,12 @@ if test -n "$OVIRT_LIBS"; then
     pkg_cv_OVIRT_LIBS="$OVIRT_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"govirt-1.0 >= \$GOVIRT_REQUIRED\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "govirt-1.0 >= $GOVIRT_REQUIRED") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"govirt-1.0 >= \$GOVIRT_REQUIRED rest-0.7 >= REST_REQUIRED\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "govirt-1.0 >= $GOVIRT_REQUIRED rest-0.7 >= REST_REQUIRED") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_OVIRT_LIBS=`$PKG_CONFIG --libs "govirt-1.0 >= $GOVIRT_REQUIRED" 2>/dev/null`
+  pkg_cv_OVIRT_LIBS=`$PKG_CONFIG --libs "govirt-1.0 >= $GOVIRT_REQUIRED rest-0.7 >= REST_REQUIRED" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -14855,14 +14994,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        OVIRT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "govirt-1.0 >= $GOVIRT_REQUIRED" 2>&1`
+	        OVIRT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "govirt-1.0 >= $GOVIRT_REQUIRED rest-0.7 >= REST_REQUIRED" 2>&1`
         else
-	        OVIRT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "govirt-1.0 >= $GOVIRT_REQUIRED" 2>&1`
+	        OVIRT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "govirt-1.0 >= $GOVIRT_REQUIRED rest-0.7 >= REST_REQUIRED" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$OVIRT_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (govirt-1.0 >= $GOVIRT_REQUIRED) were not met:
+	as_fn_error $? "Package requirements (govirt-1.0 >= $GOVIRT_REQUIRED rest-0.7 >= REST_REQUIRED) were not met:
 
 $OVIRT_PKG_ERRORS
 
@@ -14901,24 +15040,6 @@ $as_echo "#define HAVE_OVIRT 1" >>confdefs.h
        SAVED_LIBS="$LIBS"
        CFLAGS="$OVIRT_CFLAGS"
        LIBS="$OVIRT_LIBS"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <govirt/govirt.h>
-int
-main ()
-{
-static int err = OVIRT_REST_CALL_ERROR_CANCELLED;
-         void *fun = rest_proxy_auth_cancel;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-$as_echo "#define HAVE_OVIRT_CANCEL 1" >>confdefs.h
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
        for ac_func in ovirt_api_search_vms ovirt_vm_get_host ovirt_host_get_cluster ovirt_cluster_get_data_center
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -15236,6 +15357,10 @@ if test -z "${HAVE_SPICE_GTK_TRUE}" && test -z "${HAVE_SPICE_GTK_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_SPICE_GTK\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_VTE_TRUE}" && test -z "${HAVE_VTE_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_VTE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_OVIRT_TRUE}" && test -z "${HAVE_OVIRT_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_OVIRT\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -15641,7 +15766,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by virt-viewer $as_me 7.0, which was
+This file was extended by virt-viewer $as_me 8.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15711,7 +15836,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-virt-viewer config.status 7.0
+virt-viewer config.status 8.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -15830,7 +15955,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 #
 # INIT-COMMANDS
 #
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
 
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -16779,29 +16904,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
   # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
+  # TODO: see whether this extra hack can be removed once we start
+  # requiring Autoconf 2.70 or later.
+  case $CONFIG_FILES in #(
+  *\'*) :
+    eval set x "$CONFIG_FILES" ;; #(
+  *) :
+    set x $CONFIG_FILES ;; #(
+  *) :
+     ;;
+esac
   shift
-  for mf
+  # Used to flag and report bootstrapping failures.
+  am_rc=0
+  for am_mf
   do
     # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named 'Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
+    am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile which includes
+    # dependency-tracking related rules and includes.
+    # Grep'ing the whole file directly is not great: AIX grep has a line
     # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$mf" : 'X\(//\)[^/]' \| \
-	 X"$mf" : 'X\(//\)$' \| \
-	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
+    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+      || continue
+    am_dirpart=`$as_dirname -- "$am_mf" ||
+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$am_mf" : 'X\(//\)[^/]' \| \
+	 X"$am_mf" : 'X\(//\)$' \| \
+	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$am_mf" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -16819,53 +16950,48 @@ $as_echo X"$mf" |
 	    q
 	  }
 	  s/.*/./; q'`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running 'make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "$am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$file" : 'X\(//\)[^/]' \| \
-	 X"$file" : 'X\(//\)$' \| \
-	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
+    am_filepart=`$as_basename -- "$am_mf" ||
+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$am_mf" : 'X\(//\)$' \| \
+	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$am_mf" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
 	    s//\1/
 	    q
 	  }
-	  /^X\(\/\/\)$/{
+	  /^X\/\(\/\/\)$/{
 	    s//\1/
 	    q
 	  }
-	  /^X\(\/\).*/{
+	  /^X\/\(\/\).*/{
 	    s//\1/
 	    q
 	  }
 	  s/.*/./; q'`
-      as_dir=$dirpart/$fdir; as_fn_mkdir_p
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
+    { echo "$as_me:$LINENO: cd "$am_dirpart" \
+      && sed -e '/# am--include-marker/d' "$am_filepart" \
+        | $MAKE -f - am--depfiles" >&5
+   (cd "$am_dirpart" \
+      && sed -e '/# am--include-marker/d' "$am_filepart" \
+        | $MAKE -f - am--depfiles) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } || am_rc=$?
   done
+  if test $am_rc -ne 0; then
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Something went wrong bootstrapping makefile fragments
+    for automatic dependency tracking.  Try re-running configure with the
+    '--disable-dependency-tracking' option to at least be able to build
+    the package (albeit without support for automatic dependency tracking).
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+  { am_dirpart=; unset am_dirpart;}
+  { am_filepart=; unset am_filepart;}
+  { am_mf=; unset am_mf;}
+  { am_rc=; unset am_rc;}
+  rm -f conftest-deps.mk
 }
  ;;
     "libtool":C)
@@ -17501,6 +17627,10 @@ $as_echo "$as_me: " >&6;}
 $as_echo "$as_me:    SPICE_GTK: $SPICE_GTK_CFLAGS $SPICE_GTK_LIBS" >&6;}
 { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
 $as_echo "$as_me: " >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}:          VTE: $VTE_CFLAGS $VTE_LIBS" >&5
+$as_echo "$as_me:          VTE: $VTE_CFLAGS $VTE_LIBS" >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
+$as_echo "$as_me: " >&6;}
 { $as_echo "$as_me:${as_lineno-$LINENO}:      LIBXML2: $LIBXML2_CFLAGS $LIBXML2_LIBS" >&5
 $as_echo "$as_me:      LIBXML2: $LIBXML2_CFLAGS $LIBXML2_LIBS" >&6;}
 { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
diff --git a/configure.ac b/configure.ac
index 1b99066..5598c61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 
-AC_INIT([virt-viewer],[7.0])
+AC_INIT([virt-viewer],[8.0])
 AC_CONFIG_SRCDIR(src/virt-viewer-main.c)
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([build-aux])
@@ -13,8 +13,8 @@ m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
 AM_SILENT_RULES([yes])
 
 # Keep these two definitions in agreement.
-GLIB2_REQUIRED="2.38"
-GLIB2_ENCODED_VERSION="GLIB_VERSION_2_38"
+GLIB2_REQUIRED="2.40"
+GLIB2_ENCODED_VERSION="GLIB_VERSION_2_40"
 
 # Keep these two definitions in agreement.
 GTK_REQUIRED="3.12"
@@ -26,7 +26,8 @@ LIBVIRT_GLIB_REQUIRED="0.1.8"
 GTK_VNC_REQUIRED="0.4.0"
 SPICE_GTK_REQUIRED="0.35"
 SPICE_PROTOCOL_REQUIRED="0.12.7"
-GOVIRT_REQUIRED="0.3.2"
+GOVIRT_REQUIRED="0.3.3"
+REST_REQUIRED="0.8"
 
 AC_SUBST([GLIB2_REQUIRED])
 AC_SUBST([LIBXML2_REQUIRED])
@@ -37,6 +38,7 @@ AC_SUBST([GTK_VNC_REQUIRED])
 AC_SUBST([SPICE_GTK_REQUIRED])
 AC_SUBST([SPICE_PROTOCOL_REQUIRED])
 AC_SUBST([GOVIRT_REQUIRED])
+AC_SUBST([REST_REQUIRED])
 
 AC_MSG_CHECKING([for native Win32])
 case "$host_os" in
@@ -170,6 +172,18 @@ AS_IF([test "x$with_spice_gtk" = "xyes"],
 )
 AM_CONDITIONAL([HAVE_SPICE_GTK], [test "x$with_spice_gtk" = "xyes"])
 
+AC_ARG_WITH([vte],
+    AS_HELP_STRING([--without-vte], [Ignore presence of vte and disable it]))
+
+AS_IF([test "x$with_vte" != "xno" && test "x$with_vte" != "xyes"],
+      [PKG_CHECK_EXISTS([vte-2.91], [with_vte=yes], [with_vte=no])])
+
+AS_IF([test "x$with_vte" = "xyes"],
+      [PKG_CHECK_MODULES(VTE, [vte-2.91])]
+      [AC_DEFINE([HAVE_VTE], 1, [Have vte?])]
+)
+AM_CONDITIONAL([HAVE_VTE], [test "x$with_vte" = "xyes"])
+
 AC_ARG_WITH([ovirt],
     AS_HELP_STRING([--without-ovirt], [Ignore presence of librest and disable oVirt support]))
 
@@ -178,17 +192,12 @@ AS_IF([test "x$with_ovirt" != "xno" && test "x$with_ovirt" != "xyes"],
                         [with_ovirt=yes], [with_ovirt=no])])
 
 AS_IF([test "x$with_ovirt" = "xyes"],
-      [PKG_CHECK_MODULES([OVIRT], [govirt-1.0 >= $GOVIRT_REQUIRED])]
+      [PKG_CHECK_MODULES([OVIRT], [govirt-1.0 >= $GOVIRT_REQUIRED rest-0.7 >= REST_REQUIRED])]
       [AC_DEFINE([HAVE_OVIRT], 1, [Have libgovirt?])]
       [SAVED_CFLAGS="$CFLAGS"
        SAVED_LIBS="$LIBS"
        CFLAGS="$OVIRT_CFLAGS"
        LIBS="$OVIRT_LIBS"
-       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <govirt/govirt.h>]],
-        [static int err = OVIRT_REST_CALL_ERROR_CANCELLED;
-         void *fun = rest_proxy_auth_cancel;])],
-        [AC_DEFINE([HAVE_OVIRT_CANCEL], 1, [Have rest_proxy_auth_cancel and OVIRT_REST_CALL_ERROR_CANCELLED?])],
-        [])
        AC_CHECK_FUNCS([ovirt_api_search_vms ovirt_vm_get_host ovirt_host_get_cluster ovirt_cluster_get_data_center],
                       [AC_DEFINE([HAVE_OVIRT_DATA_CENTER], 1, [Have support for data center])],
                       []
@@ -274,6 +283,8 @@ AC_MSG_NOTICE([     GTK_VNC: $GTK_VNC_CFLAGS $GTK_VNC_LIBS])
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([   SPICE_GTK: $SPICE_GTK_CFLAGS $SPICE_GTK_LIBS])
 AC_MSG_NOTICE([])
+AC_MSG_NOTICE([         VTE: $VTE_CFLAGS $VTE_LIBS])
+AC_MSG_NOTICE([])
 AC_MSG_NOTICE([     LIBXML2: $LIBXML2_CFLAGS $LIBXML2_LIBS])
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([     LIBVIRT: $LIBVIRT_CFLAGS $LIBVIRT_LIBS])
diff --git a/data/Makefile.am b/data/Makefile.am
index 54be2b1..1f6c8bf 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -36,10 +36,10 @@ else
 HaveGtkVnc = False
 endif
 
-deps.txt:
-	$(AM_V_GEN)rpm -qa | grep $(host_os) | sort | unix2dos > $@
+buildenv.txt:
+	$(AM_V_GEN)rpm -qa | sort | unix2dos > $@
 
-virt-viewer-$(WIXL_ARCH)-$(VERSION).msi: virt-viewer.wxs deps.txt
+virt-viewer-$(WIXL_ARCH)-$(VERSION).msi: virt-viewer.wxs buildenv.txt
 	$(AM_V_GEN)DESTDIR=`mktemp -d` &&				\
 	make -C $(top_builddir) install DESTDIR=$$DESTDIR >/dev/null &&	\
 	find $$DESTDIR | wixl-heat -p $$DESTDIR$(prefix)/		\
@@ -59,7 +59,7 @@ virt-viewer-$(WIXL_ARCH)-$(VERSION).msi: virt-viewer.wxs deps.txt
 msi: virt-viewer-$(WIXL_ARCH)-$(VERSION).msi
 
 CLEANFILES +=					\
-	deps.txt				\
+	buildenv.txt				\
 	virt-viewer-$(WIXL_ARCH)-$(VERSION).msi	\
 	$(NULL)
 
diff --git a/data/Makefile.in b/data/Makefile.in
index e70da70..9f5a16a 100644
--- a/data/Makefile.in
+++ b/data/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -89,7 +89,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 @OS_WIN32_TRUE@am__append_1 = \
-@OS_WIN32_TRUE@	deps.txt				\
+@OS_WIN32_TRUE@	buildenv.txt				\
 @OS_WIN32_TRUE@	virt-viewer-$(WIXL_ARCH)-$(VERSION).msi	\
 @OS_WIN32_TRUE@	$(NULL)
 
@@ -97,11 +97,10 @@ host_triplet = @host@
 @OS_WIN32_FALSE@am__append_3 = $(MIMEFILES) $(DESKTOPFILES) $(APPDATAFILES)
 subdir = data
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
-	$(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -271,6 +270,7 @@ POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 RANLIB = @RANLIB@
+REST_REQUIRED = @REST_REQUIRED@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -284,6 +284,8 @@ STRIP = @STRIP@
 UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+VTE_CFLAGS = @VTE_CFLAGS@
+VTE_LIBS = @VTE_LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WINDOWS_PRODUCTVERSION = @WINDOWS_PRODUCTVERSION@
 WINDRES = @WINDRES@
@@ -384,8 +386,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -474,7 +476,10 @@ ctags CTAGS:
 cscope cscopelist:
 
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -638,10 +643,10 @@ uninstall-am: uninstall-appdataDATA uninstall-desktopDATA \
 # (in maintainer-mode)
 all-local: virt-viewer.wxs
 
-@OS_WIN32_TRUE@deps.txt:
-@OS_WIN32_TRUE@	$(AM_V_GEN)rpm -qa | grep $(host_os) | sort | unix2dos > $@
+@OS_WIN32_TRUE@buildenv.txt:
+@OS_WIN32_TRUE@	$(AM_V_GEN)rpm -qa | sort | unix2dos > $@
 
-@OS_WIN32_TRUE@virt-viewer-$(WIXL_ARCH)-$(VERSION).msi: virt-viewer.wxs deps.txt
+@OS_WIN32_TRUE@virt-viewer-$(WIXL_ARCH)-$(VERSION).msi: virt-viewer.wxs buildenv.txt
 @OS_WIN32_TRUE@	$(AM_V_GEN)DESTDIR=`mktemp -d` &&				\
 @OS_WIN32_TRUE@	make -C $(top_builddir) install DESTDIR=$$DESTDIR >/dev/null &&	\
 @OS_WIN32_TRUE@	find $$DESTDIR | wixl-heat -p $$DESTDIR$(prefix)/		\
diff --git a/data/remote-viewer.desktop.in b/data/remote-viewer.desktop.in
index 213642c..24bcf6a 100644
--- a/data/remote-viewer.desktop.in
+++ b/data/remote-viewer.desktop.in
@@ -4,7 +4,7 @@ _Comment=Access remote desktops
 Exec=remote-viewer %u
 Type=Application
 Terminal=false
-MimeType=x-scheme-handler/spice;application/x-virt-viewer;
+MimeType=x-scheme-handler/spice;x-scheme-handler/spice+unix;x-scheme-handler/spice+tls;application/x-virt-viewer;
 StartupNotify=true
 Categories=GNOME;GTK;Network;RemoteAccess;
 Icon=virt-viewer
diff --git a/data/virt-viewer.wxs.in b/data/virt-viewer.wxs.in
index 2047720..99d70d5 100644
--- a/data/virt-viewer.wxs.in
+++ b/data/virt-viewer.wxs.in
@@ -68,8 +68,8 @@
     <Directory Id="TARGETDIR" Name="SourceDir">
       <Directory Id="$(var.ArchProgramFilesFolder)">
         <Directory Id="INSTALLDIR" Name="VirtViewer v@VERSION@@BUILDID@">
-          <Component Id="CDepsFile" Guid="*">
-            <File Id="filA1E799D196006E6DF67DACE15B8C6193" KeyPath="yes" Source="deps.txt"/>
+          <Component Id="CBuildEnvFile" Guid="*">
+            <File Id="filA1E799D196006E6DF67DACE15B8C6193" KeyPath="yes" Source="buildenv.txt"/>
           </Component>
         </Directory>
       </Directory>
@@ -117,7 +117,7 @@
       <?endif?>
       <ComponentGroupRef Id="CG.libxml2"/>
       <ComponentGroupRef Id="CG.virt-viewer"/>
-      <ComponentRef Id="CDepsFile"/>
+      <ComponentRef Id="CBuildEnvFile"/>
       <ComponentRef Id="CShortcut"/>
       <ComponentRef Id="CProgIds"/>
       <ComponentRef Id="CHwdataUSB"/>
diff --git a/debian/changelog b/debian/changelog
index 91e20c9..bbce2d8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+virt-viewer (8.0-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Tue, 23 Jul 2019 05:59:09 +0000
+
 virt-viewer (7.0-2) unstable; urgency=medium
 
   [ Andreas Beckmann ]
diff --git a/debian/patches/Disable-automatich-usb-redirection-by-default.patch b/debian/patches/Disable-automatich-usb-redirection-by-default.patch
index 0ce7ae7..ddc55c0 100644
--- a/debian/patches/Disable-automatich-usb-redirection-by-default.patch
+++ b/debian/patches/Disable-automatich-usb-redirection-by-default.patch
@@ -7,11 +7,11 @@ Closes: #765016
  src/virt-viewer-session.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/src/virt-viewer-session.c b/src/virt-viewer-session.c
-index c432719..ee287e9 100644
---- a/src/virt-viewer-session.c
-+++ b/src/virt-viewer-session.c
-@@ -153,7 +153,7 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
+Index: virt-viewer/src/virt-viewer-session.c
+===================================================================
+--- virt-viewer.orig/src/virt-viewer-session.c
++++ virt-viewer/src/virt-viewer-session.c
+@@ -183,7 +183,7 @@ virt_viewer_session_class_init(VirtViewe
                                      g_param_spec_boolean("auto-usbredir",
                                                           "USB redirection",
                                                           "USB redirection",
diff --git a/icons/16x16/Makefile.in b/icons/16x16/Makefile.in
index c8e2940..024ba96 100644
--- a/icons/16x16/Makefile.in
+++ b/icons/16x16/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -90,11 +90,10 @@ build_triplet = @build@
 host_triplet = @host@
 subdir = icons/16x16
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
-	$(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -263,6 +262,7 @@ POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 RANLIB = @RANLIB@
+REST_REQUIRED = @REST_REQUIRED@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -276,6 +276,8 @@ STRIP = @STRIP@
 UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+VTE_CFLAGS = @VTE_CFLAGS@
+VTE_LIBS = @VTE_LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WINDOWS_PRODUCTVERSION = @WINDOWS_PRODUCTVERSION@
 WINDRES = @WINDRES@
@@ -359,8 +361,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -405,7 +407,10 @@ ctags CTAGS:
 cscope cscopelist:
 
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
diff --git a/icons/22x22/Makefile.in b/icons/22x22/Makefile.in
index 979dd5d..c53c1ad 100644
--- a/icons/22x22/Makefile.in
+++ b/icons/22x22/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -90,11 +90,10 @@ build_triplet = @build@
 host_triplet = @host@
 subdir = icons/22x22
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
-	$(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -263,6 +262,7 @@ POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 RANLIB = @RANLIB@
+REST_REQUIRED = @REST_REQUIRED@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -276,6 +276,8 @@ STRIP = @STRIP@
 UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+VTE_CFLAGS = @VTE_CFLAGS@
+VTE_LIBS = @VTE_LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WINDOWS_PRODUCTVERSION = @WINDOWS_PRODUCTVERSION@
 WINDRES = @WINDRES@
@@ -359,8 +361,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -405,7 +407,10 @@ ctags CTAGS:
 cscope cscopelist:
 
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
diff --git a/icons/24x24/Makefile.in b/icons/24x24/Makefile.in
index c03fd4f..2a006c5 100644
--- a/icons/24x24/Makefile.in
+++ b/icons/24x24/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -90,11 +90,10 @@ build_triplet = @build@
 host_triplet = @host@
 subdir = icons/24x24
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
-	$(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -264,6 +263,7 @@ POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 RANLIB = @RANLIB@
+REST_REQUIRED = @REST_REQUIRED@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -277,6 +277,8 @@ STRIP = @STRIP@
 UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+VTE_CFLAGS = @VTE_CFLAGS@
+VTE_LIBS = @VTE_LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WINDOWS_PRODUCTVERSION = @WINDOWS_PRODUCTVERSION@
 WINDRES = @WINDRES@
@@ -362,8 +364,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -429,7 +431,10 @@ ctags CTAGS:
 cscope cscopelist:
 
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
diff --git a/icons/256x256/Makefile.in b/icons/256x256/Makefile.in
index 083f5a5..ee17892 100644
--- a/icons/256x256/Makefile.in
+++ b/icons/256x256/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -90,11 +90,10 @@ build_triplet = @build@
 host_triplet = @host@
 subdir = icons/256x256
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
-	$(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -263,6 +262,7 @@ POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 RANLIB = @RANLIB@
+REST_REQUIRED = @REST_REQUIRED@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -276,6 +276,8 @@ STRIP = @STRIP@
 UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+VTE_CFLAGS = @VTE_CFLAGS@
+VTE_LIBS = @VTE_LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WINDOWS_PRODUCTVERSION = @WINDOWS_PRODUCTVERSION@
 WINDRES = @WINDRES@
@@ -359,8 +361,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -405,7 +407,10 @@ ctags CTAGS:
 cscope cscopelist:
 
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
diff --git a/icons/32x32/Makefile.in b/icons/32x32/Makefile.in
index 1ad56f5..c3d4ea1 100644
--- a/icons/32x32/Makefile.in
+++ b/icons/32x32/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -90,11 +90,10 @@ build_triplet = @build@
 host_triplet = @host@
 subdir = icons/32x32
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
-	$(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -263,6 +262,7 @@ POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 RANLIB = @RANLIB@
+REST_REQUIRED = @REST_REQUIRED@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -276,6 +276,8 @@ STRIP = @STRIP@
 UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+VTE_CFLAGS = @VTE_CFLAGS@
+VTE_LIBS = @VTE_LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WINDOWS_PRODUCTVERSION = @WINDOWS_PRODUCTVERSION@
 WINDRES = @WINDRES@
@@ -359,8 +361,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -405,7 +407,10 @@ ctags CTAGS:
 cscope cscopelist:
 
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
diff --git a/icons/48x48/Makefile.in b/icons/48x48/Makefile.in
index 4d4cbcb..5a7b9ec 100644
--- a/icons/48x48/Makefile.in
+++ b/icons/48x48/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -90,11 +90,10 @@ build_triplet = @build@
 host_triplet = @host@
 subdir = icons/48x48
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
-	$(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -263,6 +262,7 @@ POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 RANLIB = @RANLIB@
+REST_REQUIRED = @REST_REQUIRED@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -276,6 +276,8 @@ STRIP = @STRIP@
 UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+VTE_CFLAGS = @VTE_CFLAGS@
+VTE_LIBS = @VTE_LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WINDOWS_PRODUCTVERSION = @WINDOWS_PRODUCTVERSION@
 WINDRES = @WINDRES@
@@ -359,8 +361,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -405,7 +407,10 @@ ctags CTAGS:
 cscope cscopelist:
 
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
diff --git a/icons/Makefile.in b/icons/Makefile.in
index f72470f..4be3161 100644
--- a/icons/Makefile.in
+++ b/icons/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -90,11 +90,10 @@ build_triplet = @build@
 host_triplet = @host@
 subdir = icons
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
-	$(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -137,7 +136,7 @@ am__recursive_targets = \
   $(RECURSIVE_CLEAN_TARGETS) \
   $(am__extra_recursive_targets)
 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
-	distdir
+	distdir distdir-am
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 # Read a list of newline-separated strings from the standard input,
 # and print each of them once, without duplicates.  Input order is
@@ -295,6 +294,7 @@ POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 RANLIB = @RANLIB@
+REST_REQUIRED = @REST_REQUIRED@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -308,6 +308,8 @@ STRIP = @STRIP@
 UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+VTE_CFLAGS = @VTE_CFLAGS@
+VTE_LIBS = @VTE_LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WINDOWS_PRODUCTVERSION = @WINDOWS_PRODUCTVERSION@
 WINDRES = @WINDRES@
@@ -393,8 +395,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -511,7 +513,10 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
diff --git a/m4/intltool.m4 b/m4/intltool.m4
deleted file mode 100644
index c25b7b1..0000000
--- a/m4/intltool.m4
+++ /dev/null
@@ -1,212 +0,0 @@
-## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*-
-## Copyright (C) 2001 Eazel, Inc.
-## Author: Maciej Stachowiak <mjs@noisehavoc.org>
-##         Kenneth Christiansen <kenneth@gnu.org>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-##
-## As a special exception to the GNU General Public License, if you
-## distribute this file as part of a program that contains a
-## configuration script generated by Autoconf, you may include it under
-## the same distribution terms that you use for the rest of that program.
-
-dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 42 IT_PROG_INTLTOOL
-AC_DEFUN([IT_PROG_INTLTOOL], [
-AC_PREREQ([2.50])dnl
-AC_REQUIRE([AM_NLS])dnl
-
-case "$am__api_version" in
-    1.[01234])
-	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
-    ;;
-    *)
-    ;;
-esac
-
-INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
-INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-if test -n "$1"; then
-    AC_MSG_CHECKING([for intltool >= $1])
-    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
-    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
-	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
-fi
-
-AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
-AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
-AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
-if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
-    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
-fi
-
-if test -z "$AM_DEFAULT_VERBOSITY"; then
-  AM_DEFAULT_VERBOSITY=1
-fi
-AC_SUBST([AM_DEFAULT_VERBOSITY])
-
-INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
-INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
-INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
-AC_SUBST(INTLTOOL_V_MERGE)
-AC_SUBST(INTLTOOL__v_MERGE_)
-AC_SUBST(INTLTOOL__v_MERGE_0)
-
-INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
-intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
-intltool__v_merge_options_0='-q'
-AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
-AC_SUBST(intltool__v_merge_options_)
-AC_SUBST(intltool__v_merge_options_0)
-
-  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
-     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
-else
-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
-fi
-      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-
-_IT_SUBST(INTLTOOL_DESKTOP_RULE)
-_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
-_IT_SUBST(INTLTOOL_KEYS_RULE)
-_IT_SUBST(INTLTOOL_PROP_RULE)
-_IT_SUBST(INTLTOOL_OAF_RULE)
-_IT_SUBST(INTLTOOL_PONG_RULE)
-_IT_SUBST(INTLTOOL_SERVER_RULE)
-_IT_SUBST(INTLTOOL_SHEET_RULE)
-_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
-_IT_SUBST(INTLTOOL_UI_RULE)
-_IT_SUBST(INTLTOOL_XAM_RULE)
-_IT_SUBST(INTLTOOL_KBD_RULE)
-_IT_SUBST(INTLTOOL_XML_RULE)
-_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
-_IT_SUBST(INTLTOOL_CAVES_RULE)
-_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
-_IT_SUBST(INTLTOOL_THEME_RULE)
-_IT_SUBST(INTLTOOL_SERVICE_RULE)
-_IT_SUBST(INTLTOOL_POLICY_RULE)
-
-# Check the gettext tools to make sure they are GNU
-AC_PATH_PROG(XGETTEXT, xgettext)
-AC_PATH_PROG(MSGMERGE, msgmerge)
-AC_PATH_PROG(MSGFMT, msgfmt)
-AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
-    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
-fi
-xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
-mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
-mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
-if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
-    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
-fi
-
-AC_PATH_PROG(INTLTOOL_PERL, perl)
-if test -z "$INTLTOOL_PERL"; then
-   AC_MSG_ERROR([perl not found])
-fi
-AC_MSG_CHECKING([for perl >= 5.8.1])
-$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
-if test $? -ne 0; then
-   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
-else
-   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
-   AC_MSG_RESULT([$IT_PERL_VERSION])
-fi
-if test "x$2" != "xno-xml"; then
-   AC_MSG_CHECKING([for XML::Parser])
-   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
-       AC_MSG_RESULT([ok])
-   else
-       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
-   fi
-fi
-
-# Substitute ALL_LINGUAS so we can use it in po/Makefile
-AC_SUBST(ALL_LINGUAS)
-
-IT_PO_SUBDIR([po])
-
-])
-
-
-# IT_PO_SUBDIR(DIRNAME)
-# ---------------------
-# All po subdirs have to be declared with this macro; the subdir "po" is
-# declared by IT_PROG_INTLTOOL.
-#
-AC_DEFUN([IT_PO_SUBDIR],
-[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
-dnl
-dnl The following CONFIG_COMMANDS should be executed at the very end
-dnl of config.status.
-AC_CONFIG_COMMANDS_PRE([
-  AC_CONFIG_COMMANDS([$1/stamp-it], [
-    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
-       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
-    fi
-    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
-    >"$1/stamp-it.tmp"
-    [sed '/^#/d
-	 s/^[[].*] *//
-	 /^[ 	]*$/d
-	'"s|^|	$ac_top_srcdir/|" \
-      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
-    ]
-    [sed '/^POTFILES =/,/[^\\]$/ {
-		/^POTFILES =/!d
-		r $1/POTFILES
-	  }
-	 ' "$1/Makefile.in" >"$1/Makefile"]
-    rm -f "$1/Makefile.tmp"
-    mv "$1/stamp-it.tmp" "$1/stamp-it"
-  ])
-])dnl
-])
-
-# _IT_SUBST(VARIABLE)
-# -------------------
-# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
-#
-AC_DEFUN([_IT_SUBST],
-[
-AC_SUBST([$1])
-m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
-]
-)
-
-# deprecated macros
-AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
-# A hint is needed for aclocal from Automake <= 1.9.4:
-# AC_DEFUN([AC_PROG_INTLTOOL], ...)
-
diff --git a/man/Makefile.in b/man/Makefile.in
index 080e047..7fa98b0 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -89,11 +89,10 @@ build_triplet = @build@
 host_triplet = @host@
 subdir = man
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
-	$(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -264,6 +263,7 @@ POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 RANLIB = @RANLIB@
+REST_REQUIRED = @REST_REQUIRED@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -277,6 +277,8 @@ STRIP = @STRIP@
 UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+VTE_CFLAGS = @VTE_CFLAGS@
+VTE_LIBS = @VTE_LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WINDOWS_PRODUCTVERSION = @WINDOWS_PRODUCTVERSION@
 WINDRES = @WINDRES@
@@ -368,8 +370,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -436,7 +438,10 @@ ctags CTAGS:
 cscope cscopelist:
 
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
diff --git a/man/remote-viewer.1 b/man/remote-viewer.1
index ea29fb6..cd8fb00 100644
--- a/man/remote-viewer.1
+++ b/man/remote-viewer.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "REMOTE-VIEWER 1"
-.TH REMOTE-VIEWER 1 "2018-07-27" "perl v5.26.2" "Virtualization Support"
+.TH REMOTE-VIEWER 1 "2018-12-21" "perl v5.28.1" "Virtualization Support"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -281,9 +281,15 @@ fails.
 .el .IP "\f(CWtype\fR (string, mandatory)" 4
 .IX Item "type (string, mandatory)"
 The session type, either \*(L"spice\*(R", \*(L"vnc\*(R" or \*(L"ovirt\*(R".
-.ie n .IP """host"" (string, mandatory)" 4
-.el .IP "\f(CWhost\fR (string, mandatory)" 4
-.IX Item "host (string, mandatory)"
+.ie n .IP """unix\-path"" (string)" 4
+.el .IP "\f(CWunix\-path\fR (string)" 4
+.IX Item "unix-path (string)"
+The server to connect to, using a Unix socket path. (supported with spice, since 8.0)
+.Sp
+This option is incompatible with \f(CW\*(C`host\*(C'\fR, \f(CW\*(C`port\*(C'\fR and \f(CW\*(C`tls\-port\*(C'\fR.
+.ie n .IP """host"" (string)" 4
+.el .IP "\f(CWhost\fR (string)" 4
+.IX Item "host (string)"
 The server host to connect to.
 .ie n .IP """port"" (integer)" 4
 .el .IP "\f(CWport\fR (integer)" 4
diff --git a/man/remote-viewer.pod b/man/remote-viewer.pod
index 8cf5ee4..4b683cf 100644
--- a/man/remote-viewer.pod
+++ b/man/remote-viewer.pod
@@ -162,7 +162,13 @@ fails.
 
 The session type, either "spice", "vnc" or "ovirt".
 
-=item C<host> (string, mandatory)
+=item C<unix-path> (string)
+
+The server to connect to, using a Unix socket path. (supported with spice, since 8.0)
+
+This option is incompatible with C<host>, C<port> and C<tls-port>.
+
+=item C<host> (string)
 
 The server host to connect to.
 
diff --git a/man/virt-viewer.1 b/man/virt-viewer.1
index 851e729..f71b067 100644
--- a/man/virt-viewer.1
+++ b/man/virt-viewer.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "VIRT-VIEWER 1"
-.TH VIRT-VIEWER 1 "2018-07-27" "perl v5.26.2" "Virtualization Support"
+.TH VIRT-VIEWER 1 "2018-07-27" "perl v5.28.1" "Virtualization Support"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/mingw-virt-viewer.spec.in b/mingw-virt-viewer.spec.in
index f4344a1..05a9026 100644
--- a/mingw-virt-viewer.spec.in
+++ b/mingw-virt-viewer.spec.in
@@ -3,9 +3,7 @@
 %define relver 1%{?dist}
 
 # We want the 1st part of the release number, and
-# the 3rd part (or 0 if not present). We want to
-# avoid the autobuild magic 'extra_release' too
-# which is not purely numeric and larger than 255.
+# the 3rd part (or 0 if not present).
 # This scheme lets us cope with RHEL-style z-stream
 # versioning when creating Win product versions
 %define rel0 %(echo %{relver} | cut -d. -f1)
@@ -14,7 +12,7 @@
 
 Name:           mingw-virt-viewer
 Version:        @VERSION@
-Release:        %{relver}%{?extra_release}
+Release:        %{relver}
 Summary:        MinGW Windows virt-viewer console application
 
 License:        GPLv2+
@@ -36,6 +34,8 @@ BuildRequires:  mingw32-gstreamer1-plugins-good
 BuildRequires:  mingw64-gstreamer1-plugins-good
 BuildRequires:  mingw32-gtk3 >= @GTK_REQUIRED@
 BuildRequires:  mingw64-gtk3 >= @GTK_REQUIRED@
+BuildRequires:  mingw32-hicolor-icon-theme
+BuildRequires:  mingw64-hicolor-icon-theme
 BuildRequires:  mingw32-libgovirt
 BuildRequires:  mingw64-libgovirt
 BuildRequires:  mingw32-libusbx
@@ -63,9 +63,9 @@ BuildRequires:  /usr/bin/pod2man
 BuildRequires:  intltool
 BuildRequires:  icoutils
 BuildRequires:  dos2unix
-BuildRequires:  hicolor-icon-theme
 BuildRequires:  hwdata
 BuildRequires:  msitools >= 0.95-5
+BuildRequires:  glib2-devel
 
 BuildArch:      noarch
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 371c242..b296134 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -11,6 +11,7 @@ src/virt-viewer-app.c
 src/virt-viewer-auth.c
 [type: gettext/glade] src/resources/ui/virt-viewer-auth.ui
 src/virt-viewer-display-vnc.c
+src/virt-viewer-display-vte.c
 src/virt-viewer-file-transfer-dialog.c
 src/virt-viewer-main.c
 src/virt-viewer-session-spice.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 0a3cbbf..3a5d90d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -72,6 +72,8 @@ libvirt_viewer_la_SOURCES =					\
 	virt-viewer-window.c				\
 	virt-viewer-vm-connection.h			\
 	virt-viewer-vm-connection.c			\
+	virt-viewer-display-vte.h			\
+	virt-viewer-display-vte.c			\
 	virt-viewer-timed-revealer.c \
 	virt-viewer-timed-revealer.h \
 	$(NULL)
@@ -110,6 +112,7 @@ COMMON_LIBS = \
 	$(GLIB2_LIBS)				\
 	$(GTK_LIBS)				\
 	$(GTK_VNC_LIBS)				\
+	$(VTE_LIBS)				\
 	$(SPICE_GTK_LIBS)			\
 	$(LIBXML2_LIBS)				\
 	$(OVIRT_LIBS) \
@@ -121,6 +124,7 @@ COMMON_CFLAGS = \
 	$(GLIB2_CFLAGS) \
 	$(GTK_CFLAGS) \
 	$(GTK_VNC_CFLAGS) \
+	$(VTE_CFLAGS) \
 	$(SPICE_GTK_CFLAGS) \
 	$(LIBXML2_CFLAGS) \
 	$(OVIRT_CFLAGS) \
diff --git a/src/Makefile.in b/src/Makefile.in
index e18e7c5..2c2a613 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -121,11 +121,10 @@ bin_PROGRAMS = $(am__EXEEXT_1) remote-viewer$(EXEEXT) $(am__EXEEXT_2)
 @OS_WIN32_TRUE@am__append_8 = virt-viewer_rc.$(OBJEXT)
 subdir = src
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
-	$(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -133,6 +132,10 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES = virt-viewer.rc
 CONFIG_CLEAN_VPATH_FILES =
+@HAVE_LIBVIRT_TRUE@am__EXEEXT_1 = virt-viewer$(EXEEXT)
+@OS_WIN32_TRUE@am__EXEEXT_2 = windows-cmdline-wrapper$(EXEEXT)
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libvirt_viewer_util_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
@@ -153,7 +156,7 @@ libvirt_viewer_util_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 libvirt_viewer_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
 	$(am__DEPENDENCIES_1)
 am__libvirt_viewer_la_SOURCES_DIST = virt-viewer-resources.h \
@@ -166,6 +169,7 @@ am__libvirt_viewer_la_SOURCES_DIST = virt-viewer-resources.h \
 	virt-viewer-notebook.h virt-viewer-notebook.c \
 	virt-viewer-window.h virt-viewer-window.c \
 	virt-viewer-vm-connection.h virt-viewer-vm-connection.c \
+	virt-viewer-display-vte.h virt-viewer-display-vte.c \
 	virt-viewer-timed-revealer.c virt-viewer-timed-revealer.h \
 	virt-viewer-session-vnc.h virt-viewer-session-vnc.c \
 	virt-viewer-display-vnc.h virt-viewer-display-vnc.c \
@@ -198,6 +202,7 @@ am_libvirt_viewer_la_OBJECTS = $(am__objects_2) \
 	libvirt_viewer_la-virt-viewer-notebook.lo \
 	libvirt_viewer_la-virt-viewer-window.lo \
 	libvirt_viewer_la-virt-viewer-vm-connection.lo \
+	libvirt_viewer_la-virt-viewer-display-vte.lo \
 	libvirt_viewer_la-virt-viewer-timed-revealer.lo \
 	$(am__objects_1) $(am__objects_3) $(am__objects_4) \
 	$(am__objects_5)
@@ -206,10 +211,6 @@ libvirt_viewer_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(libvirt_viewer_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
 	-o $@
-@HAVE_LIBVIRT_TRUE@am__EXEEXT_1 = virt-viewer$(EXEEXT)
-@OS_WIN32_TRUE@am__EXEEXT_2 = windows-cmdline-wrapper$(EXEEXT)
-am__installdirs = "$(DESTDIR)$(bindir)"
-PROGRAMS = $(bin_PROGRAMS)
 am_remote_viewer_OBJECTS = remote_viewer-remote-viewer.$(OBJEXT) \
 	remote_viewer-remote-viewer-connect.$(OBJEXT) \
 	remote_viewer-remote-viewer-main.$(OBJEXT) $(am__objects_1)
@@ -256,7 +257,34 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/libvirt_viewer_la-glib-compat.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-ovirt-foreign-menu.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-remote-viewer-iso-list-dialog.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-app.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-auth.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-spice.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-vnc.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-vte.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-enums.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-file-transfer-dialog.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-file.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-notebook.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-resources.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session-spice.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session-vnc.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-timed-revealer.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-vm-connection.Plo \
+	./$(DEPDIR)/libvirt_viewer_la-virt-viewer-window.Plo \
+	./$(DEPDIR)/libvirt_viewer_util_la-virt-viewer-util.Plo \
+	./$(DEPDIR)/remote_viewer-remote-viewer-connect.Po \
+	./$(DEPDIR)/remote_viewer-remote-viewer-main.Po \
+	./$(DEPDIR)/remote_viewer-remote-viewer.Po \
+	./$(DEPDIR)/virt_viewer-virt-viewer-main.Po \
+	./$(DEPDIR)/virt_viewer-virt-viewer.Po \
+	./$(DEPDIR)/windows-cmdline-wrapper.Po
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -421,6 +449,7 @@ POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 RANLIB = @RANLIB@
+REST_REQUIRED = @REST_REQUIRED@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -434,6 +463,8 @@ STRIP = @STRIP@
 UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+VTE_CFLAGS = @VTE_CFLAGS@
+VTE_LIBS = @VTE_LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WINDOWS_PRODUCTVERSION = @WINDOWS_PRODUCTVERSION@
 WINDRES = @WINDRES@
@@ -540,6 +571,7 @@ libvirt_viewer_la_SOURCES = $(BUILT_SOURCES) glib-compat.h \
 	virt-viewer-notebook.h virt-viewer-notebook.c \
 	virt-viewer-window.h virt-viewer-window.c \
 	virt-viewer-vm-connection.h virt-viewer-vm-connection.c \
+	virt-viewer-display-vte.h virt-viewer-display-vte.c \
 	virt-viewer-timed-revealer.c virt-viewer-timed-revealer.h \
 	$(NULL) $(am__append_1) $(am__append_2) $(am__append_3)
 COMMON_LIBS = \
@@ -547,6 +579,7 @@ COMMON_LIBS = \
 	$(GLIB2_LIBS)				\
 	$(GTK_LIBS)				\
 	$(GTK_VNC_LIBS)				\
+	$(VTE_LIBS)				\
 	$(SPICE_GTK_LIBS)			\
 	$(LIBXML2_LIBS)				\
 	$(OVIRT_LIBS) \
@@ -558,6 +591,7 @@ COMMON_CFLAGS = \
 	$(GLIB2_CFLAGS) \
 	$(GTK_CFLAGS) \
 	$(GTK_VNC_CFLAGS) \
+	$(VTE_CFLAGS) \
 	$(SPICE_GTK_CFLAGS) \
 	$(LIBXML2_CFLAGS) \
 	$(OVIRT_CFLAGS) \
@@ -651,8 +685,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -665,23 +699,6 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 virt-viewer.rc: $(top_builddir)/config.status $(srcdir)/virt-viewer.rc.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-clean-noinstLTLIBRARIES:
-	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-	@list='$(noinst_LTLIBRARIES)'; \
-	locs=`for p in $$list; do echo $$p; done | \
-	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
-	      sort -u`; \
-	test -z "$$locs" || { \
-	  echo rm -f $${locs}; \
-	  rm -f $${locs}; \
-	}
-
-libvirt-viewer-util.la: $(libvirt_viewer_util_la_OBJECTS) $(libvirt_viewer_util_la_DEPENDENCIES) $(EXTRA_libvirt_viewer_util_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libvirt_viewer_util_la_LINK)  $(libvirt_viewer_util_la_OBJECTS) $(libvirt_viewer_util_la_LIBADD) $(LIBS)
-
-libvirt-viewer.la: $(libvirt_viewer_la_OBJECTS) $(libvirt_viewer_la_DEPENDENCIES) $(EXTRA_libvirt_viewer_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libvirt_viewer_la_LINK)  $(libvirt_viewer_la_OBJECTS) $(libvirt_viewer_la_LIBADD) $(LIBS)
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
 	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
@@ -732,6 +749,23 @@ clean-binPROGRAMS:
 	echo " rm -f" $$list; \
 	rm -f $$list
 
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+
+libvirt-viewer-util.la: $(libvirt_viewer_util_la_OBJECTS) $(libvirt_viewer_util_la_DEPENDENCIES) $(EXTRA_libvirt_viewer_util_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libvirt_viewer_util_la_LINK)  $(libvirt_viewer_util_la_OBJECTS) $(libvirt_viewer_util_la_LIBADD) $(LIBS)
+
+libvirt-viewer.la: $(libvirt_viewer_la_OBJECTS) $(libvirt_viewer_la_DEPENDENCIES) $(EXTRA_libvirt_viewer_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libvirt_viewer_la_LINK)  $(libvirt_viewer_la_OBJECTS) $(libvirt_viewer_la_LIBADD) $(LIBS)
+
 remote-viewer$(EXEEXT): $(remote_viewer_OBJECTS) $(remote_viewer_DEPENDENCIES) $(EXTRA_remote_viewer_DEPENDENCIES) 
 	@rm -f remote-viewer$(EXEEXT)
 	$(AM_V_CCLD)$(remote_viewer_LINK) $(remote_viewer_OBJECTS) $(remote_viewer_LDADD) $(LIBS)
@@ -750,32 +784,39 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-glib-compat.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-ovirt-foreign-menu.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-remote-viewer-iso-list-dialog.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-app.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-auth.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-spice.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-vnc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-enums.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-file-transfer-dialog.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-file.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-notebook.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-resources.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session-spice.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session-vnc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-timed-revealer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-vm-connection.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-window.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_util_la-virt-viewer-util.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_viewer-remote-viewer-connect.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_viewer-remote-viewer-main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_viewer-remote-viewer.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows-cmdline-wrapper.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-glib-compat.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-ovirt-foreign-menu.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-remote-viewer-iso-list-dialog.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-app.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-auth.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-spice.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-vnc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-vte.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-enums.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-file-transfer-dialog.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-file.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-notebook.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-resources.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session-spice.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session-vnc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-timed-revealer.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-vm-connection.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_la-virt-viewer-window.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_viewer_util_la-virt-viewer-util.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_viewer-remote-viewer-connect.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_viewer-remote-viewer-main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_viewer-remote-viewer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows-cmdline-wrapper.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+	@$(MKDIR_P) $(@D)
+	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -885,6 +926,13 @@ libvirt_viewer_la-virt-viewer-vm-connection.lo: virt-viewer-vm-connection.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvirt_viewer_la_CFLAGS) $(CFLAGS) -c -o libvirt_viewer_la-virt-viewer-vm-connection.lo `test -f 'virt-viewer-vm-connection.c' || echo '$(srcdir)/'`virt-viewer-vm-connection.c
 
+libvirt_viewer_la-virt-viewer-display-vte.lo: virt-viewer-display-vte.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvirt_viewer_la_CFLAGS) $(CFLAGS) -MT libvirt_viewer_la-virt-viewer-display-vte.lo -MD -MP -MF $(DEPDIR)/libvirt_viewer_la-virt-viewer-display-vte.Tpo -c -o libvirt_viewer_la-virt-viewer-display-vte.lo `test -f 'virt-viewer-display-vte.c' || echo '$(srcdir)/'`virt-viewer-display-vte.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvirt_viewer_la-virt-viewer-display-vte.Tpo $(DEPDIR)/libvirt_viewer_la-virt-viewer-display-vte.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virt-viewer-display-vte.c' object='libvirt_viewer_la-virt-viewer-display-vte.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvirt_viewer_la_CFLAGS) $(CFLAGS) -c -o libvirt_viewer_la-virt-viewer-display-vte.lo `test -f 'virt-viewer-display-vte.c' || echo '$(srcdir)/'`virt-viewer-display-vte.c
+
 libvirt_viewer_la-virt-viewer-timed-revealer.lo: virt-viewer-timed-revealer.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvirt_viewer_la_CFLAGS) $(CFLAGS) -MT libvirt_viewer_la-virt-viewer-timed-revealer.lo -MD -MP -MF $(DEPDIR)/libvirt_viewer_la-virt-viewer-timed-revealer.Tpo -c -o libvirt_viewer_la-virt-viewer-timed-revealer.lo `test -f 'virt-viewer-timed-revealer.c' || echo '$(srcdir)/'`virt-viewer-timed-revealer.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libvirt_viewer_la-virt-viewer-timed-revealer.Tpo $(DEPDIR)/libvirt_viewer_la-virt-viewer-timed-revealer.Plo
@@ -1069,7 +1117,10 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -1102,7 +1153,7 @@ distdir: $(DISTFILES)
 check-am: all-am
 check: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA)
+all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA)
 installdirs:
 	for dir in "$(DESTDIR)$(bindir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
@@ -1147,7 +1198,33 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool \
 	clean-noinstLTLIBRARIES mostlyclean-am
 
 distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/libvirt_viewer_la-glib-compat.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-ovirt-foreign-menu.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-remote-viewer-iso-list-dialog.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-app.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-auth.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-spice.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-vnc.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-vte.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-enums.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-file-transfer-dialog.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-file.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-notebook.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-resources.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session-spice.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session-vnc.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-timed-revealer.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-vm-connection.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-window.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_util_la-virt-viewer-util.Plo
+	-rm -f ./$(DEPDIR)/remote_viewer-remote-viewer-connect.Po
+	-rm -f ./$(DEPDIR)/remote_viewer-remote-viewer-main.Po
+	-rm -f ./$(DEPDIR)/remote_viewer-remote-viewer.Po
+	-rm -f ./$(DEPDIR)/virt_viewer-virt-viewer-main.Po
+	-rm -f ./$(DEPDIR)/virt_viewer-virt-viewer.Po
+	-rm -f ./$(DEPDIR)/windows-cmdline-wrapper.Po
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -1193,7 +1270,33 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/libvirt_viewer_la-glib-compat.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-ovirt-foreign-menu.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-remote-viewer-iso-list-dialog.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-app.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-auth.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-spice.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-vnc.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display-vte.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-display.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-enums.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-file-transfer-dialog.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-file.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-notebook.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-resources.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session-spice.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session-vnc.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-session.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-timed-revealer.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-vm-connection.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_la-virt-viewer-window.Plo
+	-rm -f ./$(DEPDIR)/libvirt_viewer_util_la-virt-viewer-util.Plo
+	-rm -f ./$(DEPDIR)/remote_viewer-remote-viewer-connect.Po
+	-rm -f ./$(DEPDIR)/remote_viewer-remote-viewer-main.Po
+	-rm -f ./$(DEPDIR)/remote_viewer-remote-viewer.Po
+	-rm -f ./$(DEPDIR)/virt_viewer-virt-viewer-main.Po
+	-rm -f ./$(DEPDIR)/virt_viewer-virt-viewer.Po
+	-rm -f ./$(DEPDIR)/windows-cmdline-wrapper.Po
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -1214,7 +1317,7 @@ uninstall-am: uninstall-binPROGRAMS
 
 .MAKE: all check install install-am install-strip
 
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
 	clean-binPROGRAMS clean-generic clean-libtool \
 	clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \
 	distclean-compile distclean-generic distclean-libtool \
diff --git a/src/ovirt-foreign-menu.c b/src/ovirt-foreign-menu.c
index cd1b8bd..59c3d48 100644
--- a/src/ovirt-foreign-menu.c
+++ b/src/ovirt-foreign-menu.c
@@ -59,8 +59,6 @@ static void ovirt_foreign_menu_fetch_vm_cdrom_async(OvirtForeignMenu *menu, GTas
 static void ovirt_foreign_menu_refresh_cdrom_file_async(OvirtForeignMenu *menu, GTask *task);
 static void ovirt_foreign_menu_fetch_iso_list_async(OvirtForeignMenu *menu, GTask *task);
 
-G_DEFINE_TYPE (OvirtForeignMenu, ovirt_foreign_menu, G_TYPE_OBJECT)
-
 
 struct _OvirtForeignMenuPrivate {
     OvirtProxy *proxy;
@@ -87,7 +85,7 @@ struct _OvirtForeignMenuPrivate {
 };
 
 
-#define OVIRT_FOREIGN_MENU_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), OVIRT_TYPE_FOREIGN_MENU, OvirtForeignMenuPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (OvirtForeignMenu, ovirt_foreign_menu, G_TYPE_OBJECT)
 
 
 enum {
@@ -100,7 +98,6 @@ enum {
     PROP_VM_GUID,
 };
 
-
 gchar *
 ovirt_foreign_menu_get_current_iso_name(OvirtForeignMenu *foreign_menu)
 {
@@ -230,8 +227,6 @@ ovirt_foreign_menu_class_init(OvirtForeignMenuClass *klass)
     oclass->set_property = ovirt_foreign_menu_set_property;
     oclass->dispose = ovirt_foreign_menu_dispose;
 
-    g_type_class_add_private(klass, sizeof(OvirtForeignMenuPrivate));
-
     g_object_class_install_property(oclass,
                                     PROP_PROXY,
                                     g_param_spec_object("proxy",
@@ -287,7 +282,7 @@ ovirt_foreign_menu_class_init(OvirtForeignMenuClass *klass)
 static void
 ovirt_foreign_menu_init(OvirtForeignMenu *self)
 {
-    self->priv = OVIRT_FOREIGN_MENU_GET_PRIVATE(self);
+    self->priv = ovirt_foreign_menu_get_instance_private(self);
 }
 
 
@@ -368,7 +363,7 @@ ovirt_foreign_menu_next_async_step(OvirtForeignMenu *menu,
     default:
         g_warn_if_reached();
         g_task_return_new_error(task, OVIRT_ERROR, OVIRT_ERROR_FAILED,
-                                "Invalid state: %d", current_state);
+                                "Invalid state: %u", current_state);
         g_object_unref(task);
     }
 }
@@ -490,7 +485,8 @@ static void ovirt_foreign_menu_set_files(OvirtForeignMenu *menu,
          * associated with file resources , but as of 3.2, this node
          * is not present, so we do an extension check instead
          * to differentiate between ISOs and floppy images */
-        if (g_str_has_suffix(name, ".vfd")) {
+        if (!g_str_has_suffix(name, ".iso")) {
+            g_debug("Ignoring %s which does not have a .iso extension", name);
             g_free(name);
             continue;
         }
@@ -623,6 +619,13 @@ static void ovirt_foreign_menu_fetch_vm_cdrom_async(OvirtForeignMenu *menu,
 }
 
 #ifdef HAVE_OVIRT_DATA_CENTER
+static gboolean strv_contains(const gchar * const *strv, const gchar *str)
+{
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+  return g_strv_contains (strv, str);
+G_GNUC_END_IGNORE_DEPRECATIONS
+}
+
 static gboolean storage_domain_attached_to_data_center(OvirtStorageDomain *domain,
                                                       OvirtDataCenter *data_center)
 {
@@ -632,7 +635,7 @@ static gboolean storage_domain_attached_to_data_center(OvirtStorageDomain *domai
 
     g_object_get(domain, "data-center-ids", &data_center_ids, NULL);
     g_object_get(data_center, "guid", &data_center_guid, NULL);
-    match = g_strv_contains((const gchar * const *) data_center_ids, data_center_guid);
+    match = strv_contains((const gchar * const *) data_center_ids, data_center_guid);
     g_strfreev(data_center_ids);
     g_free(data_center_guid);
 
@@ -640,6 +643,35 @@ static gboolean storage_domain_attached_to_data_center(OvirtStorageDomain *domai
 }
 #endif
 
+static gboolean storage_domain_validate(OvirtForeignMenu *menu G_GNUC_UNUSED,
+                                        OvirtStorageDomain *domain)
+{
+    char *name;
+    int type, state;
+    gboolean ret = TRUE;
+
+    g_object_get(domain, "name", &name, "type", &type, "state", &state, NULL);
+
+    if (type != OVIRT_STORAGE_DOMAIN_TYPE_ISO) {
+        g_debug("Storage domain '%s' type is not ISO", name);
+        ret = FALSE;
+    }
+
+    if (state != OVIRT_STORAGE_DOMAIN_STATE_ACTIVE) {
+        g_debug("Storage domain '%s' state is not active", name);
+        ret = FALSE;
+    }
+
+#ifdef HAVE_OVIRT_DATA_CENTER
+    if (!storage_domain_attached_to_data_center(domain, menu->priv->data_center)) {
+        g_debug("Storage domain '%s' is not attached to data center", name);
+        ret = FALSE;
+    }
+#endif
+
+    g_free(name);
+    return ret;
+}
 
 static void storage_domains_fetched_cb(GObject *source_object,
                                        GAsyncResult *result,
@@ -663,23 +695,9 @@ static void storage_domains_fetched_cb(GObject *source_object,
     g_hash_table_iter_init(&iter, ovirt_collection_get_resources(collection));
     while (g_hash_table_iter_next(&iter, NULL, (gpointer *)&domain)) {
         OvirtCollection *file_collection;
-        int type;
-        int state;
-
-        g_object_get(domain, "type", &type, "state", &state, NULL);
-        if (type != OVIRT_STORAGE_DOMAIN_TYPE_ISO) {
-            continue;
-        }
 
-        if (state != OVIRT_STORAGE_DOMAIN_STATE_ACTIVE) {
+        if (!storage_domain_validate(menu, domain))
             continue;
-        }
-
-#ifdef HAVE_OVIRT_DATA_CENTER
-        if (!storage_domain_attached_to_data_center(domain, menu->priv->data_center)) {
-            continue;
-        }
-#endif
 
         file_collection = ovirt_storage_domain_get_files(domain);
         if (file_collection != NULL) {
diff --git a/src/remote-viewer-iso-list-dialog.c b/src/remote-viewer-iso-list-dialog.c
index 745768a..c6fbe50 100644
--- a/src/remote-viewer-iso-list-dialog.c
+++ b/src/remote-viewer-iso-list-dialog.c
@@ -29,13 +29,9 @@
 static void ovirt_foreign_menu_iso_name_changed(OvirtForeignMenu *foreign_menu, GAsyncResult *result, RemoteViewerISOListDialog *self);
 static void remote_viewer_iso_list_dialog_show_error(RemoteViewerISOListDialog *self, const gchar *message);
 
-G_DEFINE_TYPE(RemoteViewerISOListDialog, remote_viewer_iso_list_dialog, GTK_TYPE_DIALOG)
-
-#define DIALOG_PRIVATE(o) \
-        (G_TYPE_INSTANCE_GET_PRIVATE((o), REMOTE_VIEWER_TYPE_ISO_LIST_DIALOG, RemoteViewerISOListDialogPrivate))
-
-struct _RemoteViewerISOListDialogPrivate
+struct _RemoteViewerISOListDialog
 {
+    GtkDialog parent;
     GtkListStore *list_store;
     GtkWidget *status;
     GtkWidget *spinner;
@@ -45,6 +41,13 @@ struct _RemoteViewerISOListDialogPrivate
     GCancellable *cancellable;
 };
 
+struct _RemoteViewerISOListDialogClass
+{
+    GtkDialogClass parent_class;
+};
+
+G_DEFINE_TYPE(RemoteViewerISOListDialog, remote_viewer_iso_list_dialog, GTK_TYPE_DIALOG)
+
 enum RemoteViewerISOListDialogModel
 {
     ISO_IS_ACTIVE = 0,
@@ -65,13 +68,12 @@ static void
 remote_viewer_iso_list_dialog_dispose(GObject *object)
 {
     RemoteViewerISOListDialog *self = REMOTE_VIEWER_ISO_LIST_DIALOG(object);
-    RemoteViewerISOListDialogPrivate *priv = self->priv;
 
-    g_clear_object(&priv->cancellable);
+    g_clear_object(&self->cancellable);
 
-    if (priv->foreign_menu) {
-        g_signal_handlers_disconnect_by_data(priv->foreign_menu, object);
-        g_clear_object(&priv->foreign_menu);
+    if (self->foreign_menu) {
+        g_signal_handlers_disconnect_by_data(self->foreign_menu, object);
+        g_clear_object(&self->foreign_menu);
     }
     G_OBJECT_CLASS(remote_viewer_iso_list_dialog_parent_class)->dispose(object);
 }
@@ -81,11 +83,10 @@ remote_viewer_iso_list_dialog_set_property(GObject *object, guint property_id,
                                            const GValue *value, GParamSpec *pspec)
 {
     RemoteViewerISOListDialog *self = REMOTE_VIEWER_ISO_LIST_DIALOG(object);
-    RemoteViewerISOListDialogPrivate *priv = self->priv;
 
     switch (property_id) {
     case PROP_FOREIGN_MENU:
-        priv->foreign_menu = g_value_dup_object(value);
+        self->foreign_menu = g_value_dup_object(value);
         break;
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -97,8 +98,6 @@ remote_viewer_iso_list_dialog_class_init(RemoteViewerISOListDialogClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS(klass);
 
-    g_type_class_add_private(klass, sizeof(RemoteViewerISOListDialogPrivate));
-
     object_class->dispose = remote_viewer_iso_list_dialog_dispose;
     object_class->set_property = remote_viewer_iso_list_dialog_set_property;
 
@@ -114,8 +113,7 @@ remote_viewer_iso_list_dialog_class_init(RemoteViewerISOListDialogClass *klass)
 static void
 remote_viewer_iso_list_dialog_show_files(RemoteViewerISOListDialog *self)
 {
-    self->priv = DIALOG_PRIVATE(self);
-    gtk_stack_set_visible_child_full(GTK_STACK(self->priv->stack), "iso-list",
+    gtk_stack_set_visible_child_full(GTK_STACK(self->stack), "iso-list",
                                      GTK_STACK_TRANSITION_TYPE_NONE);
     gtk_dialog_set_response_sensitive(GTK_DIALOG(self), GTK_RESPONSE_NONE, TRUE);
 }
@@ -123,22 +121,21 @@ remote_viewer_iso_list_dialog_show_files(RemoteViewerISOListDialog *self)
 static void
 remote_viewer_iso_list_dialog_foreach(char *name, RemoteViewerISOListDialog *self)
 {
-    RemoteViewerISOListDialogPrivate *priv = self->priv;
-    gchar *current_iso = ovirt_foreign_menu_get_current_iso_name(self->priv->foreign_menu);
+    gchar *current_iso = ovirt_foreign_menu_get_current_iso_name(self->foreign_menu);
     gboolean active = (g_strcmp0(current_iso, name) == 0);
     gint weight = active ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL;
     GtkTreeIter iter;
 
-    gtk_list_store_append(priv->list_store, &iter);
-    gtk_list_store_set(priv->list_store, &iter,
+    gtk_list_store_append(self->list_store, &iter);
+    gtk_list_store_set(self->list_store, &iter,
                        ISO_IS_ACTIVE, active,
                        ISO_NAME, name,
                        FONT_WEIGHT, weight, -1);
 
     if (active) {
-        GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL(priv->list_store), &iter);
-        gtk_tree_view_set_cursor(GTK_TREE_VIEW(priv->tree_view), path, NULL, FALSE);
-        gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(priv->tree_view), path, NULL, TRUE, 0.5, 0.5);
+        GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL(self->list_store), &iter);
+        gtk_tree_view_set_cursor(GTK_TREE_VIEW(self->tree_view), path, NULL, FALSE);
+        gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(self->tree_view), path, NULL, TRUE, 0.5, 0.5);
         gtk_tree_path_free(path);
     }
 
@@ -150,7 +147,6 @@ fetch_iso_names_cb(OvirtForeignMenu *foreign_menu,
                    GAsyncResult *result,
                    RemoteViewerISOListDialog *self)
 {
-    RemoteViewerISOListDialogPrivate *priv = self->priv;
     GError *error = NULL;
     GList *iso_list;
 
@@ -164,15 +160,15 @@ fetch_iso_names_cb(OvirtForeignMenu *foreign_menu,
         if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
             goto end;
 
-        gtk_label_set_markup(GTK_LABEL(priv->status), markup);
-        gtk_spinner_stop(GTK_SPINNER(priv->spinner));
+        gtk_label_set_markup(GTK_LABEL(self->status), markup);
+        gtk_spinner_stop(GTK_SPINNER(self->spinner));
         remote_viewer_iso_list_dialog_show_error(self, msg);
         gtk_dialog_set_response_sensitive(GTK_DIALOG(self), GTK_RESPONSE_NONE, TRUE);
         g_free(markup);
         goto end;
     }
 
-    g_clear_object(&priv->cancellable);
+    g_clear_object(&self->cancellable);
     g_list_foreach(iso_list, (GFunc) remote_viewer_iso_list_dialog_foreach, self);
     remote_viewer_iso_list_dialog_show_files(self);
 
@@ -184,13 +180,11 @@ end:
 static void
 remote_viewer_iso_list_dialog_refresh_iso_list(RemoteViewerISOListDialog *self)
 {
-    RemoteViewerISOListDialogPrivate *priv = self->priv;
-
-    gtk_list_store_clear(priv->list_store);
+    gtk_list_store_clear(self->list_store);
 
-    priv->cancellable = g_cancellable_new();
-    ovirt_foreign_menu_fetch_iso_names_async(priv->foreign_menu,
-                                             priv->cancellable,
+    self->cancellable = g_cancellable_new();
+    ovirt_foreign_menu_fetch_iso_names_async(self->foreign_menu,
+                                             self->cancellable,
                                              (GAsyncReadyCallback) fetch_iso_names_cb,
                                              self);
 }
@@ -201,53 +195,51 @@ remote_viewer_iso_list_dialog_response(GtkDialog *dialog,
                                        gpointer user_data G_GNUC_UNUSED)
 {
     RemoteViewerISOListDialog *self = REMOTE_VIEWER_ISO_LIST_DIALOG(dialog);
-    RemoteViewerISOListDialogPrivate *priv = self->priv;
 
     if (response_id != GTK_RESPONSE_NONE) {
-        g_cancellable_cancel(priv->cancellable);
+        g_cancellable_cancel(self->cancellable);
         return;
     }
 
-    gtk_spinner_start(GTK_SPINNER(priv->spinner));
-    gtk_label_set_markup(GTK_LABEL(priv->status), _("<b>Loading...</b>"));
-    gtk_stack_set_visible_child_full(GTK_STACK(priv->stack), "status",
+    gtk_spinner_start(GTK_SPINNER(self->spinner));
+    gtk_label_set_markup(GTK_LABEL(self->status), _("<b>Loading...</b>"));
+    gtk_stack_set_visible_child_full(GTK_STACK(self->stack), "status",
                                      GTK_STACK_TRANSITION_TYPE_NONE);
     gtk_dialog_set_response_sensitive(GTK_DIALOG(self), GTK_RESPONSE_NONE, FALSE);
     remote_viewer_iso_list_dialog_refresh_iso_list(self);
 }
 
-void
+G_MODULE_EXPORT void
 remote_viewer_iso_list_dialog_toggled(GtkCellRendererToggle *cell_renderer G_GNUC_UNUSED,
                                       gchar *path,
                                       gpointer user_data)
 {
     RemoteViewerISOListDialog *self = REMOTE_VIEWER_ISO_LIST_DIALOG(user_data);
-    RemoteViewerISOListDialogPrivate *priv = self->priv;
-    GtkTreeModel *model = GTK_TREE_MODEL(priv->list_store);
+    GtkTreeModel *model = GTK_TREE_MODEL(self->list_store);
     GtkTreePath *tree_path = gtk_tree_path_new_from_string(path);
     GtkTreeIter iter;
     gboolean active;
     gchar *name;
 
-    gtk_tree_view_set_cursor(GTK_TREE_VIEW(priv->tree_view), tree_path, NULL, FALSE);
+    gtk_tree_view_set_cursor(GTK_TREE_VIEW(self->tree_view), tree_path, NULL, FALSE);
     gtk_tree_model_get_iter(model, &iter, tree_path);
     gtk_tree_model_get(model, &iter,
                        ISO_IS_ACTIVE, &active,
                        ISO_NAME, &name, -1);
 
     gtk_dialog_set_response_sensitive(GTK_DIALOG(self), GTK_RESPONSE_NONE, FALSE);
-    gtk_widget_set_sensitive(priv->tree_view, FALSE);
+    gtk_widget_set_sensitive(self->tree_view, FALSE);
 
-    priv->cancellable = g_cancellable_new();
-    ovirt_foreign_menu_set_current_iso_name_async(priv->foreign_menu, active ? NULL : name,
-                                                  priv->cancellable,
+    self->cancellable = g_cancellable_new();
+    ovirt_foreign_menu_set_current_iso_name_async(self->foreign_menu, active ? NULL : name,
+                                                  self->cancellable,
                                                   (GAsyncReadyCallback)ovirt_foreign_menu_iso_name_changed,
                                                   self);
     gtk_tree_path_free(tree_path);
     g_free(name);
 }
 
-void
+G_MODULE_EXPORT void
 remote_viewer_iso_list_dialog_row_activated(GtkTreeView *view G_GNUC_UNUSED,
                                             GtkTreePath *path,
                                             GtkTreeViewColumn *col G_GNUC_UNUSED,
@@ -262,19 +254,18 @@ static void
 remote_viewer_iso_list_dialog_init(RemoteViewerISOListDialog *self)
 {
     GtkWidget *content = gtk_dialog_get_content_area(GTK_DIALOG(self));
-    RemoteViewerISOListDialogPrivate *priv = self->priv = DIALOG_PRIVATE(self);
     GtkBuilder *builder = virt_viewer_util_load_ui("remote-viewer-iso-list.ui");
     GtkCellRendererToggle *cell_renderer;
 
     gtk_builder_connect_signals(builder, self);
 
-    priv->status = GTK_WIDGET(gtk_builder_get_object(builder, "status"));
-    priv->spinner = GTK_WIDGET(gtk_builder_get_object(builder, "spinner"));
-    priv->stack = GTK_WIDGET(gtk_builder_get_object(builder, "stack"));
-    gtk_box_pack_start(GTK_BOX(content), priv->stack, TRUE, TRUE, 0);
+    self->status = GTK_WIDGET(gtk_builder_get_object(builder, "status"));
+    self->spinner = GTK_WIDGET(gtk_builder_get_object(builder, "spinner"));
+    self->stack = GTK_WIDGET(gtk_builder_get_object(builder, "stack"));
+    gtk_box_pack_start(GTK_BOX(content), self->stack, TRUE, TRUE, 0);
 
-    priv->list_store = GTK_LIST_STORE(gtk_builder_get_object(builder, "liststore"));
-    priv->tree_view = GTK_WIDGET(gtk_builder_get_object(builder, "view"));
+    self->list_store = GTK_LIST_STORE(gtk_builder_get_object(builder, "liststore"));
+    self->tree_view = GTK_WIDGET(gtk_builder_get_object(builder, "view"));
     cell_renderer = GTK_CELL_RENDERER_TOGGLE(gtk_builder_get_object(builder, "cellrenderertoggle"));
     gtk_cell_renderer_toggle_set_radio(cell_renderer, TRUE);
     gtk_cell_renderer_set_padding(GTK_CELL_RENDERER(cell_renderer), 6, 6);
@@ -313,8 +304,7 @@ ovirt_foreign_menu_iso_name_changed(OvirtForeignMenu *foreign_menu,
                                     GAsyncResult *result,
                                     RemoteViewerISOListDialog *self)
 {
-    RemoteViewerISOListDialogPrivate *priv = self->priv;
-    GtkTreeModel *model = GTK_TREE_MODEL(priv->list_store);
+    GtkTreeModel *model = GTK_TREE_MODEL(self->list_store);
     gchar *current_iso;
     GtkTreeIter iter;
     gchar *name;
@@ -334,7 +324,7 @@ ovirt_foreign_menu_iso_name_changed(OvirtForeignMenu *foreign_menu,
         remote_viewer_iso_list_dialog_show_error(self, msg);
     }
 
-    g_clear_object(&priv->cancellable);
+    g_clear_object(&self->cancellable);
     if (!gtk_tree_model_get_iter_first(model, &iter))
         goto end;
 
@@ -348,11 +338,11 @@ ovirt_foreign_menu_iso_name_changed(OvirtForeignMenu *foreign_menu,
 
         /* iso is not active anymore */
         if (active && !match) {
-            gtk_list_store_set(priv->list_store, &iter,
+            gtk_list_store_set(self->list_store, &iter,
                                ISO_IS_ACTIVE, FALSE,
                                FONT_WEIGHT, PANGO_WEIGHT_NORMAL, -1);
         } else if (match) {
-            gtk_list_store_set(priv->list_store, &iter,
+            gtk_list_store_set(self->list_store, &iter,
                                ISO_IS_ACTIVE, TRUE,
                                FONT_WEIGHT, PANGO_WEIGHT_BOLD, -1);
         }
@@ -361,7 +351,7 @@ ovirt_foreign_menu_iso_name_changed(OvirtForeignMenu *foreign_menu,
     } while (gtk_tree_model_iter_next(model, &iter));
 
     gtk_dialog_set_response_sensitive(GTK_DIALOG(self), GTK_RESPONSE_NONE, TRUE);
-    gtk_widget_set_sensitive(priv->tree_view, TRUE);
+    gtk_widget_set_sensitive(self->tree_view, TRUE);
     g_free(current_iso);
 
 end:
diff --git a/src/remote-viewer-iso-list-dialog.h b/src/remote-viewer-iso-list-dialog.h
index 480777c..d579a7e 100644
--- a/src/remote-viewer-iso-list-dialog.h
+++ b/src/remote-viewer-iso-list-dialog.h
@@ -35,19 +35,6 @@ G_BEGIN_DECLS
 
 typedef struct _RemoteViewerISOListDialog RemoteViewerISOListDialog;
 typedef struct _RemoteViewerISOListDialogClass RemoteViewerISOListDialogClass;
-typedef struct _RemoteViewerISOListDialogPrivate RemoteViewerISOListDialogPrivate;
-
-struct _RemoteViewerISOListDialog
-{
-    GtkDialog parent;
-
-    RemoteViewerISOListDialogPrivate *priv;
-};
-
-struct _RemoteViewerISOListDialogClass
-{
-    GtkDialogClass parent_class;
-};
 
 GType remote_viewer_iso_list_dialog_get_type(void) G_GNUC_CONST;
 
diff --git a/src/remote-viewer.c b/src/remote-viewer.c
index c52d20f..8938ef9 100644
--- a/src/remote-viewer.c
+++ b/src/remote-viewer.c
@@ -54,9 +54,7 @@ struct _RemoteViewerPrivate {
     gboolean open_recent_dialog;
 };
 
-G_DEFINE_TYPE (RemoteViewer, remote_viewer, VIRT_VIEWER_TYPE_APP)
-#define GET_PRIVATE(o)                                                        \
-    (G_TYPE_INSTANCE_GET_PRIVATE ((o), REMOTE_VIEWER_TYPE, RemoteViewerPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (RemoteViewer, remote_viewer, VIRT_VIEWER_TYPE_APP)
 
 enum RemoteViewerProperties {
     PROP_0,
@@ -196,8 +194,6 @@ remote_viewer_class_init (RemoteViewerClass *klass)
     VirtViewerAppClass *app_class = VIRT_VIEWER_APP_CLASS (klass);
     GApplicationClass *g_app_class = G_APPLICATION_CLASS(klass);
 
-    g_type_class_add_private (klass, sizeof (RemoteViewerPrivate));
-
     object_class->get_property = remote_viewer_get_property;
     object_class->dispose = remote_viewer_dispose;
 
@@ -221,7 +217,7 @@ remote_viewer_class_init (RemoteViewerClass *klass)
 static void
 remote_viewer_init(RemoteViewer *self)
 {
-    self->priv = GET_PRIVATE(self);
+    self->priv = remote_viewer_get_instance_private(self);
 }
 
 RemoteViewer *
@@ -345,10 +341,8 @@ authenticate_cb(RestProxy *proxy, G_GNUC_UNUSED RestProxyAuth *auth,
                      "username", username,
                      "password", password,
                      NULL);
-#ifdef HAVE_OVIRT_CANCEL
     } else {
         rest_proxy_auth_cancel(auth);
-#endif
     }
 
     g_free(username);
@@ -447,14 +441,12 @@ create_ovirt_session(VirtViewerApp *app, const char *uri, GError **err)
     api = ovirt_proxy_fetch_api(proxy, &error);
     if (error != NULL) {
         g_debug("failed to get oVirt 'api' collection: %s", error->message);
-#ifdef HAVE_OVIRT_CANCEL
         if (g_error_matches(error, OVIRT_REST_CALL_ERROR, OVIRT_REST_CALL_ERROR_CANCELLED)) {
             g_clear_error(&error);
             g_set_error_literal(&error,
                                 VIRT_VIEWER_ERROR, VIRT_VIEWER_ERROR_CANCELLED,
                                 _("Authentication was cancelled"));
         }
-#endif
         goto error;
     }
     vms = ovirt_api_get_vms(api);
@@ -509,10 +501,10 @@ create_ovirt_session(VirtViewerApp *app, const char *uri, GError **err)
                  "proxy-url", &proxy_url,
                  NULL);
     if (port != 0) {
-        gport = g_strdup_printf("%d", port);
+        gport = g_strdup_printf("%u", port);
     }
     if (secure_port != 0) {
-        gtlsport = g_strdup_printf("%d", secure_port);
+        gtlsport = g_strdup_printf("%u", secure_port);
     }
 
     if (ghost == NULL) {
@@ -528,7 +520,7 @@ create_ovirt_session(VirtViewerApp *app, const char *uri, GError **err)
         session_type = "vnc";
     } else {
         g_set_error(&error, VIRT_VIEWER_ERROR, VIRT_VIEWER_ERROR_FAILED,
-                    _("oVirt VM %s has unknown display type: %d"), vm_name, type);
+                    _("oVirt VM %s has unknown display type: %u"), vm_name, type);
         g_debug("%s", error->message);
         goto error;
     }
@@ -688,9 +680,18 @@ remote_viewer_initial_connect(RemoteViewer *self, const gchar *type, const gchar
 {
     VirtViewerApp *app = VIRT_VIEWER_APP(self);
 
-    if (!virt_viewer_app_create_session(app, type, error))
-        return FALSE;
-
+#ifdef HAVE_OVIRT
+    if (g_strcmp0(type, "ovirt") == 0) {
+        if (!create_ovirt_session(app, guri, error)) {
+            g_prefix_error(error, _("Couldn't open oVirt session: "));
+            return FALSE;
+        }
+    } else
+#endif
+    {
+        if (!virt_viewer_app_create_session(app, type, error))
+            return FALSE;
+    }
 
     g_signal_connect(virt_viewer_app_get_session(app), "session-connected",
                      G_CALLBACK(remote_viewer_session_connected), g_strdup(guri));
@@ -786,18 +787,8 @@ retry_dialog:
                                 _("Cannot determine the connection type from URI"));
             goto cleanup;
         }
-#ifdef HAVE_OVIRT
-        if (g_strcmp0(type, "ovirt") == 0) {
-            if (!create_ovirt_session(app, guri, &error)) {
-                g_prefix_error(&error, _("Couldn't open oVirt session: "));
-                goto cleanup;
-            }
-        } else
-#endif
-        {
-            if (!remote_viewer_initial_connect(self, type, guri, vvfile, &error))
-                goto cleanup;
-        }
+        if (!remote_viewer_initial_connect(self, type, guri, vvfile, &error))
+            goto cleanup;
     }
 
     ret = VIRT_VIEWER_APP_CLASS(remote_viewer_parent_class)->start(app, &error);
diff --git a/src/resources/ui/virt-viewer.ui b/src/resources/ui/virt-viewer.ui
index e9609ec..93471a4 100644
--- a/src/resources/ui/virt-viewer.ui
+++ b/src/resources/ui/virt-viewer.ui
@@ -34,6 +34,7 @@
                         <property name="accel_group">accelgroup</property>
                         <child>
                           <object class="GtkMenuItem" id="menu-file-screenshot">
+                            <property name="sensitive">False</property>
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="use_action_appearance">False</property>
@@ -83,6 +84,7 @@
                         </child>
                         <child>
                           <object class="GtkMenuItem" id="menu-preferences">
+                            <property name="sensitive">False</property>
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="label" translatable="yes">_Preferences</property>
@@ -111,6 +113,52 @@
                     </child>
                   </object>
                 </child>
+                <child>
+                  <object class="GtkMenuItem" id="menu-machine">
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">_Machine</property>
+                    <property name="use_underline">True</property>
+                    <child type="submenu">
+                      <object class="GtkMenu">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkCheckMenuItem" id="menu-vm-pause">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">_Pause</property>
+                            <property name="use_underline">True</property>
+                            <signal name="toggled" handler="virt_viewer_window_menu_machine_pause" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkSeparatorMenuItem">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="menu-vm-reset">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">_Reset</property>
+                            <property name="use_underline">True</property>
+                            <signal name="activate" handler="virt_viewer_window_menu_machine_reset" swapped="no"/>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuItem" id="menu-vm-powerdown">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">_Power down</property>
+                            <property name="use_underline">True</property>
+                            <signal name="activate" handler="virt_viewer_window_menu_machine_powerdown" swapped="no"/>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
                 <child>
                   <object class="GtkMenuItem" id="menu-view">
                     <property name="visible">True</property>
@@ -136,6 +184,7 @@
                         </child>
                         <child>
                           <object class="GtkMenuItem" id="menu-view-zoom">
+                            <property name="sensitive">False</property>
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="use_action_appearance">False</property>
@@ -214,6 +263,7 @@
                 </child>
                 <child>
                   <object class="GtkMenuItem" id="menu-send">
+                    <property name="sensitive">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="use_action_appearance">False</property>
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 2a88882..2684263 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -62,6 +62,8 @@
 #include "virt-viewer-session-spice.h"
 #endif
 
+#include "virt-viewer-display-vte.h"
+
 gboolean doDebug = FALSE;
 
 /* Signal handlers for about dialog */
@@ -110,7 +112,7 @@ struct _VirtViewerAppPrivate {
     VirtViewerWindow *main_window;
     GtkWidget *main_notebook;
     GList *windows;
-    GHashTable *displays;
+    GHashTable *displays; /* !vte */
     GHashTable *initial_display_map;
     gchar *clipboard;
     GtkWidget *preferences;
@@ -125,6 +127,8 @@ struct _VirtViewerAppPrivate {
     gboolean attach;
     gboolean quitting;
     gboolean kiosk;
+    gboolean vm_ui;
+    gboolean vm_running;
 
     VirtViewerSession *session;
     gboolean active;
@@ -145,7 +149,6 @@ struct _VirtViewerAppPrivate {
     char *title;
     char *uuid;
 
-    gint focused;
     GKeyFile *config;
     gchar *config_file;
 
@@ -157,9 +160,7 @@ struct _VirtViewerAppPrivate {
 };
 
 
-G_DEFINE_ABSTRACT_TYPE(VirtViewerApp, virt_viewer_app, GTK_TYPE_APPLICATION)
-#define GET_PRIVATE(o)                                                        \
-    (G_TYPE_INSTANCE_GET_PRIVATE ((o), VIRT_VIEWER_TYPE_APP, VirtViewerAppPrivate))
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(VirtViewerApp, virt_viewer_app, GTK_TYPE_APPLICATION)
 
 enum {
     PROP_0,
@@ -170,10 +171,11 @@ enum {
     PROP_FULLSCREEN,
     PROP_TITLE,
     PROP_ENABLE_ACCEL,
-    PROP_HAS_FOCUS,
     PROP_KIOSK,
     PROP_QUIT_ON_DISCONNECT,
     PROP_UUID,
+    PROP_VM_UI,
+    PROP_VM_RUNNING,
 };
 
 void
@@ -258,9 +260,13 @@ virt_viewer_app_save_config(VirtViewerApp *self)
         if (error) {
             g_debug("Unable to get comment from key file: %s", error->message);
             g_clear_error(&error);
-        } else {
-            if (!comment || *comment == '\0')
-                g_key_file_set_comment(priv->config, priv->uuid, NULL, priv->guest_name, NULL);
+        }
+
+        if (comment == NULL ||
+                (comment != NULL && g_strstr_len(comment, -1, priv->guest_name) == NULL)) {
+            /* Note that this function appends the guest's name string as last
+             * comment in case there were comments there already */
+            g_key_file_set_comment(priv->config, priv->uuid, NULL, priv->guest_name, NULL);
         }
         g_free(comment);
     }
@@ -282,6 +288,11 @@ virt_viewer_app_quit(VirtViewerApp *self)
 
     virt_viewer_app_save_config(self);
 
+    if (priv->vm_ui) {
+        virt_viewer_session_vm_action(VIRT_VIEWER_SESSION(priv->session),
+                                      VIRT_VIEWER_SESSION_VM_ACTION_QUIT);
+    }
+
     if (priv->session) {
         virt_viewer_session_close(VIRT_VIEWER_SESSION(priv->session));
         if (priv->connected) {
@@ -294,7 +305,7 @@ virt_viewer_app_quit(VirtViewerApp *self)
 }
 
 static gint
-get_n_client_monitors()
+get_n_client_monitors(void)
 {
     return gdk_screen_get_n_monitors(gdk_screen_get_default());
 }
@@ -502,29 +513,6 @@ virt_viewer_app_get_n_windows_visible(VirtViewerApp *self)
     return n;
 }
 
-gboolean
-virt_viewer_app_window_set_visible(VirtViewerApp *self,
-                                   VirtViewerWindow *window,
-                                   gboolean visible)
-{
-    g_return_val_if_fail(VIRT_VIEWER_IS_APP(self), FALSE);
-    g_return_val_if_fail(VIRT_VIEWER_IS_WINDOW(window), FALSE);
-
-    if (visible) {
-        virt_viewer_window_show(window);
-        return TRUE;
-    } else {
-        if (virt_viewer_app_get_n_windows_visible(self) > 1) {
-            virt_viewer_window_hide(window);
-            return FALSE;
-        }
-
-        virt_viewer_app_maybe_quit(self, window);
-    }
-
-    return FALSE;
-}
-
 static void hide_one_window(gpointer value,
                             gpointer user_data G_GNUC_UNUSED)
 {
@@ -724,13 +712,23 @@ virt_viewer_app_set_window_subtitle(VirtViewerApp *app,
     const gchar *title = virt_viewer_app_get_title(app);
 
     if (title != NULL) {
+        VirtViewerDisplay *display = virt_viewer_window_get_display(window);
         gchar *d = strstr(title, "%d");
+        gchar *desc = NULL;
+
+        if (display && VIRT_VIEWER_IS_DISPLAY_VTE(display)) {
+            g_object_get(display, "name", &desc, NULL);
+        } else  {
+            desc = g_strdup_printf("%d", nth + 1);
+        }
+
         if (d != NULL) {
             *d = '\0';
-            subtitle = g_strdup_printf("%s%d%s", title, nth + 1, d + 2);
+            subtitle = g_strdup_printf("%s%s%s", title, desc, d + 2);
             *d = '%';
         } else
-            subtitle = g_strdup_printf("%s (%d)", title, nth + 1);
+            subtitle = g_strdup_printf("%s (%s)", title, desc);
+        g_free(desc);
     }
 
     g_object_set(window, "subtitle", subtitle, NULL);
@@ -738,8 +736,8 @@ virt_viewer_app_set_window_subtitle(VirtViewerApp *app,
 }
 
 static void
-set_title(gpointer value,
-          gpointer user_data)
+set_subtitle(gpointer value,
+             gpointer user_data)
 {
     VirtViewerApp *app = user_data;
     VirtViewerWindow *window = value;
@@ -755,7 +753,7 @@ set_title(gpointer value,
 static void
 virt_viewer_app_set_all_window_subtitles(VirtViewerApp *app)
 {
-    g_list_foreach(app->priv->windows, set_title, app);
+    g_list_foreach(app->priv->windows, set_subtitle, app);
 }
 
 static void update_title(gpointer value,
@@ -801,6 +799,10 @@ static VirtViewerWindow *
 virt_viewer_app_get_nth_window(VirtViewerApp *self, gint nth)
 {
     GList *l;
+
+    if (nth < 0)
+        return NULL;
+
     for (l = self->priv->windows; l; l = l->next) {
         VirtViewerDisplay *display = virt_viewer_window_get_display(l->data);
         if (display
@@ -818,33 +820,6 @@ viewer_window_visible_cb(GtkWidget *widget G_GNUC_UNUSED,
     virt_viewer_app_update_menu_displays(VIRT_VIEWER_APP(user_data));
 }
 
-static gboolean
-viewer_window_focus_in_cb(GtkWindow *window G_GNUC_UNUSED,
-                          GdkEvent *event G_GNUC_UNUSED,
-                          VirtViewerApp *self)
-{
-    self->priv->focused += 1;
-
-    if (self->priv->focused == 1)
-        g_object_notify(G_OBJECT(self), "has-focus");
-
-    return FALSE;
-}
-
-static gboolean
-viewer_window_focus_out_cb(GtkWindow *window G_GNUC_UNUSED,
-                           GdkEvent *event G_GNUC_UNUSED,
-                           VirtViewerApp *self)
-{
-    self->priv->focused -= 1;
-    g_warn_if_fail(self->priv->focused >= 0);
-
-    if (self->priv->focused <= 0)
-        g_object_notify(G_OBJECT(self), "has-focus");
-
-    return FALSE;
-}
-
 static gboolean
 virt_viewer_app_has_usbredir(VirtViewerApp *self)
 {
@@ -881,16 +856,27 @@ virt_viewer_app_window_new(VirtViewerApp *self, gint nth)
 
     g_signal_connect(w, "hide", G_CALLBACK(viewer_window_visible_cb), self);
     g_signal_connect(w, "show", G_CALLBACK(viewer_window_visible_cb), self);
-    g_signal_connect(w, "focus-in-event", G_CALLBACK(viewer_window_focus_in_cb), self);
-    g_signal_connect(w, "focus-out-event", G_CALLBACK(viewer_window_focus_out_cb), self);
     return window;
 }
 
+static void
+window_weak_notify(gpointer data, GObject *where_was G_GNUC_UNUSED)
+{
+    VirtViewerDisplay *display = VIRT_VIEWER_DISPLAY(data);
+
+    g_object_set_data(G_OBJECT(display), "virt-viewer-window", NULL);
+}
+
 static VirtViewerWindow *
 ensure_window_for_display(VirtViewerApp *self, VirtViewerDisplay *display)
 {
     gint nth = virt_viewer_display_get_nth(display);
     VirtViewerWindow *win = virt_viewer_app_get_nth_window(self, nth);
+
+    if (VIRT_VIEWER_IS_DISPLAY_VTE(display)) {
+        win = g_object_get_data(G_OBJECT(display), "virt-viewer-window");
+    }
+
     if (win == NULL) {
         GList *l = self->priv->windows;
 
@@ -912,12 +898,26 @@ ensure_window_for_display(VirtViewerApp *self, VirtViewerDisplay *display)
         }
 
         virt_viewer_window_set_display(win, display);
+        if (VIRT_VIEWER_IS_DISPLAY_VTE(display)) {
+            g_object_set_data(G_OBJECT(display), "virt-viewer-window", win);
+            g_object_weak_ref(G_OBJECT(win), window_weak_notify, display);
+        }
     }
     virt_viewer_app_set_window_subtitle(self, win, nth);
 
     return win;
 }
 
+static VirtViewerWindow *
+display_show_notebook_get_window(VirtViewerApp *self, VirtViewerDisplay *display)
+{
+    VirtViewerWindow *win = ensure_window_for_display(self, display);
+    VirtViewerNotebook *nb = virt_viewer_window_get_notebook(win);
+
+    virt_viewer_notebook_show_display(nb);
+    return win;
+}
+
 static void
 display_show_hint(VirtViewerDisplay *display,
                   GParamSpec *pspec G_GNUC_UNUSED,
@@ -945,9 +945,7 @@ display_show_hint(VirtViewerDisplay *display,
             virt_viewer_window_hide(win);
     } else {
         if (hint & VIRT_VIEWER_DISPLAY_SHOW_HINT_READY) {
-            win = ensure_window_for_display(self, display);
-            nb = virt_viewer_window_get_notebook(win);
-            virt_viewer_notebook_show_display(nb);
+            win = display_show_notebook_get_window(self, display);
             virt_viewer_window_show(win);
         } else {
             if (!self->priv->kiosk && win) {
@@ -967,8 +965,15 @@ virt_viewer_app_display_added(VirtViewerSession *session G_GNUC_UNUSED,
     gint nth;
 
     g_object_get(display, "nth-display", &nth, NULL);
-
     g_debug("Insert display %d %p", nth, display);
+
+    if (VIRT_VIEWER_IS_DISPLAY_VTE(display)) {
+        VirtViewerWindow *win = display_show_notebook_get_window(self, display);
+        virt_viewer_window_hide(win);
+        virt_viewer_app_update_menu_displays(self);
+        return;
+    }
+
     g_hash_table_insert(self->priv->displays, GINT_TO_POINTER(nth), g_object_ref(display));
 
     g_signal_connect(display, "notify::show-hint",
@@ -976,7 +981,6 @@ virt_viewer_app_display_added(VirtViewerSession *session G_GNUC_UNUSED,
     g_object_notify(G_OBJECT(display), "show-hint"); /* call display_show_hint */
 }
 
-
 static void virt_viewer_app_remove_nth_window(VirtViewerApp *self,
                                               gint nth)
 {
@@ -1564,10 +1568,6 @@ virt_viewer_app_get_property (GObject *object, guint property_id,
         g_value_set_boolean(value, virt_viewer_app_get_enable_accel(self));
         break;
 
-    case PROP_HAS_FOCUS:
-        g_value_set_boolean(value, priv->focused > 0);
-        break;
-
     case PROP_KIOSK:
         g_value_set_boolean(value, priv->kiosk);
         break;
@@ -1580,6 +1580,14 @@ virt_viewer_app_get_property (GObject *object, guint property_id,
         g_value_set_string(value, priv->uuid);
         break;
 
+    case PROP_VM_UI:
+        g_value_set_boolean(value, priv->vm_ui);
+        break;
+
+    case PROP_VM_RUNNING:
+        g_value_set_boolean(value, priv->vm_running);
+        break;
+
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
     }
@@ -1634,6 +1642,14 @@ virt_viewer_app_set_property (GObject *object, guint property_id,
         virt_viewer_app_set_uuid_string(self, g_value_get_string(value));
         break;
 
+    case PROP_VM_UI:
+        priv->vm_ui = g_value_get_boolean(value);
+        break;
+
+    case PROP_VM_RUNNING:
+        priv->vm_running = g_value_get_boolean(value);
+        break;
+
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
     }
@@ -1731,7 +1747,7 @@ static void
 virt_viewer_app_init(VirtViewerApp *self)
 {
     GError *error = NULL;
-    self->priv = GET_PRIVATE(self);
+    self->priv = virt_viewer_app_get_instance_private(self);
 
     gtk_window_set_default_icon_name("virt-viewer");
 
@@ -1790,15 +1806,20 @@ virt_viewer_update_smartcard_accels(VirtViewerApp *self)
         sw_smartcard = FALSE;
     }
     if (sw_smartcard) {
+        gboolean r;
         g_debug("enabling smartcard shortcuts");
-        gtk_accel_map_change_entry("<virt-viewer>/file/smartcard-insert",
-                                   priv->insert_smartcard_accel_key,
-                                   priv->insert_smartcard_accel_mods,
-                                   TRUE);
-        gtk_accel_map_change_entry("<virt-viewer>/file/smartcard-remove",
-                                   priv->remove_smartcard_accel_key,
-                                   priv->remove_smartcard_accel_mods,
-                                   TRUE);
+        r = gtk_accel_map_change_entry("<virt-viewer>/file/smartcard-insert",
+                                       priv->insert_smartcard_accel_key,
+                                       priv->insert_smartcard_accel_mods,
+                                       TRUE);
+        if (!r)
+            g_warning("Unable to set hotkey for 'smartcard-insert' due to a conflict in GTK");
+        r = gtk_accel_map_change_entry("<virt-viewer>/file/smartcard-remove",
+                                       priv->remove_smartcard_accel_key,
+                                       priv->remove_smartcard_accel_mods,
+                                       TRUE);
+        if (!r)
+            g_warning("Unable to set hotkey for 'smartcard-remove' due to a conflict in GTK");
     } else {
         g_debug("disabling smartcard shortcuts");
         gtk_accel_map_change_entry("<virt-viewer>/file/smartcard-insert", 0, 0, TRUE);
@@ -1863,7 +1884,6 @@ virt_viewer_app_local_command_line (GApplication   *gapp,
 {
     VirtViewerApp *self = VIRT_VIEWER_APP(gapp);
     gboolean ret = FALSE;
-    gint argc = g_strv_length(*args);
     GError *error = NULL;
     GOptionContext *context = g_option_context_new(NULL);
     GOptionGroup *group = g_option_group_new("virt-viewer", NULL, NULL, gapp, NULL);
@@ -1882,7 +1902,7 @@ virt_viewer_app_local_command_line (GApplication   *gapp,
     g_option_context_add_group(context, spice_get_option_group());
 #endif
 
-    if (!g_option_context_parse(context, &argc, args, &error)) {
+    if (!g_option_context_parse_strv(context, args, &error)) {
         if (error != NULL) {
             g_printerr(_("%s\n"), error->message);
             g_error_free(error);
@@ -1913,8 +1933,6 @@ virt_viewer_app_class_init (VirtViewerAppClass *klass)
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
     GApplicationClass *g_app_class = G_APPLICATION_CLASS(klass);
 
-    g_type_class_add_private (klass, sizeof (VirtViewerAppPrivate));
-
     object_class->get_property = virt_viewer_app_get_property;
     object_class->set_property = virt_viewer_app_set_property;
     object_class->dispose = virt_viewer_app_dispose;
@@ -1997,15 +2015,6 @@ virt_viewer_app_class_init (VirtViewerAppClass *klass)
                                                          G_PARAM_READWRITE |
                                                          G_PARAM_STATIC_STRINGS));
 
-    g_object_class_install_property(object_class,
-                                    PROP_HAS_FOCUS,
-                                    g_param_spec_boolean("has-focus",
-                                                         "Has Focus",
-                                                         "Application has focus",
-                                                         FALSE,
-                                                         G_PARAM_READABLE |
-                                                         G_PARAM_STATIC_STRINGS));
-
     g_object_class_install_property(object_class,
                                     PROP_KIOSK,
                                     g_param_spec_boolean("kiosk",
@@ -2034,6 +2043,24 @@ virt_viewer_app_class_init (VirtViewerAppClass *klass)
                                                         G_PARAM_READABLE |
                                                         G_PARAM_WRITABLE |
                                                         G_PARAM_STATIC_STRINGS));
+
+    g_object_class_install_property(object_class,
+                                    PROP_VM_UI,
+                                    g_param_spec_boolean("vm-ui",
+                                                         "VM UI",
+                                                         "QEMU UI & behaviour",
+                                                         FALSE,
+                                                         G_PARAM_READWRITE |
+                                                         G_PARAM_STATIC_STRINGS));
+
+    g_object_class_install_property(object_class,
+                                    PROP_VM_RUNNING,
+                                    g_param_spec_boolean("vm-running",
+                                                         "VM running",
+                                                         "VM running",
+                                                         FALSE,
+                                                         G_PARAM_READWRITE |
+                                                         G_PARAM_STATIC_STRINGS));
 }
 
 void
@@ -2109,12 +2136,13 @@ virt_viewer_app_set_hotkeys(VirtViewerApp *self, const gchar *hotkeys_str)
             continue;
         }
 
+        gboolean status = TRUE;
         if (g_str_equal(*hotkey, "toggle-fullscreen")) {
-            gtk_accel_map_change_entry("<virt-viewer>/view/toggle-fullscreen", accel_key, accel_mods, TRUE);
+            status = gtk_accel_map_change_entry("<virt-viewer>/view/toggle-fullscreen", accel_key, accel_mods, TRUE);
         } else if (g_str_equal(*hotkey, "release-cursor")) {
-            gtk_accel_map_change_entry("<virt-viewer>/view/release-cursor", accel_key, accel_mods, TRUE);
+            status = gtk_accel_map_change_entry("<virt-viewer>/view/release-cursor", accel_key, accel_mods, TRUE);
         } else if (g_str_equal(*hotkey, "secure-attention")) {
-            gtk_accel_map_change_entry("<virt-viewer>/send/secure-attention", accel_key, accel_mods, TRUE);
+            status = gtk_accel_map_change_entry("<virt-viewer>/send/secure-attention", accel_key, accel_mods, TRUE);
         } else if (g_str_equal(*hotkey, "smartcard-insert")) {
             virt_viewer_set_insert_smartcard_accel(self, accel_key, accel_mods);
         } else if (g_str_equal(*hotkey, "smartcard-remove")) {
@@ -2122,6 +2150,8 @@ virt_viewer_app_set_hotkeys(VirtViewerApp *self, const gchar *hotkeys_str)
         } else {
             g_warning("Unknown hotkey command %s", *hotkey);
         }
+        if (!status)
+            g_warning("Unable to set hotkey for '%s' due to a conflict in GTK", *hotkey);
     }
     g_strfreev(hotkeys);
 
@@ -2232,19 +2262,21 @@ menu_display_visible_toggled_cb(GtkCheckMenuItem *checkmenuitem,
 {
     VirtViewerApp *self = virt_viewer_session_get_app(virt_viewer_display_get_session(display));
     gboolean visible = gtk_check_menu_item_get_active(checkmenuitem);
-    static gboolean reentering = FALSE;
     VirtViewerWindow *vwin;
 
-    if (reentering) /* do not reenter if I switch you back */
-        return;
-
-    reentering = TRUE;
-
     vwin = ensure_window_for_display(self, display);
-    visible = virt_viewer_app_window_set_visible(self, vwin, visible);
 
-    gtk_check_menu_item_set_active(checkmenuitem, /* will be toggled again */ !visible);
-    reentering = FALSE;
+    if (visible) {
+        virt_viewer_window_show(vwin);
+    } else {
+        if (virt_viewer_app_get_n_windows_visible(self) > 1) {
+            virt_viewer_window_hide(vwin);
+        } else {
+            virt_viewer_app_maybe_quit(self, vwin);
+            /* the last item remains active, doesn't matter if we quit */
+            gtk_check_menu_item_set_active(checkmenuitem, TRUE);
+        }
+    }
 
     virt_viewer_session_update_displays_geometry(virt_viewer_display_get_session(display));
 }
@@ -2343,6 +2375,26 @@ window_update_menu_displays_cb(gpointer value,
         tmp = tmp->next;
     }
 
+    for (tmp = self->priv->windows; tmp; tmp = tmp->next) {
+        VirtViewerWindow *win = VIRT_VIEWER_WINDOW(tmp->data);
+        VirtViewerDisplay *display = virt_viewer_window_get_display(win);
+
+        if (VIRT_VIEWER_IS_DISPLAY_VTE(display)) {
+            gchar *name = NULL;
+            GtkWidget *item;
+
+            g_object_get(display, "name", &name, NULL);
+            item = gtk_check_menu_item_new_with_label(name);
+            g_free(name);
+
+            virt_viewer_signal_connect_object(G_OBJECT(item), "toggled",
+                G_CALLBACK(menu_display_visible_toggled_cb), display, 0);
+            gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item),
+                gtk_widget_get_visible(GTK_WIDGET(virt_viewer_window_get_window(win))));
+            gtk_menu_shell_append(submenu, item);
+        }
+    }
+
     gtk_widget_show_all(GTK_WIDGET(submenu));
     g_list_free(keys);
 }
diff --git a/src/virt-viewer-app.h b/src/virt-viewer-app.h
index 16b1c8c..0321229 100644
--- a/src/virt-viewer-app.h
+++ b/src/virt-viewer-app.h
@@ -84,7 +84,7 @@ void virt_viewer_app_set_connect_info(VirtViewerApp *self,
                                       const gchar *user,
                                       gint port,
                                       const gchar *guri);
-gboolean virt_viewer_app_window_set_visible(VirtViewerApp *self, VirtViewerWindow *window, gboolean visible);
+
 void virt_viewer_app_show_status(VirtViewerApp *self, const gchar *fmt, ...);
 void virt_viewer_app_show_display(VirtViewerApp *self);
 GList* virt_viewer_app_get_windows(VirtViewerApp *self);
diff --git a/src/virt-viewer-display-spice.c b/src/virt-viewer-display-spice.c
index f9b383b..311178b 100644
--- a/src/virt-viewer-display-spice.c
+++ b/src/virt-viewer-display-spice.c
@@ -33,8 +33,6 @@
 #include "virt-viewer-display-spice.h"
 #include "virt-viewer-auth.h"
 
-G_DEFINE_TYPE (VirtViewerDisplaySpice, virt_viewer_display_spice, VIRT_VIEWER_TYPE_DISPLAY)
-
 typedef enum {
     AUTO_RESIZE_ALWAYS,
     AUTO_RESIZE_FULLSCREEN,
@@ -49,14 +47,13 @@ struct _VirtViewerDisplaySpicePrivate {
     guint y;
 };
 
-#define VIRT_VIEWER_DISPLAY_SPICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), VIRT_VIEWER_TYPE_DISPLAY_SPICE, VirtViewerDisplaySpicePrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (VirtViewerDisplaySpice, virt_viewer_display_spice, VIRT_VIEWER_TYPE_DISPLAY)
 
 static void virt_viewer_display_spice_send_keys(VirtViewerDisplay *display,
                                                 const guint *keyvals,
                                                 int nkeyvals);
 static GdkPixbuf *virt_viewer_display_spice_get_pixbuf(VirtViewerDisplay *display);
 static void virt_viewer_display_spice_release_cursor(VirtViewerDisplay *display);
-static void virt_viewer_display_spice_close(VirtViewerDisplay *display G_GNUC_UNUSED);
 static gboolean virt_viewer_display_spice_selectable(VirtViewerDisplay *display);
 static void virt_viewer_display_spice_enable(VirtViewerDisplay *display);
 static void virt_viewer_display_spice_disable(VirtViewerDisplay *display);
@@ -69,12 +66,9 @@ virt_viewer_display_spice_class_init(VirtViewerDisplaySpiceClass *klass)
     dclass->send_keys = virt_viewer_display_spice_send_keys;
     dclass->get_pixbuf = virt_viewer_display_spice_get_pixbuf;
     dclass->release_cursor = virt_viewer_display_spice_release_cursor;
-    dclass->close = virt_viewer_display_spice_close;
     dclass->selectable = virt_viewer_display_spice_selectable;
     dclass->enable = virt_viewer_display_spice_enable;
     dclass->disable = virt_viewer_display_spice_disable;
-
-    g_type_class_add_private(klass, sizeof(VirtViewerDisplaySpicePrivate));
 }
 
 static SpiceMainChannel*
@@ -128,7 +122,7 @@ static void virt_viewer_display_spice_disable(VirtViewerDisplay *self)
 static void
 virt_viewer_display_spice_init(VirtViewerDisplaySpice *self G_GNUC_UNUSED)
 {
-    self->priv = VIRT_VIEWER_DISPLAY_SPICE_GET_PRIVATE(self);
+    self->priv = virt_viewer_display_spice_get_instance_private(self);
     self->priv->auto_resize = AUTO_RESIZE_ALWAYS;
 
     g_signal_connect(self, "notify::show-hint", G_CALLBACK(show_hint_changed), NULL);
@@ -348,12 +342,6 @@ virt_viewer_display_spice_release_cursor(VirtViewerDisplay *display)
     spice_display_mouse_ungrab(self->priv->display);
 }
 
-
-static void
-virt_viewer_display_spice_close(VirtViewerDisplay *display G_GNUC_UNUSED)
-{
-}
-
 static gboolean
 virt_viewer_display_spice_selectable(VirtViewerDisplay *self)
 {
diff --git a/src/virt-viewer-display-vnc.c b/src/virt-viewer-display-vnc.c
index c200ac2..d38dcac 100644
--- a/src/virt-viewer-display-vnc.c
+++ b/src/virt-viewer-display-vnc.c
@@ -30,13 +30,11 @@
 
 #include <glib/gi18n.h>
 
-G_DEFINE_TYPE(VirtViewerDisplayVnc, virt_viewer_display_vnc, VIRT_VIEWER_TYPE_DISPLAY)
-
 struct _VirtViewerDisplayVncPrivate {
     VncDisplay *vnc;
 };
 
-#define VIRT_VIEWER_DISPLAY_VNC_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), VIRT_VIEWER_TYPE_DISPLAY_VNC, VirtViewerDisplayVncPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE(VirtViewerDisplayVnc, virt_viewer_display_vnc, VIRT_VIEWER_TYPE_DISPLAY)
 
 static void virt_viewer_display_vnc_send_keys(VirtViewerDisplay* display, const guint *keyvals, int nkeyvals);
 static GdkPixbuf *virt_viewer_display_vnc_get_pixbuf(VirtViewerDisplay* display);
@@ -73,14 +71,12 @@ virt_viewer_display_vnc_class_init(VirtViewerDisplayVncClass *klass)
     dclass->get_pixbuf = virt_viewer_display_vnc_get_pixbuf;
     dclass->close = virt_viewer_display_vnc_close;
     dclass->release_cursor = virt_viewer_display_vnc_release_cursor;
-
-    g_type_class_add_private(klass, sizeof(VirtViewerDisplayVncPrivate));
 }
 
 static void
 virt_viewer_display_vnc_init(VirtViewerDisplayVnc *self G_GNUC_UNUSED)
 {
-    self->priv = VIRT_VIEWER_DISPLAY_VNC_GET_PRIVATE(self);
+    self->priv = virt_viewer_display_vnc_get_instance_private(self);
 }
 
 
diff --git a/src/virt-viewer-display-vte.c b/src/virt-viewer-display-vte.c
new file mode 100644
index 0000000..ef0d5ac
--- /dev/null
+++ b/src/virt-viewer-display-vte.c
@@ -0,0 +1,315 @@
+/*
+ * Virt Viewer: A virtual machine console viewer
+ *
+ * Copyright (C) 2018 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Marc-André Lureau <marcandre.lureau@redhat.com>
+ */
+
+#include <config.h>
+#include <glib/gi18n.h>
+
+#ifdef HAVE_VTE
+#include <vte/vte.h>
+#endif
+
+#include "virt-viewer-auth.h"
+#include "virt-viewer-display-vte.h"
+#include "virt-viewer-util.h"
+
+struct _VirtViewerDisplayVtePrivate {
+#ifdef HAVE_VTE
+    VteTerminal *vte;
+#endif
+    GtkWidget *scroll;
+    gchar *name;
+};
+
+G_DEFINE_TYPE_WITH_PRIVATE(VirtViewerDisplayVte, virt_viewer_display_vte, VIRT_VIEWER_TYPE_DISPLAY)
+
+enum {
+    PROP_0,
+
+    PROP_NAME,
+};
+
+static void
+virt_viewer_display_vte_finalize(GObject *obj)
+{
+    G_OBJECT_CLASS(virt_viewer_display_vte_parent_class)->finalize(obj);
+}
+
+static void
+virt_viewer_display_vte_set_property(GObject *object,
+                                     guint prop_id,
+                                     const GValue *value,
+                                     GParamSpec *pspec)
+{
+    VirtViewerDisplayVte *self = VIRT_VIEWER_DISPLAY_VTE(object);
+
+    switch (prop_id) {
+    case PROP_NAME:
+        g_free(self->priv->name);
+        self->priv->name = g_value_dup_string(value);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+static void
+virt_viewer_display_vte_get_property(GObject *object,
+                                     guint prop_id,
+                                     GValue *value,
+                                     GParamSpec *pspec)
+{
+    VirtViewerDisplayVte *self = VIRT_VIEWER_DISPLAY_VTE(object);
+
+    switch (prop_id) {
+    case PROP_NAME:
+        g_value_set_string(value, self->priv->name);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+static void
+virt_viewer_display_vte_size_allocate(GtkWidget *widget G_GNUC_UNUSED,
+                                      GtkAllocation *allocation G_GNUC_UNUSED)
+{
+    GtkWidget *child = gtk_bin_get_child(GTK_BIN(widget));
+
+    if (child && gtk_widget_get_visible(child))
+        gtk_widget_size_allocate(child, allocation);
+}
+
+static void
+virt_viewer_display_vte_class_init(VirtViewerDisplayVteClass *klass)
+{
+    GObjectClass *oclass = G_OBJECT_CLASS(klass);
+    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
+
+    oclass->set_property = virt_viewer_display_vte_set_property;
+    oclass->get_property = virt_viewer_display_vte_get_property;
+    oclass->finalize = virt_viewer_display_vte_finalize;
+    /* override display desktop aspect-ratio behaviour */
+    widget_class->size_allocate = virt_viewer_display_vte_size_allocate;
+
+    g_object_class_install_property(oclass,
+                                    PROP_NAME,
+                                    g_param_spec_string("name",
+                                                        "Name",
+                                                        "Console name",
+                                                        NULL,
+                                                        G_PARAM_READWRITE|
+                                                        G_PARAM_CONSTRUCT_ONLY|
+                                                        G_PARAM_STATIC_STRINGS));
+    g_signal_new("commit",
+                 G_OBJECT_CLASS_TYPE(oclass),
+                 G_SIGNAL_RUN_FIRST,
+                 0,
+                 NULL, NULL,
+                 NULL,
+                 G_TYPE_NONE,
+                 2,
+                 G_TYPE_POINTER, G_TYPE_INT);
+}
+
+static void
+virt_viewer_display_vte_init(VirtViewerDisplayVte *self G_GNUC_UNUSED)
+{
+    self->priv = virt_viewer_display_vte_get_instance_private(self);
+}
+
+#ifdef HAVE_VTE
+static void
+virt_viewer_display_vte_commit(VirtViewerDisplayVte *self,
+                               const gchar *text,
+                               guint size,
+                               gpointer user_data G_GNUC_UNUSED)
+{
+    g_signal_emit_by_name(self, "commit", text, size);
+}
+#endif
+
+static void
+virt_viewer_display_vte_adj_changed(VirtViewerDisplayVte *self,
+                                    GtkAdjustment *adjustment)
+{
+    gtk_widget_set_visible(self->priv->scroll,
+        gtk_adjustment_get_upper(adjustment) > gtk_adjustment_get_page_size(adjustment));
+}
+
+GtkWidget *
+virt_viewer_display_vte_new(VirtViewerSession *session, const char *name)
+{
+    VirtViewerDisplayVte *self;
+    GtkWidget *grid, *scroll = NULL, *vte;
+
+    self = g_object_new(VIRT_VIEWER_TYPE_DISPLAY_VTE,
+                        "session", session,
+                        "nth-display", -1,
+                        "name", name,
+                        NULL);
+#ifdef HAVE_VTE
+    vte = vte_terminal_new();
+    self->priv->vte = VTE_TERMINAL(g_object_ref(vte));
+    virt_viewer_signal_connect_object(vte, "commit",
+                                      G_CALLBACK(virt_viewer_display_vte_commit),
+                                      self, G_CONNECT_SWAPPED);
+    scroll = gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL,
+                               gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(vte)));
+    self->priv->scroll = scroll;
+#else
+    vte = gtk_label_new(_("Console support is compiled out!"));
+#endif
+    g_object_set(vte, "hexpand", TRUE, "vexpand", TRUE, NULL);
+
+    grid = gtk_grid_new();
+
+    gtk_container_add(GTK_CONTAINER(grid), vte);
+    if (scroll) {
+        gtk_container_add(GTK_CONTAINER(grid), scroll);
+        gtk_widget_hide(scroll);
+        virt_viewer_signal_connect_object(gtk_range_get_adjustment(GTK_RANGE(scroll)),
+                                          "changed", G_CALLBACK(virt_viewer_display_vte_adj_changed),
+                                          self, G_CONNECT_SWAPPED);
+    }
+
+    gtk_container_add(GTK_CONTAINER(self), grid);
+
+    return GTK_WIDGET(self);
+}
+
+/* adapted from gnome-terminal */
+/* Allow scales a bit smaller and a bit larger than the usual pango ranges */
+#define TERMINAL_SCALE_XXX_SMALL   (PANGO_SCALE_XX_SMALL/1.2)
+#define TERMINAL_SCALE_XXXX_SMALL  (TERMINAL_SCALE_XXX_SMALL/1.2)
+#define TERMINAL_SCALE_XXXXX_SMALL (TERMINAL_SCALE_XXXX_SMALL/1.2)
+#define TERMINAL_SCALE_XXX_LARGE   (PANGO_SCALE_XX_LARGE*1.2)
+#define TERMINAL_SCALE_XXXX_LARGE  (TERMINAL_SCALE_XXX_LARGE*1.2)
+#define TERMINAL_SCALE_XXXXX_LARGE (TERMINAL_SCALE_XXXX_LARGE*1.2)
+#define TERMINAL_SCALE_MINIMUM     (TERMINAL_SCALE_XXXXX_SMALL/1.2)
+#define TERMINAL_SCALE_MAXIMUM     (TERMINAL_SCALE_XXXXX_LARGE*1.2)
+
+#ifdef HAVE_VTE
+static const double zoom_factors[] = {
+  TERMINAL_SCALE_MINIMUM,
+  TERMINAL_SCALE_XXXXX_SMALL,
+  TERMINAL_SCALE_XXXX_SMALL,
+  TERMINAL_SCALE_XXX_SMALL,
+  PANGO_SCALE_XX_SMALL,
+  PANGO_SCALE_X_SMALL,
+  PANGO_SCALE_SMALL,
+  PANGO_SCALE_MEDIUM,
+  PANGO_SCALE_LARGE,
+  PANGO_SCALE_X_LARGE,
+  PANGO_SCALE_XX_LARGE,
+  TERMINAL_SCALE_XXX_LARGE,
+  TERMINAL_SCALE_XXXX_LARGE,
+  TERMINAL_SCALE_XXXXX_LARGE,
+  TERMINAL_SCALE_MAXIMUM
+};
+
+static gboolean
+find_larger_zoom_factor (double *zoom)
+{
+  double current = *zoom;
+  guint i;
+
+  for (i = 0; i < G_N_ELEMENTS (zoom_factors); ++i)
+    {
+      /* Find a font that's larger than this one */
+      if ((zoom_factors[i] - current) > 1e-6)
+        {
+          *zoom = zoom_factors[i];
+          return TRUE;
+        }
+    }
+
+  return FALSE;
+}
+
+static gboolean
+find_smaller_zoom_factor (double *zoom)
+{
+  double current = *zoom;
+  int i;
+
+  i = (int) G_N_ELEMENTS (zoom_factors) - 1;
+  while (i >= 0)
+    {
+      /* Find a font that's smaller than this one */
+      if ((current - zoom_factors[i]) > 1e-6)
+        {
+          *zoom = zoom_factors[i];
+          return TRUE;
+        }
+
+      --i;
+    }
+
+  return FALSE;
+}
+
+void virt_viewer_display_vte_feed(VirtViewerDisplayVte *display, gpointer data, int size)
+{
+    vte_terminal_feed(display->priv->vte, data, size);
+}
+
+void virt_viewer_display_vte_zoom_in(VirtViewerDisplayVte *self)
+{
+    double zoom = vte_terminal_get_font_scale(self->priv->vte);
+
+    if (!find_larger_zoom_factor(&zoom))
+        return;
+
+    vte_terminal_set_font_scale(self->priv->vte, zoom);
+}
+
+void virt_viewer_display_vte_zoom_out(VirtViewerDisplayVte *self)
+{
+    double zoom = vte_terminal_get_font_scale(self->priv->vte);
+
+    if (!find_smaller_zoom_factor(&zoom))
+        return;
+
+    vte_terminal_set_font_scale(self->priv->vte, zoom);
+}
+
+void virt_viewer_display_vte_zoom_reset(VirtViewerDisplayVte *self)
+{
+    vte_terminal_set_font_scale(self->priv->vte, PANGO_SCALE_MEDIUM);
+}
+#else
+void virt_viewer_display_vte_feed(VirtViewerDisplayVte *self G_GNUC_UNUSED,
+                                  gpointer data G_GNUC_UNUSED, int size G_GNUC_UNUSED)
+{
+}
+void virt_viewer_display_vte_zoom_in(VirtViewerDisplayVte *self G_GNUC_UNUSED)
+{
+}
+void virt_viewer_display_vte_zoom_out(VirtViewerDisplayVte *self G_GNUC_UNUSED)
+{
+}
+void virt_viewer_display_vte_zoom_reset(VirtViewerDisplayVte *self G_GNUC_UNUSED)
+{
+}
+#endif
diff --git a/src/virt-viewer-display-vte.h b/src/virt-viewer-display-vte.h
new file mode 100644
index 0000000..8d111b7
--- /dev/null
+++ b/src/virt-viewer-display-vte.h
@@ -0,0 +1,81 @@
+/*
+ * Virt Viewer: A virtual machine console viewer
+ *
+ * Copyright (C) 2018 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Marc-André Lureau <marcandre.lureau@redhat.com>
+ */
+#ifndef _VIRT_VIEWER_DISPLAY_VTE_H
+#define _VIRT_VIEWER_DISPLAY_VTE_H
+
+#include <glib-object.h>
+
+#include "virt-viewer-display.h"
+
+G_BEGIN_DECLS
+
+#define VIRT_VIEWER_TYPE_DISPLAY_VTE virt_viewer_display_vte_get_type()
+
+#define VIRT_VIEWER_DISPLAY_VTE(obj)                                    \
+    (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIRT_VIEWER_TYPE_DISPLAY_VTE, VirtViewerDisplayVte))
+
+#define VIRT_VIEWER_DISPLAY_VTE_CLASS(klass)                            \
+    (G_TYPE_CHECK_CLASS_CAST ((klass), VIRT_VIEWER_TYPE_DISPLAY_VTE, VirtViewerDisplayVteClass))
+
+#define VIRT_VIEWER_IS_DISPLAY_VTE(obj)                                 \
+    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIRT_VIEWER_TYPE_DISPLAY_VTE))
+
+#define VIRT_VIEWER_IS_DISPLAY_VTE_CLASS(klass)                         \
+    (G_TYPE_CHECK_CLASS_TYPE ((klass), VIRT_VIEWER_TYPE_DISPLAY_VTE))
+
+#define VIRT_VIEWER_DISPLAY_VTE_GET_CLASS(obj)                          \
+    (G_TYPE_INSTANCE_GET_CLASS ((obj), VIRT_VIEWER_TYPE_DISPLAY_VTE, VirtViewerDisplayVteClass))
+
+typedef struct _VirtViewerDisplayVte VirtViewerDisplayVte;
+typedef struct _VirtViewerDisplayVteClass VirtViewerDisplayVteClass;
+typedef struct _VirtViewerDisplayVtePrivate VirtViewerDisplayVtePrivate;
+
+struct _VirtViewerDisplayVte {
+    VirtViewerDisplay parent;
+
+    VirtViewerDisplayVtePrivate *priv;
+};
+
+struct _VirtViewerDisplayVteClass {
+    VirtViewerDisplayClass parent_class;
+};
+
+GType virt_viewer_display_vte_get_type(void);
+
+GtkWidget* virt_viewer_display_vte_new(VirtViewerSession *session, const char *name);
+
+void virt_viewer_display_vte_feed(VirtViewerDisplayVte *vte, gpointer data, int size);
+
+void virt_viewer_display_vte_zoom_reset(VirtViewerDisplayVte *vte);
+void virt_viewer_display_vte_zoom_in(VirtViewerDisplayVte *vte);
+void virt_viewer_display_vte_zoom_out(VirtViewerDisplayVte *vte);
+
+G_END_DECLS
+
+#endif /* _VIRT_VIEWER_DISPLAY_VTE_H */
+/*
+ * Local variables:
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  indent-tabs-mode: nil
+ * End:
+ */
diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c
index 2dbaba1..de72353 100644
--- a/src/virt-viewer-display.c
+++ b/src/virt-viewer-display.c
@@ -31,8 +31,6 @@
 #include "virt-viewer-display.h"
 #include "virt-viewer-util.h"
 
-#define VIRT_VIEWER_DISPLAY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), VIRT_VIEWER_TYPE_DISPLAY, VirtViewerDisplayPrivate))
-
 struct _VirtViewerDisplayPrivate
 {
     guint desktopWidth;
@@ -63,7 +61,7 @@ static void virt_viewer_display_get_property(GObject *object,
                                              GParamSpec *pspec);
 static void virt_viewer_display_grab_focus(GtkWidget *widget);
 
-G_DEFINE_ABSTRACT_TYPE(VirtViewerDisplay, virt_viewer_display, GTK_TYPE_BIN)
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(VirtViewerDisplay, virt_viewer_display, GTK_TYPE_BIN)
 
 enum {
     PROP_0,
@@ -129,7 +127,7 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class)
                                     g_param_spec_int("nth-display",
                                                      "Nth display",
                                                      "Nth display",
-                                                     0,
+                                                     -1,
                                                      G_MAXINT32,
                                                      0,
                                                      G_PARAM_READWRITE |
@@ -183,7 +181,7 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class)
     g_signal_new("display-pointer-grab",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
-                 G_STRUCT_OFFSET(VirtViewerDisplayClass, display_pointer_grab),
+                 0,
                  NULL,
                  NULL,
                  g_cclosure_marshal_VOID__VOID,
@@ -193,7 +191,7 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class)
     g_signal_new("display-pointer-ungrab",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
-                 G_STRUCT_OFFSET(VirtViewerDisplayClass, display_pointer_ungrab),
+                 0,
                  NULL,
                  NULL,
                  g_cclosure_marshal_VOID__VOID,
@@ -203,7 +201,7 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class)
     g_signal_new("display-keyboard-grab",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
-                 G_STRUCT_OFFSET(VirtViewerDisplayClass, display_keyboard_grab),
+                 0,
                  NULL,
                  NULL,
                  g_cclosure_marshal_VOID__VOID,
@@ -213,7 +211,7 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class)
     g_signal_new("display-keyboard-ungrab",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
-                 G_STRUCT_OFFSET(VirtViewerDisplayClass, display_keyboard_ungrab),
+                 0,
                  NULL,
                  NULL,
                  g_cclosure_marshal_VOID__VOID,
@@ -223,7 +221,7 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class)
     g_signal_new("display-desktop-resize",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
-                 G_STRUCT_OFFSET(VirtViewerDisplayClass, display_desktop_resize),
+                 0,
                  NULL,
                  NULL,
                  g_cclosure_marshal_VOID__VOID,
@@ -239,8 +237,6 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class)
                  g_cclosure_marshal_VOID__VOID,
                  G_TYPE_NONE,
                  0);
-
-    g_type_class_add_private(class, sizeof(VirtViewerDisplayPrivate));
 }
 
 static void
@@ -249,7 +245,7 @@ virt_viewer_display_init(VirtViewerDisplay *display)
     gtk_widget_set_has_window(GTK_WIDGET(display), FALSE);
     gtk_widget_set_redraw_on_allocate(GTK_WIDGET(display), FALSE);
 
-    display->priv = VIRT_VIEWER_DISPLAY_GET_PRIVATE(display);
+    display->priv = virt_viewer_display_get_instance_private(display);
 
     display->priv->desktopWidth = MIN_DISPLAY_WIDTH;
     display->priv->desktopHeight = MIN_DISPLAY_HEIGHT;
@@ -657,9 +653,8 @@ void virt_viewer_display_close(VirtViewerDisplay *self)
     g_return_if_fail(VIRT_VIEWER_IS_DISPLAY(self));
 
     klass = VIRT_VIEWER_DISPLAY_GET_CLASS(self);
-    g_return_if_fail(klass->close != NULL);
-
-    klass->close(self);
+    if (klass->close)
+        klass->close(self);
 }
 
 void virt_viewer_display_set_fullscreen(VirtViewerDisplay *self, gboolean fullscreen)
@@ -688,7 +683,9 @@ void virt_viewer_display_get_preferred_monitor_geometry(VirtViewerDisplay* self,
 
     g_return_if_fail(preferred != NULL);
 
-    if (!virt_viewer_display_get_enabled(self)) {
+    top = gtk_widget_get_toplevel(GTK_WIDGET(self));
+    if (!virt_viewer_display_get_enabled(self) ||
+        !GTK_IS_WINDOW(top)) {
         preferred->width = 0;
         preferred->height = 0;
         preferred->x = 0;
@@ -696,7 +693,6 @@ void virt_viewer_display_get_preferred_monitor_geometry(VirtViewerDisplay* self,
         return;
     }
 
-    top = gtk_widget_get_toplevel(GTK_WIDGET(self));
     gtk_window_get_position(GTK_WINDOW(top), &topx, &topy);
     topx = MAX(topx, 0);
     topy = MAX(topy, 0);
diff --git a/src/virt-viewer-display.h b/src/virt-viewer-display.h
index 7b55ca5..2de17db 100644
--- a/src/virt-viewer-display.h
+++ b/src/virt-viewer-display.h
@@ -82,18 +82,16 @@ struct _VirtViewerDisplayClass {
 
     void (*close)(VirtViewerDisplay *display);
     gboolean (*selectable)(VirtViewerDisplay *display);
-
-    /* signals */
-    void (*display_pointer_grab)(VirtViewerDisplay *display);
-    void (*display_pointer_ungrab)(VirtViewerDisplay *display);
-    void (*display_keyboard_grab)(VirtViewerDisplay *display);
-    void (*display_keyboard_ungrab)(VirtViewerDisplay *display);
-
-    void (*display_desktop_resize)(VirtViewerDisplay *display);
     void (*enable)(VirtViewerDisplay *display);
     void (*disable)(VirtViewerDisplay *display);
 };
 
+#define VIRT_VIEWER_DISPLAY_CAN_SCREENSHOT(display) \
+    (display && (VIRT_VIEWER_DISPLAY_GET_CLASS(display)->get_pixbuf != NULL))
+
+#define VIRT_VIEWER_DISPLAY_CAN_SEND_KEYS(display) \
+    (display && (VIRT_VIEWER_DISPLAY_GET_CLASS(display)->send_keys != NULL))
+
 GType virt_viewer_display_get_type(void);
 
 GtkWidget *virt_viewer_display_new(void);
diff --git a/src/virt-viewer-file-transfer-dialog.c b/src/virt-viewer-file-transfer-dialog.c
index dcf99a3..a82d01a 100644
--- a/src/virt-viewer-file-transfer-dialog.c
+++ b/src/virt-viewer-file-transfer-dialog.c
@@ -39,10 +39,6 @@ struct _VirtViewerFileTransferDialogPrivate
 
 G_DEFINE_TYPE_WITH_PRIVATE(VirtViewerFileTransferDialog, virt_viewer_file_transfer_dialog, GTK_TYPE_DIALOG)
 
-#define FILE_TRANSFER_DIALOG_PRIVATE(o) \
-        (G_TYPE_INSTANCE_GET_PRIVATE((o), VIRT_VIEWER_TYPE_FILE_TRANSFER_DIALOG, VirtViewerFileTransferDialogPrivate))
-
-
 static void
 virt_viewer_file_transfer_dialog_dispose(GObject *object)
 {
@@ -115,7 +111,7 @@ virt_viewer_file_transfer_dialog_init(VirtViewerFileTransferDialog *self)
 {
     gtk_widget_init_template(GTK_WIDGET(self));
 
-    self->priv = FILE_TRANSFER_DIALOG_PRIVATE(self);
+    self->priv = virt_viewer_file_transfer_dialog_get_instance_private(self);
 
     g_signal_connect(self, "response", G_CALLBACK(dialog_response), NULL);
     g_signal_connect(self, "delete-event", G_CALLBACK(delete_event), NULL);
@@ -153,8 +149,8 @@ static void update_global_progress(VirtViewerFileTransferDialog *self)
     if (self->priv->num_files == 1) {
         message = g_strdup(_("Transferring 1 file..."));
     } else {
-        message = g_strdup_printf(ngettext("Transferring %d file of %d...",
-                                           "Transferring %d files of %d...", n_files),
+        message = g_strdup_printf(ngettext("Transferring %u file of %u...",
+                                           "Transferring %u files of %u...", n_files),
                                   n_files, self->priv->num_files);
     }
     gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(self->priv->progressbar), fraction);
diff --git a/src/virt-viewer-file.c b/src/virt-viewer-file.c
index 1b0c310..7d2b2cb 100644
--- a/src/virt-viewer-file.c
+++ b/src/virt-viewer-file.c
@@ -43,6 +43,7 @@
  * - newer-version-url: string specifying an URL to display when the minimum
  *   version check fails
  * - type: string, mandatory, values: "spice" (later "vnc" etc..)
+ * - unix-path: string
  * - host: string
  * - port: int
  * - tls-port: int
@@ -94,9 +95,7 @@ struct _VirtViewerFilePrivate {
     GKeyFile* keyfile;
 };
 
-G_DEFINE_TYPE(VirtViewerFile, virt_viewer_file, G_TYPE_OBJECT);
-
-#define VIRT_VIEWER_FILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), VIRT_VIEWER_TYPE_FILE, VirtViewerFilePrivate))
+G_DEFINE_TYPE_WITH_PRIVATE(VirtViewerFile, virt_viewer_file, G_TYPE_OBJECT);
 
 #define MAIN_GROUP "virt-viewer"
 #define OVIRT_GROUP "ovirt"
@@ -104,6 +103,7 @@ G_DEFINE_TYPE(VirtViewerFile, virt_viewer_file, G_TYPE_OBJECT);
 enum  {
     PROP_DUMMY_PROPERTY,
     PROP_TYPE,
+    PROP_UNIX_PATH,
     PROP_HOST,
     PROP_PORT,
     PROP_TLS_PORT,
@@ -326,6 +326,19 @@ virt_viewer_file_set_host(VirtViewerFile* self, const gchar* value)
     g_object_notify(G_OBJECT(self), "host");
 }
 
+gchar*
+virt_viewer_file_get_unix_path(VirtViewerFile* self)
+{
+    return virt_viewer_file_get_string(self, MAIN_GROUP, "unix-path");
+}
+
+void
+virt_viewer_file_set_unix_path(VirtViewerFile* self, const gchar* value)
+{
+    virt_viewer_file_set_string(self, MAIN_GROUP, "unix-path", value);
+    g_object_notify(G_OBJECT(self), "unix-path");
+}
+
 gchar*
 virt_viewer_file_get_file_type(VirtViewerFile* self)
 {
@@ -939,6 +952,9 @@ virt_viewer_file_set_property(GObject* object, guint property_id,
     case PROP_TYPE:
         virt_viewer_file_set_type(self, g_value_get_string(value));
         break;
+    case PROP_UNIX_PATH:
+        virt_viewer_file_set_unix_path(self, g_value_get_string(value));
+        break;
     case PROP_HOST:
         virt_viewer_file_set_host(self, g_value_get_string(value));
         break;
@@ -1054,6 +1070,9 @@ virt_viewer_file_get_property(GObject* object, guint property_id,
     case PROP_TYPE:
         g_value_take_string(value, virt_viewer_file_get_file_type(self));
         break;
+    case PROP_UNIX_PATH:
+        g_value_take_string(value, virt_viewer_file_get_unix_path(self));
+        break;
     case PROP_HOST:
         g_value_take_string(value, virt_viewer_file_get_host(self));
         break;
@@ -1170,7 +1189,7 @@ virt_viewer_file_finalize(GObject* object)
 static void
 virt_viewer_file_init(VirtViewerFile* self)
 {
-    self->priv = VIRT_VIEWER_FILE_GET_PRIVATE(self);
+    self->priv = virt_viewer_file_get_instance_private(self);
 
     self->priv->keyfile = g_key_file_new();
 }
@@ -1179,7 +1198,6 @@ static void
 virt_viewer_file_class_init(VirtViewerFileClass* klass)
 {
     virt_viewer_file_parent_class = g_type_class_peek_parent(klass);
-    g_type_class_add_private(klass, sizeof(VirtViewerFilePrivate));
 
     G_OBJECT_CLASS(klass)->get_property = virt_viewer_file_get_property;
     G_OBJECT_CLASS(klass)->set_property = virt_viewer_file_set_property;
diff --git a/src/virt-viewer-file.h b/src/virt-viewer-file.h
index 15c61d0..108bcbf 100644
--- a/src/virt-viewer-file.h
+++ b/src/virt-viewer-file.h
@@ -54,6 +54,8 @@ VirtViewerFile* virt_viewer_file_new_from_buffer(const gchar* buf, gsize len,
                                                  GError** error);
 gboolean virt_viewer_file_is_set(VirtViewerFile* self, const gchar* key);
 
+gchar* virt_viewer_file_get_unix_path(VirtViewerFile* self);
+void virt_viewer_file_set_unix_path(VirtViewerFile* self, const gchar* value);
 gchar* virt_viewer_file_get_ca(VirtViewerFile* self);
 void virt_viewer_file_set_ca(VirtViewerFile* self, const gchar* value);
 gchar* virt_viewer_file_get_host(VirtViewerFile* self);
diff --git a/src/virt-viewer-notebook.c b/src/virt-viewer-notebook.c
index 3a74e9f..1457aa9 100644
--- a/src/virt-viewer-notebook.c
+++ b/src/virt-viewer-notebook.c
@@ -27,15 +27,12 @@
 #include "virt-viewer-notebook.h"
 #include "virt-viewer-util.h"
 
-G_DEFINE_TYPE (VirtViewerNotebook, virt_viewer_notebook, GTK_TYPE_NOTEBOOK)
-
-#define GET_PRIVATE(o)                                                        \
-    (G_TYPE_INSTANCE_GET_PRIVATE ((o), VIRT_VIEWER_TYPE_NOTEBOOK, VirtViewerNotebookPrivate))
-
 struct _VirtViewerNotebookPrivate {
     GtkWidget *status;
 };
 
+G_DEFINE_TYPE_WITH_PRIVATE (VirtViewerNotebook, virt_viewer_notebook, GTK_TYPE_NOTEBOOK)
+
 static void
 virt_viewer_notebook_get_property (GObject *object, guint property_id,
                                    GValue *value G_GNUC_UNUSED, GParamSpec *pspec)
@@ -61,8 +58,6 @@ virt_viewer_notebook_class_init (VirtViewerNotebookClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-    g_type_class_add_private (klass, sizeof (VirtViewerNotebookPrivate));
-
     object_class->get_property = virt_viewer_notebook_get_property;
     object_class->set_property = virt_viewer_notebook_set_property;
 }
@@ -72,7 +67,7 @@ virt_viewer_notebook_init (VirtViewerNotebook *self)
 {
     VirtViewerNotebookPrivate *priv;
 
-    self->priv = GET_PRIVATE(self);
+    self->priv = virt_viewer_notebook_get_instance_private(self);
     priv = self->priv;
 
     priv->status = gtk_label_new("");
diff --git a/src/virt-viewer-resources.c b/src/virt-viewer-resources.c
index 82ac96c..d1d06b9 100644
--- a/src/virt-viewer-resources.c
+++ b/src/virt-viewer-resources.c
@@ -6,7 +6,7 @@
 # define SECTION
 #endif
 
-static const SECTION union { const guint8 data[89144]; const double alignment; void * const ptr;}  virt_viewer_resource_data = { {
+static const SECTION union { const guint8 data[92168]; const double alignment; void * const ptr;}  virt_viewer_resource_data = { {
   0x47, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
   0x18, 0x00, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 
@@ -57,58 +57,58 @@ static const SECTION union { const guint8 data[89144]; const double alignment; v
   0x68, 0x93, 0x00, 0x00, 0x76, 0xab, 0x00, 0x00, 
   0x17, 0x53, 0x0e, 0x8b, 0x17, 0x00, 0x00, 0x00, 
   0x76, 0xab, 0x00, 0x00, 0x0e, 0x00, 0x76, 0x00, 
-  0x88, 0xab, 0x00, 0x00, 0x9d, 0xee, 0x00, 0x00, 
+  0x88, 0xab, 0x00, 0x00, 0x6d, 0xfa, 0x00, 0x00, 
   0x7f, 0x72, 0x6e, 0x6f, 0x17, 0x00, 0x00, 0x00, 
-  0x9d, 0xee, 0x00, 0x00, 0x1c, 0x00, 0x76, 0x00, 
-  0xc0, 0xee, 0x00, 0x00, 0xe4, 0x03, 0x01, 0x00, 
+  0x6d, 0xfa, 0x00, 0x00, 0x1c, 0x00, 0x76, 0x00, 
+  0x90, 0xfa, 0x00, 0x00, 0xb4, 0x0f, 0x01, 0x00, 
   0xb4, 0x90, 0xee, 0x05, 0x0f, 0x00, 0x00, 0x00, 
-  0xe4, 0x03, 0x01, 0x00, 0x06, 0x00, 0x4c, 0x00, 
-  0xec, 0x03, 0x01, 0x00, 0xf0, 0x03, 0x01, 0x00, 
+  0xb4, 0x0f, 0x01, 0x00, 0x06, 0x00, 0x4c, 0x00, 
+  0xbc, 0x0f, 0x01, 0x00, 0xc0, 0x0f, 0x01, 0x00, 
   0x44, 0x7e, 0x05, 0x0b, 0x0f, 0x00, 0x00, 0x00, 
-  0xf0, 0x03, 0x01, 0x00, 0x06, 0x00, 0x4c, 0x00, 
-  0xf8, 0x03, 0x01, 0x00, 0xfc, 0x03, 0x01, 0x00, 
+  0xc0, 0x0f, 0x01, 0x00, 0x06, 0x00, 0x4c, 0x00, 
+  0xc8, 0x0f, 0x01, 0x00, 0xcc, 0x0f, 0x01, 0x00, 
   0xf8, 0xc1, 0x12, 0x06, 0x0f, 0x00, 0x00, 0x00, 
-  0xfc, 0x03, 0x01, 0x00, 0x06, 0x00, 0x4c, 0x00, 
-  0x04, 0x04, 0x01, 0x00, 0x0c, 0x04, 0x01, 0x00, 
+  0xcc, 0x0f, 0x01, 0x00, 0x06, 0x00, 0x4c, 0x00, 
+  0xd4, 0x0f, 0x01, 0x00, 0xdc, 0x0f, 0x01, 0x00, 
   0x85, 0x5f, 0xf4, 0x8b, 0x14, 0x00, 0x00, 0x00, 
-  0x0c, 0x04, 0x01, 0x00, 0x06, 0x00, 0x4c, 0x00, 
-  0x14, 0x04, 0x01, 0x00, 0x2c, 0x04, 0x01, 0x00, 
+  0xdc, 0x0f, 0x01, 0x00, 0x06, 0x00, 0x4c, 0x00, 
+  0xe4, 0x0f, 0x01, 0x00, 0xfc, 0x0f, 0x01, 0x00, 
   0x5f, 0x8c, 0xb5, 0x30, 0x17, 0x00, 0x00, 0x00, 
-  0x2c, 0x04, 0x01, 0x00, 0x14, 0x00, 0x76, 0x00, 
-  0x40, 0x04, 0x01, 0x00, 0xcf, 0x10, 0x01, 0x00, 
+  0xfc, 0x0f, 0x01, 0x00, 0x14, 0x00, 0x76, 0x00, 
+  0x10, 0x10, 0x01, 0x00, 0x9f, 0x1c, 0x01, 0x00, 
   0x1b, 0xfe, 0x47, 0xed, 0x0d, 0x00, 0x00, 0x00, 
-  0xcf, 0x10, 0x01, 0x00, 0x0f, 0x00, 0x76, 0x00, 
-  0xe0, 0x10, 0x01, 0x00, 0xde, 0x1a, 0x01, 0x00, 
+  0x9f, 0x1c, 0x01, 0x00, 0x0f, 0x00, 0x76, 0x00, 
+  0xb0, 0x1c, 0x01, 0x00, 0xae, 0x26, 0x01, 0x00, 
   0x4b, 0x50, 0x90, 0x0b, 0x13, 0x00, 0x00, 0x00, 
-  0xde, 0x1a, 0x01, 0x00, 0x04, 0x00, 0x4c, 0x00, 
-  0xe4, 0x1a, 0x01, 0x00, 0xe8, 0x1a, 0x01, 0x00, 
+  0xae, 0x26, 0x01, 0x00, 0x04, 0x00, 0x4c, 0x00, 
+  0xb4, 0x26, 0x01, 0x00, 0xb8, 0x26, 0x01, 0x00, 
   0xd4, 0xb5, 0x02, 0x00, 0xff, 0xff, 0xff, 0xff, 
-  0xe8, 0x1a, 0x01, 0x00, 0x01, 0x00, 0x4c, 0x00, 
-  0xec, 0x1a, 0x01, 0x00, 0xf0, 0x1a, 0x01, 0x00, 
+  0xb8, 0x26, 0x01, 0x00, 0x01, 0x00, 0x4c, 0x00, 
+  0xbc, 0x26, 0x01, 0x00, 0xc0, 0x26, 0x01, 0x00, 
   0x1a, 0x0f, 0x8f, 0x65, 0x03, 0x00, 0x00, 0x00, 
-  0xf0, 0x1a, 0x01, 0x00, 0x0c, 0x00, 0x4c, 0x00, 
-  0xfc, 0x1a, 0x01, 0x00, 0x04, 0x1b, 0x01, 0x00, 
+  0xc0, 0x26, 0x01, 0x00, 0x0c, 0x00, 0x4c, 0x00, 
+  0xcc, 0x26, 0x01, 0x00, 0xd4, 0x26, 0x01, 0x00, 
   0x9f, 0xae, 0x96, 0xc9, 0x17, 0x00, 0x00, 0x00, 
-  0x04, 0x1b, 0x01, 0x00, 0x19, 0x00, 0x76, 0x00, 
-  0x20, 0x1b, 0x01, 0x00, 0xa6, 0x34, 0x01, 0x00, 
+  0xd4, 0x26, 0x01, 0x00, 0x19, 0x00, 0x76, 0x00, 
+  0xf0, 0x26, 0x01, 0x00, 0x76, 0x40, 0x01, 0x00, 
   0x93, 0xff, 0xee, 0x3f, 0x17, 0x00, 0x00, 0x00, 
-  0xa6, 0x34, 0x01, 0x00, 0x23, 0x00, 0x76, 0x00, 
-  0xd0, 0x34, 0x01, 0x00, 0x55, 0x43, 0x01, 0x00, 
+  0x76, 0x40, 0x01, 0x00, 0x23, 0x00, 0x76, 0x00, 
+  0xa0, 0x40, 0x01, 0x00, 0x25, 0x4f, 0x01, 0x00, 
   0x47, 0xf0, 0x78, 0xb7, 0x14, 0x00, 0x00, 0x00, 
-  0x55, 0x43, 0x01, 0x00, 0x03, 0x00, 0x4c, 0x00, 
-  0x58, 0x43, 0x01, 0x00, 0x7c, 0x43, 0x01, 0x00, 
+  0x25, 0x4f, 0x01, 0x00, 0x03, 0x00, 0x4c, 0x00, 
+  0x28, 0x4f, 0x01, 0x00, 0x4c, 0x4f, 0x01, 0x00, 
   0x44, 0xd2, 0xec, 0x36, 0x17, 0x00, 0x00, 0x00, 
-  0x7c, 0x43, 0x01, 0x00, 0x1c, 0x00, 0x76, 0x00, 
-  0x98, 0x43, 0x01, 0x00, 0xd5, 0x57, 0x01, 0x00, 
+  0x4c, 0x4f, 0x01, 0x00, 0x1c, 0x00, 0x76, 0x00, 
+  0x68, 0x4f, 0x01, 0x00, 0xa5, 0x63, 0x01, 0x00, 
   0xc6, 0x62, 0xa8, 0x11, 0x0e, 0x00, 0x00, 0x00, 
-  0xd5, 0x57, 0x01, 0x00, 0x13, 0x00, 0x76, 0x00, 
-  0xe8, 0x57, 0x01, 0x00, 0x1f, 0x5c, 0x01, 0x00, 
+  0xa5, 0x63, 0x01, 0x00, 0x13, 0x00, 0x76, 0x00, 
+  0xb8, 0x63, 0x01, 0x00, 0xef, 0x67, 0x01, 0x00, 
   0x96, 0xbd, 0x43, 0x08, 0x0f, 0x00, 0x00, 0x00, 
-  0x1f, 0x5c, 0x01, 0x00, 0x06, 0x00, 0x4c, 0x00, 
-  0x28, 0x5c, 0x01, 0x00, 0x2c, 0x5c, 0x01, 0x00, 
+  0xef, 0x67, 0x01, 0x00, 0x06, 0x00, 0x4c, 0x00, 
+  0xf8, 0x67, 0x01, 0x00, 0xfc, 0x67, 0x01, 0x00, 
   0x5a, 0xc6, 0xe1, 0x03, 0x0f, 0x00, 0x00, 0x00, 
-  0x2c, 0x5c, 0x01, 0x00, 0x06, 0x00, 0x4c, 0x00, 
-  0x34, 0x5c, 0x01, 0x00, 0x38, 0x5c, 0x01, 0x00, 
+  0xfc, 0x67, 0x01, 0x00, 0x06, 0x00, 0x4c, 0x00, 
+  0x04, 0x68, 0x01, 0x00, 0x08, 0x68, 0x01, 0x00, 
   0x76, 0x69, 0x72, 0x74, 0x2d, 0x76, 0x69, 0x65, 
   0x77, 0x65, 0x72, 0x2e, 0x70, 0x6e, 0x67, 0x00, 
   0xc1, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
@@ -5496,7 +5496,7 @@ static const SECTION union { const guint8 data[89144]; const double alignment; v
   0x28, 0x75, 0x75, 0x61, 0x79, 0x29, 0x76, 0x69, 
   0x72, 0x74, 0x2d, 0x76, 0x69, 0x65, 0x77, 0x65, 
   0x72, 0x2e, 0x75, 0x69, 0x00, 0x00, 0x00, 0x00, 
-  0x05, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xd5, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
   0x3c, 0x3f, 0x78, 0x6d, 0x6c, 0x20, 0x76, 0x65, 
   0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 
   0x2e, 0x30, 0x22, 0x20, 0x65, 0x6e, 0x63, 0x6f, 
@@ -5734,6 +5734,15 @@ static const SECTION union { const guint8 data[89144]; const double alignment; v
   0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
   0x20, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 
   0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 
+  0x22, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 
+  0x76, 0x65, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 
+  0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 
+  0x72, 0x74, 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 
+  0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 
   0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 
   0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 
   0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 
@@ -6174,6 +6183,15 @@ static const SECTION union { const guint8 data[89144]; const double alignment; v
   0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
   0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 
   0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 
+  0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 
+  0x65, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 
+  0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 
+  0x74, 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 
+  0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 
   0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 
   0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 
   0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 
@@ -6394,6 +6412,349 @@ static const SECTION union { const guint8 data[89144]; const double alignment; v
   0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 
   0x4d, 0x65, 0x6e, 0x75, 0x49, 0x74, 0x65, 0x6d, 
   0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6d, 0x65, 
+  0x6e, 0x75, 0x2d, 0x6d, 0x61, 0x63, 0x68, 0x69, 
+  0x6e, 0x65, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 
+  0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 
+  0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 
+  0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 
+  0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 
+  0x72, 0x74, 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 
+  0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 
+  0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20, 
+  0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 
+  0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 
+  0x73, 0x22, 0x3e, 0x5f, 0x4d, 0x61, 0x63, 0x68, 
+  0x69, 0x6e, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 
+  0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x0a, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x3c, 0x70, 0x72, 0x6f, 0x70, 
+  0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 
+  0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x75, 
+  0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65, 
+  0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 
+  0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 
+  0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x63, 
+  0x68, 0x69, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 
+  0x65, 0x3d, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x65, 
+  0x6e, 0x75, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 
+  0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 
+  0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4d, 0x65, 0x6e, 
+  0x75, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x72, 0x6f, 
+  0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 
+  0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 
+  0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 
+  0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 
+  0x72, 0x74, 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x72, 
+  0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 
+  0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 
+  0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 
+  0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 
+  0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 
+  0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 
+  0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 
+  0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 
+  0x3d, 0x22, 0x47, 0x74, 0x6b, 0x43, 0x68, 0x65, 
+  0x63, 0x6b, 0x4d, 0x65, 0x6e, 0x75, 0x49, 0x74, 
+  0x65, 0x6d, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 
+  0x6d, 0x65, 0x6e, 0x75, 0x2d, 0x76, 0x6d, 0x2d, 
+  0x70, 0x61, 0x75, 0x73, 0x65, 0x22, 0x3e, 0x0a, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x72, 0x6f, 
+  0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 
+  0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 
+  0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 
+  0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 
+  0x72, 0x74, 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 
+  0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 
+  0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 
+  0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 
+  0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 
+  0x72, 0x74, 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 
+  0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 
+  0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x20, 
+  0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 
+  0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 
+  0x73, 0x22, 0x3e, 0x5f, 0x50, 0x61, 0x75, 0x73, 
+  0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 
+  0x72, 0x74, 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 
+  0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 
+  0x22, 0x75, 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 
+  0x65, 0x72, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 
+  0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 
+  0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x0a, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x3c, 0x73, 0x69, 0x67, 
+  0x6e, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 
+  0x3d, 0x22, 0x74, 0x6f, 0x67, 0x67, 0x6c, 0x65, 
+  0x64, 0x22, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 
+  0x65, 0x72, 0x3d, 0x22, 0x76, 0x69, 0x72, 0x74, 
+  0x5f, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x5f, 
+  0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x6d, 
+  0x65, 0x6e, 0x75, 0x5f, 0x6d, 0x61, 0x63, 0x68, 
+  0x69, 0x6e, 0x65, 0x5f, 0x70, 0x61, 0x75, 0x73, 
+  0x65, 0x22, 0x20, 0x73, 0x77, 0x61, 0x70, 0x70, 
+  0x65, 0x64, 0x3d, 0x22, 0x6e, 0x6f, 0x22, 0x2f, 
+  0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x6f, 0x62, 
+  0x6a, 0x65, 0x63, 0x74, 0x3e, 0x0a, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 
+  0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x0a, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 
+  0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x0a, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 
+  0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 
+  0x47, 0x74, 0x6b, 0x53, 0x65, 0x70, 0x61, 0x72, 
+  0x61, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x6e, 0x75, 
+  0x49, 0x74, 0x65, 0x6d, 0x22, 0x3e, 0x0a, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x3c, 0x70, 0x72, 0x6f, 0x70, 
+  0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 
+  0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 
+  0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 
+  0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 
+  0x74, 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 
+  0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 
+  0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 
+  0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 
+  0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 
+  0x74, 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 
+  0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x0a, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 
+  0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 
+  0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 
+  0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 
+  0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4d, 0x65, 0x6e, 
+  0x75, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x20, 0x69, 
+  0x64, 0x3d, 0x22, 0x6d, 0x65, 0x6e, 0x75, 0x2d, 
+  0x76, 0x6d, 0x2d, 0x72, 0x65, 0x73, 0x65, 0x74, 
+  0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 
+  0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 
+  0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 
+  0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 
+  0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 
+  0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x0a, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x72, 0x6f, 
+  0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 
+  0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 
+  0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 
+  0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 
+  0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x0a, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x72, 0x6f, 
+  0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 
+  0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 
+  0x6c, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 
+  0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 
+  0x22, 0x79, 0x65, 0x73, 0x22, 0x3e, 0x5f, 0x52, 
+  0x65, 0x73, 0x65, 0x74, 0x3c, 0x2f, 0x70, 0x72, 
+  0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x0a, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x72, 0x6f, 
+  0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 
+  0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 
+  0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x69, 0x6e, 
+  0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 
+  0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 
+  0x79, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 
+  0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x6e, 
+  0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x63, 0x74, 
+  0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x20, 0x68, 
+  0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x3d, 0x22, 
+  0x76, 0x69, 0x72, 0x74, 0x5f, 0x76, 0x69, 0x65, 
+  0x77, 0x65, 0x72, 0x5f, 0x77, 0x69, 0x6e, 0x64, 
+  0x6f, 0x77, 0x5f, 0x6d, 0x65, 0x6e, 0x75, 0x5f, 
+  0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 
+  0x72, 0x65, 0x73, 0x65, 0x74, 0x22, 0x20, 0x73, 
+  0x77, 0x61, 0x70, 0x70, 0x65, 0x64, 0x3d, 0x22, 
+  0x6e, 0x6f, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 
+  0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 
+  0x64, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x3c, 0x63, 0x68, 0x69, 0x6c, 
+  0x64, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6f, 0x62, 
+  0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 
+  0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4d, 
+  0x65, 0x6e, 0x75, 0x49, 0x74, 0x65, 0x6d, 0x22, 
+  0x20, 0x69, 0x64, 0x3d, 0x22, 0x6d, 0x65, 0x6e, 
+  0x75, 0x2d, 0x76, 0x6d, 0x2d, 0x70, 0x6f, 0x77, 
+  0x65, 0x72, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x3e, 
+  0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x72, 
+  0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 
+  0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 
+  0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 
+  0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 
+  0x65, 0x72, 0x74, 0x79, 0x3e, 0x0a, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 
+  0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 
+  0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 
+  0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 
+  0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 
+  0x65, 0x72, 0x74, 0x79, 0x3e, 0x0a, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 
+  0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 
+  0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 
+  0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 
+  0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 
+  0x65, 0x73, 0x22, 0x3e, 0x5f, 0x50, 0x6f, 0x77, 
+  0x65, 0x72, 0x20, 0x64, 0x6f, 0x77, 0x6e, 0x3c, 
+  0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 
+  0x79, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 
+  0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 
+  0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 
+  0x73, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72, 
+  0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x54, 0x72, 
+  0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 
+  0x65, 0x72, 0x74, 0x79, 0x3e, 0x0a, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x3c, 0x73, 0x69, 0x67, 0x6e, 0x61, 
+  0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 
+  0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 
+  0x22, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 
+  0x72, 0x3d, 0x22, 0x76, 0x69, 0x72, 0x74, 0x5f, 
+  0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x77, 
+  0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x6d, 0x65, 
+  0x6e, 0x75, 0x5f, 0x6d, 0x61, 0x63, 0x68, 0x69, 
+  0x6e, 0x65, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 
+  0x64, 0x6f, 0x77, 0x6e, 0x22, 0x20, 0x73, 0x77, 
+  0x61, 0x70, 0x70, 0x65, 0x64, 0x3d, 0x22, 0x6e, 
+  0x6f, 0x22, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 
+  0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 
+  0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 
+  0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 
+  0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 
+  0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x0a, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 
+  0x74, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x3c, 0x2f, 0x63, 0x68, 0x69, 
+  0x6c, 0x64, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x3c, 0x63, 0x68, 0x69, 
+  0x6c, 0x64, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6f, 
+  0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 
+  0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 
+  0x4d, 0x65, 0x6e, 0x75, 0x49, 0x74, 0x65, 0x6d, 
+  0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6d, 0x65, 
   0x6e, 0x75, 0x2d, 0x76, 0x69, 0x65, 0x77, 0x22, 
   0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
   0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
@@ -6597,6 +6958,15 @@ static const SECTION union { const guint8 data[89144]; const double alignment; v
   0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
   0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 
   0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 
+  0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 
+  0x65, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 
+  0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 
+  0x74, 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 
+  0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 
   0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 
   0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 
   0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 
@@ -7270,6 +7640,14 @@ static const SECTION union { const guint8 data[89144]; const double alignment; v
   0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
   0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x72, 
   0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 
+  0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x65, 0x6e, 
+  0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22, 0x3e, 
+  0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 
+  0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 
+  0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+  0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x72, 
+  0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 
   0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 
   0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 
   0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 
diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index fdc7004..93b52a1 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -34,9 +34,12 @@
 #include "virt-viewer-util.h"
 #include "virt-viewer-session-spice.h"
 #include "virt-viewer-display-spice.h"
+#include "virt-viewer-display-vte.h"
 #include "virt-viewer-auth.h"
 
-G_DEFINE_TYPE (VirtViewerSessionSpice, virt_viewer_session_spice, VIRT_VIEWER_TYPE_SESSION)
+#if SPICE_GTK_CHECK_VERSION(0,36,0)
+#define WITH_QMP_PORT 1
+#endif
 
 struct _VirtViewerSessionSpicePrivate {
     GtkWindow *main_window;
@@ -50,10 +53,13 @@ struct _VirtViewerSessionSpicePrivate {
     guint pass_try;
     gboolean did_auto_conf;
     VirtViewerFileTransferDialog *file_transfer_dialog;
-
+    GError *disconnect_error;
+#ifdef WITH_QMP_PORT
+    SpiceQmpPort *qmp;
+#endif
 };
 
-#define VIRT_VIEWER_SESSION_SPICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), VIRT_VIEWER_TYPE_SESSION_SPICE, VirtViewerSessionSpicePrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (VirtViewerSessionSpice, virt_viewer_session_spice, VIRT_VIEWER_TYPE_SESSION)
 
 enum {
     PROP_0,
@@ -75,10 +81,13 @@ static void virt_viewer_session_spice_channel_new(SpiceSession *s,
 static void virt_viewer_session_spice_channel_destroy(SpiceSession *s,
                                                       SpiceChannel *channel,
                                                       VirtViewerSession *session);
+static void virt_viewer_session_spice_session_disconnected(SpiceSession *s,
+                                                           VirtViewerSessionSpice *session);
 static void virt_viewer_session_spice_smartcard_insert(VirtViewerSession *session);
 static void virt_viewer_session_spice_smartcard_remove(VirtViewerSession *session);
 static gboolean virt_viewer_session_spice_fullscreen_auto_conf(VirtViewerSessionSpice *self);
 static void virt_viewer_session_spice_apply_monitor_geometry(VirtViewerSession *self, GHashTable *monitors);
+static void virt_viewer_session_spice_vm_action(VirtViewerSession *self, gint action);
 
 static void virt_viewer_session_spice_clear_displays(VirtViewerSessionSpice *self)
 {
@@ -152,6 +161,7 @@ virt_viewer_session_spice_dispose(GObject *obj)
         gtk_widget_destroy(GTK_WIDGET(spice->priv->file_transfer_dialog));
         spice->priv->file_transfer_dialog = NULL;
     }
+    g_clear_error(&spice->priv->disconnect_error);
 
     G_OBJECT_CLASS(virt_viewer_session_spice_parent_class)->dispose(obj);
 }
@@ -258,8 +268,7 @@ virt_viewer_session_spice_class_init(VirtViewerSessionSpiceClass *klass)
     dclass->apply_monitor_geometry = virt_viewer_session_spice_apply_monitor_geometry;
     dclass->can_share_folder = virt_viewer_session_spice_can_share_folder;
     dclass->can_retry_auth = virt_viewer_session_spice_can_retry_auth;
-
-    g_type_class_add_private(klass, sizeof(VirtViewerSessionSpicePrivate));
+    dclass->vm_action = virt_viewer_session_spice_vm_action;
 
     g_object_class_install_property(oclass,
                                     PROP_SPICE_SESSION,
@@ -285,7 +294,7 @@ virt_viewer_session_spice_class_init(VirtViewerSessionSpiceClass *klass)
 static void
 virt_viewer_session_spice_init(VirtViewerSessionSpice *self G_GNUC_UNUSED)
 {
-    self->priv = VIRT_VIEWER_SESSION_SPICE_GET_PRIVATE(self);
+    self->priv = virt_viewer_session_spice_get_instance_private(self);
 }
 
 static void
@@ -398,6 +407,8 @@ create_spice_session(VirtViewerSessionSpice *self)
                                       G_CALLBACK(virt_viewer_session_spice_channel_new), self, 0);
     virt_viewer_signal_connect_object(self->priv->session, "channel-destroy",
                                       G_CALLBACK(virt_viewer_session_spice_channel_destroy), self, 0);
+    virt_viewer_signal_connect_object(self->priv->session, "disconnected",
+                                      G_CALLBACK(virt_viewer_session_spice_session_disconnected), self, 0);
 
     usb_manager = spice_usb_device_manager_get(self->priv->session, NULL);
     if (usb_manager) {
@@ -455,6 +466,9 @@ virt_viewer_session_spice_close(VirtViewerSession *session)
 
     g_object_add_weak_pointer(G_OBJECT(self), (gpointer*)&self);
 
+#ifdef WITH_QMP_PORT
+    g_clear_object(&self->priv->qmp);
+#endif
     virt_viewer_session_spice_clear_displays(self);
 
     if (self->priv->session) {
@@ -500,21 +514,28 @@ fill_session(VirtViewerFile *file, SpiceSession *session)
     g_return_if_fail(VIRT_VIEWER_IS_FILE(file));
     g_return_if_fail(SPICE_IS_SESSION(session));
 
-    if (virt_viewer_file_is_set(file, "host")) {
-        gchar *val = virt_viewer_file_get_host(file);
-        g_object_set(G_OBJECT(session), "host", val, NULL);
+    if (virt_viewer_file_is_set(file, "unix-path")) {
+        gchar *val = virt_viewer_file_get_unix_path(file);
+        g_object_set(G_OBJECT(session), "unix-path", val, NULL);
         g_free(val);
-    }
+    } else {
+        if (virt_viewer_file_is_set(file, "host")) {
+            gchar *val = virt_viewer_file_get_host(file);
+            g_object_set(G_OBJECT(session), "host", val, NULL);
+            g_free(val);
+        }
 
-    if (virt_viewer_file_is_set(file, "port")) {
-        gchar *port = g_strdup_printf("%d", virt_viewer_file_get_port(file));
-        g_object_set(G_OBJECT(session), "port", port, NULL);
-        g_free(port);
-    }
-    if (virt_viewer_file_is_set(file, "tls-port")) {
-        gchar *tls_port = g_strdup_printf("%d", virt_viewer_file_get_tls_port(file));
-        g_object_set(G_OBJECT(session), "tls-port", tls_port, NULL);
-        g_free(tls_port);
+        if (virt_viewer_file_is_set(file, "port")) {
+            gchar *port = g_strdup_printf("%d", virt_viewer_file_get_port(file));
+            g_object_set(G_OBJECT(session), "port", port, NULL);
+            g_free(port);
+        }
+
+        if (virt_viewer_file_is_set(file, "tls-port")) {
+            gchar *tls_port = g_strdup_printf("%d", virt_viewer_file_get_tls_port(file));
+            g_object_set(G_OBJECT(session), "tls-port", tls_port, NULL);
+            g_free(tls_port);
+        }
     }
 
     if (virt_viewer_file_is_set(file, "username")) {
@@ -774,7 +795,7 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel,
         virt_viewer_session_spice_channel_destroy(NULL, channel, session);
         break;
     default:
-        g_warning("unhandled spice main channel event: %d", event);
+        g_warning("unhandled spice main channel event: %u", event);
         break;
     }
 
@@ -950,20 +971,220 @@ on_new_file_transfer(SpiceMainChannel *channel G_GNUC_UNUSED,
                                               task);
 }
 
+static void
+spice_port_write_finished(GObject *source_object,
+                          GAsyncResult *res,
+                          gpointer dup)
+{
+    SpicePortChannel *port = SPICE_PORT_CHANNEL(source_object);
+    GError *err = NULL;
+
+    spice_port_channel_write_finish(port, res, &err);
+    if (err) {
+        g_warning("Spice port write failed: %s", err->message);
+        g_error_free(err);
+    }
+    g_free(dup);
+}
+
+static void
+spice_vte_commit(SpicePortChannel *port, const char *text,
+                 guint size, gpointer user_data G_GNUC_UNUSED)
+{
+    void *dup = g_memdup(text, size);
+
+    /* note: spice-gtk queues write */
+    spice_port_channel_write_async(port, dup, size,
+                                   NULL, spice_port_write_finished, dup);
+}
+
+static void
+spice_port_data(VirtViewerDisplayVte *vte, gpointer data, int size,
+                SpicePortChannel *port G_GNUC_UNUSED)
+{
+    virt_viewer_display_vte_feed(vte, data, size);
+}
+
+static const char *
+port_name_to_vte_name(const char *name)
+{
+    if (g_str_equal(name, "org.qemu.console.serial.0"))
+        return _("Serial");
+    else if (g_str_equal(name, "org.qemu.monitor.hmp.0"))
+        return _("QEMU human monitor");
+    else if (g_str_equal(name, "org.qemu.console.debug.0"))
+        return _("QEMU debug console");
+
+    return NULL;
+}
+
+static void
+virt_viewer_session_spice_vm_action(VirtViewerSession *sess G_GNUC_UNUSED,
+                                    gint action G_GNUC_UNUSED)
+{
+#ifdef WITH_QMP_PORT
+    VirtViewerSessionSpice *self = VIRT_VIEWER_SESSION_SPICE(sess);
+
+    switch (action) {
+    case VIRT_VIEWER_SESSION_VM_ACTION_QUIT:
+        action = SPICE_QMP_PORT_VM_ACTION_QUIT;
+        break;
+    case VIRT_VIEWER_SESSION_VM_ACTION_RESET:
+        action = SPICE_QMP_PORT_VM_ACTION_RESET;
+        break;
+    case VIRT_VIEWER_SESSION_VM_ACTION_POWER_DOWN:
+        action = SPICE_QMP_PORT_VM_ACTION_POWER_DOWN;
+        break;
+    case VIRT_VIEWER_SESSION_VM_ACTION_PAUSE:
+        action = SPICE_QMP_PORT_VM_ACTION_PAUSE;
+        break;
+    case VIRT_VIEWER_SESSION_VM_ACTION_CONTINUE:
+        action = SPICE_QMP_PORT_VM_ACTION_CONTINUE;
+        break;
+    default:
+        g_return_if_reached();
+    }
+
+    spice_qmp_port_vm_action_async(self->priv->qmp, action, NULL, NULL, NULL);
+#endif
+}
+
+#ifdef WITH_QMP_PORT
+static void
+set_vm_running(VirtViewerSessionSpice *self, gboolean running)
+{
+    g_object_set(virt_viewer_session_get_app(VIRT_VIEWER_SESSION(self)),
+                 "vm-running", running, NULL);
+}
+
+static void
+query_status_cb(GObject *source_object G_GNUC_UNUSED,
+                GAsyncResult *res, gpointer user_data)
+{
+    VirtViewerSessionSpice *self = VIRT_VIEWER_SESSION_SPICE(user_data);
+    SpiceQmpStatus *status;
+    gboolean running = TRUE;
+    GError *error = NULL;
+
+    status = spice_qmp_port_query_status_finish(self->priv->qmp, res, &error);
+    if (!status) {
+        g_warning("failed to query VM status: %s", error->message);
+        g_error_free(error);
+        return;
+    }
+
+    if (g_str_equal(status->status, "paused")) {
+        running = FALSE;
+    }
+
+    set_vm_running(self, running);
+
+    spice_qmp_status_unref(status);
+}
+
+static void qmp_ready_cb(VirtViewerSessionSpice *self,
+                         GParamSpec *pspec G_GNUC_UNUSED,
+                         GObject *object G_GNUC_UNUSED)
+{
+    spice_qmp_port_query_status_async(self->priv->qmp, NULL, query_status_cb, self);
+}
+
+static void qmp_event_cb(VirtViewerSessionSpice *self, const gchar *event,
+                         void *data G_GNUC_UNUSED, GObject *object G_GNUC_UNUSED)
+{
+    g_debug("QMP event %s", event);
+
+    if (g_str_equal(event, "STOP")) {
+        set_vm_running(self, FALSE);
+    } else if (g_str_equal(event, "RESUME")) {
+        set_vm_running(self, TRUE);
+    }
+}
+#endif /* WITH_QMP_PORT */
+
+static void
+spice_port_opened(SpiceChannel *channel, GParamSpec *pspec G_GNUC_UNUSED,
+                  VirtViewerSessionSpice *self)
+{
+    SpicePortChannel *port = SPICE_PORT_CHANNEL(channel);
+    int id;
+    gchar *name = NULL;
+    gboolean opened = FALSE;
+    const char *vte_name;
+    GtkWidget *vte;
+
+    g_object_get(G_OBJECT(port),
+                 "channel-id", &id,
+                 "port-name", &name,
+                 "port-opened", &opened,
+                 NULL);
+
+    g_return_if_fail(name != NULL);
+    g_debug("port#%d %s: %s", id, name, opened ? "opened" : "closed");
+    vte_name = port_name_to_vte_name(name);
+
+#ifdef WITH_QMP_PORT
+    if (g_str_equal(name, "org.qemu.monitor.qmp.0")) {
+        if (opened) {
+            g_return_if_fail(!self->priv->qmp);
+
+            g_object_set(virt_viewer_session_get_app(VIRT_VIEWER_SESSION(self)),
+                         "vm-ui", TRUE, NULL);
+
+            self->priv->qmp = spice_qmp_port_get(port);
+            virt_viewer_signal_connect_object(self->priv->qmp, "notify::ready",
+                                              G_CALLBACK(qmp_ready_cb), self, G_CONNECT_SWAPPED);
+            virt_viewer_signal_connect_object(self->priv->qmp, "event",
+                                              G_CALLBACK(qmp_event_cb), self, G_CONNECT_SWAPPED);
+        } else {
+            g_clear_object(&self->priv->qmp);
+        }
+        g_free(name);
+        return;
+    }
+#endif
+
+    g_free(name);
+    vte = g_object_get_data(G_OBJECT(port), "virt-viewer-vte");
+    if (vte) {
+        if (opened)
+            return;
+
+        g_object_set_data(G_OBJECT(port), "virt-viewer-vte", NULL);
+        virt_viewer_session_remove_display(VIRT_VIEWER_SESSION(self), VIRT_VIEWER_DISPLAY(vte));
+        g_object_unref(vte);
+
+    } else if (opened) {
+        if (!vte_name)
+            return;
+
+        vte = virt_viewer_display_vte_new(VIRT_VIEWER_SESSION(self), vte_name);
+        g_object_set_data(G_OBJECT(port), "virt-viewer-vte", g_object_ref_sink(vte));
+        virt_viewer_session_add_display(VIRT_VIEWER_SESSION(self), VIRT_VIEWER_DISPLAY(vte));
+        virt_viewer_signal_connect_object(vte, "commit",
+                                          G_CALLBACK(spice_vte_commit), port, G_CONNECT_SWAPPED);
+        virt_viewer_signal_connect_object(port, "port-data",
+                                          G_CALLBACK(spice_port_data), vte, G_CONNECT_SWAPPED);
+    }
+}
+
 static void
 virt_viewer_session_spice_channel_new(SpiceSession *s,
                                       SpiceChannel *channel,
                                       VirtViewerSession *session)
 {
     VirtViewerSessionSpice *self = VIRT_VIEWER_SESSION_SPICE(session);
-    int id;
+    int id, type;
 
     g_return_if_fail(self != NULL);
 
     virt_viewer_signal_connect_object(channel, "open-fd",
                                       G_CALLBACK(virt_viewer_session_spice_channel_open_fd_request), self, 0);
 
-    g_object_get(channel, "channel-id", &id, NULL);
+    g_object_get(channel,
+                 "channel-id", &id,
+                 "channel-type", &type,
+                 NULL);
 
     g_debug("New spice channel %p %s %d", channel, g_type_name(G_OBJECT_TYPE(channel)), id);
 
@@ -1012,6 +1233,13 @@ virt_viewer_session_spice_channel_new(SpiceSession *s,
             virt_viewer_session_set_has_usbredir(session, TRUE);
     }
 
+    /* the port channel object is also sub-classed for webdav... */
+    if (SPICE_IS_PORT_CHANNEL(channel) && type == SPICE_CHANNEL_PORT) {
+        virt_viewer_signal_connect_object(channel, "notify::port-opened",
+                                          G_CALLBACK(spice_port_opened), self, 0);
+        spice_channel_connect(channel);
+    }
+
     self->priv->channel_count++;
 }
 
@@ -1062,11 +1290,11 @@ virt_viewer_session_spice_fullscreen_auto_conf(VirtViewerSessionSpice *self)
     displays = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, g_free);
 
     for (l = initial_displays; l != NULL; l = l->next) {
-        GdkRectangle* rect = g_new0(GdkRectangle, 1);;
         gint j = virt_viewer_app_get_initial_monitor_for_display(app, GPOINTER_TO_INT(l->data));
         if (j == -1)
             continue;
 
+        GdkRectangle* rect = g_new0(GdkRectangle, 1);;
         gdk_screen_get_monitor_geometry(screen, j, rect);
         g_hash_table_insert(displays, l->data, rect);
     }
@@ -1091,6 +1319,14 @@ virt_viewer_session_spice_fullscreen_auto_conf(VirtViewerSessionSpice *self)
     return TRUE;
 }
 
+static void
+virt_viewer_session_spice_session_disconnected(G_GNUC_UNUSED SpiceSession *s,
+                                               VirtViewerSessionSpice *self)
+{
+    GError *error = self->priv->disconnect_error;
+    g_signal_emit_by_name(self, "session-disconnected", error ? error->message : NULL);
+}
+
 static void
 virt_viewer_session_spice_channel_destroy(G_GNUC_UNUSED SpiceSession *s,
                                           SpiceChannel *channel,
@@ -1118,6 +1354,17 @@ virt_viewer_session_spice_channel_destroy(G_GNUC_UNUSED SpiceSession *s,
         g_object_set_data(G_OBJECT(channel), "virt-viewer-displays", NULL);
     }
 
+    if (SPICE_IS_PORT_CHANNEL(channel)) {
+        VirtViewerDisplayVte *vte = g_object_get_data(G_OBJECT(channel), "virt-viewer-vte");
+        g_debug("zap port channel (#%d)", id);
+        if (vte) {
+            g_object_set_data(G_OBJECT(channel), "virt-viewer-vte", NULL);
+            virt_viewer_session_remove_display(VIRT_VIEWER_SESSION(self), VIRT_VIEWER_DISPLAY(vte));
+            g_object_unref(vte);
+        }
+
+    }
+
     if (SPICE_IS_PLAYBACK_CHANNEL(channel) && self->priv->audio) {
         g_debug("zap audio channel");
         self->priv->audio = NULL;
@@ -1129,10 +1376,12 @@ virt_viewer_session_spice_channel_destroy(G_GNUC_UNUSED SpiceSession *s,
         if (self->priv->usbredir_channel_count == 0)
             virt_viewer_session_set_has_usbredir(session, FALSE);
     }
-
-    self->priv->channel_count--;
-    if (self->priv->channel_count == 0)
-        g_signal_emit_by_name(self, "session-disconnected", error ? error->message : NULL);
+    if (error) {
+        g_warning("Channel error: %s", error->message);
+        if (self->priv->disconnect_error == NULL) {
+            self->priv->disconnect_error = g_error_copy(error);
+        }
+    }
 }
 
 VirtViewerSession *
diff --git a/src/virt-viewer-session-vnc.c b/src/virt-viewer-session-vnc.c
index c79b63c..261d984 100644
--- a/src/virt-viewer-session-vnc.c
+++ b/src/virt-viewer-session-vnc.c
@@ -34,8 +34,6 @@
 #include <glib/gi18n.h>
 #include <libxml/uri.h>
 
-G_DEFINE_TYPE(VirtViewerSessionVnc, virt_viewer_session_vnc, VIRT_VIEWER_TYPE_SESSION)
-
 struct _VirtViewerSessionVncPrivate {
     GtkWindow *main_window;
     /* XXX we should really just have a VncConnection */
@@ -43,7 +41,7 @@ struct _VirtViewerSessionVncPrivate {
     gboolean auth_dialog_cancelled;
 };
 
-#define VIRT_VIEWER_SESSION_VNC_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), VIRT_VIEWER_TYPE_SESSION_VNC, VirtViewerSessionVncPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE(VirtViewerSessionVnc, virt_viewer_session_vnc, VIRT_VIEWER_TYPE_SESSION)
 
 static void virt_viewer_session_vnc_close(VirtViewerSession* session);
 static gboolean virt_viewer_session_vnc_open_fd(VirtViewerSession* session, int fd);
@@ -88,14 +86,12 @@ virt_viewer_session_vnc_class_init(VirtViewerSessionVncClass *klass)
     dclass->open_uri = virt_viewer_session_vnc_open_uri;
     dclass->channel_open_fd = virt_viewer_session_vnc_channel_open_fd;
     dclass->mime_type = virt_viewer_session_vnc_mime_type;
-
-    g_type_class_add_private(klass, sizeof(VirtViewerSessionVncPrivate));
 }
 
 static void
 virt_viewer_session_vnc_init(VirtViewerSessionVnc *self G_GNUC_UNUSED)
 {
-    self->priv = VIRT_VIEWER_SESSION_VNC_GET_PRIVATE(self);
+    self->priv = virt_viewer_session_vnc_get_instance_private(self);
 }
 
 static void
@@ -159,7 +155,7 @@ virt_viewer_session_vnc_auth_unsupported(VncDisplay *vnc G_GNUC_UNUSED,
                                          unsigned int authType,
                                          VirtViewerSession *session)
 {
-    gchar *msg = g_strdup_printf(_("Unsupported authentication type %d"),
+    gchar *msg = g_strdup_printf(_("Unsupported authentication type %u"),
                                  authType);
     g_signal_emit_by_name(session, "session-auth-unsupported", msg);
     g_free(msg);
@@ -273,9 +269,10 @@ virt_viewer_session_vnc_auth_credential(GtkWidget *src G_GNUC_UNUSED,
     VirtViewerSessionVnc *self = VIRT_VIEWER_SESSION_VNC(session);
     char *username = NULL, *password = NULL;
     gboolean wantPassword = FALSE, wantUsername = FALSE;
+    VirtViewerFile *file = NULL;
     int i;
 
-    g_debug("Got VNC credential request for %d credential(s)", credList->n_values);
+    g_debug("Got VNC credential request for %u credential(s)", credList->n_values);
 
     for (i = 0 ; i < credList->n_values ; i++) {
         GValue *cred = g_value_array_get_nth(credList, i);
@@ -295,7 +292,7 @@ virt_viewer_session_vnc_auth_credential(GtkWidget *src G_GNUC_UNUSED,
         }
     }
 
-    VirtViewerFile *file = virt_viewer_session_get_file(VIRT_VIEWER_SESSION(self));
+    file = virt_viewer_session_get_file(VIRT_VIEWER_SESSION(self));
     if (file != NULL) {
         if (wantUsername) {
             if (virt_viewer_file_is_set(file, "username")) {
diff --git a/src/virt-viewer-session.c b/src/virt-viewer-session.c
index 92ffd3f..a809814 100644
--- a/src/virt-viewer-session.c
+++ b/src/virt-viewer-session.c
@@ -29,9 +29,7 @@
 
 #include "virt-viewer-session.h"
 #include "virt-viewer-util.h"
-
-#define VIRT_VIEWER_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), VIRT_VIEWER_TYPE_SESSION, VirtViewerSessionPrivate))
-
+#include "virt-viewer-display-vte.h"
 
 struct _VirtViewerSessionPrivate
 {
@@ -46,7 +44,7 @@ struct _VirtViewerSessionPrivate
     gboolean share_folder_ro;
 };
 
-G_DEFINE_ABSTRACT_TYPE(VirtViewerSession, virt_viewer_session, G_TYPE_OBJECT)
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(VirtViewerSession, virt_viewer_session, G_TYPE_OBJECT)
 
 enum {
     PROP_0,
@@ -259,7 +257,7 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
     g_signal_new("session-connected",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_FIRST,
-                 G_STRUCT_OFFSET(VirtViewerSessionClass, session_connected),
+                 0,
                  NULL, NULL,
                  g_cclosure_marshal_VOID__VOID,
                  G_TYPE_NONE,
@@ -268,7 +266,7 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
     g_signal_new("session-initialized",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_FIRST,
-                 G_STRUCT_OFFSET(VirtViewerSessionClass, session_initialized),
+                 0,
                  NULL, NULL,
                  g_cclosure_marshal_VOID__VOID,
                  G_TYPE_NONE,
@@ -277,7 +275,7 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
     g_signal_new("session-disconnected",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_FIRST,
-                 G_STRUCT_OFFSET(VirtViewerSessionClass, session_disconnected),
+                 0,
                  NULL, NULL,
                  g_cclosure_marshal_VOID__STRING,
                  G_TYPE_NONE,
@@ -287,7 +285,7 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
     g_signal_new("session-channel-open",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_FIRST,
-                 G_STRUCT_OFFSET(VirtViewerSessionClass, session_channel_open),
+                 0,
                  NULL, NULL,
                  g_cclosure_marshal_VOID__OBJECT,
                  G_TYPE_NONE,
@@ -297,7 +295,7 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
     g_signal_new("session-auth-refused",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
-                 G_STRUCT_OFFSET(VirtViewerSessionClass, session_auth_refused),
+                 0,
                  NULL,
                  NULL,
                  g_cclosure_marshal_VOID__STRING,
@@ -308,7 +306,7 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
     g_signal_new("session-auth-unsupported",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
-                 G_STRUCT_OFFSET(VirtViewerSessionClass, session_auth_unsupported),
+                 0,
                  NULL,
                  NULL,
                  g_cclosure_marshal_VOID__STRING,
@@ -319,7 +317,7 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
     g_signal_new("session-usb-failed",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
-                 G_STRUCT_OFFSET(VirtViewerSessionClass, session_usb_failed),
+                 0,
                  NULL,
                  NULL,
                  g_cclosure_marshal_VOID__STRING,
@@ -330,7 +328,7 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
     g_signal_new("session-display-added",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
-                 G_STRUCT_OFFSET(VirtViewerSessionClass, session_display_added),
+                 0,
                  NULL,
                  NULL,
                  g_cclosure_marshal_VOID__OBJECT,
@@ -341,7 +339,7 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
     g_signal_new("session-display-removed",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
-                 G_STRUCT_OFFSET(VirtViewerSessionClass, session_display_removed),
+                 0,
                  NULL,
                  NULL,
                  g_cclosure_marshal_VOID__OBJECT,
@@ -352,7 +350,7 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
     g_signal_new("session-display-updated",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
-                 G_STRUCT_OFFSET(VirtViewerSessionClass, session_display_updated),
+                 0,
                  NULL,
                  NULL,
                  g_cclosure_marshal_VOID__VOID,
@@ -362,7 +360,7 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
     g_signal_new("session-cut-text",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
-                 G_STRUCT_OFFSET(VirtViewerSessionClass, session_cut_text),
+                 0,
                  NULL,
                  NULL,
                  g_cclosure_marshal_VOID__STRING,
@@ -373,7 +371,7 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
     g_signal_new("session-bell",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS,
-                 G_STRUCT_OFFSET(VirtViewerSessionClass, session_bell),
+                 0,
                  NULL,
                  NULL,
                  g_cclosure_marshal_VOID__VOID,
@@ -383,19 +381,17 @@ virt_viewer_session_class_init(VirtViewerSessionClass *class)
     g_signal_new("session-cancelled",
                  G_OBJECT_CLASS_TYPE(object_class),
                  G_SIGNAL_RUN_FIRST,
-                 G_STRUCT_OFFSET(VirtViewerSessionClass, session_cancelled),
+                 0,
                  NULL, NULL,
                  g_cclosure_marshal_VOID__VOID,
                  G_TYPE_NONE,
                  0);
-
-    g_type_class_add_private(class, sizeof(VirtViewerSessionPrivate));
 }
 
 static void
 virt_viewer_session_init(VirtViewerSession *session)
 {
-    session->priv = VIRT_VIEWER_SESSION_GET_PRIVATE(session);
+    session->priv = virt_viewer_session_get_instance_private(session);
 }
 
 static void
@@ -406,6 +402,7 @@ virt_viewer_session_on_monitor_geometry_changed(VirtViewerSession* self,
     gboolean all_fullscreen = TRUE;
     /* GHashTable<gint, GdkRectangle*> */
     GHashTable *monitors;
+    gint n_sized_monitors = 0;
     GList *l;
 
     klass = VIRT_VIEWER_SESSION_GET_CLASS(self);
@@ -416,11 +413,17 @@ virt_viewer_session_on_monitor_geometry_changed(VirtViewerSession* self,
 
     for (l = self->priv->displays; l; l = l->next) {
         VirtViewerDisplay *d = VIRT_VIEWER_DISPLAY(l->data);
+
+        if (VIRT_VIEWER_IS_DISPLAY_VTE(d))
+            continue;
+
         guint nth = 0;
         GdkRectangle *rect = g_new0(GdkRectangle, 1);
 
         g_object_get(d, "nth-display", &nth, NULL);
         virt_viewer_display_get_preferred_monitor_geometry(d, rect);
+        if (rect->width > 0 && rect->height > 0)
+            n_sized_monitors++;
 
         if (virt_viewer_display_get_enabled(d) &&
             !virt_viewer_display_get_fullscreen(d))
@@ -428,12 +431,18 @@ virt_viewer_session_on_monitor_geometry_changed(VirtViewerSession* self,
         g_hash_table_insert(monitors, GINT_TO_POINTER(nth), rect);
     }
 
+    if (n_sized_monitors == 0) {
+        goto cleanup;
+    }
+
     if (!all_fullscreen)
         virt_viewer_align_monitors_linear(monitors);
 
     virt_viewer_shift_monitors_to_origin(monitors);
 
     klass->apply_monitor_geometry(self, monitors);
+
+cleanup:
     g_hash_table_unref(monitors);
 }
 
@@ -677,6 +686,17 @@ gboolean virt_viewer_session_can_retry_auth(VirtViewerSession *self)
     return klass->can_retry_auth ? klass->can_retry_auth(self) : FALSE;
 }
 
+void virt_viewer_session_vm_action(VirtViewerSession *self, gint action)
+{
+    VirtViewerSessionClass *klass;
+
+    g_return_if_fail(VIRT_VIEWER_IS_SESSION(self));
+
+    klass = VIRT_VIEWER_SESSION_GET_CLASS(self);
+
+    if (klass->vm_action)
+        klass->vm_action(self, action);
+}
 /*
  * Local variables:
  *  c-indent-level: 4
diff --git a/src/virt-viewer-session.h b/src/virt-viewer-session.h
index 8ee4d8a..ddb54c4 100644
--- a/src/virt-viewer-session.h
+++ b/src/virt-viewer-session.h
@@ -53,6 +53,14 @@ typedef struct _VirtViewerSessionPrivate VirtViewerSessionPrivate;
 
 typedef struct _VirtViewerSessionChannel VirtViewerSessionChannel;
 
+enum {
+    VIRT_VIEWER_SESSION_VM_ACTION_QUIT,
+    VIRT_VIEWER_SESSION_VM_ACTION_RESET,
+    VIRT_VIEWER_SESSION_VM_ACTION_POWER_DOWN,
+    VIRT_VIEWER_SESSION_VM_ACTION_PAUSE,
+    VIRT_VIEWER_SESSION_VM_ACTION_CONTINUE,
+};
+
 
 /* perhaps this become an interface, and be pushed in gtkvnc and spice? */
 struct _VirtViewerSession {
@@ -75,29 +83,11 @@ struct _VirtViewerSessionClass {
     void (* smartcard_remove) (VirtViewerSession* session);
     const gchar* (* mime_type) (VirtViewerSession* session);
 
-    /* signals */
-    void (*session_connected)(VirtViewerSession *session);
-    void (*session_initialized)(VirtViewerSession *session);
-    void (*session_disconnected)(VirtViewerSession *session, const gchar *msg);
-    void (*session_auth_refused)(VirtViewerSession *session, const gchar *msg);
-    void (*session_auth_unsupported)(VirtViewerSession *session, const gchar *msg);
-    void (*session_usb_failed)(VirtViewerSession *session, const gchar *msg);
-
-    void (*session_channel_open)(VirtViewerSession *session, VirtViewerSessionChannel *channel);
-
-    void (*session_display_added)(VirtViewerSession *session,
-                                  VirtViewerDisplay *display);
-    void (*session_display_removed)(VirtViewerSession *session,
-                                    VirtViewerDisplay *display);
-    void (*session_display_updated)(VirtViewerSession *session);
-
-    void (*session_cut_text)(VirtViewerSession *session, const gchar *str);
-    void (*session_bell)(VirtViewerSession *session);
-    void (*session_cancelled)(VirtViewerSession *session);
     /* monitors = GHashTable<int, GdkRectangle*> */
     void (*apply_monitor_geometry)(VirtViewerSession *session, GHashTable* monitors);
     gboolean (*can_share_folder)(VirtViewerSession *session);
     gboolean (*can_retry_auth)(VirtViewerSession *session);
+    void (*vm_action)(VirtViewerSession *session, gint action);
 };
 
 GType virt_viewer_session_get_type(void);
@@ -135,6 +125,8 @@ VirtViewerFile* virt_viewer_session_get_file(VirtViewerSession *self);
 gboolean virt_viewer_session_can_share_folder(VirtViewerSession *self);
 gboolean virt_viewer_session_can_retry_auth(VirtViewerSession *self);
 
+void virt_viewer_session_vm_action(VirtViewerSession *self, gint action);
+
 G_END_DECLS
 
 #endif /* _VIRT_VIEWER_SESSION_H */
diff --git a/src/virt-viewer-timed-revealer.c b/src/virt-viewer-timed-revealer.c
index 3c48ab5..acc55fc 100644
--- a/src/virt-viewer-timed-revealer.c
+++ b/src/virt-viewer-timed-revealer.c
@@ -25,11 +25,6 @@
 
 #include "virt-viewer-timed-revealer.h"
 
-G_DEFINE_TYPE (VirtViewerTimedRevealer, virt_viewer_timed_revealer, GTK_TYPE_EVENT_BOX)
-
-#define VIRT_VIEWER_TIMED_REVEALER_GET_PRIVATE(obj) \
-    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), VIRT_VIEWER_TYPE_TIMED_REVEALER, VirtViewerTimedRevealerPrivate))
-
 struct _VirtViewerTimedRevealerPrivate
 {
     gboolean fullscreen;
@@ -38,6 +33,8 @@ struct _VirtViewerTimedRevealerPrivate
     GtkWidget *revealer;
 };
 
+G_DEFINE_TYPE_WITH_PRIVATE (VirtViewerTimedRevealer, virt_viewer_timed_revealer, GTK_TYPE_EVENT_BOX)
+
 static void
 virt_viewer_timed_revealer_unregister_timeout(VirtViewerTimedRevealer *self)
 {
@@ -124,7 +121,7 @@ virt_viewer_timed_revealer_enter_leave_notify(VirtViewerTimedRevealer *self,
 static void
 virt_viewer_timed_revealer_init(VirtViewerTimedRevealer *self)
 {
-    self->priv = VIRT_VIEWER_TIMED_REVEALER_GET_PRIVATE(self);
+    self->priv = virt_viewer_timed_revealer_get_instance_private(self);
 }
 
 static void
@@ -149,8 +146,6 @@ virt_viewer_timed_revealer_class_init(VirtViewerTimedRevealerClass *klass)
 {
    GObjectClass *object_class = G_OBJECT_CLASS(klass);
 
-   g_type_class_add_private (klass, sizeof (VirtViewerTimedRevealerPrivate));
-
    object_class->dispose = virt_viewer_timed_revealer_dispose;
 }
 
diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index af3441f..4bbe2ca 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -42,6 +42,7 @@
 #include "virt-viewer-app.h"
 #include "virt-viewer-util.h"
 #include "virt-viewer-timed-revealer.h"
+#include "virt-viewer-display-vte.h"
 
 #include "remote-viewer-iso-list-dialog.h"
 
@@ -51,6 +52,9 @@
 void virt_viewer_window_menu_view_zoom_out(GtkWidget *menu, VirtViewerWindow *self);
 void virt_viewer_window_menu_view_zoom_in(GtkWidget *menu, VirtViewerWindow *self);
 void virt_viewer_window_menu_view_zoom_reset(GtkWidget *menu, VirtViewerWindow *self);
+void virt_viewer_window_menu_machine_reset(GtkWidget *menu, VirtViewerWindow *self);
+void virt_viewer_window_menu_machine_powerdown(GtkWidget *menu, VirtViewerWindow *self);
+void virt_viewer_window_menu_machine_pause(GtkWidget *menu, VirtViewerWindow *self);
 gboolean virt_viewer_window_delete(GtkWidget *src, void *dummy, VirtViewerWindow *self);
 void virt_viewer_window_menu_file_quit(GtkWidget *src, VirtViewerWindow *self);
 void virt_viewer_window_guest_details_response(GtkDialog *dialog, gint response_id, gpointer user_data);
@@ -76,11 +80,6 @@ static GtkMenu* virt_viewer_window_get_keycombo_menu(VirtViewerWindow *self);
 static void virt_viewer_window_get_minimal_dimensions(VirtViewerWindow *self, guint *width, guint *height);
 static gint virt_viewer_window_get_minimal_zoom_level(VirtViewerWindow *self);
 
-G_DEFINE_TYPE (VirtViewerWindow, virt_viewer_window, G_TYPE_OBJECT)
-
-#define GET_PRIVATE(o)                                                  \
-    (G_TYPE_INSTANCE_GET_PRIVATE ((o), VIRT_VIEWER_TYPE_WINDOW, VirtViewerWindowPrivate))
-
 enum {
     PROP_0,
     PROP_WINDOW,
@@ -117,6 +116,8 @@ struct _VirtViewerWindowPrivate {
     gboolean initial_zoom_set;
 };
 
+G_DEFINE_TYPE_WITH_PRIVATE (VirtViewerWindow, virt_viewer_window, G_TYPE_OBJECT)
+
 static void
 virt_viewer_window_get_property (GObject *object, guint property_id,
                                  GValue *value, GParamSpec *pspec)
@@ -219,7 +220,32 @@ rebuild_combo_menu(GObject    *gobject G_GNUC_UNUSED,
     menu = GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-send"));
     gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu),
                               GTK_WIDGET(virt_viewer_window_get_keycombo_menu(self)));
-    gtk_widget_set_sensitive(menu, (self->priv->display != NULL));
+}
+
+static void
+vm_ui_changed(GObject    *gobject G_GNUC_UNUSED,
+              GParamSpec *pspec G_GNUC_UNUSED,
+              gpointer    user_data)
+{
+    VirtViewerWindow *self = user_data;
+    gboolean vm_ui;
+
+    g_object_get(G_OBJECT(self->priv->app), "vm-ui", &vm_ui, NULL);
+    gtk_widget_set_visible(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-machine")), vm_ui);
+}
+
+static void
+vm_running_changed(GObject    *gobject G_GNUC_UNUSED,
+                   GParamSpec *pspec G_GNUC_UNUSED,
+                   gpointer    user_data)
+{
+    VirtViewerWindow *self = user_data;
+    GtkCheckMenuItem *check = GTK_CHECK_MENU_ITEM(gtk_builder_get_object(self->priv->builder, "menu-vm-pause"));
+    gboolean running;
+
+    g_object_get(G_OBJECT(self->priv->app), "vm-running", &running, NULL);
+
+    gtk_check_menu_item_set_active(check, !running);
 }
 
 static void
@@ -232,6 +258,10 @@ virt_viewer_window_constructed(GObject *object)
 
     g_signal_connect(priv->app, "notify::enable-accel",
                      G_CALLBACK(rebuild_combo_menu), object);
+    g_signal_connect(priv->app, "notify::vm-ui",
+                     G_CALLBACK(vm_ui_changed), object);
+    g_signal_connect(priv->app, "notify::vm-running",
+                     G_CALLBACK(vm_running_changed), object);
     rebuild_combo_menu(NULL, NULL, object);
 }
 
@@ -240,8 +270,6 @@ virt_viewer_window_class_init (VirtViewerWindowClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-    g_type_class_add_private (klass, sizeof (VirtViewerWindowPrivate));
-
     object_class->get_property = virt_viewer_window_get_property;
     object_class->set_property = virt_viewer_window_set_property;
     object_class->dispose = virt_viewer_window_dispose;
@@ -302,7 +330,7 @@ virt_viewer_window_init (VirtViewerWindow *self)
     GtkWidget *vbox;
     GSList *accels;
 
-    self->priv = GET_PRIVATE(self);
+    self->priv = virt_viewer_window_get_instance_private(self);
     priv = self->priv;
 
     priv->fullscreen_monitor = -1;
@@ -313,11 +341,6 @@ virt_viewer_window_init (VirtViewerWindow *self)
 
     priv->builder = virt_viewer_util_load_ui("virt-viewer.ui");
 
-    gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-send")), FALSE);
-    gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-view-zoom")), FALSE);
-    gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-file-screenshot")), FALSE);
-    gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-preferences")), FALSE);
-
     gtk_builder_connect_signals(priv->builder, self);
 
     priv->accel_group = GTK_ACCEL_GROUP(gtk_builder_get_object(priv->builder, "accelgroup"));
@@ -385,27 +408,69 @@ virt_viewer_window_get_real_zoom_level(VirtViewerWindow *self)
     return round((double) NORMAL_ZOOM_LEVEL * allocation.width / width);
 }
 
+G_MODULE_EXPORT void
+virt_viewer_window_menu_machine_reset(GtkWidget *menu G_GNUC_UNUSED,
+                                      VirtViewerWindow *self)
+{
+    virt_viewer_session_vm_action(virt_viewer_app_get_session(self->priv->app),
+                                  VIRT_VIEWER_SESSION_VM_ACTION_RESET);
+}
+
+G_MODULE_EXPORT void
+virt_viewer_window_menu_machine_powerdown(GtkWidget *menu G_GNUC_UNUSED,
+                                      VirtViewerWindow *self)
+{
+    virt_viewer_session_vm_action(virt_viewer_app_get_session(self->priv->app),
+                                  VIRT_VIEWER_SESSION_VM_ACTION_POWER_DOWN);
+}
+
+G_MODULE_EXPORT void
+virt_viewer_window_menu_machine_pause(GtkWidget *menu G_GNUC_UNUSED,
+                                      VirtViewerWindow *self)
+{
+    gint action;
+
+    if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu)))
+        action = VIRT_VIEWER_SESSION_VM_ACTION_PAUSE;
+    else
+        action = VIRT_VIEWER_SESSION_VM_ACTION_CONTINUE;
+
+    virt_viewer_session_vm_action(virt_viewer_app_get_session(self->priv->app), action);
+}
+
 G_MODULE_EXPORT void
 virt_viewer_window_menu_view_zoom_out(GtkWidget *menu G_GNUC_UNUSED,
                                       VirtViewerWindow *self)
 {
-    virt_viewer_window_set_zoom_level(self,
-                                      virt_viewer_window_get_real_zoom_level(self) - ZOOM_STEP);
+    if (VIRT_VIEWER_IS_DISPLAY_VTE(self->priv->display)) {
+        virt_viewer_display_vte_zoom_out(VIRT_VIEWER_DISPLAY_VTE(self->priv->display));
+    } else {
+        virt_viewer_window_set_zoom_level(self,
+                                          virt_viewer_window_get_real_zoom_level(self) - ZOOM_STEP);
+    }
 }
 
 G_MODULE_EXPORT void
 virt_viewer_window_menu_view_zoom_in(GtkWidget *menu G_GNUC_UNUSED,
                                      VirtViewerWindow *self)
 {
-    virt_viewer_window_set_zoom_level(self,
-                                      virt_viewer_window_get_real_zoom_level(self) + ZOOM_STEP);
+    if (VIRT_VIEWER_IS_DISPLAY_VTE(self->priv->display)) {
+        virt_viewer_display_vte_zoom_in(VIRT_VIEWER_DISPLAY_VTE(self->priv->display));
+    } else {
+        virt_viewer_window_set_zoom_level(self,
+                                          virt_viewer_window_get_real_zoom_level(self) + ZOOM_STEP);
+    }
 }
 
 G_MODULE_EXPORT void
 virt_viewer_window_menu_view_zoom_reset(GtkWidget *menu G_GNUC_UNUSED,
                                         VirtViewerWindow *self)
 {
-    virt_viewer_window_set_zoom_level(self, NORMAL_ZOOM_LEVEL);
+    if (VIRT_VIEWER_IS_DISPLAY_VTE(self->priv->display)) {
+        virt_viewer_display_vte_zoom_reset(VIRT_VIEWER_DISPLAY_VTE(self->priv->display));
+    } else {
+        virt_viewer_window_set_zoom_level(self, NORMAL_ZOOM_LEVEL);
+    }
 }
 
 /* Kick GtkWindow to tell it to adjust to our new widget sizes */
@@ -530,7 +595,19 @@ virt_viewer_window_enter_fullscreen(VirtViewerWindow *self, gint monitor)
     }
     virt_viewer_window_move_to_monitor(self);
 
-    gtk_window_fullscreen(GTK_WINDOW(priv->window));
+#if GTK_CHECK_VERSION(3, 18, 0)
+    if (monitor == -1) {
+        // just go fullscreen on the current monitor
+        gtk_window_fullscreen(GTK_WINDOW(priv->window));
+    } else {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+        gtk_window_fullscreen_on_monitor(GTK_WINDOW(priv->window),
+                                         gdk_screen_get_default(), monitor);
+G_GNUC_END_IGNORE_DEPRECATIONS
+    }
+#else
+        gtk_window_fullscreen(GTK_WINDOW(priv->window));
+#endif /* GTK_CHECK_VERSION */
 }
 
 #define MAX_KEY_COMBO 4
@@ -910,7 +987,7 @@ static void add_if_writable (GdkPixbufFormat *data, GHashTable *formats)
     }
 }
 
-static GHashTable *init_image_formats(void)
+static GHashTable *init_image_formats(G_GNUC_UNUSED gpointer user_data)
 {
     GHashTable *format_map;
     GSList *formats = gdk_pixbuf_get_formats();
@@ -1131,7 +1208,7 @@ iso_dialog_response(GtkDialog *dialog,
 }
 #endif
 
-void
+G_MODULE_EXPORT void
 virt_viewer_window_menu_change_cd_activate(GtkWidget *menu G_GNUC_UNUSED,
                                            VirtViewerWindow *self G_GNUC_UNUSED)
 {
@@ -1345,13 +1422,24 @@ virt_viewer_window_set_menus_sensitive(VirtViewerWindow *self, gboolean sensitiv
     gtk_widget_set_sensitive(menu, sensitive);
 
     menu = GTK_WIDGET(gtk_builder_get_object(priv->builder, "menu-file-screenshot"));
-    gtk_widget_set_sensitive(menu, sensitive);
+    gtk_widget_set_sensitive(menu, sensitive &&
+                             VIRT_VIEWER_DISPLAY_CAN_SCREENSHOT(self->priv->display));
 
     menu = GTK_WIDGET(gtk_builder_get_object(priv->builder, "menu-view-zoom"));
     gtk_widget_set_sensitive(menu, sensitive);
 
-    menu = GTK_WIDGET(gtk_builder_get_object(priv->builder, "menu-send"));
+    menu = GTK_WIDGET(gtk_builder_get_object(priv->builder, "menu-machine"));
     gtk_widget_set_sensitive(menu, sensitive);
+
+    {
+        gboolean can_send = sensitive &&
+            VIRT_VIEWER_DISPLAY_CAN_SEND_KEYS(self->priv->display);
+
+        menu = GTK_WIDGET(gtk_builder_get_object(priv->builder, "menu-send"));
+        gtk_widget_set_sensitive(menu, can_send);
+
+        gtk_widget_set_sensitive(self->priv->toolbar_send_key, can_send);
+    }
 }
 
 static void
@@ -1432,10 +1520,7 @@ virt_viewer_window_set_display(VirtViewerWindow *self, VirtViewerDisplay *displa
         if (virt_viewer_display_get_enabled(display))
             virt_viewer_window_desktop_resize(display, self);
 
-        gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-preferences")), TRUE);
-        gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-view-zoom")), TRUE);
-        gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-send")), TRUE);
-        gtk_widget_set_sensitive(self->priv->toolbar_send_key, TRUE);
+        virt_viewer_window_set_menus_sensitive(self, TRUE);
     }
 }
 
@@ -1522,7 +1607,9 @@ virt_viewer_window_set_zoom_level(VirtViewerWindow *self, gint zoom_level)
 
     virt_viewer_display_set_zoom_level(VIRT_VIEWER_DISPLAY(priv->display), priv->zoomlevel);
 
-    virt_viewer_window_queue_resize(self);
+    if (!VIRT_VIEWER_IS_DISPLAY_VTE(priv->display)) {
+        virt_viewer_window_queue_resize(self);
+    }
 }
 
 gint virt_viewer_window_get_zoom_level(VirtViewerWindow *self)
diff --git a/src/virt-viewer.c b/src/virt-viewer.c
index 5c321db..8294ff1 100644
--- a/src/virt-viewer.c
+++ b/src/virt-viewer.c
@@ -68,9 +68,7 @@ struct _VirtViewerPrivate {
     guint reconnect_poll; /* source id */
 };
 
-G_DEFINE_TYPE (VirtViewer, virt_viewer, VIRT_VIEWER_TYPE_APP)
-#define GET_PRIVATE(o)                                                        \
-    (G_TYPE_INSTANCE_GET_PRIVATE ((o), VIRT_VIEWER_TYPE, VirtViewerPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (VirtViewer, virt_viewer, VIRT_VIEWER_TYPE_APP)
 
 static gboolean virt_viewer_initial_connect(VirtViewerApp *self, GError **error);
 static gboolean virt_viewer_open_connection(VirtViewerApp *self, int *fd);
@@ -213,8 +211,6 @@ virt_viewer_class_init (VirtViewerClass *klass)
     VirtViewerAppClass *app_class = VIRT_VIEWER_APP_CLASS (klass);
     GApplicationClass *g_app_class = G_APPLICATION_CLASS(klass);
 
-    g_type_class_add_private (klass, sizeof (VirtViewerPrivate));
-
     object_class->dispose = virt_viewer_dispose;
 
     app_class->initial_connect = virt_viewer_initial_connect;
@@ -229,7 +225,7 @@ virt_viewer_class_init (VirtViewerClass *klass)
 static void
 virt_viewer_init(VirtViewer *self)
 {
-    self->priv = GET_PRIVATE(self);
+    self->priv = virt_viewer_get_instance_private(self);
     self->priv->domain_event = -1;
 }
 
@@ -258,7 +254,7 @@ virt_viewer_start_reconnect_poll(VirtViewer *self)
 {
     VirtViewerPrivate *priv = self->priv;
 
-    g_debug("reconnect_poll: %d", priv->reconnect_poll);
+    g_debug("reconnect_poll: %u", priv->reconnect_poll);
 
     if (priv->reconnect_poll != 0)
         return;
@@ -271,7 +267,7 @@ virt_viewer_stop_reconnect_poll(VirtViewer *self)
 {
     VirtViewerPrivate *priv = self->priv;
 
-    g_debug("reconnect_poll: %d", priv->reconnect_poll);
+    g_debug("reconnect_poll: %u", priv->reconnect_poll);
 
     if (priv->reconnect_poll == 0)
         return;
@@ -875,6 +871,7 @@ virt_viewer_initial_connect(VirtViewerApp *app, GError **error)
     VirtViewerPrivate *priv = self->priv;
     char uuid_string[VIR_UUID_STRING_BUFLEN];
     const char *guest_name;
+    char *title;
     GError *err = NULL;
 
     g_debug("initial connect");
@@ -915,6 +912,12 @@ virt_viewer_initial_connect(VirtViewerApp *app, GError **error)
         g_object_set(app, "guest-name", guest_name, NULL);
     }
 
+    title = virDomainGetMetadata(dom, VIR_DOMAIN_METADATA_TITLE, NULL, 0);
+    if (title != NULL) {
+        g_object_set(app, "title", title, NULL);
+        free(title);
+    }
+
     virt_viewer_app_show_status(app, _("Checking guest domain status"));
     if (virDomainGetInfo(dom, &info) < 0) {
         g_set_error_literal(&err, VIRT_VIEWER_ERROR, VIRT_VIEWER_ERROR_FAILED,
@@ -968,7 +971,7 @@ virt_viewer_auth_libvirt_credentials(virConnectCredentialPtr cred,
     int i;
     int ret = 0;
 
-    g_debug("Got libvirt credential request for %d credential(s)", ncred);
+    g_debug("Got libvirt credential request for %u credential(s)", ncred);
 
     for (i = 0 ; i < ncred ; i++) {
         switch (cred[i].type) {
@@ -1002,12 +1005,13 @@ virt_viewer_auth_libvirt_credentials(virConnectCredentialPtr cred,
         }
     }
 
+    static const char * const cred_type_to_str[] = {
+        [VIR_CRED_USERNAME] = "Identity to act as",
+        [VIR_CRED_AUTHNAME] = "Identify to authorize as",
+        [VIR_CRED_PASSPHRASE] = "Passphrase secret",
+    };
+
     for (i = 0 ; i < ncred ; i++) {
-        const char *cred_type_to_str[] = {
-            [VIR_CRED_USERNAME] = "Identity to act as",
-            [VIR_CRED_AUTHNAME] = "Identify to authorize as",
-            [VIR_CRED_PASSPHRASE] = "Passphrase secret",
-        };
         switch (cred[i].type) {
         case VIR_CRED_AUTHNAME:
         case VIR_CRED_USERNAME:
diff --git a/src/virt-viewer.rc b/src/virt-viewer.rc
index 7cb4d5b..b97b2fd 100644
--- a/src/virt-viewer.rc
+++ b/src/virt-viewer.rc
@@ -9,12 +9,12 @@ BEGIN
     BEGIN
       VALUE "CompanyName", "virt-manager.org"
       VALUE "FileDescription", "VirtViewer desktop client"
-      VALUE "FileVersion", "7.0"
-      VALUE "InternalName", "virt-viewer 7.0"
+      VALUE "FileVersion", "8.0"
+      VALUE "InternalName", "virt-viewer 8.0"
       VALUE "LegalCopyright", "Copyright (C) 2007-2013 Red Hat, Inc."
       VALUE "OriginalFilename", "virt-viewer.exe"
       VALUE "ProductName", "VirtViewer"
-      VALUE "ProductVersion", "7.0"
+      VALUE "ProductVersion", "8.0"
     END
   END
 
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 1ee38e8..ea893c3 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -94,11 +94,10 @@ check_PROGRAMS = $(am__EXEEXT_2)
 @OS_WIN32_TRUE@am__append_1 = redirect-test
 subdir = tests
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
-	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
-	$(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -173,7 +172,12 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/redirect_test-redirect-test.Po \
+	./$(DEPDIR)/test-hotkeys.Po \
+	./$(DEPDIR)/test-monitor-alignment.Po \
+	./$(DEPDIR)/test-monitor-mapping.Po \
+	./$(DEPDIR)/test-version-compare.Po
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -543,6 +547,7 @@ POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 RANLIB = @RANLIB@
+REST_REQUIRED = @REST_REQUIRED@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -556,6 +561,8 @@ STRIP = @STRIP@
 UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+VTE_CFLAGS = @VTE_CFLAGS@
+VTE_LIBS = @VTE_LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WINDOWS_PRODUCTVERSION = @WINDOWS_PRODUCTVERSION@
 WINDRES = @WINDRES@
@@ -679,8 +686,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -727,11 +734,17 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/redirect_test-redirect-test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-hotkeys.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-monitor-alignment.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-monitor-mapping.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-version-compare.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/redirect_test-redirect-test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-hotkeys.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-monitor-alignment.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-monitor-mapping.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-version-compare.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+	@$(MKDIR_P) $(@D)
+	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -949,7 +962,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
 	fi;								\
 	$$success || exit 1
 
-check-TESTS:
+check-TESTS: $(check_PROGRAMS)
 	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
 	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
 	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@@ -1020,7 +1033,10 @@ redirect-test.log: redirect-test$(EXEEXT)
 @am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
 @am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -1095,7 +1111,11 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
 	mostlyclean-am
 
 distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/redirect_test-redirect-test.Po
+	-rm -f ./$(DEPDIR)/test-hotkeys.Po
+	-rm -f ./$(DEPDIR)/test-monitor-alignment.Po
+	-rm -f ./$(DEPDIR)/test-monitor-mapping.Po
+	-rm -f ./$(DEPDIR)/test-version-compare.Po
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -1141,7 +1161,11 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/redirect_test-redirect-test.Po
+	-rm -f ./$(DEPDIR)/test-hotkeys.Po
+	-rm -f ./$(DEPDIR)/test-monitor-alignment.Po
+	-rm -f ./$(DEPDIR)/test-monitor-mapping.Po
+	-rm -f ./$(DEPDIR)/test-version-compare.Po
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -1162,16 +1186,16 @@ uninstall-am:
 
 .MAKE: check-am install-am install-strip
 
-.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
-	clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
-	ctags ctags-am distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \
+	check-am clean clean-checkPROGRAMS clean-generic clean-libtool \
+	cscopelist-am ctags ctags-am distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	recheck tags tags-am uninstall uninstall-am
diff --git a/virt-viewer.spec b/virt-viewer.spec
index e8d05dd..c7b9ea6 100644
--- a/virt-viewer.spec
+++ b/virt-viewer.spec
@@ -16,14 +16,13 @@
 %endif
 
 Name: virt-viewer
-Version: 7.0
-Release: 1%{?dist}%{?extra_release}
+Version: 8.0
+Release: 1%{?dist}
 Summary: Virtual Machine Viewer
 Group: Applications/System
 License: GPLv2+
 URL: http://virt-manager.org/
 Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: openssh-clients
 Requires(post):   %{_sbindir}/update-alternatives
 Requires(postun): %{_sbindir}/update-alternatives
@@ -37,7 +36,8 @@ BuildRequires: gettext-devel
 BuildRequires: libtool
 %endif
 
-BuildRequires: pkgconfig(glib-2.0) >= 2.38
+BuildRequires: gcc
+BuildRequires: pkgconfig(glib-2.0) >= 2.40
 BuildRequires: pkgconfig(gtk+-3.0) >= 3.12
 BuildRequires: pkgconfig(libvirt) >= 0.10.0
 BuildRequires: pkgconfig(libvirt-glib-1.0) >= 0.1.8
@@ -50,7 +50,7 @@ BuildRequires: pkgconfig(spice-protocol) >= 0.12.7
 BuildRequires: /usr/bin/pod2man
 BuildRequires: intltool
 %if %{with_govirt}
-BuildRequires: pkgconfig(govirt-1.0) >= 0.3.2
+BuildRequires: pkgconfig(govirt-1.0) >= 0.3.3
 %endif
 
 %if 0%{?fedora} >= 20
@@ -91,28 +91,8 @@ rm -rf $RPM_BUILD_ROOT
 %__make install  DESTDIR=$RPM_BUILD_ROOT
 %find_lang %{name}
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post
-%{_bindir}/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-%{_bindir}/touch --no-create %{_datadir}/mime/packages &> /dev/null || :
-%{_bindir}/update-desktop-database -q %{_datadir}/applications
-
-%postun
-if [ $1 -eq 0 ] ; then
-  %{_bindir}/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
-  %{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-  %{_bindir}/update-mime-database %{_datadir}/mime &> /dev/null
-fi
-%{_bindir}/update-desktop-database -q %{_datadir}/applications
-
-%posttrans
-%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-%{_bindir}/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
 
 %files -f %{name}.lang
-%defattr(-,root,root,-)
 %doc README.md COPYING AUTHORS ChangeLog NEWS
 %{_bindir}/%{name}
 %{_bindir}/remote-viewer
diff --git a/virt-viewer.spec.in b/virt-viewer.spec.in
index 86624d0..6c49c02 100644
--- a/virt-viewer.spec.in
+++ b/virt-viewer.spec.in
@@ -17,13 +17,12 @@
 
 Name: @PACKAGE@
 Version: @VERSION@
-Release: 1%{?dist}%{?extra_release}
+Release: 1%{?dist}
 Summary: Virtual Machine Viewer
 Group: Applications/System
 License: GPLv2+
 URL: http://virt-manager.org/
 Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: openssh-clients
 Requires(post):   %{_sbindir}/update-alternatives
 Requires(postun): %{_sbindir}/update-alternatives
@@ -37,6 +36,7 @@ BuildRequires: gettext-devel
 BuildRequires: libtool
 %endif
 
+BuildRequires: gcc
 BuildRequires: pkgconfig(glib-2.0) >= @GLIB2_REQUIRED@
 BuildRequires: pkgconfig(gtk+-3.0) >= @GTK_REQUIRED@
 BuildRequires: pkgconfig(libvirt) >= @LIBVIRT_REQUIRED@
@@ -91,28 +91,8 @@ rm -rf $RPM_BUILD_ROOT
 %__make install  DESTDIR=$RPM_BUILD_ROOT
 %find_lang %{name}
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post
-%{_bindir}/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-%{_bindir}/touch --no-create %{_datadir}/mime/packages &> /dev/null || :
-%{_bindir}/update-desktop-database -q %{_datadir}/applications
-
-%postun
-if [ $1 -eq 0 ] ; then
-  %{_bindir}/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
-  %{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-  %{_bindir}/update-mime-database %{_datadir}/mime &> /dev/null
-fi
-%{_bindir}/update-desktop-database -q %{_datadir}/applications
-
-%posttrans
-%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-%{_bindir}/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
 
 %files -f %{name}.lang
-%defattr(-,root,root,-)
 %doc README.md COPYING AUTHORS ChangeLog NEWS
 %{_bindir}/%{name}
 %{_bindir}/remote-viewer