virt-viewer-1.0/ 0000775 0000000 0000000 00000000000 12363213414 010605 5 0000000 0000000 virt-viewer-1.0/virt-viewer.spec 0000664 0000000 0000000 00000010310 12363213371 013661 0000000 0000000 # -*- rpm-spec -*-
# Default to skipping autoreconf. Distros can change just this one line
# (or provide a command-line override) if they backport any patches that
# touch configure.ac or Makefile.am.
%{!?enable_autotools:%define enable_autotools 0}
%define with_gtk3 0
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
%define with_gtk3 1
%endif
%define with_spice 0
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
%define with_spice 1
%endif
%define with_govirt 0
%if 0%{?fedora} > 19 || 0%{?rhel} >= 7
%define with_govirt 1
%endif
Name: virt-viewer
Version: 1.0
Release: 1%{?dist}%{?extra_release}
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
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
%if 0%{?enable_autotools}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gettext-devel
BuildRequires: libtool
%endif
BuildRequires: glib2-devel >= 2.22.0
%if %{with_gtk3}
BuildRequires: gtk3-devel >= 3.0
%else
BuildRequires: gtk2-devel >= 2.18.0
%endif
BuildRequires: libvirt-devel >= 0.10.0
BuildRequires: libxml2-devel >= 2.6.0
%if %{with_gtk3}
BuildRequires: gtk-vnc2-devel >= 0.4.0
%else
BuildRequires: gtk-vnc-devel >= 0.3.8
%endif
%if %{with_spice}
%if %{with_gtk3}
BuildRequires: spice-gtk3-devel >= 0.22
%else
BuildRequires: spice-gtk-devel >= 0.22
%endif
BuildRequires: spice-protocol >= 0.10.1
%endif
BuildRequires: /usr/bin/pod2man
BuildRequires: intltool
%if %{with_govirt}
BuildRequires: libgovirt-devel >= 0.3.0
%endif
%if 0%{?fedora} >= 20
Obsoletes: spice-client < 0.12.3-2
%endif
%description
Virtual Machine Viewer provides a graphical console client for connecting
to virtual machines. It uses the GTK-VNC or SPICE-GTK widgets to provide
the display, and libvirt for looking up VNC/SPICE server details.
%prep
%setup -q
%build
%if 0%{?enable_autotools}
autoreconf -if
%endif
%if %{with_spice}
%define spice_arg --with-spice-gtk
%else
%define spice_arg --without-spice-gtk
%endif
%if %{with_gtk3}
%define gtk_arg --with-gtk=3.0
%else
%define gtk_arg --with-gtk=2.0
%endif
%if %{with_govirt}
%define govirt_arg --with-ovirt
%endif
%configure %{spice_arg} %{gtk_arg} %{govirt_arg} --with-buildid=%{release} --disable-update-mimedb
%__make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
%__make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p %{buildroot}%{_libexecdir}
touch %{buildroot}%{_libexecdir}/spice-xpi-client
install -m 0755 data/spice-xpi-client-remote-viewer %{buildroot}%{_libexecdir}/
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%{_sbindir}/update-alternatives --install %{_libexecdir}/spice-xpi-client \
spice-xpi-client %{_libexecdir}/spice-xpi-client-remote-viewer 25
update-desktop-database -q %{_datadir}/applications
%{_bindir}/update-mime-database %{_datadir}/mime &> /dev/null
%postun
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_sbindir}/update-alternatives --remove spice-xpi-client %{_libexecdir}/spice-xpi-client-remote-viewer
fi
update-desktop-database -q %{_datadir}/applications
%{_bindir}/update-mime-database %{_datadir}/mime &> /dev/null
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc README COPYING AUTHORS ChangeLog NEWS
%{_bindir}/%{name}
%{_bindir}/remote-viewer
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/ui/
%{_datadir}/%{name}/ui/virt-viewer.xml
%{_datadir}/%{name}/ui/virt-viewer-auth.xml
%{_datadir}/%{name}/ui/virt-viewer-about.xml
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/icons/hicolor/*/devices/*
%{_datadir}/applications/remote-viewer.desktop
%{_datadir}/mime/packages/virt-viewer-mime.xml
%ghost %{_libexecdir}/spice-xpi-client
%{_libexecdir}/spice-xpi-client-remote-viewer
%{_mandir}/man1/virt-viewer.1*
%{_mandir}/man1/remote-viewer.1*
%changelog
virt-viewer-1.0/Makefile.in 0000664 0000000 0000000 00000072734 12363213344 012611 0000000 0000000 # Makefile.in generated by automake 1.13.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in 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.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in $(srcdir)/mingw-virt-viewer.spec.in \
$(srcdir)/virt-viewer.spec.in COPYING build-aux/compile \
build-aux/config.guess build-aux/config.sub \
build-aux/install-sh build-aux/missing build-aux/ltmain.sh \
$(top_srcdir)/build-aux/compile \
$(top_srcdir)/build-aux/config.guess \
$(top_srcdir)/build-aux/config.sub \
$(top_srcdir)/build-aux/install-sh \
$(top_srcdir)/build-aux/ltmain.sh \
$(top_srcdir)/build-aux/missing
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__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = mingw-virt-viewer.spec virt-viewer.spec
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir 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,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILDID = @BUILDID@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB2_CFLAGS = @GLIB2_CFLAGS@
GLIB2_LIBS = @GLIB2_LIBS@
GLIB2_REQUIRED = @GLIB2_REQUIRED@
GLIB_MKENUMS = @GLIB_MKENUMS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GOVIRT_REQUIRED = @GOVIRT_REQUIRED@
GREP = @GREP@
GTK2_REQUIRED = @GTK2_REQUIRED@
GTK3_REQUIRED = @GTK3_REQUIRED@
GTK_API_VERSION = @GTK_API_VERSION@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
GTK_REQUIRED = @GTK_REQUIRED@
GTK_VNC1_REQUIRED = @GTK_VNC1_REQUIRED@
GTK_VNC2_REQUIRED = @GTK_VNC2_REQUIRED@
GTK_VNC_API_VERSION = @GTK_VNC_API_VERSION@
GTK_VNC_CFLAGS = @GTK_VNC_CFLAGS@
GTK_VNC_LIBS = @GTK_VNC_LIBS@
ICOTOOL = @ICOTOOL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBVIRT_CFLAGS = @LIBVIRT_CFLAGS@
LIBVIRT_LIBS = @LIBVIRT_LIBS@
LIBVIRT_REQUIRED = @LIBVIRT_REQUIRED@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIBXML2_REQUIRED = @LIBXML2_REQUIRED@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
MSGMERGE = @MSGMERGE@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
OVIRT_CFLAGS = @OVIRT_CFLAGS@
OVIRT_LIBS = @OVIRT_LIBS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SPICE_CONTROLLER_CFLAGS = @SPICE_CONTROLLER_CFLAGS@
SPICE_CONTROLLER_LIBS = @SPICE_CONTROLLER_LIBS@
SPICE_GTK_CFLAGS = @SPICE_GTK_CFLAGS@
SPICE_GTK_LIBS = @SPICE_GTK_LIBS@
SPICE_GTK_REQUIRED = @SPICE_GTK_REQUIRED@
SPICE_PROTOCOL_CFLAGS = @SPICE_PROTOCOL_CFLAGS@
SPICE_PROTOCOL_LIBS = @SPICE_PROTOCOL_LIBS@
SPICE_PROTOCOL_REQUIRED = @SPICE_PROTOCOL_REQUIRED@
STRIP = @STRIP@
UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WINDOWS_PRODUCTVERSION = @WINDOWS_PRODUCTVERSION@
WINDRES = @WINDRES@
WIXL_ARCH = @WIXL_ARCH@
XGETTEXT = @XGETTEXT@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
intltool__v_merge_options_ = @intltool__v_merge_options_@
intltool__v_merge_options_0 = @intltool__v_merge_options_0@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = icons src man po data
AM_DISTCHECK_CONFIGURE_FLAGS = --disable-update-mimedb
EXTRA_DIST = \
$(PACKAGE).spec \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
GNUmakefile \
maint.mk \
cfg.mk \
build-aux/gitlog-to-changelog \
build-aux/useless-if-before-free \
build-aux/vc-list-files \
AUTHORS.in \
$(NULL)
DISTCLEAN_FILES = \
$(PACKAGE).spec \
intltool-extract \
intltool-merge \
intltool-update \
$(NULL)
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/aclocal.m4 \
$(srcdir)/autoscan.log \
$(srcdir)/config.h.in \
$(srcdir)/build-aux/compile \
$(srcdir)/build-aux/config.guess \
$(srcdir)/build-aux/config.sub \
$(srcdir)/build-aux/depcomp \
$(srcdir)/build-aux/install-sh \
$(srcdir)/build-aux/ltmain.sh \
$(srcdir)/build-aux/missing \
$(srcdir)/m4/intltool.m4 \
$(srcdir)/m4/libtool.m4 \
$(srcdir)/m4/ltoptions.m4 \
$(srcdir)/m4/ltsugar.m4 \
$(srcdir)/m4/ltversion.m4 \
$(srcdir)/m4/lt~obsolete.m4 \
$(NULL)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*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);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then rm -f stamp-h1; else :; fi
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
mingw-virt-viewer.spec: $(top_builddir)/config.status $(srcdir)/mingw-virt-viewer.spec.in
cd $(top_builddir) && $(SHELL) ./config.status $@
virt-viewer.spec: $(top_builddir)/config.status $(srcdir)/virt-viewer.spec.in
cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool config.lt
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
-rm -f cscope.files
cscope.files: clean-cscope cscopelist
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
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)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__post_remove_distdir)
dist dist-all:
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
$(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile config.h all-local
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr \
distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(am__recursive_targets) all install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
dist-tarZ dist-xz dist-zip distcheck distclean \
distclean-generic distclean-hdr distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck 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 installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
dist-hook: gen-ChangeLog gen-AUTHORS
# Generate the ChangeLog file (with all entries since the switch to git)
# and insert it into the directory we're about to use to create a tarball.
@OS_WIN32_TRUE@.PHONY: gen-ChangeLog gen-AUTHORS nsis
@OS_WIN32_FALSE@.PHONY: gen-ChangeLog gen-AUTHORS
gen-ChangeLog:
if test -d .git || test -d ../.git; then \
$(top_srcdir)/build-aux/gitlog-to-changelog \
> $(distdir)/cl-t; \
rm -f $(distdir)/ChangeLog; \
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
fi
gen-AUTHORS:
$(AM_V_GEN)if test -d $(srcdir)/.git; then \
out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u`" && \
perl -p -e "s/#authorslist#// and print '$$out'" \
< $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \
mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \
fi
@OS_WIN32_TRUE@.PHONY: nsis
@OS_WIN32_TRUE@nsis:
@OS_WIN32_TRUE@ make -C $(builddir)/data virt-viewer-$(VERSION).exe
# this make sure those files are regenerated when they change
# (in maintainer-mode)
all-local: virt-viewer.spec mingw-virt-viewer.spec
-include $(top_srcdir)/git.mk
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
virt-viewer-1.0/GNUmakefile 0000664 0000000 0000000 00000011316 12363164223 012604 0000000 0000000 # Having a separate GNUmakefile lets me `include' the dynamically
# generated rules created via cfg.mk (package-local configuration)
# as well as maint.mk (generic maintainer rules).
# This makefile is used only if you run GNU Make.
# It is necessary if you want to build targets usually of interest
# only to the maintainer.
# Copyright (C) 2001, 2003, 2006-2011 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
# the Free Software Foundation, either version 3 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, see .
# Systems where /bin/sh is not the default shell need this. The $(shell)
# command below won't work with e.g. stock DOS/Windows shells.
ifeq ($(wildcard /bin/s[h]),/bin/sh)
SHELL = /bin/sh
else
# will be used only with the next shell-test line, then overwritten
# by a configured-in value
SHELL = sh
endif
# If the user runs GNU make but has not yet run ./configure,
# give them a diagnostic.
_have-Makefile := $(shell test -f Makefile && echo yes)
ifeq ($(_have-Makefile),yes)
# Make tar archive easier to reproduce.
export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
# Allow the user to add to this in the Makefile.
ALL_RECURSIVE_TARGETS =
include Makefile
# Some projects override e.g., _autoreconf here.
-include $(srcdir)/cfg.mk
# Allow cfg.mk to override these.
_build-aux ?= build-aux
_autoreconf ?= autoreconf -v
include $(srcdir)/maint.mk
# Ensure that $(VERSION) is up to date for dist-related targets, but not
# for others: rerunning autoreconf and recompiling everything isn't cheap.
_have-git-version-gen := \
$(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
_is-dist-target ?= $(filter-out %clean, \
$(filter maintainer-% dist% alpha beta stable,$(MAKECMDGOALS)))
_is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS)))
ifneq (,$(_is-dist-target)$(_is-install-target))
_curr-ver := $(shell cd $(srcdir) \
&& $(_build-aux)/git-version-gen \
.tarball-version \
$(git-version-gen-tag-sed-script))
ifneq ($(_curr-ver),$(VERSION))
ifeq ($(_curr-ver),UNKNOWN)
$(info WARNING: unable to verify if $(VERSION) is the correct version)
else
ifneq (,$(_is-install-target))
# GNU Coding Standards state that 'make install' should not cause
# recompilation after 'make all'. But as long as changing the version
# string alters config.h, the cost of having 'make all' always have an
# up-to-date version is prohibitive. So, as a compromise, we merely
# warn when installing a version string that is out of date; the user
# should run 'autoreconf' (or something like 'make distcheck') to
# fix the version, 'make all' to propagate it, then 'make install'.
$(info WARNING: version string $(VERSION) is out of date;)
$(info run '$(MAKE) _version' to fix it)
else
$(info INFO: running autoreconf for new version string: $(_curr-ver))
GNUmakefile: _version
touch GNUmakefile
endif
endif
endif
endif
endif
.PHONY: _version
_version:
cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf)
$(MAKE) $(AM_MAKEFLAGS) Makefile
else
.DEFAULT_GOAL := abort-due-to-no-makefile
srcdir = .
# The package can override .DEFAULT_GOAL to run actions like autoreconf.
-include ./cfg.mk
include ./maint.mk
ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
$(MAKECMDGOALS): abort-due-to-no-makefile
endif
abort-due-to-no-makefile:
@echo There seems to be no Makefile in this directory. 1>&2
@echo "You must run ./configure before running \`make'." 1>&2
@exit 1
endif
# Tell version 3.79 and up of GNU make to not build goals in this
# directory in parallel, in case someone tries to build multiple
# targets, and one of them can cause a recursive target to be invoked.
# Only set this if Automake doesn't provide it.
AM_RECURSIVE_TARGETS ?= $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) \
dist distcheck tags ctags
ALL_RECURSIVE_TARGETS += $(AM_RECURSIVE_TARGETS)
ifneq ($(word 2, $(MAKECMDGOALS)), )
ifneq ($(filter $(ALL_RECURSIVE_TARGETS), $(MAKECMDGOALS)), )
.NOTPARALLEL:
endif
endif
virt-viewer-1.0/ChangeLog 0000664 0000000 0000000 00000551036 12363213414 012311 0000000 0000000 2014-07-21 Daniel P. Berrange
Update NEWS for 1.0 release
Refresh translations from transifex
2014-07-08 Marc-André Lureau
Make ctrl-[+-] zoom in/out in fullscreen
Make ctrl-[+-] zoom in/out in fullscreen
with mouse over the control bar.
https://bugzilla.redhat.com/show_bug.cgi?id=987549
app: report disconnection error details
It may be useful to provide more detailed reason for disconnection.
https://bugzilla.redhat.com/show_bug.cgi?id=1115986
app: add virt_viewer_app_make_dialog()
Add a function to create an application dialog. In the following
commit, we will add more details for connection failures.
2014-07-02 Jonathon Jongsma
Use GOptionGroup for VirtViewerApp options
Encapsulate things a bit better by adding
virt_viewer_app_get_option_group() which provides a GOptionGroup rather
than exposing an array of options. This option is then set as the main
option group, and additional options can be added by subclasses, so the
effect to the user should be equivalent.
2014-07-01 Jonathon Jongsma
Set help output summary correctly
Use g_option_context_set_summary() to provide a brief description of the
executable instead of tacking the summary onto the end of the
commandline.
remote-viewer: mention vv-file in help output
The man page already has a description of the vv-file format, but the
--help output didn't mention it how to use it.
References: rhbz#970825
2014-06-26 Christophe Fergeau
build-sys: Use automake 'subdir-objects' option
This silences an automake 1.14 warning:
src/Makefile.am:35: warning: source file 'view/autoDrawer.c' is in a
subdirectory,
src/Makefile.am:35: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the
'subdir-objects'
automake: automake option hasn't been enabled. For now, the
corresponding output
automake: object file(s) will be placed in the top-level directory.
However,
automake: this behaviour will change in future Automake versions: they
will
automake: unconditionally cause object files to be placed in the same
subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option
throughout your
automake: project, to avoid future incompatibilities.
Don't use C99 for loops
Declaring a local variable as part as a for loop
such as 'for (unsigned int i; i < N; i++)' is a C99 specific feature.
Running configure with --enable-compile-warnings=minimal does not add
-std=c99 to the compile flags, so it's better if the codebase does not
require C99 support from the compiler.
2014-06-23 Jonathon Jongsma
rhbz#1111514: Fix un-shrinkable displays on windows guests
Commit 6edde5786 introduced a regression wrt shrinking windows on windows
guests. This seems to be because resizing a display often causes the notebook
widget to switch to the status page temporarily (often so quickly that it's not
noticeable to the eye). This causes a quick 'unmap' and 'map' event sequence on
the display widget. Apparently the timing of these events varies enough between
linux and windows guests that it is only noticeable on windows gueststhe timing
of these events varies enough between linux and windows guests that it is only
noticeable on windows guests. The exact sequence that causes the bug appears to
be as follows:
1 user resizes window smaller
2 display widget gets a new allocation, which causes it to send a display
reconfiguration to the guest
3 client receives a new show-hint for the display which causes it to switch
temporarily to the 'status' notebook page
4 display widget gets unmapped
5 Client receives another new show-hint, which causes the display widget to get
re- mapped, which causes client to send a display reconfiguration to the guest
(using the old size)
6 client receives new (smaller, from step 2) display size and temporarily
changes to the new size
7 client receives new (larger, from step 5) display size and changes back to
original size.
To fix the issue, we only explicitly request a resize in response to the very
first map event, and for any subsequent map events, we simply call
_make_resizable() as before.
2014-06-23 Daniel P. Berrange
Bump version 1.0 to simplify Windows MSI versioning
The Windows MSI product version is restricted to a 3 component
version number, whose fields are a max value of 255.255.65536
Since the main virt-viewer version takes up 3 components already,
we have the munge the micro version together with the first
component of the release version. eg we have
$VERSION[0].$VERSION[1].($VERSION[2] << 8 + $RELEASE[0])
This causes problems for RHEL which needs to have 2-component
release versions to deal with z-stream builds. eg a RHEL
version might be virt-viewer-0.5.6-2.el6_4.3 and we've
no easy way of adding the final '.3' to the Windows product
version.
If we reduce the primary virt-viewer version to just 2 components,
then we can leave the 3rd component for exclusive use by the RPM
release number. eg so we'd make product version up using
$VERSION[0].$VERSION[1].($RELEASE[0] << 8 + $RELEASE[1])
In course of normal development, we'd increase the $VERSION[0]
for each release. ie next release is 1.0, then 2.0, then 3.0.
This means we retain the ability to put out "stable" branch
releases for any historical version by doing 1.1, 1.2 instead
of having to re-add a 3rd component.
2014-06-20 Marc-André Lureau
man: fix zoom level range
https://bugzilla.redhat.com/show_bug.cgi?id=1111428
2014-06-16 Marc-André Lureau
Fix a floating display warning
You can reproduce the error by starting the client in kiosk and shuting
down the guest.
#0 0x000000317e432915 in raise (sig=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x000000317e4340f5 in abort () at abort.c:92
#2 0x000000317fc4a98a in g_logv (log_domain=0x318730e657 "Gtk",
log_level=, format=
0x31873a50a8 "A floating object was finalized. This means that
someone\ncalled g_object_unref() on an object that had only a
floating\nreference; the initial floating reference is not owned by
anyone\nand must be remo"..., args1=0x7fffffffd5f0)
at gmessages.c:557
#3 0x000000317fc4aa23 in g_log (log_domain=,
log_level=,
format=) at gmessages.c:577
#4 0x000000318717ba72 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#5 0x0000000000426eb5 in
virt_viewer_display_spice_finalize (obj=0x6fec20
[VirtViewerDisplaySpice])
at virt-viewer-display-spice.c:67
#6 0x0000003180c106a4 in g_object_unref (_object=0x6fec20) at
gobject.c:2712
#7 0x0000000000425b5d in destroy_display (data=0x6fec20) at
virt-viewer-session-spice.c:596
#8 0x000000317fc1667b in g_ptr_array_foreach (array=0x74a040,
func=0x425ae7 , user_data=0x0)
at garray.c:1306
#9 0x000000317fc16e7b in g_ptr_array_free (farray=0x74a040,
free_segment=1) at garray.c:938
#10 0x000000317fc2906a in g_data_set_internal (datalist=, key_id=1297, data=0x0, destroy_func=0)
at gdataset.c:351
#11 g_datalist_id_set_data_full (datalist=,
key_id=1297, data=0x0, destroy_func=0) at gdataset.c:598
#12 0x00000000004268d0 in
virt_viewer_session_spice_channel_destroy (s=0x800000 [SpiceSession],
channel=
kiosk: remove invalid unref
This unref doesn't seem to be related to any reference, although it
was probably introduced in the first place to clear the floating ref,
wrongly. See following commit for a working solution.
2014-06-12 Marc-André Lureau
util: fix glib_check_version() condition
glib_check_version() returns NULL if version is higher or equal.
2014-06-11 Jonathon Jongsma
Fix tiny window when resetting zoom factor in gtk2 build
rhbz#1104064 had a couple of symptoms. The first was fixed in
6edde57862ac30e74ce6412c93a2fa925ae4ea67.
The second symptom is that displays could also become tiny when clicking 'View >
Zoom > Normal Size'. This was because VirtViewerDisplay returned early from
_display_set_zoom_level() if the zoom level was being set to the current zoom
setting. However, the calling function (_window_set_zoom_level()) also tries to
queue a resize event for itself after setting the zoom level on the display. If
the display doesn't queue a resize event for itself, its size request will only
be 50x50 during the window resize negotiation. This causes the display to become
tiny and zoomed out. Queueing a resize on the display widget ensures that it
will request the proper size during the next allocation.
2014-06-11 Marc-André Lureau
window: take zoom-level into account for display limits
Fixes guest can not be resized to expected window size after zoom out.
https://bugzilla.redhat.com/show_bug.cgi?id=1105528
2014-06-10 Jonathon Jongsma
Fix tiny windows for secondary displays in gtk2 build
When enabling a new display on linux guests, the new window would be tiny
(50x50) and zoomed way out. This was caused by the fact that when the display
widget received the 'map' event, it unconditionally cleared the 'dirty' flag,
which meant that it would only request 50x50 size. This behavior was intended to
fix a bug on the windows client which wprevented windows from resized smaller
than the guest display resolution. Unfortunately, due to the timing of the 'map'
and allocate events, the widget became very small.
Instead of clearing the 'dirty' flag directly when a widget is mapped, we
now queue a resize event, which will guarantee that the widget attains its
desired size and will then clear its dirty flag (allowing it to be resized).
Testing on windows indicates that this fix still solves the 'unshrinkable
window' problem while also preventing the tiny secondary display bug.
Resolves: rhbz#1104064
2014-06-10 Marc-André Lureau
util: get rid of ARRAY_CARDINALITY
Use a custom log handler to silence debug messages
On RHEL6, with old glib, all g_log messages are printed.
Filter the messages with a custom handler instead.
https://bugzilla.redhat.com/show_bug.cgi?id=1107518
2014-06-10 Marc-André Lureau
kiosk: don't attempt to hide windows when disconnecting
Get rid of the following warning:
(virt-viewer:7262): virt-viewer-WARNING **: Can't hide windows in kiosk mode
https://bugzilla.redhat.com/show_bug.cgi?id=1107518
Replace DEBUG_LOG with g_debug
https://bugzilla.redhat.com/show_bug.cgi?id=1107518
Remove warning when removing display
Some display have no associated window (for ex, if it doesn't fit
on client monitors).
(remote-viewer:22275): remote-viewer-CRITICAL **: virt_viewer_window_set_display: assertion `VIRT_VIEWER_IS_WINDOW(self)' failed
(remote-viewer:22275): remote-viewer-CRITICAL **: virt_viewer_app_remove_nth_window: assertion `win != NULL' failed
https://bugzilla.redhat.com/show_bug.cgi?id=1107518
2014-06-10 Marc-André Lureau
msi: move up micro version in x.x.build productversion
This allows 12 bits to form a buildid, ex in RHEVM builds:
--with-buildid=$(release << 4 + zrelease)
https://bugzilla.redhat.com/show_bug.cgi?id=1105650
2014-06-10 Christophe Fergeau
Don't connect to localhost when using --direct
Trying to connect to a remote virtual machine using
virt-viewer -c qemu+ssh://example.com/system --direct $vm_name
will currently fail with an error message saying it's not possible to
localhost. This happens with VMs which listen on a wildcard address (eg
'0.0.0.0').
This was introduced by commit 74b1b62 which changes the host to connect to
to 'localhost' when trying to connect through ssh to a VM listening on a
wildcard address. This is only valid when using a ssh tunnel, and should
not be done with --direct. The fallback code which uses the hostname from
the libvirt URI is what makes the most sense in this situation (wildcard
listen address + --direct).
This commit introduces a virt_viewer_app_get_direct() so that this can be
implemented.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1079211
Fix 'title' leak in virt_viewer_file_fill_app()
virt_viewer_file_get_title() returns a newly allocated string.
2014-06-03 Jonathon Jongsma
Set freed variables to NULL in remote_viewer_start()
Coverity warns that 'type' can sometimes be used or free after already having
been freed. This can happen when open_recent_dialog is true and we jump back up
to the retry_dialog label. To prevent this, make sure the freed variables are
set to NULL after freeing.
Improve remote-viewer connection dialog
Based on the new design for the 'connect to server' dialog from Nautilus.
2014-04-17 Marc-André Lureau
Fix race with metacity in fullscreen
To avoid some races with metacity, the window should be placed as
early as possible, before it is (re)allocated & mapped (rhbz#809546).
build-sys: man Makefile.am misc improvements
Make it silent.
Ship man files in tarball.
Use maintainer-clean instead of distclean (which is for files generated
by configure in general).
man: remove Perl header
Remove "User Contributed Perl Documentation" header.
2014-04-08 Jonathon Jongsma
Fix gtk2 build
Previous commit accidentally broke gtk2 build by using
gtk_widget_get_preferred_size(). We can't simply use gtk_widget_size_request()
for the gtk2 build since this will generally return 50x50 whenever we're not in
the middle of a resize, so we need to add a compatibility function.
2014-04-07 Christophe Fergeau
man: Use nicer link to GPLv2
As pointed out by Eric Blake,
https://www.gnu.org/licenses/gpl-2.0.html and
https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
both point to the same location, with the former being nicer to read.
2014-04-04 Christophe Fergeau
man: Fix 'concatonated' typo
This also removes an extra 'are' in the same sentence.
man: Fix link to GPLv2 text
The unversionned http links point to the GLPv3 text while virt-viewer is
still licensed under the GPLv2.
man: Add missing '.' at end of one sentence
Update user-visible copyright information
Years in copyright notices in the about dialog and man pages is at most
2012, let's set it to 2014
build-sys: Always prepend '-' to build id
When using the --with-buildid configure paramater, the build id which is
substituted in the MSI wxs file is automatically prepended by a '-', but
the build id which is used in the C files does not get this '-'
automatically.
Currently, the linux and mingw spec files prepend a '-' on their own to the
--with-buildid argument, but this causes the MSI installer to show 2 '-'
during installation: "Please wait while Windows configures VirtViewer
0.6.0--1"
This commit always prepends a '-' to the buildid strings, and removes the
'-' from the spec files. This is to ensure the separator between version
number and buildid is not forgotten, which could give a confusing version
number.
2014-03-27 Jonathon Jongsma
Fix regression with enabling additional displays
Commit 8fa942 broke enabling of additional displays. We don't want to send down
display re-configurations due to events that happen while setting up windows for
enabled displays that we recieve from the server. However, by ignoring
allocations on unmapped windows, we fail to send display configurations for new
displays that a user is attempting to enable via the window menu. To
discriminate between these two cases, we check whether the display is in the
'ready' state or not.
- Unmapped displays with the 'ready' hint set can be assumed to be displays
that are enabled on the server that we are attempting to create windows for on
the client. In this case, we should *not* send a display configuration to the
server
- Unmapped displays with the 'ready' hint cleared can be assumed to be displays
that are not yet enabled on the server that we are trying to enable in the
client. In this case, we *should* send a display configuration to the server
2014-03-14 Martin Kletzander
Fix building with older spice-gtk
Due to spice-gtk-0.23 missing SPICE_GTK_CHECK_VERSION macro, the
condition:
causes the following error:
virt-viewer-session-spice.c: In function 'virt_viewer_session_spice_main_channel_event':
virt-viewer-session-spice.c:525:64: error: missing binary operator before token "("
#if defined(SPICE_GTK_CHECK_VERSION) && SPICE_GTK_CHECK_VERSION(0, 23, 21)
^
Also one more warning is fixed in this patch:
virt-viewer-session-spice.c:476:19: warning: unused variable 'error'
[-Wunused-variable] const GError *error;
^
2014-03-14 Christophe Fergeau
Fix 'silentely' typo in remote-viewer man page
Don't show 'do you want to quit' dialog in kiosk mode
In some situation, (for example, guest without vdagent running), it's
possible to pass key combinations to virt-viewer. When using alt+f4,
this can cause the 'do you want to quit?' dialog to show while it's
non-functional.
This commit moves the check for kiosk mode to before we show this dialog.
2014-03-13 Jonathon Jongsma
Fix broken 'release-cursor' accel when not specified in --hotkeys
When the --hotkeys option is given, all hotkeys that are not explicitly
specified are disabled. The method used to disable hotkeys is to change the
accel map entry to key=0, mods=0. However, when we decide whether to set a grab
sequence on the spice dispay widget, we simply use the return value for
gtk_accel_map_lookup_entry and assume that a TRUE value returned from this
function means that the hotkey is enabled. In reality, this function will
return TRUE for disabled hotkeys, but the 'key' variable will be set to key=0,
mods=0. The result is that if I start virt-viewer like this:
virt-viewer --hotkeys secure-attention=ctrl+alt+end ...
and the guest that I'm attached to uses server mouse mode, it will be impossible
to release the grab on the spice widget. Because we will explicitly disable the
grab keys in the spice widget and handle the 'release-cursor' hotkey in
virt-viewer, but the hotkey is an empty accel key.
Instead of simply checking the return value of gtk_accel_map_lookup_entry, we
have to inspect the return value for 'key' and check whether any keys are
actually assigned.
Don't create new windows at startup when kiosk mode is false
virt_viewer_app_set_kiosk creates a new window at startup for each client
monitor (regardless of whether the guest supports more than one display). This
seems unnecessary. Only do this if kiosk mode is actually enabled.
Remove special-case for getting window n=0
virt_viewer_app_get_nth_window() will return the proper window when passed 0 for
the 'nth' argument, so there's no need to avoid calling it in this case. It
just complicates the code logic.
Don't resize guest display on zoom change
When the zoom level is changed, the virt-viewer window gets resized. But we
don't want this to trigger a resize of the guest display. But occasionally
rounding errors cause the guest display to be reconfigured when zooming out. To
fix this, we first check whether the current size is the preferred size. If it
is, we don't send down a resize command to the guest.
In addition to preventing guest resizes in response to zooming, it also improves
the behavior when the guest display resolution is changed from within the guest.
Before this change, we'd have the following behavior:
A. guest changes display to WxH
B. client gets notified of change and resizes the window to WxH
C. client responds to window resize by sending a new monitor config command to the guest
With this change, the extra step C will be avoided because we're already at the
preferred size.
Resolves: rhbz#1004051
2014-03-13 Marc-André Lureau
Use a USB icon in the fullscreen toolbar
Replace the generic GTK_STOCK_PREFERENCES with a more appropriate USB icon.
The icon was provided by Jakub Steiner
https://bugzilla.redhat.com/show_bug.cgi?id=804184
Remove "Automatically resize" menu
Remove "Automatically resize" menu item (always enabled for Spice
display now)
https://bugzilla.redhat.com/show_bug.cgi?id=1007649
Silence a message about missing configuration file
Do not print a g_debug() error when the configuration file is missing,
unless given the --debug option.
https://bugzilla.redhat.com/show_bug.cgi?id=1006737
2014-03-12 Daniel P. Berrange
Fix scaling of window upon resize
The code to determine scaling of windows was incorrectly
using the original desktop size instead of the host screen
size. The 128 pixel fudge factor was also causing windows
to be scaled when there was no need for them to be.
2014-03-06 Jonathon Jongsma
Revert "Don't resize guest display on zoom change"
This reverts commit 895ef8029e794e7b74a45f27c7c741d1332bc02b.
2014-02-27 Christophe Fergeau
spec: Don't disable spice support on some archs
Nowadays spice-gtk no longer has an ExclusiveArch: x86 x86_64 %{arm}
virt-viewer can be built with spice-gtk support on all arches.
2014-02-26 Jonathon Jongsma
Don't resize guest display on zoom change
When the zoom level is changed, the virt-viewer window gets resized. But we
don't want this to trigger a resize of the guest display. But occasionally
rounding errors cause the guest display to be reconfigured when zooming out. To
fix this, we first check whether the current size is the preferred size. If it
is, we don't send down a resize command to the guest.
In addition to preventing guest resizes in response to zooming, it also improves
the behavior when the guest display resolution is changed from within the guest.
Before this change, we'd have the following behavior:
A. guest changes display to WxH
B. client gets notified of change and resizes the window to WxH
C. client responds to window resize by sending a new monitor config command to the guest
With this change, the extra step C will be avoided because we're already at the
preferred size.
Resolves: rhbz#1004051
2014-02-26 Marc-André Lureau
spice: do not open in fullscreen with CONTROLLER_AUTO_DISPLAY_RES
This flag is always set when using the rhevm user portal. Best is
probably to ignore it, now that fullscreen has simplified unique
behaviour.
2014-02-24 Marc-André Lureau
spice: ask credentials for proxy
If Spice proxy requires authentication, ask credentials and try
connecting again.
2014-02-24 Marc-André Lureau
Fix a gcc warning when compiling with mingw32
2014-02-24 Daniel P. Berrange
Fix german translation of send key
Improve docs for --attach flag in virt-viewer
People seem to have a hard time understanding the --attach flag.
Rewrite the docs in the hope that people figure it out this time.
2014-02-13 Jonathon Jongsma
rhbz#1007306 - Don't free session if we're re-trying auth
deactivate() is called in response to a failed authentication attempt. If the
session is cleared here, when a user attempts to re-authenticate, it will issue
a warning and will not actually work. So only clear the session here if we're
not going to re-try authentication.
Don't set VNC display to ready until vnc is initialized
We were setting the show_hint to READY as soon as we got the vnc-connected
signal. But there may be an authentication step between vnc-connected and
vnc-initialized. In this case, we switch to an empty black display during the
authentication step instead of showing the 'waiting for display N' status.
Don't hide the main window when disconnecting
The main window (display #1) is treated a bit differently from other windows,
since it is opened at app start and displays status messages while we attempt to
connect to the remote guest. As such, it should really stay open as long as the
app is running.
The impetus for this change is the following:
- user attempts to connect to a remote VNC display with a password
- user types the wrong password
- A dialog pops up indicating that authentication failed and asking if the user
would like to try to re-connect.
- User clicks 'Yes'
- Because the connection was disconnected, all windows are closed
- remote-viewer tries to reconnect again, at which point a new display window is
opened, and the window gets placed by the window manager (possibly on another
monitor altogether).
As a user, I expect the program to simply re-use the existing window when trying
to re-authenticate, instead of having the window disappear and then re-appear at
a different location. This patch accomplishes that.
Move vnc-specific auth logic to VirtViewerSessionVnc
2014-02-11 Jonathon Jongsma
Improve window title when connected to newer spice-server
Recent spice servers send the guest vm name and uuid to the client. We can use
these values to display the proper vm name in the window title if a title is not
specified on the commandline. We can also be smarter about the title in
virt-viewer as well.
If a title is specified on the comamndline (-t/--title=foo), we use that. If not,
we fall back to the vm name. If that is empty, we fall back to the uri of the
connection.
Comparison between old behavior and new behavior
Using new spice-server
Command Old title New title
------- --------- ---------
remote-viewer -t xyz spice://host:port xyz xyz
remote-viewer spice://host:port spice://host:port
virt-viewer
virt-viewer
Using old spice-server
Command Old title New title
------- --------- ---------
remote-viewer -t xyz spice://host:port xyz xyz
remote-viewer spice://host:port spice://host:port spice://host:port
virt-viewer
virt-viewer
Display warning if UI file fails
When trying to load ui files, we try to find the file in several directories.
If a file is not found in one directory, try to load it from the next directory.
However, if a file is found in a directory but we are not able to load it (e.g.
due to unsupported versions of glade used to generate it, etc), we should print
a warning to the terminal to help the developer debug the issue.
This is an unexpected failure (whereas not finding the file in that directory at
all is an 'expected' failure).
2014-01-24 Daniel P. Berrange
Update for 0.6.0 release
Refresh translations
Fix virt-viewer.exe on win32
Libvirt uses gnulib for making winsock look like POSIX
sockets. This means that in the libvirt event handle
callbacks the application will be given a file descriptor
rather than a winsock HANDLE object. The g_io_channel_unix_new
method will detect that it is an FD and delegate to the
g_io_channel_win32_new_fd method. Unfortunately the glib Win32
event loop impl is not very good at dealing with FD objects,
simulating poll() by doing a read() on the FD :-(
The API docs for g_io_channel_win32_new_fd say
"All reads from the file descriptor should be done by
this internal GLib thread. Your code should call only
g_io_channel_read()."
This isn't going to fly for libvirt, since it has zero
knowledge of glib at all, so is just doing normal read().
Fortunately we can work around this problem by turning
the FD we get from libvirt back into a HANDLE using the
_get_osfhandle() method.
Don't use --nodeps for developer builds
Only use --nodeps when running under the autobuild engine
2014-01-20 Jonathon Jongsma
Load ui files first from installed location
virt_viewer_util_load_ui() looks first in the current directory, and then looks
in the system data dirs for a ui file to load, but if you install virt-viewer in
a different prefix, it will load the system UI file rather than the one from the
install prefix. Try to load the ui file from pkgdatadir first.
2014-01-07 Marc-André Lureau
Clear global zoom-reset hotkey too
Fix rebuild of accelerators menu when loading from file
It's not enough to set the property to notify of its change. Add a
virt_viewer_app_set_enable_accel() helper, and call it after the changes
to accelerators are made when loading from file.
I verified the menu is correctly built when connection from controller
or command line too.
2013-12-19 Christophe Fergeau
Disable mime database update during make distcheck
Updating the mime database creates files in the install directory, and
these files are not cleaned up on make uninstall, so this causes a make
distcheck failure.
2013-12-18 Christophe Fergeau
spec: Get BuildRequires min versions from configure.ac
We currently duplicate the minimum requirements for the various virt-viewer
dependencies in configure.ac, virt-viewer.spec.in and mingw-virt-viewer.spec.in
This commit uses the versions set in configure.ac in the 2 .spec.in files
so that it's easier to keep them in sync
Before/after diff of the .spec files are:
--- virt-viewer.spec.or 2013-12-18 14:14:14.304285905 +0100
+++ virt-viewer.spec 2013-12-18 14:19:20.217072678 +0100
@@ -47,14 +47,14 @@
BuildRequires: libtool
%endif
-BuildRequires: glib2-devel >= 2.22
+BuildRequires: glib2-devel >= 2.22.0
%if %{with_gtk3}
-BuildRequires: gtk3-devel >= 3.0.0
+BuildRequires: gtk3-devel >= 3.0
%else
-BuildRequires: gtk2-devel >= 2.12.0
+BuildRequires: gtk2-devel >= 2.18.0
%endif
-BuildRequires: libvirt-devel >= 0.9.7
-BuildRequires: libxml2-devel
+BuildRequires: libvirt-devel >= 0.10.0
+BuildRequires: libxml2-devel >= 2.6.0
%if %{with_gtk3}
BuildRequires: gtk-vnc2-devel >= 0.4.0
%else
--- mingw-virt-viewer.spec.or 2013-12-18 14:14:23.656401693 +0100
+++ mingw-virt-viewer.spec 2013-12-18 14:20:57.007270507 +0100
@@ -12,22 +12,22 @@
BuildRequires: mingw32-filesystem >= 23
BuildRequires: mingw64-filesystem >= 23
-BuildRequires: mingw32-glib2 >= 2.22
-BuildRequires: mingw64-glib2 >= 2.22
+BuildRequires: mingw32-glib2 >= 2.22.0
+BuildRequires: mingw64-glib2 >= 2.22.0
BuildRequires: mingw32-gstreamer-plugins-bad-free
BuildRequires: mingw64-gstreamer-plugins-bad-free
BuildRequires: mingw32-gstreamer-plugins-good
BuildRequires: mingw64-gstreamer-plugins-good
-BuildRequires: mingw32-gtk2
-BuildRequires: mingw64-gtk2
+BuildRequires: mingw32-gtk2 >= 2.18.0
+BuildRequires: mingw64-gtk2 >= 2.18.0
BuildRequires: mingw32-libusbx
BuildRequires: mingw64-libusbx
-BuildRequires: mingw32-libvirt >= 0.9.7
-BuildRequires: mingw64-libvirt >= 0.9.7
-BuildRequires: mingw32-libxml2
-BuildRequires: mingw64-libxml2
-BuildRequires: mingw32-gtk-vnc >= 0.4.3
-BuildRequires: mingw64-gtk-vnc >= 0.4.3
+BuildRequires: mingw32-libvirt >= 0.10.0
+BuildRequires: mingw64-libvirt >= 0.10.0
+BuildRequires: mingw32-libxml2 >= 2.6.0
+BuildRequires: mingw64-libxml2 >= 2.6.0
+BuildRequires: mingw32-gtk-vnc >= 0.3.8
+BuildRequires: mingw64-gtk-vnc >= 0.3.8
BuildRequires: mingw32-readline
BuildRequires: mingw64-readline
BuildRequires: mingw32-spice-glib
Update spice-gtk requirement everywhere
d1c2bc1 updated configure.ac spice-gtk requirement to 0.22, but did not
update the various places which duplicated this requirement, namely the
.spec.in files and the README file.
Update shared mime database on install/uninstall
remomte-viewer installs a file to $datadir/share/mime to register a
mime-type for its .vv files. However, after installing this file,
update-mime-database must be run in order to update the shared mime
database. This commit (inspired by what Nautilus/planner are doing) adds
what is needed for that.
If the mime type is not correctly registered, gvfs-info console.vv will not
return the correct mime type, and xdg-open console.vv will fail to start
remote-viewer, and will fall back to running gedit as the .vv file is a
text file.
https://bugzilla.redhat.com/show_bug.cgi?id=1044209
2013-12-16 Jonathon Jongsma
Enable the display before showing the window
This ensures that the display is enabled when it gets its first Allocate event
(which causes a display reconfiguration). If the display is not enabled at this
point, it won't send down a new monitors_config message until the second
allocation, which may result in the display being disabled until a window is
resized.
2013-12-16 Marc-André Lureau
build-sys: require spice-gtk >= 0.22
Require 0.22 fro spice_uuid_to_string()
2013-12-13 Christophe Fergeau
Disable govirt support on f19
The govirt package in f19 is an older one, and does not have some of the
functions used since the switch to govirt 0.3.0. As 0.3.0 broke ABI, it's
not convenient to backport it to f19.
Update the spec file to reflect the fact that oVirt support in git is no
longer buildable on f19.
2013-12-10 Marc-André Lureau
app: remove useless warning
This warning should have been removed with 20eb200c.
https://bugzilla.redhat.com/show_bug.cgi?id=1021350
remote-viewer: add desktop icon
Associate an icon to desktop menu entry.
https://bugzilla.redhat.com/show_bug.cgi?id=1020359
2013-12-10 Jonathon Jongsma
Remove obsolete function declaration
This function was removed in bd914bdea2e85d62d5f67eb567ce200f526c6bab, but the
declaration was missed.
2013-11-27 Jonathon Jongsma
Create a sparse array for monitor-geometry-changed
It's possible to have only display N enabled without having all of the displays
before it. I experienced this a couple times with a windows guest where display
1 would show up before display 0 and we'd hit a warning that nth is not less
than nmonitors. So find the highest display ID and then create an array of that
size, leaving missing displays initialized to 0
Don't re-configure displays when show-hint changes
This caused secondary displays on a windows guest to flicker under some
circumstances. The old code didn't re-configure displays in this case either, so
it shouldn't have been included in the display alignment refactor.
Do all display alignment in virt-viewer
Don't rely on spice-gtk to do any alignment of displays. This patch sets the
disable-display-align property on the SpiceMainChannel, and makes the
VirtViewerSession in charge of doing all alignment. This means that every
display has to tell the VirtViewerSession when its "virtual monitor" has changed
configuration (and wants to reconfigure its display on the guest), rather than
sending it directly to the Main Channel. The session will then align the
displays (if necessary), and the spice session will send down new configuration
for all displays at once. This solves a couple of problems:
1. It allows the session to send down absolute coordinates only in the case
where *all* windows are fullscreen (so that we can still support
vertically-stacked displays, etc). But it auto-aligns displays if only a
subset of the displays are in fullscreen mode. This solves the problem of
overlapping regions on different displays when one monitor is in fullscreen
because only one monitor's configuration was updated and the others were not
aligned.
2. Allows us to always align based on the current position of each display. This
contrasts with the earlier behavior where the position used for alignment was
the window's position at the time when it was last resized. This caused
displays to be arranged in a seemingly non-deterministic manner if one window
was moved and then another window was resized (causing a display
re-configuration).
Solves rhbz#1002156
2013-11-21 Jonathon Jongsma
Ensure all windows obey initial --zoom setting
There are cases where multiple VirtViewerWindow objects are created before the
VirtViewerApp constructor has a chance to run. Since the constructor has not yet
run, priv->main_window will still be NULL, the test in
virt_viewer_app_window_new() will fail, and they will not get their initial zoom
level set. When the constructor finally runs, it set the zoom level of the main
window to the value set on the command line, but all other windows that had
already been created retained the default 100% zoom level.
By creating the main_window in the instance init function, we ensure that the
main window is created before we get any 'session-display-added' signals and all
displays will start out with consistent zoom levels.
Remove non-functional VIRT_VIEWER_HIDE env behavior
VIRT_VIEWER_HIDE could be set as an environment variable to (theoretically) hide
displays whenever they were not ready. Unfortunately, this bit of functionality
appears bitrotten and doesn't work anymore (it prevents windows from opening
when you click 'view > displays > display 2', for instance).
2013-11-20 Jonathon Jongsma
separate fullscreen_set_active into a separate function
Ensure auto-conf is only done once
Auto-conf should only happen at startup. It is triggered from several places due
to the somewhat unreliable ordering of events, but that doesn't mean we want to
run it several times. This patch ensures that we only do it once.
Add ability to define custom display->monitor mapping per vm
Fullscreen mode generally just assigns display 1 to monitor 1, display 2 to
monitor 2, etc. For custom setups, you can define a monitor mapping in the
settings keyfile per-vm. This requires a vm uuid (so only works in virt-viewer
or on versions of spice-server that send the uuid over the wire). The format is
pretty basic:
[6485b20f-e9da-614c-72b0-60a7857e7886]
monitor-mapping=2;3
The group name ("6485b20f-e9da-614c-72b0-60a7857e7886") is the uuid id of the
vm. This group has a single key: monitor-mapping. This key is an array of
integers describing the order in which to assign the monitors to a guest
display. Any monitors that are not listed in this array will not be configured
at startup. For instance:
monitor-mapping=2;1
will attempt to configure 2 displays on the guest and assign the first display
to monitor 2 and the second display to monitor 1.
monitor-mapping=2
will only configure a single display on the guest and place it on the second
monitor. Any monitor numbers listed in the keyfile are greater than the number
of monitors that are physically present, they will be ignored.
2013-11-20 Christophe Fergeau
Fix leak of VirtViewerApp::windows hash table key
The VirtViewerApp::windows hash table owns the memory for both the keys
and values it stores. virt_viewer_app_remove_nth_window() uses
g_hash_table_steal() which does not call the 'free' function neither for
the key nor for the value. This method takes care of releasing the
reference for the value it extracted from the hash table, but not for the
key.
This commit fixes by explicitly taking a reference on the value rather than
stealing the one held by the hash table. We can then replace the use of
g_hash_table_steal() with g_hash_table_remove() which will take care of
freeing the removed key.
session: Don't hold VirtViewerDisplay refs on channel destroy
VirtViewerSessionSpice creates a reference-holding VirtViewerDisplay
array and associates it with the display SpiceChannel with
g_object_set_data(channel, "virt-viewer-displays").
When virt_viewer_session_spice_channel_destroy() is called and the display
channel is being destroyed, we should ensure these VirtViewerDisplay
references are dropped or the displays could outlive the session.
In my testing (start qemu with a f20 live cd, connect to it, when the
kernel has started booting and qxl is initialized (4 displays listed in the
display submenu), kill qemu), I was getting "invalid unclassed pointer in
cast to 'VirtViewerSessionSpice'" warnings through
#0 0x00000035bac504e9 in g_logv (log_domain=0x35bb039aa4 "GLib-GObject",
log_level=G_LOG_LEVEL_WARNING, format=,
args=args@entry=0x7fffffffc7c0) at gmessages.c:989
#1 0x00000035bac5063f in g_log (
log_domain=log_domain@entry=0x35bb039aa4 "GLib-GObject",
log_level=log_level@entry=G_LOG_LEVEL_WARNING,
format=format@entry=0x35bb041010 "invalid unclassed pointer in cast to '%s'")
at gmessages.c:1025
#2 0x00000035bb032e09 in g_type_check_instance_cast (type_instance=0x665580,
iface_type=) at gtype.c:4025
#3 0x0000000000426e9f in get_main (self=0x894190) at virt-viewer-display-spice.c:92
#4 0x0000000000426ece in show_hint_changed (self=0x894190)
at virt-viewer-display-spice.c:100
#5 0x00000035bb010298 in g_closure_invoke (closure=0x9f47c0,
return_value=return_value@entry=0x0, n_param_values=2,
param_values=param_values@entry=0x7fffffffcad0,
invocation_hint=invocation_hint@entry=0x7fffffffca70) at gclosure.c:777
#6 0x00000035bb02235d in signal_emit_unlocked_R (node=node@entry=0x651f60,
detail=detail@entry=1782, instance=instance@entry=0x894190,
emission_return=emission_return@entry=0x0,
instance_and_params=instance_and_params@entry=0x7fffffffcad0) at gsignal.c:3586
#7 0x00000035bb02a0f2 in g_signal_emit_valist (instance=,
signal_id=, detail=,
var_args=var_args@entry=0x7fffffffcc60) at gsignal.c:3330
#8 0x00000035bb02a3af in g_signal_emit (instance=,
signal_id=, detail=) at gsignal.c:3386
#9 0x00000035bb014945 in g_object_dispatch_properties_changed (object=0x894190,
n_pspecs=92, pspecs=0x0) at gobject.c:1047
#10 0x00000035bb017019 in g_object_notify_by_spec_internal (pspec=,
object=0x894190) at gobject.c:1141
#11 g_object_notify (object=0x894190, property_name=) at gobject.c:1183
#12 0x000000000041b617 in virt_viewer_display_set_show_hint (self=0x894190, mask=1,
enable=0) at virt-viewer-display.c:659
#13 0x000000000042712c in update_display_ready (self=0x894190)
at virt-viewer-display-spice.c:156
#14 0x00000035bb010298 in g_closure_invoke (closure=0x6ba480,
return_value=return_value@entry=0x0, n_param_values=2,
param_values=param_values@entry=0x7fffffffcfb0,
invocation_hint=invocation_hint@entry=0x7fffffffcf50) at gclosure.c:777
#15 0x00000035bb02235d in signal_emit_unlocked_R (node=node@entry=0x651f60,
detail=detail@entry=1798, instance=instance@entry=0xa2c250,
emission_return=emission_return@entry=0x0,
instance_and_params=instance_and_params@entry=0x7fffffffcfb0) at gsignal.c:3586
#16 0x00000035bb02a0f2 in g_signal_emit_valist (instance=,
signal_id=, detail=,
var_args=var_args@entry=0x7fffffffd140) at gsignal.c:3330
#17 0x00000035bb02a3af in g_signal_emit (instance=,
signal_id=, detail=) at gsignal.c:3386
#18 0x00000035bb014945 in g_object_dispatch_properties_changed (object=0xa2c250,
n_pspecs=92, pspecs=0x0) at gobject.c:1047
#19 0x00000035bb017019 in g_object_notify_by_spec_internal (pspec=,
object=0xa2c250) at gobject.c:1141
#20 g_object_notify (object=0xa2c250, property_name=) at gobject.c:1183
#21 0x00007ffff7044d9a in update_ready (display=0xa2c250) at spice-widget.c:257
#22 0x00007ffff7044df0 in set_monitor_ready (self=0xa2c250, ready=0)
at spice-widget.c:265
#23 0x00007ffff7049bb3 in primary_destroy (channel=0x9f40b0, data=0xa2c250)
at spice-widget.c:2131
#24 0x00007ffff704afd5 in channel_destroy (s=0x892880, channel=0x9f40b0, data=0xa2c250)
at spice-widget.c:2444
#25 0x00000035bb010298 in g_closure_invoke (closure=0xa27850,
return_value=return_value@entry=0x0, n_param_values=2,
param_values=param_values@entry=0x7fffffffd570,
invocation_hint=invocation_hint@entry=0x7fffffffd510) at gclosure.c:777
#26 0x00000035bb02235d in signal_emit_unlocked_R (node=node@entry=0x7cf600,
detail=detail@entry=0, instance=instance@entry=0x892880,
emission_return=emission_return@entry=0x0,
instance_and_params=instance_and_params@entry=0x7fffffffd570) at gsignal.c:3586
#27 0x00000035bb02a0f2 in g_signal_emit_valist (instance=,
signal_id=, detail=,
var_args=var_args@entry=0x7fffffffd700) at gsignal.c:3330
#28 0x00000035bb02a3af in g_signal_emit (instance=,
signal_id=, detail=) at gsignal.c:3386
#29 0x00007ffff6ceba87 in spice_session_channel_destroy (session=0x892880,
channel=0x9f40b0) at spice-session.c:1923
#30 0x00007ffff6cecf05 in spice_channel_dispose (gobject=0x9f40b0)
at spice-channel.c:149
#31 0x00007ffff6cf912c in spice_display_channel_dispose (object=0x9f40b0)
at channel-display.c:136
#32 0x00000035bb014ee8 in g_object_unref (_object=0x9f40b0) at gobject.c:3160
#33 0x00007ffff6cf300c in spice_channel_delayed_unref (data=0x9f40b0)
at spice-channel.c:2135
#34 0x00000035bac492a6 in g_main_dispatch (context=0x67a6b0) at gmain.c:3066
#35 g_main_context_dispatch (context=context@entry=0x67a6b0) at gmain.c:3642
#36 0x00000035bac49628 in g_main_context_iterate (context=0x67a6b0,
block=block@entry=1, dispatch=dispatch@entry=1, self=)
at gmain.c:3713
#37 0x00000035bac49a3a in g_main_loop_run (loop=0x7baf60) at gmain.c:3907
#38 0x00000035bfdaa2d5 in gtk_main () at gtkmain.c:1158
#39 0x000000000042caf1 in main (argc=1, argv=0x7fffffffdc78) at remote-viewer-main.c:179
In that backtrace, the last ref to the VirtViewerDisplay instances is held by the
SpiceChannel:virt-viewer-displays object data which will only be released after
completion of spice_display_channel_dispose()
Remove obsolete use of SpiceChannel:virt-viewer-display object data
Commit 0d58d9c72 removed the setting of the
SpiceChannel:virt-viewer-display object data, but there was still a
call to g_object_get_data() trying to use it. Since it's only used to
output a debug log, we can remove this call and fix up the debug log.
2013-11-13 Christophe Fergeau
Hide all windows on disconnection
When starting remote-viewer without argument, we are showing a
window where the user can enter connection details. We then
go on to try and connect to the URI the user specified, and if
the connection fails, we disconnect from the remote server, and then
we show again the connection window so that the user can correct the
URI if he entered it wrong.
However, when this happens, the window for the previous connection
will still be visible even if connection failed. To avoid this,
this commit makes sure we hide all windows when we get a disconnection
event.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1024309
Reshow connection dialog on errors
remote-viewer behaviour is currently inconsistent in the connection dialog:
if the user enters a valid URI, but then remote-viewer fails to connect
to it, then we'll show again the connection dialog through a call
to virt_viewer_app_start() in remote_viewer_deactivated(). If instead we
enter an invalid URI in the connection dialog, then remote-viewer will
report an error and quit.
This commit makes sure in the latter case, we report the error and show
again the connection dialog. The user can press 'Cancel' in the
connection dialog to get out of remote-viewer as in this case, we
return directly FALSE rather than going through the cleanup: label
and looping.
Handle virt_viewer_app_start() errors
remote_viewer_deactivated() can be calling virt_viewer_app_start()
without checking whether it returns TRUE or FALSE. It returns FALSE
when it was not successful (when it failed to parse the URI to connect
to for example, or whe the user presses Cancel in the connection dialog).
This means that if the user starts remote-viewer, enters a valid URI
in the connection dialog to which it cannot connect to
(spice://example.com:999) and then presses Cancel in the connection
dialog that appears after the connection failure, then remote-viewer
will be sitting there with an empty window doing nothing.
This commit ensures we chain to the parent class when
virt_viewer_app_start() returns FALSE, which causes remote-viewer to
exit.
Fix window title after failed connection
When using the connection dialog, if the user picks an invalid
URI first causing a failed connection, and then picks/enters a valid
URI, remote-viewer window title will be set to the first invalid URI,
not to the second one which was entered.
As the user may have specified a window title to use on the command
line (-t option), we need to be careful not to override that when
setting the window title on the second attempt.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1024309
build-sys: Use gtk+ 3.0 by default
virt-viewer currenty builds with gtk+ 2.0 by default. Nowadays, gtk+ 2.0 is
legacy, and this default is inconsistent with spice-gtk which defaults to
gtk+ 3.0. This commit switches the default to gtk+ 3.0
2013-11-13 Jonathon Jongsma
Disconnect fullscreen map-event handler when leaving fullscreen
When we enter fullscreen mode before the window is shown, we set up a signal
handler to enter fullscreen mode when the window is mapped. If we then leave
fullscreen mode before the window is mapped, we don't disconnect this handler,
so it will still enter fullscreen mode when it is shown.
Fixes rhbz #1009513
Drop basic fullscreen mode
Remove the distinction between --full-screen and --full-screen=auto-conf. Just
make --full-screen behave like auto-conf did. There's really no advantage to
having two slightly different fullscreen startup modes.
2013-11-07 Marc-André Lureau
Unify configured hotkey behaviour
Whether the hotkeys are set through command line, controller or file, we
should get the same keybinding result (clear unspecified, and enable
global bindings)
However, when started from command line arguments, without --hotkey
argument, it will have basic non-global default bindings.
https://bugzilla.redhat.com/show_bug.cgi?id=1023447
file: learn to set secure-attention hotkey
Rename internal toggle-fullscreen menu accel name
This avoid confusion with other fullscreen state property
file: factor a bit setting accelerators code
2013-10-30 Christophe Fergeau
ovirt: Only set SPICE CA cert if it's non NULL
We currently reuse the oVirt CA cert for SPICE connection as well,
but it may not be set. When this happens, we don't want to try to use
it.
ovirt: Don't automatically download CA certificate
The CA certificate to use to authenticate the various hosts in
an oVirt instance can be fetched from https://ovirt.example.com/ca.crt.
However, the gio API we are using does not seem to be checking the
server-side certificate of ovirt.example.com before connecting to it,
which could lead to man-in-the-middle attacks. Now that the CA
certificate to use can be specified from the command line using
--ovirt-ca-file, we can remove this automatic fetching of the CA
certificate.
ovirt: Honour oVirt command line options
libgovirt 0.3.0 and newer can be passed from the commandline a CA
certificate to use during SSL communications. This commit adds support
for this option to remote-viewer.
ovirt: Remove use of deprecated APIs
ovirt_proxy_fetch_vms/ovirt_proxy_lookup_vm have been deprecated
in govirt 0.3.0
2013-10-29 Christophe Fergeau
Clean-up spaces before/after URI in connection dialog
When starting remote-viewer with no argument, a connection dialog
is shown. If the URI the user types in this dialog as trailing
or leading spaces, then connection will fail because remote-viewer
will keep them as if they were significant.
This commit makes sure we remove spaces at the beginning/end of
the URI before trying to use it.
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1024199
Fix 'quiting' typo in VirtViewerApp private member
Fix typo in manpage
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=823916
2013-10-18 Jonathon Jongsma
Make 'Send' menu items with defined accels work in fullscreen
Set Spice display to fullscreen if owning window is pending fullscreen
When you call virt_viewer_window_enter_fullscreen() on a hidden window, it
didn't actually change its fullscreen state. Instead, it sets up a map-event
handler to enter fullscreen after it is shown. When _set_display() is called on
a window that is pending fullscreen status, it initially sets the fullscreen
state of the display to FALSE, which can cause an unwanted resize to be sent
down to the guest. This patch changes the behavior to set its fullscreen state
to TRUE even before the window is shown.
Don't freeze property notifications when adding new displays
Freezing property notifications prevents VirtViewerDisplaySpice from
synchronizing its fullscreen/auto-resize state with the base class until after
the notifications are thawed. During the time that notifications were frozen,
an allocation happens. The action we take on an allocation event depends on the
current state of the auto_resize variable, so this can result in an unwanted
resize.
VirtViewerDisplaySpice: use enum type for auto_resize
Instead of storing the auto_resize member as an integer, use the enum, it makes
it slightly easier for debugging. Also, explicitly initialize the value.
Avoid extra zoom-level property notifications
When setting a display's zoom level to the same level as the current setting,
return early so that we don't notify about a property change
Don't disable fullscreen if kiosk mode is off
This conflicts with the --full-screen switch, because if kiosk mode is disabled,
it sets disables fullscreen mode, which overrides the earlier call to enable
fullscreen.
2013-10-16 Christophe Fergeau
Make 'Cancel' the default action in exit dialog
In the 'Do you want to close the session dialog?', the default focus
is currently on the 'Do not ask me again' checkbox.
The purpose of this dialog is to make sure that the user does not
inadvertantly exit remote-viewer, this commit changes the default
action in this dialog to be 'cancel' rather than switching the
'Do not ask me again 'checkbox.
vnc: Clear all displays before creating dummy display
If VirtViewerSessionVnc::disconnected is called because of an
authentication failure, we get:
(remote-viewer:29588): gtk-vnc-DEBUG: vncdisplay.c Disconnected from VNC server
(remote-viewer:29588): Gtk-WARNING **: Attempting to add a widget with type
VncDisplay to a container of type VirtViewerDisplayVnc, but the widget is
already inside a container of type VirtViewerDisplayVnc, please use
gtk_widget_reparent()
#0 0x0000003136e50499 in g_logv (log_domain=0x3f2e13e143 "Gtk",
log_level=G_LOG_LEVEL_WARNING, format=,
args=args@entry=0x7fffffffd210) at gmessages.c:989
#1 0x0000003136e505ef in g_log (log_domain=, log_level=,
format=) at gmessages.c:1025
#2 0x00000000004230eb in virt_viewer_display_vnc_new (vnc=0x8a8250)
at virt-viewer-display-vnc.c:169
#3 0x0000000000422191 in virt_viewer_session_vnc_disconnected (vnc=0x8a8250,
session=0x86bf00) at virt-viewer-session-vnc.c:113
#4 0x00000031372104c7 in _g_closure_invoke_va (closure=closure@entry=0x8ad2b0,
return_value=return_value@entry=0x0, instance=instance@entry=0x8a8250,
args=args@entry=0x7fffffffd530, n_params=0, param_types=0x0) at gclosure.c:840
#5 0x0000003137229749 in g_signal_emit_valist (instance=0x8a8250,
signal_id=, detail=0, var_args=var_args@entry=0x7fffffffd530)
at gsignal.c:3238
#6 0x000000313722a3af in g_signal_emit (instance=,
signal_id=, detail=) at gsignal.c:3386
#7 0x00007ffff7dbeb5a in on_disconnected (conn=0x8b5aa0, opaque=0x8a8250)
at vncdisplay.c:1563
#8 0x00000031372104c7 in _g_closure_invoke_va (closure=closure@entry=0x7d55f0,
return_value=return_value@entry=0x0, instance=instance@entry=0x8b5aa0,
args=args@entry=0x7fffffffd820, n_params=0, param_types=0x0) at gclosure.c:840
#9 0x0000003137229749 in g_signal_emit_valist (instance=0x8b5aa0,
signal_id=, detail=0, var_args=var_args@entry=0x7fffffffd820)
at gsignal.c:3238
#10 0x000000313722a3af in g_signal_emit (instance=,
signal_id=, detail=) at gsignal.c:3386
#11 0x00007ffff7b97308 in do_vnc_connection_emit_main_context (opaque=0x7fffe3c91f40)
at vncconnection.c:578
#12 0x0000003136e49256 in g_main_dispatch (context=0x681840) at gmain.c:3065
#13 g_main_context_dispatch (context=context@entry=0x681840) at gmain.c:3641
#14 0x0000003136e495d8 in g_main_context_iterate (context=0x681840,
block=block@entry=1, dispatch=dispatch@entry=1, self=)
at gmain.c:3712
#15 0x0000003136e499ea in g_main_loop_run (loop=0x830430) at gmain.c:3906
#16 0x0000003f2dfa8f75 in gtk_main () at gtkmain.c:1158
#17 0x0000000000429bf3 in main (argc=1, argv=0x7fffffffdcd8) at remote-viewer-main.c:179
This commit calls virt_viewer_session_clear_displays() before creating a dummy VNC display with
virt_viewer_display_vnc_new(), which avoids this warning.
2013-09-26 Marc-André Lureau
hotkeys: send modifiers before non-modifier key
This fixes the "send menu" for hotkeys set with non-modifiers keys. The
current order of press events is wrong, as it sends first non-modifiers
keys, and in general ctrl+t will work, t+ctrl will not.
https://bugzilla.redhat.com/show_bug.cgi?id=846006
2013-09-13 Christophe Fergeau
spec: Enable ovirt support on RHEL7 as well
spec: Group %define spice together
The rhel and fedora %define for enabling spice were separated, we
can group them for better readability.
spec: Build with gtk+3 on rhel7+
2013-09-10 Jonathon Jongsma
Update hotkeys documentation in manpage
Describe the expected behavior of the hotkey bindings in a bit more detail.
Add ability to use 'End' key in hotkeys
ctrl_key_to_gtk_key() capitalizes all key names not explicitly specified in the
translation table. So 'end' becomes 'END', which is not a valid key name
according to GTK+. Un-comment out the 'end' item from the table and set it to
the properly capitalized key name ("End").
This allows users to specify e.g. "ctrl+alt+end" as a hotkey for
sending the secure attention sequence.
Add ability to send Secure attention sequence via keyboard
On Windows, the OS doesn't allow applications to handle Ctrl+Alt+Del, because
it's handled by the OS at a much lower level. Although we have a menu item to
send this sequence to the guest, it's not possible to send via the keyboard (in
the windows client). So add an alternative key sequence (defaulting to
Ctrl+Alt+End) to send this sequence to the guest.
2013-08-20 Marc-André Lureau
kiosk: explicit resize window to fullscreen size
Allow to run the client in kiosk mode with window-manager-less
environment.
This was a conditional workaroud on win32. I am making it
non-conditional to make fullscreen work on non-wm environment. Hence
I don't see the need to refer explicitely to the bug workaround, since
it is no longer something that should be removed, even when bgo 652049
is fixed.
kiosk: don't open extra monitors
In kiosk mode, we don't want new monitors windows that wouldn't fit on
the client monitors to come up.
kiosk: warn and prevent if app want to quit or window to hide
These condition shouldn't happen, they are here for debugging
purposes (ie file a bug if it happens).
kiosk: add --kiosk-quit option
In kiosk mode, it's useful to keep the app alive, even if the remote
session ended for example. Ie, we want to prevent the app from quiting
itself, even if the remote end closed, lost network, or crashed etc.
kiosk: teach a window to become kiosk-mode
Remove the toolbar, disable modifiers.
kiosk: keep a reference on the toolbar
We are going to change the container content dynamically, so we need a
strong reference.
kiosk: use less verbose window/display status
We want extra windows to remain blank after connection.
For example, if the remote has a single monitor, and client has more, we
don't want extra client monitors to say "Connected to graphic server"
all the time on other monitors. Instead, we leave them empty/black in
kiosk mode.
kiosk: open a window on each client monitor
Open a window on each client monitor in fullscreen. If the remote
display has less monitors than the client, the extra client monitors
will still be used to prevent the user from accessing the windows or
desktop below, and also to show some status messages when necessary.
kiosk: add app kiosk option, pass it down to window
See man page update for details.
Return existing window in app_window_new()
Since the returned window is weak, it can already returns existing
windows (instead of creating one and failing to insert).
This allows the following set_kiosk() function to create a main window
before the app constructor is called.
Define the min/max zoom levels, so all values are sync
Try to share more GOption code between r-v and v-v
2013-08-14 Marc-André Lureau
remote-viewer: remove -d direct option
remote-viewer currently doesn't provide automatic ssh tunnels, and even if
it would, that would be explicit in the url given to remote-viewer (such
as spice+ssh://...)
https://bugzilla.redhat.com/show_bug.cgi?id=991261
2013-08-08 Marc-André Lureau
man: add application/x-virt-viewer file format description
https://bugzilla.redhat.com/show_bug.cgi?id=970825
spice: show an error dialog if password is invalid
Error message should show up when input the wrong password for spice
guests as vnc guests.
https://bugzilla.redhat.com/show_bug.cgi?id=990883
2013-07-31 Daniel P. Berrange
Update NEWS for 0.5.7 release
Update min spice-gtk dep to 0.20
The spice_smartcard_manager_get_readers method was only added
in spice-gtk 0.20.
2013-07-31 Christophe Fergeau
Enable smartcard shortcuts when a software reader is present
At the moment, smartcard keyboard accelerators are always enabled when
specified, even if no software smartcard reader is in use. This commit only
enables the smartcard keyboard accelerators when a smartcard reader
has been found. This fixes rhbz#866944
Add VirtViewerSession::software-smartcard-reader property
This property will be set to TRUE when a software smartcard reader
is available, and FALSE otherwise. This property can only be TRUE
when using SPICE and when smartcard support is enabled, and when
both smartcard certificates and smartcard db directory are set.
2013-07-31 Daniel P. Berrange
Fix two type cast problems
The g_array_free() return value is 'char *' rather than 'void *'
so must be explicitly cast to 'uint8 *'.
The accelerator menu callback data is a GtkMenu rather GtkWidget
2013-07-30 Marc-André Lureau
window: auto-add hot key combos to "Send key" menu
Auto-add hotkey combos to "Send key" menu. Because they are captured by
virt-viewer, there is currently no way to pass them to the guest.
https://bugzilla.redhat.com/show_bug.cgi?id=846006
window: use dynamically generated menu
Remove the static Glade menu in favour of the one generated dynamically
already used for the toolbar.
window: use a menu item property for key combos
Allow to add dynamically generated key combos later on.
This also removes the extra combo lookup, which used to be problematic
due to translations etc.
compat: add a few GDK_Key defines
file: add missing field comment
Remove restore window location code
It turns out gdk on win32 already restores properly the window
size/positon when leaving fullscreen. On non-win32, the WM should
do the job.
This solves the first window having too small size after leaving fullscreen:
https://bugzilla.redhat.com/show_bug.cgi?id=978362
win32: fix first window un-shrinkable at start
The fix 0dca975d64fcf0782ec7b3e3bd965f1bcf47c528 make the first window
unshrinkable right after start. Wait until the window is mapped and
remove the dirty-resizable state after (win32/gtk2).
Make zoom-reset a global key binding
spice: if zoom-level is changed, resize guest, even in fullscreen
spice: factor out spice resize code from gtk signal handler
This will allow that part of the code to be called with a different
resize-guest setting.
msi: use ProductVersion compatible with Windows Installer
Windows Installer expects version of form major.minor.build in order to
perform updates.
Following Daniel Berrange suggestion, compute a ProductVersion
compatible with this scheme by shifting virt-viewer "micro" release
number and adding the extra "buildid".
wxs: add usb.ids and keyboard-shortcuts.png
Hide extra monitors that don't fit in auto-conf
Virt-viewer sometimes opens one too many windows if the guest is
configured with more monitors than the client (the spice monitor
configuration request and the current config aren't related, so there is
some race). Instead, let's hide extra monitors that wouldn't fit in
auto-conf.
https://bugzilla.redhat.com/show_bug.cgi?id=985898
Realize the display when it's added to the window
Make sure the widget get some dimensions, so if the display is enabled
before it is actually shown, it will have non-zero size
Initialize fullscreen_monitor to invalid value
This makes it easier to debug when a window has no associated monitor.
Disable auto-conf when user toggle display
Let's get out of auto-conf mode whenever user tricks display visibility.
Remove dead function
2013-07-29 Daniel P. Berrange
Remove typo \\n in de.po translation
2013-07-29 Ján Tomko
Unregister events and callbacks on dispose
Without these libvirtd reports an error on virt-viewer shutdown:
virNetSocketReadWire:1377 : End of file while reading data: Input/output
error
2013-07-11 Christophe Fergeau
virt-viewer: Allow TLS-only SPICE connections
When trying to connect to a VM which uses SPICE with only a tls port
set:
the connection will fail with
"Cannot determine the graphic address for the guest spice"
virt_viewer_extract_connect_info() indeed assumes that if no
non-TLS port is set, then this means we are trying to connect through
an already open socket, and otherwise the connection fails.
The presence of a TLS port is only checked when a non-TLS port is set.
This commit reworks that logic to start by extracting both the non-TLS
and TLS ports (only when using SPICE for the latter), and by only trying
to parse the socket to use if none of these 2 ports is set
This fixes rhbz#982840
2013-07-09 Daniel P. Berrange
Refresh translations from transifex
2013-07-08 Marc-André Lureau
vnc: implement release_cursor()
Error reported in:
https://bugzilla.redhat.com/show_bug.cgi?id=904094
app: always use maybe_quit()
Now that closing a window is like quiting, there is no reason to ask or
skip the confirm dialog depending on how you quit (menu/toolbar/window).
https://bugzilla.redhat.com/show_bug.cgi?id=905684
2013-07-06 Hans de Goede
usbredir: Don't depend on channel ordering
Before this patch-set virt-viewer was calling spice_session_has_channel_type(
session, SPICE_CHANNEL_USBREDIR) from the session-initialized signal handler,
So as soon as the display channel gets added to the session, the check was
done. This causes the check to return FALSE for usbredir capable vms if
the usbredir channel(s) get added to the session after the display channed.
This patch refactors things to not depend on channel creation order.
2013-07-05 Marc-André Lureau
Use display fullscreen state instead of app state
This is a recent regression introduced by independant fullscreen windows
support, which reopened the bug "Resolution higher than native could not
be set in fullscreen"
https://bugzilla.redhat.com/show_bug.cgi?id=864929
window: set display fullscreen state
display: add fullscreen property
Now that fullscreen state is no longer global to application, we need to
have the current state per display
Remove debugging leftover
2013-07-04 Marc-André Lureau
data/remote-viewer.desktop: Fix missing trailing ;
data/remote-viewer.desktop: error: value
"x-scheme-handler/spice;application/x-virt-viewer" for string list key
"MimeType" in group "Desktop Entry" does not have a semicolon (';') as
trailing character
2013-07-03 Christophe Fergeau
Use -H instead of -h for the short --hotkeys
-h conflicts with the short version of --help.
Fixes rhbz#980846
2013-06-28 Marc-André Lureau
Fix build --without-spice-gtk
2013-06-26 Guido Günther
Use format string
to fix
virt-viewer.c: In function 'virt_viewer_connect':
virt-viewer.c:686:13: error: format not a string literal and no format arguments [-Werror=format-security]
g_warning(error->message);
2013-06-11 Christophe Fergeau
ovirt: Set host subject if needed
For some VMs, setting host subject on SpiceSession is needed to
be able to connect to it using SPICE/SSL. Until recently, this
was not exposed in oVirt REST API/libgovirt. Since
oVirt 3.2/libgovirt 0.1.0, the host subject is available, this
patch makes use of it.
This should fix connection to oVirt VMs that were migrated to a
different host than the one they were started on.
2013-06-04 Christophe Fergeau
spec: Add missing % in %if 0{?fedora}
This was missing in previous commit.
spec: Deprecate spice-client
This has been true for quite some time, it's high time we stop
building spicec and have remote-viewer replace it on upgrades.
2013-05-27 Marc-André Lureau
Support Spice controller "auto-display-res" flag
The controller "auto-display-res" flag should be use to reconfigure
guest to match client configuration. This is what the
--fullscreen=auto-conf option is already made for.
https://bugzilla.redhat.com/show_bug.cgi?id=967154
2013-05-24 Marc-André Lureau
man: document auto-conf fullscreen option
https://bugzilla.redhat.com/show_bug.cgi?id=875559
2013-05-23 Marc-André Lureau
Use a more descriptive FileDescription
This field is used to invite the user to close running instances, when
updating the installation with an MSI. "A remote desktop client" isn't
specific enough, use a VirtViewer specific description.
build-sys: add debug-helper rule
2013-05-22 Marc-André Lureau
app: move display on client monitors with --full-screen
There used to be a check to fullscreen the only visible display on
current monitor, by checking the number of visible monitors. Now that
fullscreen is independant for each display, and goes on current monitor,
it's useless.
However, this code path is still used for the app --full-screen, at
startup time. And it is still nicer to open the display on respective
client monitors, rather than all on current monitor.
2013-05-21 Marc-André Lureau
Fix trivial critical
GLib-CRITICAL **: g_strv_length: assertion `str_array != NULL'
Committed without review under trivial rule.
2013-05-17 Marc-André Lureau
Show connect dialog again if connection from dialog failed
https://bugzilla.redhat.com/show_bug.cgi?id=864026
spice-session: use a more robust signal connect
The Spice session may outlive the virt-viewer session, due to it's async
nature. Use the more robust virt_viewer_signal_connect_object() to fix
delayed potential crashes.
Move connect dialog to remote-viewer.c
2013-05-16 Marc-André Lureau
Silence unused arguments warnings
In file included from virt-viewer-session-spice.c:41:
gbinding.c: In function 'on_source_notify':
gbinding.c:381: warning: unused parameter 'gobject'
gbinding.c: In function 'on_target_notify':
gbinding.c:422: warning: unused parameter 'gobject'
gbinding.c: In function 'g_binding_init':
gbinding.c:709: warning: unused parameter 'binding'
Rename variable, fix gcc warning
virt-viewer-main.c:61: warning: declaration of 'basename' shadows a global declaration
Remove the "container" logic used by legacy browser plugin
window: wait until mapped before fullscreen
On RHEL6, when starting virt-viewer --full-screen, metacity will
remaximize & force-fullscreen when leaving fullscreen, which prevents
user from accessing window titlebar, and end up with an incorrect
fullscreen state.
Thanks Owen Taylor for help debugging this:
elmarco: So the interesting thing here is that the "legacy" isn't
triggered off a configure request to a particular size, mutter seems to
constrain the window back to fullscreen size on its own when it sees a
change to WM_NORMAL_HINTS
commit 4943d79d6844af3f7fc0a15ceadb69d95c4c5c61
Author: Peter Bloomfield
Date: Wed Jan 20 10:59:07 2010 -0500
prevent window self-maximisation
Is not in rhel6 metacity
So probably that's the main difference
can you just make your program not fullscreen initially but wait until
it's mapped? (gets map-event on the toplevel)
owen that seems to work
I don't have a better solution to offer - sorry for the ugliness (code and
initial mapping appearance)
https://bugzilla.redhat.com/show_bug.cgi?id=876445
Only fullscreen the new window
The current code will forcefully reset fullscreen all windows
when a new window is created
2013-05-14 Marc-André Lureau
window: leave fullscreen on current window
Since fdaa9b0ca, virt-viewer allows to fullscreen a single window. It
feels more symetric to leave a single window from fullscreen as well,
unless the application was started in fullscreen.
2013-05-14 Marc-André Lureau
window: fix send key menu popup position
Fix send key menu popup position.
The current code wasn't correctly translating the menu coordinates
based on the toplevel windows position, it was always using origin 0.
https://bugzilla.redhat.com/show_bug.cgi?id=913601
2013-05-13 Marc-André Lureau
man: document running remote-viewer without URI
https://bugzilla.redhat.com/show_bug.cgi?id=882133
Add -- to seperate program arguments to server in man / --help
Since some of the arguments are expecting following value, make it more
explicit in the man and --help that -- can seperate options from server
name or location.
https://bugzilla.redhat.com/show_bug.cgi?id=843103
Allow to fullscreen and position display independently
Currently, going from window to fullscreen mode changes all display to
fullscreen and realize automatic positionning on corresponding client
monitor. However, it allows for much more flexibility to allow entering
fullscreen on the current monitor each windows seperately. This way the
user can decide on arbitrary monitor arrangement.
https://bugzilla.redhat.com/show_bug.cgi?id=558241
spice: make sure display ready hint is sync after creation
The ready state can be set during construction time and
not notified immediately.
misc: fix typo
Do not restrict disabling display to != 0
Virt-viewer hides the display window 0, but doesn't disable the display.
This is inconsistent with other displays, and prevent the guest OS from
reconfiguring the main display.
(for monitor 0 to be really disabled in multi-monitor guest, the agent
need to support sparse monitor config. If not, the first display windows
will be reopened to match the new un-sparse configuration)
Note also the current Linux vdagent crashes when disabling 1st monitor,
to be solved seperately.
Related bug:
https://bugzilla.redhat.com/show_bug.cgi?id=958550
2013-05-03 Marc-André Lureau
remote-viewer: set auto-conf before fullscreen
If a monitor is already in fullscreen, setting auto-conf to true will
not move it until it is re-fullscreen
This was unnoticed, because usually, the first client window is opened
on the first monitor. Also we may argue than relying on g_object_set()
property order is lame and fragile, we better split it in two seperate
calls as this might break upstream.
https://bugzilla.redhat.com/show_bug.cgi?id=872288
2013-05-01 Daniel P. Berrange
Sync spec with Fedora
Post release version bump
Set PKG_CONFIG_LIBDIR variable for mingw builds
To avoid pkg-config accidentally falling back to
native versions, set the PKG_CONFIG_LIBDIR var
explicitly
Set a default value for AUTOBUILD_INSTALL_ROOT
Set MANUFACTURER env variable when running wixl
The MANUFACTURER env variable is mandatory since it is used
in the data files. wixl will exit with parser error if it
is not set
Add missing include of config.h
Remove tab from source file
Refresh translations from transifex
2013-04-30 Marc-André Lureau
file: add delete-this-file option
In case the virt-viewer setting file is meant to temporary, you may use
the delete-this-file=1 option to ask the client to remove it, once it
has been read. This is useful for example in ovirt context, where
connection settings file are generated and can't be reused.
2013-04-25 Christophe Fergeau
Exit virt-viewer when trying to close any window
Currently, in multi-screen scenarios, when closing one remote-viewer
window, the corresponding screen gets disabled in the guest OS.
This can be confusing as this behaves very differently from
File/Quit. This commit will exit the whole application when the user
tries to close one of virt-viewer window.
2013-04-23 Hans de Goede
gtk-3: Rework window size handling
With gtk-2 we have a special hack, where at first we make the
virt-viewer-display request its actual size, and then once the window is
mapped, we request a size of 50x50 to allow the user to resize the window
to something smaller.
With gtk-3 >= 3.8.1 this is broken, and the window gets resized to a
smaller size as soon as we change the size request to 50x50.
gtk-3 has a much better way of dealing with this in the form of widgets
being able to specify both a minimal and a natural size. This patch changes
virt-viewer to use this with gtk-3, instead of the gtk-2 hack.
ovBox: Make get_preferred_width/height differentiate between min and natural
gtk-3's widget size negotiation code differentiates between the minimum
size and the natural size of a widget, fix ovBox to pass this along from
its underlying widget to its parent.
virt-viewer-window: cleanup zoom handling
We've 3 similar zoom function zoom in / out / reset. in / out do not
schedule a window resize when there is no display, where as reset does,
which is not consistent. Also there is some duplicate code between them.
virt-viewer-display: Use virt_viewer_display_queue_resize where possible
2013-04-23 Marc-André Lureau
mingw spec: fix x64 msi location
2013-04-15 Marc-André Lureau
Prepeare notes for release 0.5.6
msi: build correct 64-bit msi
msi: fix icon location
build-sys: generate MSI installer instead of NSIS
build-sys: regenerate spec files when they change
spice: forward secure-channels
This needs spice-gtk >= 0.19.7 and will warn with lower version
2013-04-13 Christophe Fergeau
Remove redundant check, g_strdup(NULL) is allowed
This also makes the code consistent with its surroundings.
Fix memory leak on remote-viewer exit
When exiting remote-viewer, VirtViewepApp::dispose() calls
virt_viewer_app_set_connect_info() with NULL parameters to free all
internal fields. However, _set_connect_info() calls
virt_viewer_app_update_pretty_address() which will always allocate
a new string even if the fields it's using to fill the string are NULL.
This commit fixes the leak by checking if the fields have non-NULL
values before creating the newly-allocated string.
==24180== 14 bytes in 1 blocks are definitely lost in loss record 540 of 8,671
==24180== at 0x4A0887C: malloc (vg_replace_malloc.c:270)
==24180== by 0x32D2B0A187: __vasprintf_chk (vasprintf_chk.c:80)
==24180== by 0x32D52845AA: g_vasprintf (stdio2.h:210)
==24180== by 0x32D52640DC: g_strdup_vprintf (gstrfuncs.c:517)
==24180== by 0x32D526417B: g_strdup_printf (gstrfuncs.c:543)
==24180== by 0x4136E6: virt_viewer_app_update_pretty_address (virt-viewer-app.c:1681)
==24180== by 0x414100: virt_viewer_app_set_connect_info (virt-viewer-app.c:1902)
==24180== by 0x4141D0: virt_viewer_app_free_connect_info (virt-viewer-app.c:1910)
==24180== by 0x4127C6: virt_viewer_app_dispose (virt-viewer-app.c:1353)
==24180== by 0x425488: remote_viewer_dispose (remote-viewer.c:131)
==24180== by 0x32D5E14787: g_object_unref (gobject.c:2986)
==24180== by 0x4280AF: main (remote-viewer-main.c:323)
2013-04-12 Christophe Fergeau
build-sys: Simplify setting of optional CFLAGS/LDFLAGS
They don't need to be wrapped inside if HAVE_XXX blocks in Makefile.am
as when XXX is not available, XXX_CFLAGS and XXX_LIBS will expand to
the empty string, and thus we can carry them unconditionally in
our app_CFLAGS/app_LDFLAGS variables.
Be more consistent in #if/#ifdef use
Some of the code is checking for spice-gtk/oVirt availability
by using #ifdef HAVE_XXX, and some of the code is using #if HAVE_XXX.
As configure.ac only AC_DEFINE() HAVE_XXX when XXX could be found,
let's use the #ifdef HAVE_XXX form everywhere
Add oVirt support
This commit adds support for ovirt:// URIs. It does so by using
libgovirt to get the spice/vnc connection information through
oVirt xmlrpc API.
2013-04-11 Marc-André Lureau
build-sys: fix distcheck
2013-04-11 Hans de Goede
po: Remove extraenous backslash, breaking the build
2013-04-08 Daniel P. Berrange
Refresh translations from transifex
2013-04-05 Hans de Goede
virt-viewer-app: Always allow users to close displays from the displays menu
Marking display menu items as non sensitive for shown displays make no sense,
since the user can always close them through the window-manager.
Having a window for a display shown when the display is not selectable nor
ready, can happen when the agent goes away. This happens for example when using
a dual monitor config with a Linux guest and then switching to a text console
inside the guest.
2013-04-02 Christophe Fergeau
Use translations when looking up key combination to send
virt_viewer_window_menu_send() compares the label of the menu item
that was clicked on with a list of known labels to know which
key combination should be sent to the guest.
However, the menu label can be translated, but the table doing
the label -> key combination mapping uses untranslated labels.
This means the menu item will not send any key combination when
clicked if translated.
This can be observed with fr_FR where "Ctrl+Alt+_Del" is translated
to "Ctrl+Alt+_Suppr".
2013-04-02 Marc-André Lureau
win32: maximize when leaving fullscreen the first time
On windows, the client window may end up with a non-visible toolbar,
and overlapping the windows statusbar. To workaround this, let's
maximize the client the first time leaving fullscreen.
https://bugzilla.redhat.com/show_bug.cgi?id=916810
2013-03-28 Marc-André Lureau
Do not enable extra monitors until they are explicitely enabled
Make display menu item sensitive again
Even if the display has not been explicitely disabled, as long as
the display is "selectable"
Fix regression introduced with "Do not disable extra client monitors"
3b981d953f270662360e5b0c78183924276a18ed
2013-03-26 Marc-André Lureau
Remove gtk_window_present() call
gtk_window_present() may forcefully call gdk_window_show(), which will
call ShowWindow(). Although gdk call is not supposed to move the
window if it's already visible, it does restore the window position on
Vista+. For example, a snapped window will be moved back to its
previous position.
Gtk+ ShowWindow() is currently using SW_SHOWNOACTIVATE, it should
probably use SW_SHOWNA instead, but that didn't help anyway for a
snapped window.
Since virt_viewer_window_show() already ensure the window is visible,
I am not sure why gtk_window_present() is there in the first place, so
just remove it.
https://bugzilla.redhat.com/show_bug.cgi?id=912713
Add gtk_widget_get_realized() define for old gtk+
Fix build with gtk < 2.20
window: keep display size when leaving fullscreen for first time
If the application was started in fullscreen, window geometry has not
been saved, since the window was not realized. We can unfullscreen and
restore 1:1 window to match guest display size with
virt_viewer_display_queue_resize()
https://bugzilla.redhat.com/show_bug.cgi?id=916810
window: save window geometry if the window is realized
Protect against re-entering fullscreen by moving pre-condition,
keey the last know window geometry, since it stays valid.
window: resize to monitor geometry
This code is potentially bad, we should set size request to the size of the monitor
2013-03-25 Marc-André Lureau
display: make a function to queue the dirty display allocation trick
app: add get_fullscreen_auto_conf()
2013-03-25 Christophe Fergeau
Reuse existing 'displays' submenu rather than recreating it
Because of what apparently is a gtk+2 bug , we
cannot recreate the submenu every time we need to refresh it,
otherwise the application may get frozen with the keyboard and
mouse grabbed if gtk_menu_item_set_submenu is called while
the menu is displayed. Reusing the same menu every time
works around this issue.
https://bugzilla.redhat.com/show_bug.cgi?id=922712
2013-03-22 Marc-André Lureau
Do not disable extra client monitors
This allows reconfiguration of extra monitors whenever the agent is
back, for example after reboot.
https://bugzilla.redhat.com/show_bug.cgi?id=918997
spice: always send auto-conf on agent connection
Restore the auto-conf client monitor configuration whenever the agent
is started. This ensures the guest has the expected number of monitors
enabled when rebooting in fullscreen.
https://bugzilla.redhat.com/show_bug.cgi?id=918997
2013-03-22 Hans de Goede
virt-viewer-display-spice: Skip monitor info in fullscreen-auto-conf mode
When we are in fullscreen-auto-conf virt-viewer-session-spice sends a
monitor-info message to the agent with the exact client monitor info, and
virt-viewer-display-spice should not override that.
Acked-by: Marc-André Lureau
2013-03-22 Marc-André Lureau
Forward directly key events to display
Even if the display is disabled, we should keep sending key events to
guest. It can wake up from sleep for instance.
There is a single widget per window, so we can directly send key
events there. If the menu is active, it has the grab, so the window
doesn't receive those key events.
https://bugzilla.redhat.com/show_bug.cgi?id=870710
2013-03-21 Hans de Goede
virt-viewer-app: Call virt_viewer_app_update_menu_displays on show_hint change
Since the sensitivity of the display menu-check-items depends on show_hint,
we need to call virt_viewer_app_update_menu_displays on show_hint change.
This fixes the following scenario:
1) Linux guest with upto 4 displays on a single qxl dev
2) Configure it for 2 displays
3) Switch to a text-console in the guest (ie send ctrl+alt+F3)
4) All displays except for disp 1 are now not sensitve in the menu
5) Switch back to X
6) The second display in the view->displays menu is still not sensitive
virt-viewer-display: Document difference between nth display and monitor
virt-viewer-window: Don't use priv->display when it is NULL
Add some missing checks for not having a display. Note that where
functions should not be called (ie menu items should be disabled) I've
used g_return_if_fail.
virt-viewer-window: Store the monitor locally
With commit 81ed9d13 "virt_viewer_window_enter_fullscreen: Pass in monitor for
fullscreen window" we need a monitor number to determine where to move
the window when going fullscreen.
Since the VirtViewerDisplay needs to know the fullscreen monitor number too,
to determine the fullscreen size it was being stored there. But we don't
always have a display, leading to errors like:
(remote-viewer:7996): remote-viewer-CRITICAL **:
virt_viewer_display_get_monitor: assertion `VIRT_VIEWER_IS_DISPLAY(self)'
failed
And to the monitor number not always being stored. This patchset fixes this
by storing the monitor number inside VirtViewerWindow, and passing it to
VirtViewerDisplay only when we've a display.
2013-03-20 Christophe Fergeau
Fix compilation with older glib versions
Recent commits introduced use of g_clear_object and
g_byte_array_new_take which are only present respectively in glib
2.28 and 2.32
Fix compilation with older gtk+
gtk_widget_get_mapped is only available in gtk+ 2.20, so we need
a compat definition for older releases.
2013-03-20 Hans de Goede
virt-viewer-display-spice: Use display monitor property for fullscreen size
When a display is pinned to a certain monitor for fullscreen, it will be moved
there when going fullscreen. Currently we use gdk_screen_get_monitor_at_window
to determine which monitor we are on and get the size from that monitor.
But this is racy, sometimes the size_allocate function runs before the move
has finished and we get the size from the wrong monitor:
https://bugzilla.redhat.com/show_bug.cgi?id=918570
Since if the display is pinned to a certain monitor, the display will always
end up on that monitor we can avoid the race by simply using that monitors
size.
virt_viewer_window_enter_fullscreen: Pass in monitor for fullscreen window
Rather then passing in a move boolean + coordinates to move the window
to for fullscreen mode, simply pass in the monitor, so that the underlying
objects can also use the monitors size to determine the display size.
Note: pass in -1 to use the monitor the window is currently on.
virt-viewer-display: Add monitor property
2013-03-13 Marc-André Lureau
spice: update fullscreen state on display creation
This ensure self->priv->auto_resize has correct value.
And allow changing guest resolution when started in fullscreen.
https://bugzilla.redhat.com/show_bug.cgi?id=873298
Don't override G_LOG_DOMAIN=all
If the string is different, the GLib log handler will not log all
messages.
2013-03-13 Daniel P. Berrange
Delete browser plugin entirely
The browser plugin code has been effectively unmaintained since
the day it was merged. There has always been a caveat that the
code has not been properly audited to ensure it is secure, and
being unmaintained doesn't give a warm secure feeling. These
days there are better solutions for the browser which are pure
HTML5 code, noVNC and SPICE-HTML5.
2013-03-08 Marc-André Lureau
file: add version field, raise an error if incompatibily
The virt-viewer connection file can now have a version=0.5 field. If
the virt-viewer version opening the connection doesn't provide at
least that version, an error is raised with the version required.
Allow app_initial_connect() to raise an error
Add virt_viewer_compare_version()
Add VIRT_VIEWER_ERROR GError
2013-02-21 Hans de Goede
Fix send-key menu not showing in fullscreen with gtk3 (rhbz#913601)
This should also fix the send-key menu showing in the wrong position with a
gtk2 build, when the tooltray icon is clicked on the 2nd or higher monitor.
2013-02-13 Daniel P. Berrange
Post release version bump
Update for 0.5.5 release
Update min spice-gtk requirement docs / RPM requires
Turn off deprecation warnings
GLib deprecated the GValueArray type without providing an ABI
compatible replacement. Thus we need to disable dreprecation
warnings
../../src/virt-viewer-auth.c: In function 'virt_viewer_auth_vnc_credentials':
../../src/virt-viewer-auth.c:112:9: error: 'g_value_array_get_nth' is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:65): Use 'g_array_index' instead [-Werror=deprecated-declarations]
Avoid Makefile @ check for data/Makefile.am
Adapt 'po file' syntax check to look at more files
The 'po file' check needs to consider various files in data/
as well as normal sources
Don't define the same make target/variables twice
The NSIS patches defined the .PHONY target twice and also
defined CLEANFILES twice
Auto-generate AUTHORS file from GIT logs
Rather than trying to manually keep track of authors,
just auto-generate the list from GIT logs
2013-02-13 Marc-André Lureau
win: add virt-viewer.msi build rule
In order to build the MSI, you will need msitools:
http://ftp.gnome.org/pub/GNOME/sources/msitools/
The MANUFACTURER environment variable is mandatory and should be set
to the manufacturer/author of the MSI build.
2013-02-12 Marc-André Lureau
spec: include mime file
build-sys: add --with-buildid to details build version
Add a configure argument to append build version details, similar to
what Daniel Berrange proposed in the "use finer package version in
mingw-virt-viewer" thread on the ML.
2013-02-11 Marc-André Lureau
Register remote-viewer mime handling
Unfortunately, I don't see yet how we could avoid the browser dialog
asking which application to open. On Firefox, each user has a
mimeTypes.rdf, but we can't really modify it..
win32: process message queue in debug-helper
Process messages while waiting for pi.hProcess.
Avoid the spice-x from hanging in WaitForInputIdle(), although the
client itself might not be ready, not even started...
https://bugzilla.redhat.com/show_bug.cgi?id=903190
2013-02-11 Hans de Goede
virtviewer-window: Make sure fullscreen window stays on the same monitor
Sometimes the guest may shortly disable and then re-enable a monitor while
in fullscreen mode, this happens for example when changing display resolution
through gnome-display-properties inside the guest. This causes the client
window-manager to remap the window, and this can cause it to end up
on a different monitor.
This patch fixes this by remembering the position the window is places at
when going fullcreen and moving it there again when its gets (re-)shown.
2013-02-07 Marc-André Lureau
Fix "Do not ask me again" checkbox settings saving
Based on bug report by Hans:
The code block for saving was below this check:
if (priv->session) {
virt_viewer_session_close(VIRT_VIEWER_SESSION(priv->session));
if (priv->connected) {
priv->quiting = TRUE;
return;
}
}
Which means it never executes when quiting virt-viewer while conneced, causing
the "Do not ask me again" checkbox settings to not be saved.
2013-02-06 Hans de Goede
usbredir: Fix usbredir menu always being grayed out on monitor 2+
virt-viewer-display-spice: Pass proper x and y coordinates in windowed mode
This stops monitor order from the guest from being re-arranged in multi-
monitor setups when switching between fullscreen and windowed mode.
Note this relies on spice-gtk's auto monitor alignment code, which currently
does not properly handle setups where there is more then 1 row of monitors,
ie 2x1 - 5x1 will work fine, but 2x2 will not.
virt-viewer-display-spice: Use real monitor coordinates in fullscreen
Now that we pass the real monitor coordinates, tell spice-gtk to use them,
rather then to use the passed coordinates as input for its automatic monitor
alignment. This fixes ie monitors in a 2x2 grid, showing up as a 4x1
configuration in the guest.
virt-viewer-display-spice: Pass real monitor coordinates in fullscreen
Rather then always passing +0+0
2013-02-04 Michal Privoznik
g_{message,warning}: Use printf style
The g_message() and g_warning functions expect printf style of
arguments. That is, whenever we want to print a string, it has
to be preceded with "%s" format.
configure: Update with autoupdate
Don't redefine _FORTIFY_SOURCE macro
If the _FORTIFY_SOURCE has been already defined, we unconditionally
redefine it, leaving us with warning/error thrown at compilation time.
2013-02-04 Martin Kletzander
Make compilation work with automake 1.13
Just one thing needs to be changed for virt-viewer to build with
automake 1.13, AM_CONFIG_HEADER is deprecated and should be
AC_CONFIG_HEADERS.
2013-01-31 Marc-André Lureau
remote-viewer: controller sets spice session proxy
Trivial change since spice-gtk now has proxy session property and
controller message, just forward it.
Add a "Do not ask me again" checkbox when closing app
Always ask user about closing session
Currently, virt-viewer doesn't ask for user confirmation when closing
a single monitor session. Always ask before closing, as requested by
user.
https://bugzilla.redhat.com/show_bug.cgi?id=803912
2013-01-29 Marc-André Lureau
spice: add proxy configuration to connection file
2013-01-24 Christophe Fergeau
Remove unused label
It's no longer used after aecd80ec7
Remove unused variable
'window' is no longer used after 412bcf6f.
Fix warning when compiling without spice-gtk support
When remote-viewer is compiled without spice-gtk support, spice-session.h
will not get included in remote-viewer.c, causing these warnings:
remote-viewer.c: In function 'remote_viewer_start':
remote-viewer.c:693:9: warning: implicit declaration of function
'virt_viewer_session_set_file' [-Wimplicit-function-declaration]
remote-viewer.c:693:9: warning: nested extern declaration of
'virt_viewer_session_set_file' [-Wnested-externs]
Add missing intltool BuildRequires
The configure script fails if intltool is not installed.
mingw: Add packages for virt-viewer NSIS installer
This makes it much easier to build an updated Windows installer binary
as this can now be done using mock/koji/... by using this .spec and
a virt-viewer tarball.
mingw: Build a gtk2 version of virt-viewer
The nsis file we ship is generating an installer for a GTK+2 build
of virt-viewer, so it's inconsistent for the mingw-virt-viewer
spec file to generate a GTK+3 build. Switch to building a GTK+2
version of virt-viewer in mingw-virt-viewer.spec
mingw: Package debug-helper.exe
mingw: Package debug files
When building on f18, the build fails because of unpackaged
debug files. Use the appropriate mingw macro to generate
the mingw debug packages.
The build failure is:
RPM build errors:
error: Installed (but unpackaged) file(s) found:
/usr/i686-w64-mingw32/sys-root/mingw/bin/debug-helper.exe.debug
/usr/i686-w64-mingw32/sys-root/mingw/bin/remote-viewer.exe.debug
/usr/i686-w64-mingw32/sys-root/mingw/bin/virt-viewer.exe.debug
/usr/i686-w64-mingw32/sys-root/mingw/bin/windows-cmdline-wrapper.exe.debug
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/debug-helper.exe.debug
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/remote-viewer.exe.debug
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/virt-viewer.exe.debug
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/windows-cmdline-wrapper.exe.debug
Installed (but unpackaged) file(s) found:
/usr/i686-w64-mingw32/sys-root/mingw/bin/debug-helper.exe.debug
/usr/i686-w64-mingw32/sys-root/mingw/bin/remote-viewer.exe.debug
/usr/i686-w64-mingw32/sys-root/mingw/bin/virt-viewer.exe.debug
/usr/i686-w64-mingw32/sys-root/mingw/bin/windows-cmdline-wrapper.exe.debug
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/debug-helper.exe.debug
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/remote-viewer.exe.debug
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/virt-viewer.exe.debug
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/windows-cmdline-wrapper.exe.debug
mingw: Fix typo in mingw macro name (hedder -> header)
nsis: Adjust file list
Adjust file names for mingw-usbredir dlls and readline dlls
2013-01-22 Hans de Goede
virt-viewer-display-spice: Get monitor under our window
When getting monitor info for going fullscreen, Get the monitor under
*our* window rather then under the root-window.
Noticed this not working properly when testing the monitor coordinates stuff,
but this should also help people seeing problems when using non equally sized
monitors.
2013-01-18 Marc-André Lureau
vnc: add connection by file
Learn to connect to a VNC server with the connection details file, ex:
[virt-viewer]
type=vnc
host=localhost
port=2356
password=foobar
v2:
- add username/password support
https://bugzilla.redhat.com/show_bug.cgi?id=843410
file: add username support
2012-12-21 Hans de Goede
Make hotkey configuration functionality available from the cmdline (v2)
Changes in v2:
-Add --hotkeys documentation to the man-pages
Add a virt_viewer_app_set_hotkeys() helper function
2012-12-20 Christophe Fergeau
Improve check for overridden grab key combination
remote-viewer can either use the default grab/ungrab handled by
spice-gtk, or override it and use the standard gtk+ accelerator
mechanism. However, the code currently assumes that if any accelerator
is set in remote-viewer, then the grab key has been overridden.
This commit makes sure the grab key is actually overridden before assuming
so.
Don't leak SpiceGrabSequence in enable_accel_changed
Improve hotkeys controller behaviour
Disable default accelerators when setting bindings from the controller
in case the controller does not override them all. This ensures we don't
inherit from the bindings set in VirtViewerApp::constructor if the controller
doesn't set any bindings for a given action.
2012-12-07 Marc-André Lureau
Use monitor geometry, not screen size
In a recent commit, 3bb6f5ec805ecfe78eba6d4d98e3ffcab195273a, I
introduced a regression: going fullscreen would no longer match client
and guest resolution correctly.
A GdkScreen is not necessarily the physical screen monitor size.
Lookup the physical monitor size using
gdk_screen_get_monitor_geometry().
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=881020
2012-12-05 Michal Privoznik
session-spice: Cast CA string to gunit8 pointer
SpiceSession has 'ca' property which is type of GByteArray*.
However, when we read the property from file, we read it as
string. For conversion g_byte_array_new_take() is used which
takes given pointer as guint8* so we need to do the cast.
Sanitize syntax-check
make syntax-check is producing some errors about empty line at EOF
and missing #include in src/virt-viewer-file.c
* src/virt-viewer-file.c: add #include
* data/virt-viewer-debug.nsis.in: remove empty line at EOF
2012-12-05 Doug Goldstein
Make .desktop file comply with spec
The .desktop file did not comply with the Desktop Entry spec as checked
with desktop-file-validate. Boolean keys are defined as taking only
'true' or 'false', the entry Terminal had False. MimeType is a string
list and therefore must be terminated with a ;
2012-11-27 Marc-André Lureau
remote-viewer: learn to connect from file
v2:
- move some variables to inner-block as requested by reviewer
spice: learn to connect from file
Add VirtViewerSession:file property
If VirtViewerSession:file is set, it should be used to define the
connection parameters. Also correct the mime type used in this case.
The mime type is needed to identify the kind of resources we are
adding to the recent list. The recent list can then be filtered and
various application handling that type may attempt to access that
resource.
Add VirtViewerFile
v2:
- use !! for boolean values setter
- switch from bytearray/base64 to plain string for CA (PEM)
- add file format comment
Move spice_hotkey_to_gtk_accelerator() to util
To be compatible with RHEVM, VirtViewerFile hotkey format will use the
Spice Controller format.
recent: get mime type from session
Do not use spice mime type for all kind of sessions, but depending on
what is actually being used.
session: add virt_viewer_session_mime_type()
debug.nsis: remove superflous path
display: only un-constrain display size once it is mapped
Wait until the widget is actually on screen before removing its
size constrain. This solves 50x50 window secondary window size
when connecting to a multi-monitor spice guest.
2012-11-23 Marc-André Lureau
Add virt-viewer-debug.exe NSIS installer
This installer will provide with the tools and configuration needed to
debug virt-viewer & remote-viewer. It will install itself by default in
virt-viewer directory.
2012-11-21 Michal Privoznik
debug-helper: include
AUTHORS: add Dave Allan
as he has supplied patch (commit 74b1b62510d9390).
cfg.mk: Don't require bindtextdomain directly
With current implementation, all binaries that need it call
bindtextdomain but not directly. They call a helper function
instead. This makes, however, syntax-check fail as it cannot
recognize it.
Original patch proposed by Eric Blake
2012-11-20 Marc-André Lureau
spice: the session is connected when main channel opened
The previous change in 399aae55aa384bf91dff0fc770497c0d5f935fa9 rely
on correct session-connected signal. However, the spice backend
is emiting it too early, when the main channel is created, where
it should wait until it is connected instead.
"Unable to connect to the graphic server" error on guest shutdown
In virt_viewer_app_activate(), priv->connected is set to FALSE when
the connect/active is successfull. However, we rely on it to know
whether the virt_viewer_app_disconnected() is an error, so only set it
to FALSE when connection failed.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=875697
2012-11-16 Marc-André Lureau
build-sys: add min libvirt version requirement check
2012-11-15 Christophe Fergeau
Make sure png screenshots have a .png extensions
When falling back to saving to .png, the filename might not
end with .png. This commit appends the .png extension to the
screenshot filename if it's missing.
Allow to save to other formats than png
Currently, the screenshots can only be saved to png. This commit
checks if the file extension is a known one, and will save to this
format if it is. Otherwise it will fallback to saving to png.
Set a default dir/name for screenshots
It makes sense for the screenshots to be saved in ~/Images,
especially as otherwise the filechooser will display
'recent documents' to which we cannot save. This commit also sets
the default screenshot name to 'Screenshot'.
Fix spice-gtk check in configure.ac
The check that at least one of spice-gtk and gtk-vnc is present
uses a wrong variable name to check for spice-gtk presence, which
causes the check to think it's never present. This would make
gtk-vnc presence mandatory. This commit fixes the name of the
spice-gtk variable ($have_gtk_spice -> $have_spice_gtk).
2012-11-14 Michal Privoznik
Don't SIGSEGV if no transport is used.
One of previous commits (74b1b62510d939) allowed us to connect to
localhost directly if ssh transport was used. However, if there's
not transport, we SIGSEGV'ed as g_str_equal doesn't like NULL as
one of arguments. Change this to g_strcmp0 which does the same
service but is more friendly to NULL arguments.
2012-11-13 Michal Privoznik
Reconnect to libvirtd after connection breaks
Currently, if user wants to reconnect to a domain he can use
'-r' cmd line argument. This makes virt-viewer listen to
domain events. However, if connection to libvirtd breaks
somehow, we will receive no longer any event. Hence we must
reconnect to the libvirt.
2012-11-08 Dave Allan
Connect to localhost for display when transport is ssh
When connecting to a VM that does not have a 'listen' tag in its
graphcs element, we have to guess where to try to connect to the VM's
display. The current default is the host specified in the connection
URI which is correct for most transports, however, the SSH transport
makes the display connection from the remote end, so in that case,
attempt to connect to localhost.
2012-10-25 Guido Günther
Fail if neither vnc nor spice is detected
Since the viewer makes little sense otherwise.
2012-10-23 Marc-André Lureau
Fix jenkins build failure
virt-viewer-util.c: In function 'virt_viewer_util_init':
virt-viewer-util.c:289: warning: implicit declaration of function 'setlocale'
virt-viewer-util.c:289: warning: nested extern declaration of 'setlocale'
virt-viewer-util.c:289: error: 'LC_ALL' undeclared (first use in this function)
virt-viewer-util.c:289: error: (Each undeclared identifier is reported only once
virt-viewer-util.c:289: error: for each function it appears in.)
Use a mutex to check if VirtViewer running
We need to warn user that installer can't proceed if there is already
a running instance of VirtViewer or of the installer.
https://bugzilla.redhat.com/show_bug.cgi?id=864033
Use a common early init() function
There is a number of things both virt-viewer and remote-viewer need to
do early during execution. Do it only in one place.
windows: add debug-helper
This is a simple program that will set some debug variable, and run
gdb and wait until it finished. This makes it possible to debug
"remote-viewer --spice-controller" easily, by setting the necessary
variables and keeping the parent process running (the activex whatches
its death)
To use it, replace the HKCU "Software\spice-space.org\spicex\client"
value "$INSTDIR\bin\remote-viewer.exe --spice-controller" with
"$INSTDIR\bin\debug-helper.exe remote-viewer.exe --spice-controller".
nsis: add deps.txt file in installer
This helps track package version that were used during the
build of Windows installer. It's not ideal, but make up the
lack of package management on windows
nsis: update required files and libraries
win32: there is no CONERR$, only CONOUT$
2012-10-17 Marc-André Lureau
spice: only autoresize once with screen size in fullscreen
It's currently not possible to configure guest with higher resolution
than native, as it will switch back to native, since the gtk widget
allocation will always end up being the size of the screen. We
special-case fullscreen mode, and only resize when entering
fullscreen. Furthermore, it avoids sending extra unnecessary resize
events to the guest whenever gtk+ call size allocate in various
stages, with different values.
https://bugzilla.redhat.com/show_bug.cgi?id=864929
spice: avoid rounding issues when scaling up display
Fix some unwanted guest resize due to rounding issues (at least when
scaling up)
We may want to save the original remote desktop size, instead of
always checking widget requisition. That way zooming shouldn't resize
guest at all, but it seems tricky to handle that special case vs user
window resize that should trigger guest resize.
https://bugzilla.redhat.com/show_bug.cgi?id=856678
2012-10-16 Marc-André Lureau
Do not resize window to minimum when toggling auto-resize
The virt_viewer_display_idle() will queue a resize event that will
result in display size requisition of 50x50. If we later resize the
window to 1x1 in virt_viewer_window_resize() we end up with a tiny
window.
It is legitimate not to force that 1x1 window resize when toggling the
option. After the rest of the logic in virt_viewer_window_resize(), if
the remote desktop ends up being resize, that will trigger another
virt_viewer_set_desktop_size() and finally change the window size
appropriately.
https://bugzilla.redhat.com/show_bug.cgi?id=856610
2012-10-12 Daniel P. Berrange
Add RPM magic to run autoreconf
2012-10-10 Daniel P. Berrange
Fix check for IPv6 any address
The string '::' is just one of many possible ways to express
the IPv6 "any" address. Others include '::0', '0:0:0:0:0:0:0:0',
'0::0' and more. Instead of trying to do strcmp, actually try
parsing the address with GInetAddress and then simply use an
accessor to check what type it is
2012-10-09 Daniel P. Berrange
Allow user to set a window title for remote-viewer
Currently the remote viewer windows get the URI as their
title. Provide a --title STRING arg to remote-viewer to
let the user override the title with something more
meaningful to them.
2012-10-01 Christophe Fergeau
Don't free SPICE ticket twice
Commit 2201a5a was supposed to free a SPICE ticket leak, but it's
actually introducing a double-free as the SPICE ticket is
unconditionally freed at the end of
virt_viewer_session_spice_main_channel_event
2012-09-18 Christophe Fergeau
Append \n to message in virt_viewer_app_trace
Callers manually add a trailing \n when they call virt_viewer_app_trace,
but it's sometimes forgotten, leading to rhbz#822794. This commit
removes the \n from all callers (it was missing in a few of them)
and adds it in virt_viewer_app_trace.
2012-09-18 Daniel P. Berrange
Refresh translations
2012-09-17 Daniel P. Berrange
Update for 0.5.4 releae
2012-09-14 Daniel P. Berrange
Use a more specific regex to fix enum include paths
Simply doing a search replace on $(srcdir) doesn't work very
well in non-VPATH builds. Use a more specific regex that won't
generate false matches
Look in builddir for icons & strip build dir prefix from enum file includs
Don't include generated icons in tar.gz and clean them up
Convert to use Mingw64 toolchain for Windows biulds
2012-08-13 Christophe Fergeau
Document -f=auto-conf in remote-viewer --help
virt-viewer does not support -f=auto-conf so this does not change the
option there.
Fixes rhbz#718001
2012-08-10 Christophe Fergeau
Use real binary name in help message
Now that we have 2 distinct binaries, remote-viewer and virt-viewer,
'PACKAGE' can no longer be used in error messages as the name of the
binary. This causes a small inconsistency when running
'remote-viewer --foobar' as the error message would be:
'Unknown option --foobar
Run 'virt-viewer --help' to see a full list of available command line options'
This commit makes sure we use argv[0] for this message.
Fixes rhbz#814150
2012-07-23 Marc-André Lureau
Show status page by default if display not ready
Switch back to status page if display is not ready.
Make status widget visible immediately
GtkNotebook will use the currently visible widget as default page.
If we don't show status widget before we append the display, the
current page will be on display. Quoting Gtk+ documentation:
"Note that due to historical reasons, GtkNotebook refuses to switch to
a page unless the child widget is visible. Therefore, it is
recommended to show child widgets before adding them to a notebook."
vnc: when session is disconnected, make the display as non-ready
Simplify display flag handling
Add VirtViewerSession::session-display-updated
Rebuild menu when agent is connected. Only when the agent is running
may a display be enabled/disabled.
Make the display submenu insensitive if display can't be selected
spice: factor out main channel lookup code
Add VirtViewerDisplay::selectable property
This property will be set when the display can be selected to be
"enabled" and shown (this can involve creating/connecting an
additional guest monitor, and may need guest agent cooperation for
example).
Add virt_viewer_window_get_display()
Getter used in following changes.
Hook up handling of Monitors
Rely on spice-gtk display channel monitors property to manage
displays. The same display channel may now provide several monitors,
the SpiceDisplay widget must be told which monitor to display
Bump glib > 2.22, add compat file
We use API from 2.22, and some from further version. Add
virt-glib-compat.h fallback file for those.
Use SpiceDisplay:ready property instead of channel mark
The display can now check several conditions before the display can be
shown, use that instead of display mark, which was not high-level
enough.
Number display starting from 1
Prevent from adding the same display several time in the session
In virt_viewer_session_spice_display_monitors(), we (re)add the
display unconditionnaly every time we receive a new MonitorConfig.
Add a DISABLED display hint
This flag will help to track whether the display has been
removed/closed and whether it really has a valid display.
Ready in contrast, is used to "hide" temporarily the display (when
starting or redrawing the display, to avoid artifacts)
Use virt_viewer_connect_object() for display
When display is released, detach signal automatically.
Fix various crash related to not cleaning up signal handlers properly,
due to no longer 1-1 only relation between display widget and channel.
Rebuild display menu when a window is added or removed
Mark a menu string as translatable
Run-time check values before doing bad computation
Turn display:show-hint into flags type
Destroy dialog immediately after run
If the parent is already destroyed, it looks like the dialog is
destroyed too. This avoids a crash when calling app_quit().
build: generate enums type boilerplate
spice: disconnect signal handlers when either object is destroyed
Use virt_viewer_signal_connect_object(), a copy of telepathy
utility function tp_g_signal_connect_object(). This function
will take care of removing signal handler if any of emitter or
attached object are destroyed.
The following patches will have this condition met, since there is no
longer 1-1 relation between channel and display. The channels can
continue to be around when some of the display are removed.
spice: improve fullscreen=auto-conf
Do keep client monitor position, do not align monitors automatically.
The align property is only available since v0.12.101.
2012-07-03 Marc-André Lureau
build: allow building with newer glibc-headers and -O0
Fix copied from libvirt, commit by Eric Blake.
glibc 2.15 (on Fedora 17) coupled with explicit disabling of
optimization during development dies a painful death:
/usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
Work around this by only conditionally defining _FORTIFY_SOURCE,
in the case where glibc can actually use it. The trick is using
AH_VERBATIM instead of AC_DEFINE.
2012-06-15 Christophe Fergeau
Revert "Fix virt_viewer_app_activate return value"
This reverts commit 3ce6df7c309068f36e2602692da809a153ed5688. This
commit broke virt-viewer which expects this function to return -1
or 0 on error, and a positive value on success in
virt_viewer_initial_connect.
2012-06-13 Christophe Fergeau
Fix virt_viewer_app_activate return value
VirtViewerApp::activate is expected to return -1 on errors.
It calls the VirtViewerSession::open_* methods, which return FALSE
on error. However, VirtViewerApp::activate directly returns these
boolean instead of testing the returned value and properly returning
-1 on errors. This caused errors in these open methodes to be ignored.
Fix various memory leaks
==25063== 59 bytes in 1 blocks are definitely lost in loss record 5,163 of 9,502
==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263)
==25063== by 0x3DE384D2BE: g_malloc (gmem.c:159)
==25063== by 0x3DE3862D0B: g_strdup (gstrfuncs.c:356)
==25063== by 0x41F40A: connected (remote-viewer-main.c:186)
==25063== by 0x3DE400F663: g_closure_invoke (gclosure.c:777)
==25063== by 0x3DE40206D7: signal_emit_unlocked_R (gsignal.c:3547)
==25063== by 0x3DE402866C: g_signal_emit_valist (gsignal.c:3296)
==25063== by 0x3DE4028CCF: g_signal_emit_by_name (gsignal.c:3389)
==25063== by 0x41AA53: reemit_signal_VOID (virt-viewer-session-ovirt.c:211)
==25063== by 0x3DE400F942: _g_closure_invoke_va (gclosure.c:840)
==25063== by 0x3DE4027D87: g_signal_emit_valist (gsignal.c:3207)
==25063== by 0x3DE4028CCF: g_signal_emit_by_name (gsignal.c:3389)
==25063== 14 bytes in 1 blocks are definitely lost in loss record 623 of 9,502
==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263)
==25063== by 0x34561092F7: __vasprintf_chk (vasprintf_chk.c:82)
==25063== by 0x3DE3882F1A: g_vasprintf (stdio2.h:199)
==25063== by 0x3DE3862EDC: g_strdup_vprintf (gstrfuncs.c:509)
==25063== by 0x3DE3862F7B: g_strdup_printf (gstrfuncs.c:535)
==25063== by 0x40CBAE: virt_viewer_app_update_pretty_address (virt-viewer-app.c:1538)
==25063== by 0x40FB55: virt_viewer_app_free_connect_info (virt-viewer-app.c:1707)
==25063== by 0x40FBE9: virt_viewer_app_dispose (virt-viewer-app.c:1291)
==25063== by 0x3DE40144F7: g_object_unref (gobject.c:2981)
==25063== by 0x40C31A: main (remote-viewer-main.c:336)
==25063== 10 bytes in 1 blocks are definitely lost in loss record 491 of 9,502
==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263)
==25063== by 0x34561092F7: __vasprintf_chk (vasprintf_chk.c:82)
==25063== by 0x3DE3882F1A: g_vasprintf (stdio2.h:199)
==25063== by 0x3DE3862EDC: g_strdup_vprintf (gstrfuncs.c:509)
==25063== by 0x3DE3862F7B: g_strdup_printf (gstrfuncs.c:535)
==25063== by 0x40DE36: window_update_menu_displays_cb (virt-viewer-app.c:1640)
==25063== by 0x3DE383833F: g_hash_table_foreach (ghash.c:1524)
==25063== by 0x3DE400F663: g_closure_invoke (gclosure.c:777)
==25063== by 0x3DE40206D7: signal_emit_unlocked_R (gsignal.c:3547)
==25063== by 0x3DE402866C: g_signal_emit_valist (gsignal.c:3296)
==25063== by 0x3DE40287C1: g_signal_emit (gsignal.c:3352)
==25063== by 0x5772F95: gtk_widget_show (gtkwidget.c:3225)
==25063== 8,431 (72 direct, 8,359 indirect) bytes in 1 blocks are definitely lost in loss record 9,468 of 9,502
==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263)
==25063== by 0x3DE384D2BE: g_malloc (gmem.c:159)
==25063== by 0x3DE38616B1: g_slice_alloc (gslice.c:1003)
==25063== by 0x3DE3861C05: g_slice_alloc0 (gslice.c:1029)
==25063== by 0x3DE402F96F: g_type_create_instance (gtype.c:1872)
==25063== by 0x3DE40147A7: g_object_constructor (gobject.c:1849)
==25063== by 0x3DE4016260: g_object_newv (gobject.c:1632)
==25063== by 0x3DE40168AB: g_object_new (gobject.c:1542)
==25063== by 0x40C4BD: virt_viewer_util_load_ui (virt-viewer-util.c:41)
==25063== by 0x40C7EB: virt_viewer_auth_collect_credentials (virt-viewer-auth.c:43)
==25063== by 0x41B391: authenticate_cb (virt-viewer-session-ovirt.c:430)
==25063== by 0x3458C05E8F: ffi_call_unix64 (unix64.S:75)
==25063== 32 (16 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 3,962 of 9,502
==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263)
==25063== by 0x3DE384D2BE: g_malloc (gmem.c:159)
==25063== by 0x3DE38616B1: g_slice_alloc (gslice.c:1003)
==25063== by 0x3DE38629F2: g_slist_append (gslist.c:222)
==25063== by 0x41483C: virt_viewer_window_init (virt-viewer-window.c:323)
==25063== by 0x3DE402FA05: g_type_create_instance (gtype.c:1892)
==25063== by 0x3DE40147A7: g_object_constructor (gobject.c:1849)
==25063== by 0x3DE4015D70: g_object_newv (gobject.c:1713)
==25063== by 0x3DE401655F: g_object_new_valist (gobject.c:1830)
==25063== by 0x3DE4016893: g_object_new (gobject.c:1545)
==25063== by 0x40DA34: virt_viewer_app_window_new (virt-viewer-app.c:590)
==25063== by 0x40E300: virt_viewer_app_constructor (virt-viewer-app.c:1336)
==30355== 4 bytes in 1 blocks are definitely lost in loss record 53 of 9,267
==30355== at 0x4A0884D: malloc (vg_replace_malloc.c:263)
==30355== by 0x3DE384D2BE: g_malloc (gmem.c:159)
==30355== by 0x3DE3862D0B: g_strdup (gstrfuncs.c:356)
==30355== by 0x3DE40360FC: value_copy_string (gvaluetypes.c:276)
==30355== by 0x3DE40340CA: g_value_transform (gvalue.c:535)
==30355== by 0x3FDAE621DD: gdk_screen_get_setting (gdkevents-x11.c:3022)
==30355== by 0x3FDB3C7415: gtk_settings_get_property (gtksettings.c:1152)
==30355== by 0x3DE4017A74: g_object_get_property (gobject.c:1289)
==30355== by 0x414991: virt_viewer_window_disable_modifiers (virt-viewer-window.c:616)
==30355== by 0x415922: virt_viewer_window_keyboard_grab (virt-viewer-window.c:931)
==30355== by 0x3DE400F942: _g_closure_invoke_va (gclosure.c:840)
==30355== by 0x3DE4027D87: g_signal_emit_valist (gsignal.c:3207)
Don't leak SPICE ticket
2012-05-17 Marc-André Lureau
spice: use weak references to display channel
Fix switch-host migration with Spice.
spice-gtk doesn't like channels staying around when they should be
destroyed/finalized, ie removed from session.
spice-gtk should probably learned to handle better the case of non
cooperating clients, and be able to dissociate a channel from a
session without waiting for it to be disposed, but for now, the
relation is quite tight.
2012-05-15 Daniel P. Berrange
Avoid use of deprecated GTK3 pointer APIs
The gtk_widget_get_pointer() API is deprecated in GTK3 since it
is not aware of multiple pointers. Replace its usage in autoDrawer.c
with GdkDeviceManager and friends
Adapt to avoid use of deprecated GTK3 style & size APIs
The GtkStyle API has been deprecated in favour of GtkStyleContext.
Update ovBox.c to use the latter if building with GtK3. Also replace
use of the gtk_widget_size_request API with gtk_widget_get_preferred_size.
2012-05-15 Marc-André Lureau
Release v0.5.3
nsis: fix .nsis file paths
- look up for icons under the DESTDIR directory
- don't ship gstaudiofx, unneeded
- add missing libtasn
2012-05-14 Marc-André Lureau
dist: ship .ico in tarball
Some distros (a 4-letters) don't have icotool.
Let's ship the .ico in the tarball.
The build will fail if icoutil is not installed when
building from git or when the .ico is absent. The error
should be explicit.
nsis: IE policy to launch silentely remote-viewer
Add IE ElevationPolicy for the remote-viewer client.
http://msdn.microsoft.com/en-us/library/bb250462%28v=vs.85%29.aspx
nsis: fix removal of start menu directory
2012-05-08 Daniel P. Berrange
Avoid race condition when disposing of app
When disposing of the VirtViewerApp, we free the hash table
containing the windows. This causes each window to be freed,
which in turn causes the visibility callback to be invoked.
This can then get NULL pointers from the self->priv->windows
usage.
Blank out priv->windows before unrefing the hashs and add
a check to ensure priv->windows is non-NULL.
2012-05-04 Daniel P. Berrange
Ensure windows are destroyed when display closes
When running virt-viewer with the --reconnect argument, when
the session closes, the VirtViewerWindow instances were being
freed, but not the GtkWindow itself. So the orphaned window
stayed around doing nothing. The GtkBuilder instance was also
leaked.
Fix these two leaks & also add some debugging to help future
troubleshooting
2012-05-02 Daniel P. Berrange
Change 'OK' button to 'Close' button in USB device selection
The USB device selection applies immediately, so the dialog
should be using 'Close' instead of 'OK' for its primary button
2012-04-27 Christophe Fergeau
g_getenv returns a const string
When switching from getenv to g_getenv, 'doms' declaration
wasn't changed from char * to const char *, which causes
a gcc warning.
2012-04-26 Daniel P. Berrange
Replace getenv/setenv with g_getenv/g_setenv for Win32 portability
2012-04-25 Daniel P. Berrange
Add debugging when performing fullscreen auto-configuration
Refresh translations from transifex
Really fix debug output on glib >= 2.31
Fix debug output on glib >= 2.31
2012-04-23 Daniel P. Berrange
Set the remote-viewer binary application name
Currently the window titles for remote-view have 'remote-viewer'
appended them. This is based off the argv[0] name. We should be
setting the GLib application name though, so we can get a localized
'Remote Viewer' string in the titlebar
Add support for raw IPv6 addresses in VNC & libvirt URIs
Support vnc://[x:y:z:]:5901/ for raw IPv6 addresses in URIs,
and qemu+ssh://root@[x:y:x:]:22/ for raw IPv6 addresses in
libvirt URIs
2012-04-19 Daniel P. Berrange
Fix scaling of window to avoid integer truncation
Use round() instead of integer truncation when scaling the window,
to avoid floating point precision problems on i386
2012-04-18 Daniel P. Berrange
Add a desktop file for launching remote-viewer
Enable automagic handling of spice:// URLs in firefox by
registering a desktop handler for remote-viewer with the
SPICE URI scheme
2012-04-17 Daniel P. Berrange