[Spice-devel] [PATCH] Fix a memory leak in qxl_screen_init

2014-04-04 Thread Christophe Fergeau
From: Longguang Yue bigclo...@163.com

qxl-uxa was allocated twice, once in qxl_screen_init() and once in
qxl_uxa_init(). This commit removes the redundant allocation in
qxl_screen_init().
---

Here is a this same patch in git-format-patch format and with a whitespace
change removed. ACK from me for the patch. Longguang, let me know if your 
name/email
and the commit log are fine with you before this gets pushed.

Christophe

 src/qxl_driver.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index 29b1551..aa969e8 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -749,8 +749,6 @@ qxl_screen_init (SCREEN_INIT_ARGS_DECL)
}
 }
 
-qxl-uxa = uxa_driver_alloc ();
-
 #ifndef XSPICE
 qxl-io_pages = (void *)((unsigned long)qxl-ram);
 qxl-io_pages_physical = (void *)((unsigned long)qxl-ram_physical);
-- 
1.9.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [Spice-commits] 2 commits - gtk/spice-gtk-session.c gtk/spice-gtk-session.h gtk/spice-widget.c

2014-04-04 Thread Christophe Fergeau
On Fri, Apr 04, 2014 at 11:40:33AM +0800, longguang.yue wrote:
 have you decided ?  i do not get your code from git.

You should be able to get it from git:
http://cgit.freedesktop.org/spice/spice-gtk/log/

Christophe


pgpRmwm3Q06RY.pgp
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH spice-gtk 2/2] gtk-session: don't check guest modifiers when sync'ing

2014-04-04 Thread Marc-André Lureau
The channel state is not synchronous.

It may happen that we want to set and unset quickly a modifier, but the
guest modifier state hasn't been updated yet, and will still be seen as
unset, preventing the last unset change.
---
 gtk/spice-gtk-session.c | 10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/gtk/spice-gtk-session.c b/gtk/spice-gtk-session.c
index 644edcc..2f7869e 100644
--- a/gtk/spice-gtk-session.c
+++ b/gtk/spice-gtk-session.c
@@ -157,18 +157,14 @@ static guint32 get_keyboard_lock_modifiers(void)
 static void 
spice_gtk_session_sync_keyboard_modifiers_for_channel(SpiceGtkSession *self,
   
SpiceInputsChannel* inputs)
 {
-gint guest_modifiers = 0, client_modifiers = 0;
+gint client_modifiers = 0;
 
 g_return_if_fail(SPICE_IS_INPUTS_CHANNEL(inputs));
 
-g_object_get(inputs, key-modifiers, guest_modifiers, NULL);
-
 client_modifiers = get_keyboard_lock_modifiers();
-SPICE_DEBUG(%s: input:%p client_modifiers:0x%x, guest_modifiers:0x%x,
-G_STRFUNC, inputs, client_modifiers, guest_modifiers);
+SPICE_DEBUG(%s: input:%p client_modifiers:0x%x, G_STRFUNC, inputs, 
client_modifiers);
 
-if (client_modifiers != guest_modifiers)
-spice_inputs_set_key_locks(inputs, client_modifiers);
+spice_inputs_set_key_locks(inputs, client_modifiers);
 }
 
 static void keymap_modifiers_changed(GdkKeymap *keymap, gpointer data)
-- 
1.8.5.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH spice-gtk 1/2] gtk-session: s/g_debug/SPICE_DEBUG

2014-04-04 Thread Marc-André Lureau
---
 gtk/spice-gtk-session.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gtk/spice-gtk-session.c b/gtk/spice-gtk-session.c
index fe77f47..644edcc 100644
--- a/gtk/spice-gtk-session.c
+++ b/gtk/spice-gtk-session.c
@@ -164,8 +164,8 @@ static void 
spice_gtk_session_sync_keyboard_modifiers_for_channel(SpiceGtkSessio
 g_object_get(inputs, key-modifiers, guest_modifiers, NULL);
 
 client_modifiers = get_keyboard_lock_modifiers();
-g_debug(%s: input:%p client_modifiers:0x%x, guest_modifiers:0x%x,
-G_STRFUNC, inputs, client_modifiers, guest_modifiers);
+SPICE_DEBUG(%s: input:%p client_modifiers:0x%x, guest_modifiers:0x%x,
+G_STRFUNC, inputs, client_modifiers, guest_modifiers);
 
 if (client_modifiers != guest_modifiers)
 spice_inputs_set_key_locks(inputs, client_modifiers);
-- 
1.8.5.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH spice-gtk 2/2] gtk-session: don't check guest modifiers when sync'ing

2014-04-04 Thread Marc-André Lureau
nack, I am sending a better version,


On Fri, Apr 4, 2014 at 12:21 PM, Marc-André Lureau 
marcandre.lur...@gmail.com wrote:

 The channel state is not synchronous.

 It may happen that we want to set and unset quickly a modifier, but the
 guest modifier state hasn't been updated yet, and will still be seen as
 unset, preventing the last unset change.
 ---
  gtk/spice-gtk-session.c | 10 +++---
  1 file changed, 3 insertions(+), 7 deletions(-)

 diff --git a/gtk/spice-gtk-session.c b/gtk/spice-gtk-session.c
 index 644edcc..2f7869e 100644
 --- a/gtk/spice-gtk-session.c
 +++ b/gtk/spice-gtk-session.c
 @@ -157,18 +157,14 @@ static guint32 get_keyboard_lock_modifiers(void)
  static void
 spice_gtk_session_sync_keyboard_modifiers_for_channel(SpiceGtkSession *self,

  SpiceInputsChannel* inputs)
  {
 -gint guest_modifiers = 0, client_modifiers = 0;
 +gint client_modifiers = 0;

  g_return_if_fail(SPICE_IS_INPUTS_CHANNEL(inputs));

 -g_object_get(inputs, key-modifiers, guest_modifiers, NULL);
 -
  client_modifiers = get_keyboard_lock_modifiers();
 -SPICE_DEBUG(%s: input:%p client_modifiers:0x%x,
 guest_modifiers:0x%x,
 -G_STRFUNC, inputs, client_modifiers, guest_modifiers);
 +SPICE_DEBUG(%s: input:%p client_modifiers:0x%x, G_STRFUNC, inputs,
 client_modifiers);

 -if (client_modifiers != guest_modifiers)
 -spice_inputs_set_key_locks(inputs, client_modifiers);
 +spice_inputs_set_key_locks(inputs, client_modifiers);
  }

  static void keymap_modifiers_changed(GdkKeymap *keymap, gpointer data)
 --
 1.8.5.3




-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH spice-gtk 1/2] gtk-session: s/g_debug/CHANNEL_DEBUG

2014-04-04 Thread Marc-André Lureau
---
 gtk/spice-gtk-session.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gtk/spice-gtk-session.c b/gtk/spice-gtk-session.c
index fe77f47..922614d 100644
--- a/gtk/spice-gtk-session.c
+++ b/gtk/spice-gtk-session.c
@@ -41,6 +41,7 @@
 #include spice-gtk-session-priv.h
 #include spice-session-priv.h
 #include spice-util-priv.h
+#include spice-channel-priv.h
 
 #define CLIPBOARD_LAST (VD_AGENT_CLIPBOARD_SELECTION_SECONDARY + 1)
 
@@ -164,8 +165,8 @@ static void 
spice_gtk_session_sync_keyboard_modifiers_for_channel(SpiceGtkSessio
 g_object_get(inputs, key-modifiers, guest_modifiers, NULL);
 
 client_modifiers = get_keyboard_lock_modifiers();
-g_debug(%s: input:%p client_modifiers:0x%x, guest_modifiers:0x%x,
-G_STRFUNC, inputs, client_modifiers, guest_modifiers);
+CHANNEL_DEBUG(inputs, client_modifiers:0x%x, guest_modifiers:0x%x,
+  client_modifiers, guest_modifiers);
 
 if (client_modifiers != guest_modifiers)
 spice_inputs_set_key_locks(inputs, client_modifiers);
-- 
1.8.5.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH spice-gtk 2/2] gtk-session: always sync modifiers for client events

2014-04-04 Thread Marc-André Lureau
The channel state is not synchronous.

It may happen that we want to set and unset quickly a modifier, but the
guest modifier state hasn't been updated yet, and will still be seen as
unset, preventing the last unset change.
---
 gtk/spice-gtk-session.c | 19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/gtk/spice-gtk-session.c b/gtk/spice-gtk-session.c
index 922614d..9e74cbc 100644
--- a/gtk/spice-gtk-session.c
+++ b/gtk/spice-gtk-session.c
@@ -156,32 +156,35 @@ static guint32 get_keyboard_lock_modifiers(void)
 }
 
 static void 
spice_gtk_session_sync_keyboard_modifiers_for_channel(SpiceGtkSession *self,
-  
SpiceInputsChannel* inputs)
+  
SpiceInputsChannel* inputs,
+  gboolean 
force)
 {
 gint guest_modifiers = 0, client_modifiers = 0;
 
 g_return_if_fail(SPICE_IS_INPUTS_CHANNEL(inputs));
 
 g_object_get(inputs, key-modifiers, guest_modifiers, NULL);
-
 client_modifiers = get_keyboard_lock_modifiers();
-CHANNEL_DEBUG(inputs, client_modifiers:0x%x, guest_modifiers:0x%x,
-  client_modifiers, guest_modifiers);
 
-if (client_modifiers != guest_modifiers)
+if (force || client_modifiers != guest_modifiers) {
+CHANNEL_DEBUG(inputs, client_modifiers:0x%x, guest_modifiers:0x%x,
+  client_modifiers, guest_modifiers);
 spice_inputs_set_key_locks(inputs, client_modifiers);
+}
 }
 
 static void keymap_modifiers_changed(GdkKeymap *keymap, gpointer data)
 {
 SpiceGtkSession *self = data;
+
 spice_gtk_session_sync_keyboard_modifiers(self);
 }
 
 static void guest_modifiers_changed(SpiceInputsChannel *inputs, gpointer data)
 {
 SpiceGtkSession *self = data;
-spice_gtk_session_sync_keyboard_modifiers_for_channel(self, inputs);
+
+spice_gtk_session_sync_keyboard_modifiers_for_channel(self, inputs, FALSE);
 }
 
 static void spice_gtk_session_init(SpiceGtkSession *self)
@@ -965,7 +968,7 @@ static void channel_new(SpiceSession *session, SpiceChannel 
*channel,
 if (SPICE_IS_INPUTS_CHANNEL(channel)) {
 spice_g_signal_connect_object(channel, inputs-modifiers,
   G_CALLBACK(guest_modifiers_changed), 
self, 0);
-spice_gtk_session_sync_keyboard_modifiers_for_channel(self, 
SPICE_INPUTS_CHANNEL(channel));
+spice_gtk_session_sync_keyboard_modifiers_for_channel(self, 
SPICE_INPUTS_CHANNEL(channel), TRUE);
 }
 }
 
@@ -1132,7 +1135,7 @@ void 
spice_gtk_session_sync_keyboard_modifiers(SpiceGtkSession *self)
 for (l = channels; l != NULL; l = l-next) {
 if (SPICE_IS_INPUTS_CHANNEL(l-data)) {
 SpiceInputsChannel *inputs = SPICE_INPUTS_CHANNEL(l-data);
-spice_gtk_session_sync_keyboard_modifiers_for_channel(self, 
inputs);
+spice_gtk_session_sync_keyboard_modifiers_for_channel(self, 
inputs, TRUE);
 }
 }
 }
-- 
1.8.5.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [spice-gtk] Add man page

2014-04-04 Thread Christophe Fergeau
Spice-GTK provides SPICE-specific command line options. This man page
describes these options as well as the format of SPICE URIs.
---
 Makefile.am  |   2 +-
 man/spice-client.pod | 180 +++
 2 files changed, 181 insertions(+), 1 deletion(-)
 create mode 100644 man/spice-client.pod

diff --git a/Makefile.am b/Makefile.am
index 8add19f..5029497 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 ACLOCAL_AMFLAGS = -I m4
 NULL =
 
-SUBDIRS = spice-common gtk po doc data
+SUBDIRS = spice-common gtk man po doc data
 
 if BUILD_TESTS
 SUBDIRS += tests
diff --git a/man/spice-client.pod b/man/spice-client.pod
new file mode 100644
index 000..1ad11e7
--- /dev/null
+++ b/man/spice-client.pod
@@ -0,0 +1,180 @@
+=head1 NAME
+
+Spice-GTK - a client-side library to access remote SPICE displays
+
+=head1 DESCRIPTION
+
+Spice-GTK is a library allowing to accesss remote displays. At the
+moment It's mainly used to access remote virtual machines over the
+SPICE protocol.
+
+The Spice-GTK library provides a set of command line options which
+can be used to tweak how some SPICE-specific option.
+
+=head1 URI
+
+The most basic SPICE URI which can be used is in the form
+  spice://hostname.example.com:5900
+
+This will try to initiate a SPICE connection to hostname.example.com
+to port 5900. This connection will be unencrypted. This URI is
+equivalent to
+  spice://hostname.example.com?port=5900
+
+In order to start a TLS connection, one would use
+  spice://hostname.example.com?tls-port=5900
+
+Other valid URI parameters are 'username' and 'password'. Be careful that
+passing a password through a SPICE URI might cause the password to be
+visible by any local user through 'ps'.
+
+Several parameters can be specified at once if they are separated
+by  or ;
+  spice://hostname.example.com?port=5900;tls-port=5901
+
+When using 'tls-port', it's recommended to not specify any non-TLS port.
+If you give both 'port' and 'tls-port', make sure you use the
+--spice-secure-channels options to indicate which channels must be secure.
+Otherwise, Spice-GTK first attempts a connection to the non-TLS port, and
+then try to use the TLS port. This means a man-in-the-middle could force
+the whole SPICE session to go in clear text regardless of the TLS settings
+of the SPICE server.
+
+=head1 OPTIONS
+
+The following options are accepted when running a SPICE client which
+makes use of the default Spice-GTK options:
+
+=over 4
+
+=item --spice-secure-channels=main,display,inputs,...,all
+
+Force the specified channels to be secured
+
+This instructs the SPICE client that it must use a TLS connection for these
+channels. If the server only offers non-TLS connections for these channels,
+the client will not use these. If the special value all is used, this
+indicates that all SPICE channels must be encrypted.
+
+=item --spice-disable-effects=wallpaper,font-smooth,animation,all
+
+Disable guest display effects
+
+This tells the SPICE client that it should attempt to disable some guest
+features in order to lower bandwidth usage. This requires guest support,
+usually through a SPICE agent. This is currently only supported on Windows
+guests.
+
+wallpaper will disable the guest wallpaper, font-smooth will disable
+font antialiasing, animation will try to disable some of the desktop
+environment animations. all will attempt to disable everything which
+can be disabled.
+
+=item --spice-color-depth=16,32
+
+Guest display color depth
+
+This tells the SPICE client that it should attempt to force the guest OS
+color depth. A lower color depth should lower bandwith usage. This requires
+guest support, usually through a SPICE agent. This is currently only
+supported on Windows guests.
+
+=item --spice-ca-file=file
+
+Truststore file for secure connections
+
+This option is used to specify a .crt file containing the CA certificate with 
which
+the SPICE server TLS certificates are signed. This is useful when using 
self-signed
+TLS certificates rather than certificates signed by an official CA.
+
+
+=item --spice-host-subject=host-subject
+
+Subject of the host certificate (field=value pairs separated by commas)
+
+When using self-signed certificates, or when the guest is migrated between
+different hosts, the subject/altSubject of the TLS certificate the SPICE
+server will provide will not necessarily match the hostname we are connecting 
to.
+This option makes it possible to override the expected subject of the TLS 
certificate.
+
+The subject must correspond to the Subject: line returned by:
+  openssl x509 -noout -text -in server-cert.pem
+
+=item --spice-debug
+
+Enable Spice-GTK debugging. This can also be toggled on with the
+SPICE_DEBUG environment variable, or using G_MESSAGES_DEBUG=all
+
+=item --spice-disable-audio
+
+Disable audio support
+
+=item --spice-disable-usbredir
+
+Disable USB redirection support
+
+=item --spice-usbredir-auto-redirect-filter=filter-string
+
+Filter 

[Spice-devel] [spice-gtk v2] Add man page

2014-04-04 Thread Christophe Fergeau
Spice-GTK provides SPICE-specific command line options. This man page
describes these options as well as the format of SPICE URIs.
---
Changes since v1:
  - forgot to add man/Makefile.am + corresponding configure.ac change :)


 Makefile.am  |   2 +-
 configure.ac |   1 +
 man/Makefile.am  |  16 +
 man/spice-client.pod | 180 +++
 4 files changed, 198 insertions(+), 1 deletion(-)
 create mode 100644 man/Makefile.am
 create mode 100644 man/spice-client.pod

diff --git a/Makefile.am b/Makefile.am
index 8add19f..5029497 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 ACLOCAL_AMFLAGS = -I m4
 NULL =
 
-SUBDIRS = spice-common gtk po doc data
+SUBDIRS = spice-common gtk man po doc data
 
 if BUILD_TESTS
 SUBDIRS += tests
diff --git a/configure.ac b/configure.ac
index 45417d2..d89bd6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -732,6 +732,7 @@ gtk/spice-version.h
 gtk/controller/Makefile
 doc/Makefile
 doc/reference/Makefile
+man/Makefile
 vapi/Makefile
 tests/Makefile
 ])
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 000..cf288c7
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,16 @@
+NULL =
+
+dist_man_MANS =\
+   spice-client.1  \
+   $(NULL)
+
+EXTRA_DIST =   \
+   spice-client.pod\
+   $(NULL)
+
+MAINTAINERCLEANFILES = $(dist_man_MANS)
+
+%.1: %.pod
+   $(AM_V_GEN)pod2man $  $@
+
+-include $(top_srcdir)/git.mk
diff --git a/man/spice-client.pod b/man/spice-client.pod
new file mode 100644
index 000..1ad11e7
--- /dev/null
+++ b/man/spice-client.pod
@@ -0,0 +1,180 @@
+=head1 NAME
+
+Spice-GTK - a client-side library to access remote SPICE displays
+
+=head1 DESCRIPTION
+
+Spice-GTK is a library allowing to accesss remote displays. At the
+moment It's mainly used to access remote virtual machines over the
+SPICE protocol.
+
+The Spice-GTK library provides a set of command line options which
+can be used to tweak how some SPICE-specific option.
+
+=head1 URI
+
+The most basic SPICE URI which can be used is in the form
+  spice://hostname.example.com:5900
+
+This will try to initiate a SPICE connection to hostname.example.com
+to port 5900. This connection will be unencrypted. This URI is
+equivalent to
+  spice://hostname.example.com?port=5900
+
+In order to start a TLS connection, one would use
+  spice://hostname.example.com?tls-port=5900
+
+Other valid URI parameters are 'username' and 'password'. Be careful that
+passing a password through a SPICE URI might cause the password to be
+visible by any local user through 'ps'.
+
+Several parameters can be specified at once if they are separated
+by  or ;
+  spice://hostname.example.com?port=5900;tls-port=5901
+
+When using 'tls-port', it's recommended to not specify any non-TLS port.
+If you give both 'port' and 'tls-port', make sure you use the
+--spice-secure-channels options to indicate which channels must be secure.
+Otherwise, Spice-GTK first attempts a connection to the non-TLS port, and
+then try to use the TLS port. This means a man-in-the-middle could force
+the whole SPICE session to go in clear text regardless of the TLS settings
+of the SPICE server.
+
+=head1 OPTIONS
+
+The following options are accepted when running a SPICE client which
+makes use of the default Spice-GTK options:
+
+=over 4
+
+=item --spice-secure-channels=main,display,inputs,...,all
+
+Force the specified channels to be secured
+
+This instructs the SPICE client that it must use a TLS connection for these
+channels. If the server only offers non-TLS connections for these channels,
+the client will not use these. If the special value all is used, this
+indicates that all SPICE channels must be encrypted.
+
+=item --spice-disable-effects=wallpaper,font-smooth,animation,all
+
+Disable guest display effects
+
+This tells the SPICE client that it should attempt to disable some guest
+features in order to lower bandwidth usage. This requires guest support,
+usually through a SPICE agent. This is currently only supported on Windows
+guests.
+
+wallpaper will disable the guest wallpaper, font-smooth will disable
+font antialiasing, animation will try to disable some of the desktop
+environment animations. all will attempt to disable everything which
+can be disabled.
+
+=item --spice-color-depth=16,32
+
+Guest display color depth
+
+This tells the SPICE client that it should attempt to force the guest OS
+color depth. A lower color depth should lower bandwith usage. This requires
+guest support, usually through a SPICE agent. This is currently only
+supported on Windows guests.
+
+=item --spice-ca-file=file
+
+Truststore file for secure connections
+
+This option is used to specify a .crt file containing the CA certificate with 
which
+the SPICE server TLS certificates are signed. This is useful when using 
self-signed
+TLS 

Re: [Spice-devel] [spice-gtk v2] Add man page

2014-04-04 Thread Marc-André Lureau
ack


On Fri, Apr 4, 2014 at 2:46 PM, Christophe Fergeau cferg...@redhat.comwrote:

 Spice-GTK provides SPICE-specific command line options. This man page
 describes these options as well as the format of SPICE URIs.
 ---
 Changes since v1:
   - forgot to add man/Makefile.am + corresponding configure.ac change :)


  Makefile.am  |   2 +-
  configure.ac |   1 +
  man/Makefile.am  |  16 +
  man/spice-client.pod | 180
 +++
  4 files changed, 198 insertions(+), 1 deletion(-)
  create mode 100644 man/Makefile.am
  create mode 100644 man/spice-client.pod

 diff --git a/Makefile.am b/Makefile.am
 index 8add19f..5029497 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -1,7 +1,7 @@
  ACLOCAL_AMFLAGS = -I m4
  NULL =

 -SUBDIRS = spice-common gtk po doc data
 +SUBDIRS = spice-common gtk man po doc data

  if BUILD_TESTS
  SUBDIRS += tests
 diff --git a/configure.ac b/configure.ac
 index 45417d2..d89bd6f 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -732,6 +732,7 @@ gtk/spice-version.h
  gtk/controller/Makefile
  doc/Makefile
  doc/reference/Makefile
 +man/Makefile
  vapi/Makefile
  tests/Makefile
  ])
 diff --git a/man/Makefile.am b/man/Makefile.am
 new file mode 100644
 index 000..cf288c7
 --- /dev/null
 +++ b/man/Makefile.am
 @@ -0,0 +1,16 @@
 +NULL =
 +
 +dist_man_MANS =\
 +   spice-client.1  \
 +   $(NULL)
 +
 +EXTRA_DIST =   \
 +   spice-client.pod\
 +   $(NULL)
 +
 +MAINTAINERCLEANFILES = $(dist_man_MANS)
 +
 +%.1: %.pod
 +   $(AM_V_GEN)pod2man $  $@
 +
 +-include $(top_srcdir)/git.mk
 diff --git a/man/spice-client.pod b/man/spice-client.pod
 new file mode 100644
 index 000..1ad11e7
 --- /dev/null
 +++ b/man/spice-client.pod
 @@ -0,0 +1,180 @@
 +=head1 NAME
 +
 +Spice-GTK - a client-side library to access remote SPICE displays
 +
 +=head1 DESCRIPTION
 +
 +Spice-GTK is a library allowing to accesss remote displays. At the
 +moment It's mainly used to access remote virtual machines over the
 +SPICE protocol.
 +
 +The Spice-GTK library provides a set of command line options which
 +can be used to tweak how some SPICE-specific option.
 +
 +=head1 URI
 +
 +The most basic SPICE URI which can be used is in the form
 +  spice://hostname.example.com:5900
 +
 +This will try to initiate a SPICE connection to hostname.example.com
 +to port 5900. This connection will be unencrypted. This URI is
 +equivalent to
 +  spice://hostname.example.com?port=5900
 +
 +In order to start a TLS connection, one would use
 +  spice://hostname.example.com?tls-port=5900
 +
 +Other valid URI parameters are 'username' and 'password'. Be careful that
 +passing a password through a SPICE URI might cause the password to be
 +visible by any local user through 'ps'.
 +
 +Several parameters can be specified at once if they are separated
 +by  or ;
 +  spice://hostname.example.com?port=5900;tls-port=5901
 +
 +When using 'tls-port', it's recommended to not specify any non-TLS port.
 +If you give both 'port' and 'tls-port', make sure you use the
 +--spice-secure-channels options to indicate which channels must be secure.
 +Otherwise, Spice-GTK first attempts a connection to the non-TLS port, and
 +then try to use the TLS port. This means a man-in-the-middle could force
 +the whole SPICE session to go in clear text regardless of the TLS settings
 +of the SPICE server.
 +
 +=head1 OPTIONS
 +
 +The following options are accepted when running a SPICE client which
 +makes use of the default Spice-GTK options:
 +
 +=over 4
 +
 +=item --spice-secure-channels=main,display,inputs,...,all
 +
 +Force the specified channels to be secured
 +
 +This instructs the SPICE client that it must use a TLS connection for
 these
 +channels. If the server only offers non-TLS connections for these
 channels,
 +the client will not use these. If the special value all is used, this
 +indicates that all SPICE channels must be encrypted.
 +
 +=item --spice-disable-effects=wallpaper,font-smooth,animation,all
 +
 +Disable guest display effects
 +
 +This tells the SPICE client that it should attempt to disable some guest
 +features in order to lower bandwidth usage. This requires guest support,
 +usually through a SPICE agent. This is currently only supported on Windows
 +guests.
 +
 +wallpaper will disable the guest wallpaper, font-smooth will disable
 +font antialiasing, animation will try to disable some of the desktop
 +environment animations. all will attempt to disable everything which
 +can be disabled.
 +
 +=item --spice-color-depth=16,32
 +
 +Guest display color depth
 +
 +This tells the SPICE client that it should attempt to force the guest OS
 +color depth. A lower color depth should lower bandwith usage. This
 requires
 +guest support, usually through a SPICE agent. This is currently only
 +supported on Windows guests.
 +
 +=item 

Re: [Spice-devel] [spice-gtk v2] Add man page

2014-04-04 Thread Marc-André Lureau
pod2man -c spice-gtk documentation ?


On Fri, Apr 4, 2014 at 3:10 PM, Marc-André Lureau 
marcandre.lur...@gmail.com wrote:

 ack


 On Fri, Apr 4, 2014 at 2:46 PM, Christophe Fergeau cferg...@redhat.comwrote:

 Spice-GTK provides SPICE-specific command line options. This man page
 describes these options as well as the format of SPICE URIs.
 ---
 Changes since v1:
   - forgot to add man/Makefile.am + corresponding configure.ac change :)


  Makefile.am  |   2 +-
  configure.ac |   1 +
  man/Makefile.am  |  16 +
  man/spice-client.pod | 180
 +++
  4 files changed, 198 insertions(+), 1 deletion(-)
  create mode 100644 man/Makefile.am
  create mode 100644 man/spice-client.pod

 diff --git a/Makefile.am b/Makefile.am
 index 8add19f..5029497 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -1,7 +1,7 @@
  ACLOCAL_AMFLAGS = -I m4
  NULL =

 -SUBDIRS = spice-common gtk po doc data
 +SUBDIRS = spice-common gtk man po doc data

  if BUILD_TESTS
  SUBDIRS += tests
 diff --git a/configure.ac b/configure.ac
 index 45417d2..d89bd6f 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -732,6 +732,7 @@ gtk/spice-version.h
  gtk/controller/Makefile
  doc/Makefile
  doc/reference/Makefile
 +man/Makefile
  vapi/Makefile
  tests/Makefile
  ])
 diff --git a/man/Makefile.am b/man/Makefile.am
 new file mode 100644
 index 000..cf288c7
 --- /dev/null
 +++ b/man/Makefile.am
 @@ -0,0 +1,16 @@
 +NULL =
 +
 +dist_man_MANS =\
 +   spice-client.1  \
 +   $(NULL)
 +
 +EXTRA_DIST =   \
 +   spice-client.pod\
 +   $(NULL)
 +
 +MAINTAINERCLEANFILES = $(dist_man_MANS)
 +
 +%.1: %.pod
 +   $(AM_V_GEN)pod2man $  $@
 +
 +-include $(top_srcdir)/git.mk
 diff --git a/man/spice-client.pod b/man/spice-client.pod
 new file mode 100644
 index 000..1ad11e7
 --- /dev/null
 +++ b/man/spice-client.pod
 @@ -0,0 +1,180 @@
 +=head1 NAME
 +
 +Spice-GTK - a client-side library to access remote SPICE displays
 +
 +=head1 DESCRIPTION
 +
 +Spice-GTK is a library allowing to accesss remote displays. At the
 +moment It's mainly used to access remote virtual machines over the
 +SPICE protocol.
 +
 +The Spice-GTK library provides a set of command line options which
 +can be used to tweak how some SPICE-specific option.
 +
 +=head1 URI
 +
 +The most basic SPICE URI which can be used is in the form
 +  spice://hostname.example.com:5900
 +
 +This will try to initiate a SPICE connection to hostname.example.com
 +to port 5900. This connection will be unencrypted. This URI is
 +equivalent to
 +  spice://hostname.example.com?port=5900
 +
 +In order to start a TLS connection, one would use
 +  spice://hostname.example.com?tls-port=5900
 +
 +Other valid URI parameters are 'username' and 'password'. Be careful that
 +passing a password through a SPICE URI might cause the password to be
 +visible by any local user through 'ps'.
 +
 +Several parameters can be specified at once if they are separated
 +by  or ;
 +  spice://hostname.example.com?port=5900;tls-port=5901
 +
 +When using 'tls-port', it's recommended to not specify any non-TLS port.
 +If you give both 'port' and 'tls-port', make sure you use the
 +--spice-secure-channels options to indicate which channels must be
 secure.
 +Otherwise, Spice-GTK first attempts a connection to the non-TLS port, and
 +then try to use the TLS port. This means a man-in-the-middle could force
 +the whole SPICE session to go in clear text regardless of the TLS
 settings
 +of the SPICE server.
 +
 +=head1 OPTIONS
 +
 +The following options are accepted when running a SPICE client which
 +makes use of the default Spice-GTK options:
 +
 +=over 4
 +
 +=item --spice-secure-channels=main,display,inputs,...,all
 +
 +Force the specified channels to be secured
 +
 +This instructs the SPICE client that it must use a TLS connection for
 these
 +channels. If the server only offers non-TLS connections for these
 channels,
 +the client will not use these. If the special value all is used, this
 +indicates that all SPICE channels must be encrypted.
 +
 +=item --spice-disable-effects=wallpaper,font-smooth,animation,all
 +
 +Disable guest display effects
 +
 +This tells the SPICE client that it should attempt to disable some guest
 +features in order to lower bandwidth usage. This requires guest support,
 +usually through a SPICE agent. This is currently only supported on
 Windows
 +guests.
 +
 +wallpaper will disable the guest wallpaper, font-smooth will disable
 +font antialiasing, animation will try to disable some of the desktop
 +environment animations. all will attempt to disable everything which
 +can be disabled.
 +
 +=item --spice-color-depth=16,32
 +
 +Guest display color depth
 +
 +This tells the SPICE client that it should attempt to force the guest OS
 +color depth. A lower color depth should lower bandwith usage. This
 requires
 

[Spice-devel] [spice-gtk v3] Add man page

2014-04-04 Thread Christophe Fergeau
Spice-GTK provides SPICE-specific command line options. This man page
describes these options as well as the format of SPICE URIs.
---
Changes since v2:
- added '-c' parameter to pod2man
- listed valid channel names in --spice-secure-channels description
- described USB filter syntax

 Makefile.am  |   2 +-
 configure.ac |   1 +
 man/Makefile.am  |  16 +
 man/spice-client.pod | 196 +++
 4 files changed, 214 insertions(+), 1 deletion(-)
 create mode 100644 man/Makefile.am
 create mode 100644 man/spice-client.pod

diff --git a/Makefile.am b/Makefile.am
index 8add19f..5029497 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 ACLOCAL_AMFLAGS = -I m4
 NULL =
 
-SUBDIRS = spice-common gtk po doc data
+SUBDIRS = spice-common gtk man po doc data
 
 if BUILD_TESTS
 SUBDIRS += tests
diff --git a/configure.ac b/configure.ac
index 45417d2..d89bd6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -732,6 +732,7 @@ gtk/spice-version.h
 gtk/controller/Makefile
 doc/Makefile
 doc/reference/Makefile
+man/Makefile
 vapi/Makefile
 tests/Makefile
 ])
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 000..a8f7e3f
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,16 @@
+NULL =
+
+dist_man_MANS =\
+   spice-client.1  \
+   $(NULL)
+
+EXTRA_DIST =   \
+   spice-client.pod\
+   $(NULL)
+
+MAINTAINERCLEANFILES = $(dist_man_MANS)
+
+%.1: %.pod
+   $(AM_V_GEN)pod2man -c Spice-GTK Documentation $  $@
+
+-include $(top_srcdir)/git.mk
diff --git a/man/spice-client.pod b/man/spice-client.pod
new file mode 100644
index 000..3b9ae0c
--- /dev/null
+++ b/man/spice-client.pod
@@ -0,0 +1,196 @@
+=head1 NAME
+
+Spice-GTK - a client-side library to access remote SPICE displays
+
+=head1 DESCRIPTION
+
+Spice-GTK is a library allowing to accesss remote displays. At the
+moment It's mainly used to access remote virtual machines over the
+SPICE protocol.
+
+The Spice-GTK library provides a set of command line options which
+can be used to tweak how some SPICE-specific option.
+
+=head1 URI
+
+The most basic SPICE URI which can be used is in the form
+  spice://hostname.example.com:5900
+
+This will try to initiate a SPICE connection to hostname.example.com
+to port 5900. This connection will be unencrypted. This URI is
+equivalent to
+  spice://hostname.example.com?port=5900
+
+In order to start a TLS connection, one would use
+  spice://hostname.example.com?tls-port=5900
+
+Other valid URI parameters are 'username' and 'password'. Be careful that
+passing a password through a SPICE URI might cause the password to be
+visible by any local user through 'ps'.
+
+Several parameters can be specified at once if they are separated
+by  or ;
+  spice://hostname.example.com?port=5900;tls-port=5901
+
+When using 'tls-port', it's recommended to not specify any non-TLS port.
+If you give both 'port' and 'tls-port', make sure you use the
+--spice-secure-channels options to indicate which channels must be secure.
+Otherwise, Spice-GTK first attempts a connection to the non-TLS port, and
+then try to use the TLS port. This means a man-in-the-middle could force
+the whole SPICE session to go in clear text regardless of the TLS settings
+of the SPICE server.
+
+=head1 OPTIONS
+
+The following options are accepted when running a SPICE client which
+makes use of the default Spice-GTK options:
+
+=over 4
+
+=item --spice-secure-channels=main,display,inputs,...,all
+
+Force the specified channels to be secured
+
+This instructs the SPICE client that it must use a TLS connection for these
+channels. If the server only offers non-TLS connections for these channels,
+the client will not use these. If the special value all is used, this
+indicates that all SPICE channels must be encrypted.
+
+The current SPICE channels are: main, display, inputs, cursor, playback,
+record, smartcard, usbredir.
+
+=item --spice-disable-effects=wallpaper,font-smooth,animation,all
+
+Disable guest display effects
+
+This tells the SPICE client that it should attempt to disable some guest
+features in order to lower bandwidth usage. This requires guest support,
+usually through a SPICE agent. This is currently only supported on Windows
+guests.
+
+wallpaper will disable the guest wallpaper, font-smooth will disable
+font antialiasing, animation will try to disable some of the desktop
+environment animations. all will attempt to disable everything which
+can be disabled.
+
+=item --spice-color-depth=16,32
+
+Guest display color depth
+
+This tells the SPICE client that it should attempt to force the guest OS
+color depth. A lower color depth should lower bandwith usage. This requires
+guest support, usually through a SPICE agent. This is currently only
+supported on Windows guests.
+
+=item --spice-ca-file=file
+
+Truststore file for secure 

Re: [Spice-devel] [PATCH spice-gtk 1/2] gtk-session: s/g_debug/SPICE_DEBUG

2014-04-04 Thread Jonathon Jongsma
oops, I didn't really intend to commit that debug statement -- it makes the log 
a bit noisy.  Feel free to remove it if you'd like.  Otherwise ACK.

- Original Message -
 From: Marc-André Lureau marcandre.lur...@gmail.com
 To: spice-devel@lists.freedesktop.org
 Sent: Friday, April 4, 2014 5:21:21 AM
 Subject: [Spice-devel] [PATCH spice-gtk 1/2] gtk-session: 
 s/g_debug/SPICE_DEBUG
 
 ---
  gtk/spice-gtk-session.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/gtk/spice-gtk-session.c b/gtk/spice-gtk-session.c
 index fe77f47..644edcc 100644
 --- a/gtk/spice-gtk-session.c
 +++ b/gtk/spice-gtk-session.c
 @@ -164,8 +164,8 @@ static void
 spice_gtk_session_sync_keyboard_modifiers_for_channel(SpiceGtkSessio
  g_object_get(inputs, key-modifiers, guest_modifiers, NULL);
  
  client_modifiers = get_keyboard_lock_modifiers();
 -g_debug(%s: input:%p client_modifiers:0x%x, guest_modifiers:0x%x,
 -G_STRFUNC, inputs, client_modifiers, guest_modifiers);
 +SPICE_DEBUG(%s: input:%p client_modifiers:0x%x, guest_modifiers:0x%x,
 +G_STRFUNC, inputs, client_modifiers, guest_modifiers);
  
  if (client_modifiers != guest_modifiers)
  spice_inputs_set_key_locks(inputs, client_modifiers);
 --
 1.8.5.3
 
 ___
 Spice-devel mailing list
 Spice-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/spice-devel
 
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] test shared folder error: spiceport not supported in this QEMU binary

2014-04-04 Thread Cody Chan
sorry, I come for help again ==

fedora 19 x64
qemu from upstrem(2.0.0-rc1)
libvirt 1.2.3
spice-server 0.12.4
spice-protocol 0.12.6

According to http://elmarco.fedorapeople.org/manual.html#_configuration_7,
I configured xml with the following section:
channel type='spiceport'
source channel='org.spice-space.webdav.0'/
target type='virtio' name='org.spice-space.webdav.0'/
/channel

but when I run: virsh start vm_win7, I get a error:
error: Failed to start domain vm_win7
error: unsupported configuration: spiceport not supported in this QEMU binary

so, I use qemu-kvm instead of libvirt with the parameters told by
_configuration_7:
qemu-kvm -m 1024 -drive file=/var/lib/libvirt/images/vm_win7.img
-device virtserialport,bus=virtio-
serial0.0,nr=1,chardev=charchannel1,id=channel1,name=org.spice-space.webdav.0
-chardev spiceport,name=org.spice-space.webdav.0,id=charchannel1

still, get a error:
qemu-system-x86_64: -device
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel1,id=channel1,name=org.spice-space.webdav.0:
Bus 'virtio-serial0.0' not found

if I remove the configure section in xml of libvirt, it works fine, so
does qemu-kvm

now, any one gives me some idea to continue?
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH spice-gtk 2/2] gtk-session: always sync modifiers for client events

2014-04-04 Thread Jonathon Jongsma
On Fri, 2014-04-04 at 12:47 +0200, Marc-André Lureau wrote:
 The channel state is not synchronous.
 
 It may happen that we want to set and unset quickly a modifier, but the
 guest modifier state hasn't been updated yet, and will still be seen as
 unset, preventing the last unset change.
 ---
  gtk/spice-gtk-session.c | 19 +++
  1 file changed, 11 insertions(+), 8 deletions(-)
 
 diff --git a/gtk/spice-gtk-session.c b/gtk/spice-gtk-session.c
 index 922614d..9e74cbc 100644
 --- a/gtk/spice-gtk-session.c
 +++ b/gtk/spice-gtk-session.c
 @@ -156,32 +156,35 @@ static guint32 get_keyboard_lock_modifiers(void)
  }
  
  static void 
 spice_gtk_session_sync_keyboard_modifiers_for_channel(SpiceGtkSession *self,
 -  
 SpiceInputsChannel* inputs)
 +  
 SpiceInputsChannel* inputs,
 +  gboolean 
 force)
  {
  gint guest_modifiers = 0, client_modifiers = 0;
  
  g_return_if_fail(SPICE_IS_INPUTS_CHANNEL(inputs));
  
  g_object_get(inputs, key-modifiers, guest_modifiers, NULL);
 -
  client_modifiers = get_keyboard_lock_modifiers();
 -CHANNEL_DEBUG(inputs, client_modifiers:0x%x, guest_modifiers:0x%x,
 -  client_modifiers, guest_modifiers);
  
 -if (client_modifiers != guest_modifiers)
 +if (force || client_modifiers != guest_modifiers) {
 +CHANNEL_DEBUG(inputs, client_modifiers:0x%x, guest_modifiers:0x%x,
 +  client_modifiers, guest_modifiers);
  spice_inputs_set_key_locks(inputs, client_modifiers);
 +}
  }
  
  static void keymap_modifiers_changed(GdkKeymap *keymap, gpointer data)
  {
  SpiceGtkSession *self = data;
 +
  spice_gtk_session_sync_keyboard_modifiers(self);
  }
  
  static void guest_modifiers_changed(SpiceInputsChannel *inputs, gpointer 
 data)
  {
  SpiceGtkSession *self = data;
 -spice_gtk_session_sync_keyboard_modifiers_for_channel(self, inputs);
 +
 +spice_gtk_session_sync_keyboard_modifiers_for_channel(self, inputs, 
 FALSE);
  }
  
  static void spice_gtk_session_init(SpiceGtkSession *self)
 @@ -965,7 +968,7 @@ static void channel_new(SpiceSession *session, 
 SpiceChannel *channel,
  if (SPICE_IS_INPUTS_CHANNEL(channel)) {
  spice_g_signal_connect_object(channel, inputs-modifiers,
G_CALLBACK(guest_modifiers_changed), 
 self, 0);
 -spice_gtk_session_sync_keyboard_modifiers_for_channel(self, 
 SPICE_INPUTS_CHANNEL(channel));
 +spice_gtk_session_sync_keyboard_modifiers_for_channel(self, 
 SPICE_INPUTS_CHANNEL(channel), TRUE);
  }
  }
  
 @@ -1132,7 +1135,7 @@ void 
 spice_gtk_session_sync_keyboard_modifiers(SpiceGtkSession *self)
  for (l = channels; l != NULL; l = l-next) {
  if (SPICE_IS_INPUTS_CHANNEL(l-data)) {
  SpiceInputsChannel *inputs = SPICE_INPUTS_CHANNEL(l-data);
 -spice_gtk_session_sync_keyboard_modifiers_for_channel(self, 
 inputs);
 +spice_gtk_session_sync_keyboard_modifiers_for_channel(self, 
 inputs, TRUE);
  }
  }
  }


Hmm, I'm not sure about this one. The problem is that
GdkKeymap::state-changed will fire whenever *any* modifier is changed,
even ones we don't care about (e.g. shift, ctrl, alt, etc).  This patch
makes us send down messages in response to all of those keypresses. That
doesn't seem like a great idea. But this prompted me to think about the
issue in a bit more depth.  Allow me to back up and explain a little
bit.

The root problem with the modifier synchronization was that there were
only a few discrete points that modifiers get synchronized:
 - when the channel is created
 - when the window is focused

The first patch of this series (building on longguang's original
suggestion) fixed the case where the guest changed the modifiers behind
our back. We now reset them back to match the client state by listening
for the 'inputs-modifiers' signal.

This second patch (the GdkKeymap::state-changed signal handler) was not
strictly related to the reported bug, but it seemed to be a cleaner way
to handle synchronization on the client side. Instead of just
synchronizing at the discrete moment when the widget gets focus, we
synchronize whenever there is a change in the client modifier state.

However, I now wonder if there may be unintended consequences of adding
this feature. I didn't notice any problems while testing the patch, but
in thinking about it some more and doing a little testing, here are some
potential issues:

- if the guest display widget is focused and the user presses
Caps lock, we will send a keypress message (which will cause the
capslock modifier to toggle on the guest) and then we will
immediately send a modifers message. So we'll send duplicate
messages for the same event. In practice I 

Re: [Spice-devel] [PATCH spice-gtk 2/2] gtk-session: always sync modifiers for client events

2014-04-04 Thread Marc-André Lureau


- Original Message -
 - if the guest display widget is focused and the user presses
 Caps lock, we will send a keypress message (which will cause the
 capslock modifier to toggle on the guest) and then we will
 immediately send a modifers message. So we'll send duplicate
 messages for the same event. In practice I hadn't noticed any
 problems because of this, but I wonder if this is partly what
 caused the issue you observed?

Yeah, I noticed that too, but I don't think it's a big problem sending twice 
the current state.


 - if the capslock on the client is mapped to something else
 (e.g. 'control'), and the capslock key is pressed while the
 display widget is focused, we will send a keypress event to the
 guest, which will cause the guest's capslock state to change.


 However, the client's capslock state will not change, so when we
 receive the 'inputs-modifiers' message from the guest, we will
 send down the old value again.  On the other hand, this is a
 corner case because it requires a non-standard keyboard layout,
 and the alternative (not overriding the guest modifiers state)
 results in an out-of-sync modifiers state between the guest and
 client. So I'm not sure what the right answer is here.
 
 thoughts?

That sounds still ok to me, we want the guest to be sync with the client state. 
Doing something else will be even more annoying, wouldn't it?
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk v3] Add man page

2014-04-04 Thread Jonathon Jongsma
Just a couple minor nitpicks below.  Otherwise ACK.

On Fri, 2014-04-04 at 15:23 +0200, Christophe Fergeau wrote:
 Spice-GTK provides SPICE-specific command line options. This man page
 describes these options as well as the format of SPICE URIs.
 ---
 Changes since v2:
 - added '-c' parameter to pod2man
 - listed valid channel names in --spice-secure-channels description
 - described USB filter syntax
 
  Makefile.am  |   2 +-
  configure.ac |   1 +
  man/Makefile.am  |  16 +
  man/spice-client.pod | 196 
 +++
  4 files changed, 214 insertions(+), 1 deletion(-)
  create mode 100644 man/Makefile.am
  create mode 100644 man/spice-client.pod
 
 diff --git a/Makefile.am b/Makefile.am
 index 8add19f..5029497 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -1,7 +1,7 @@
  ACLOCAL_AMFLAGS = -I m4
  NULL =
  
 -SUBDIRS = spice-common gtk po doc data
 +SUBDIRS = spice-common gtk man po doc data
  
  if BUILD_TESTS
  SUBDIRS += tests
 diff --git a/configure.ac b/configure.ac
 index 45417d2..d89bd6f 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -732,6 +732,7 @@ gtk/spice-version.h
  gtk/controller/Makefile
  doc/Makefile
  doc/reference/Makefile
 +man/Makefile
  vapi/Makefile
  tests/Makefile
  ])
 diff --git a/man/Makefile.am b/man/Makefile.am
 new file mode 100644
 index 000..a8f7e3f
 --- /dev/null
 +++ b/man/Makefile.am
 @@ -0,0 +1,16 @@
 +NULL =
 +
 +dist_man_MANS =  \
 + spice-client.1  \
 + $(NULL)
 +
 +EXTRA_DIST = \
 + spice-client.pod\
 + $(NULL)
 +
 +MAINTAINERCLEANFILES = $(dist_man_MANS)
 +
 +%.1: %.pod
 + $(AM_V_GEN)pod2man -c Spice-GTK Documentation $  $@
 +
 +-include $(top_srcdir)/git.mk
 diff --git a/man/spice-client.pod b/man/spice-client.pod
 new file mode 100644
 index 000..3b9ae0c
 --- /dev/null
 +++ b/man/spice-client.pod
 @@ -0,0 +1,196 @@
 +=head1 NAME
 +
 +Spice-GTK - a client-side library to access remote SPICE displays
 +
 +=head1 DESCRIPTION
 +
 +Spice-GTK is a library allowing to accesss remote displays. At the
 +moment It's mainly used to access remote virtual machines over the
 +SPICE protocol.

'accesss' has an extra 's'.  Also, allowing to access sounds a bit
awkward.  allowing access to might be a bit better? It's doesn't
need to be capitalized. The last sentence implies that eventually we
might be able to access remote vms over some other protocol ;)  Suggest
the following:

Spice-GTK is a library allowing access to remote displays over
the
SPICE protocol. At the moment It's mainly used to access remote
virtual machines.


 +
 +The Spice-GTK library provides a set of command line options which
 +can be used to tweak how some SPICE-specific option.


The previous sentence seems unfinished.


 +
 +=head1 URI
 +
 +The most basic SPICE URI which can be used is in the form
 +  spice://hostname.example.com:5900
 +
 +This will try to initiate a SPICE connection to hostname.example.com
 +to port 5900. This connection will be unencrypted. This URI is
 +equivalent to
 +  spice://hostname.example.com?port=5900
 +
 +In order to start a TLS connection, one would use
 +  spice://hostname.example.com?tls-port=5900
 +
 +Other valid URI parameters are 'username' and 'password'. Be careful that
 +passing a password through a SPICE URI might cause the password to be
 +visible by any local user through 'ps'.
 +
 +Several parameters can be specified at once if they are separated
 +by  or ;
 +  spice://hostname.example.com?port=5900;tls-port=5901
 +
 +When using 'tls-port', it's recommended to not specify any non-TLS port.
 +If you give both 'port' and 'tls-port', make sure you use the
 +--spice-secure-channels options to indicate which channels must be secure.
 +Otherwise, Spice-GTK first attempts a connection to the non-TLS port, and
 +then try to use the TLS port. This means a man-in-the-middle could force
 +the whole SPICE session to go in clear text regardless of the TLS settings
 +of the SPICE server.
 +
 +=head1 OPTIONS
 +
 +The following options are accepted when running a SPICE client which
 +makes use of the default Spice-GTK options:
 +
 +=over 4
 +
 +=item --spice-secure-channels=main,display,inputs,...,all
 +
 +Force the specified channels to be secured
 +
 +This instructs the SPICE client that it must use a TLS connection for these
 +channels. If the server only offers non-TLS connections for these channels,
 +the client will not use these. If the special value all is used, this
 +indicates that all SPICE channels must be encrypted.
 +
 +The current SPICE channels are: main, display, inputs, cursor, playback,
 +record, smartcard, usbredir.
 +
 +=item --spice-disable-effects=wallpaper,font-smooth,animation,all
 +
 +Disable guest display effects
 +
 +This tells the SPICE client that it should attempt to disable some guest
 +features 

Re: [Spice-devel] test shared folder error: spiceport not supported in this QEMU binary

2014-04-04 Thread Cody Chan
Hi,


On Sat, Apr 5, 2014 at 12:23 AM, Marc-André Lureau mlur...@redhat.com wrote:


 - Original Message -
 sorry, I come for help again ==

 fedora 19 x64
 qemu from upstrem(2.0.0-rc1)
 libvirt 1.2.3
 spice-server 0.12.4

 You'll also need spice-server from upstream git.
Yes, I rebuilt again from upstream
 spice-protocol 0.12.6

 According to http://elmarco.fedorapeople.org/manual.html#_configuration_7,
 I configured xml with the following section:
 channel type='spiceport'
 source channel='org.spice-space.webdav.0'/
 target type='virtio' name='org.spice-space.webdav.0'/
 /channel

 but when I run: virsh start vm_win7, I get a error:
 error: Failed to start domain vm_win7
 error: unsupported configuration: spiceport not supported in this QEMU binary

 Are you sure libvirt is running qemu from upstream? What does qemu-kvm 
 --version gives you?
I'm sure, but after rebuilding, the qemu-system-x86_64(link of
qemu-kvm?) --version is 1.7.91! Is it normal?
qemu with version 2.0.0 generates qemu-system-x86_64 with version 1.7.91?

 so, I use qemu-kvm instead of libvirt with the parameters told by
 _configuration_7:
 qemu-kvm -m 1024 -drive file=/var/lib/libvirt/images/vm_win7.img
 -device virtserialport,bus=virtio-
 serial0.0,nr=1,chardev=charchannel1,id=channel1,name=org.spice-space.webdav.0
 -chardev spiceport,name=org.spice-space.webdav.0,id=charchannel1

 still, get a error:
 qemu-system-x86_64: -device
 virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel1,id=channel1,name=org.spice-space.webdav.0:
 Bus 'virtio-serial0.0' not found


 Hmm, you could try without specifying the bus, or adding this device:

 -device virtio-serial-pci,id=virtio-serial0

 if I remove the configure section in xml of libvirt, it works fine, so
 does qemu-kvm

 now, any one gives me some idea to continue?
 ___
 Spice-devel mailing list
 Spice-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/spice-devel

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH spice-gtk 2/2] gtk-session: always sync modifiers for client events

2014-04-04 Thread Jonathon Jongsma


- Original Message -
 From: Marc-André Lureau mlur...@redhat.com
 To: Jonathon Jongsma jjong...@redhat.com
 Cc: spice-devel@lists.freedesktop.org
 Sent: Friday, April 4, 2014 12:16:26 PM
 Subject: Re: [Spice-devel] [PATCH spice-gtk 2/2] gtk-session: always sync 
 modifiers for client events
 
 
 
 - Original Message -
  - if the guest display widget is focused and the user presses
  Caps lock, we will send a keypress message (which will cause the
  capslock modifier to toggle on the guest) and then we will
  immediately send a modifers message. So we'll send duplicate
  messages for the same event. In practice I hadn't noticed any
  problems because of this, but I wonder if this is partly what
  caused the issue you observed?
 
 Yeah, I noticed that too, but I don't think it's a big problem sending twice
 the current state.

Probably not. I can't currently think of a race condition that would cause 
problems here.

 
 
  - if the capslock on the client is mapped to something else
  (e.g. 'control'), and the capslock key is pressed while the
  display widget is focused, we will send a keypress event to the
  guest, which will cause the guest's capslock state to change.
 
 
  However, the client's capslock state will not change, so when we
  receive the 'inputs-modifiers' message from the guest, we will
  send down the old value again.  On the other hand, this is a
  corner case because it requires a non-standard keyboard layout,
  and the alternative (not overriding the guest modifiers state)
  results in an out-of-sync modifiers state between the guest and
  client. So I'm not sure what the right answer is here.
  
  thoughts?
 
 That sounds still ok to me, we want the guest to be sync with the client
 state. Doing something else will be even more annoying, wouldn't it?
 

Yes, probably, but I thought I'd mention it for others to consider.

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH spice-gtk] display: signal primary-destroy when clearing all surfaces

2014-04-04 Thread Jonathon Jongsma
ACK, but as you say, it's hard to tell if it will really fix that bug.

- Original Message -
 From: Marc-André Lureau marcandre.lur...@gmail.com
 To: spice-devel@lists.freedesktop.org
 Sent: Friday, April 4, 2014 10:50:23 AM
 Subject: [Spice-devel] [PATCH spice-gtk] display: signal primary-destroy  
 when clearing all surfaces
 
 When destroying the primary surface, we need to signal it, since
 listeners might be referencing the data pointer. Currently, this only
 happens during channel finalize().
 
 This could help with rhbz#1082555.
 ---
  gtk/channel-display.c | 6 ++
  1 file changed, 6 insertions(+)
 
 diff --git a/gtk/channel-display.c b/gtk/channel-display.c
 index 96fd764..ff9f85c 100644
 --- a/gtk/channel-display.c
 +++ b/gtk/channel-display.c
 @@ -807,12 +807,18 @@ static display_surface
 *find_surface(SpiceDisplayChannelPrivate *c, guint32 surf
  return g_hash_table_lookup(c-surfaces, GINT_TO_POINTER(surface_id));
  }
  
 +/* main or coroutine context */
  static void clear_surfaces(SpiceChannel *channel, gboolean keep_primary)
  {
  SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)-priv;
  GHashTableIter iter;
  display_surface *surface;
  
 +if (!keep_primary) {
 +c-primary = NULL;
 +emit_main_context(channel, SPICE_DISPLAY_PRIMARY_DESTROY);
 +}
 +
  g_hash_table_iter_init(iter, c-surfaces);
  while (g_hash_table_iter_next(iter, NULL, (gpointer*)surface)) {
  
 --
 1.8.5.3
 
 ___
 Spice-devel mailing list
 Spice-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/spice-devel
 
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel