[Spice-devel] How to use spice floder sharing

2018-12-13 Thread wangjiedong
I followed the way to configure Floder sharing on https://www.spice-space.org/spice-user-manual.html The configuration of vm XML is ok , but on Windows 7 vm the spice-webdavd service's status is allways stopped after installing spice-webdavd-x64-2.2.msi, so i can never choose a floder with virt-

[Spice-devel] [PATCH linux vdagent 06/10] Make clearer distinctions between output ids

2018-12-13 Thread Jonathon Jongsma
There are basically three ways to refer to an output within vdagent: - The index of the array of MonitorConfig message. This is essentially a "spice display id" - the index of the array of xrandr outputs. This is the "output index" - the xrandr output id. This is the "output ID" Previous

[Spice-devel] [PATCH linux vdagent 10/10] Send display_id down to the vdagentd daemon

2018-12-13 Thread Jonathon Jongsma
Add a display_id field to the structure that we use to send down the list of guest display resolutions to the vdagentd daemon. This allows us to map the spice display id to the proper X display for determining mouse locations, etc. --- src/vdagent/x11-randr.c | 36 +

[Spice-devel] [PATCH linux vdagent 08/10] Factor a function out of get_current_mon_config()

2018-12-13 Thread Jonathon Jongsma
When sending the guest xorg resolution to the vdagentd daemon, we get the current resolution with this function, which returns a VDAgentMonitorsConfig structure that must then be converted to the structure that we send to the daemon. Rather than re-using this function that returns the wrong type, f

[Spice-devel] [PATCH linux vdagent 09/10] Use new function in vdagent_x11_send_daemon_guest_xorg_res()

2018-12-13 Thread Jonathon Jongsma
Rather than getting the current guest resolution in a VDAgentMonitorsConfig struct and then translating it to a new struct type for sending down to the daemon, simply use the new function that was factored out in a previous commit and populate the message struct directly. --- src/vdagent/x11-randr

[Spice-devel] [PATCH linux vdagent 07/10] Use guest output map to determine xrandr output

2018-12-13 Thread Jonathon Jongsma
instead of using the spice display id directly as the xrandr output, look it up using our new guest output map --- src/vdagent/x11-randr.c | 79 - 1 file changed, 70 insertions(+), 9 deletions(-) diff --git a/src/vdagent/x11-randr.c b/src/vdagent/x11-randr.

[Spice-devel] [PATCH linux vdagent 05/10] Look up and store xrandr output in display map

2018-12-13 Thread Jonathon Jongsma
Instead of storing each device address and device display ID in the hash table, simply use the lookup_xrandr_output_for_device_info() function to look up the ID of the xrandr output and store that in the hash table. --- src/vdagent/x11-priv.h | 2 +- src/vdagent/x11-randr.c | 27 +---

[Spice-devel] [RFC PATCH linux vdagent 00/10] Use the PCI addr and display ID

2018-12-13 Thread Jonathon Jongsma
This is a patch set that handles the PCI address and device dispay ID sent down to the agent by the server, and uses that to maintain a map for looking up a particular xrandr output for a given spice display id. This patch series builds on the patch from Lukas titled "Receive the graphics_device_i

[Spice-devel] [PATCH linux vdagent 04/10] Move handling of DeviceInfo to vdagent_x11

2018-12-13 Thread Jonathon Jongsma
--- src/vdagent/vdagent.c | 68 + src/vdagent/x11-priv.h | 1 + src/vdagent/x11-randr.c | 57 ++ src/vdagent/x11.c | 13 src/vdagent/x11.h | 1 + 5 files changed, 73 insertions(+), 67 deletions(-) di

[Spice-devel] [PATCH linux vdagent 02/10] Fix confusion between output index and crtc index

2018-12-13 Thread Jonathon Jongsma
Get the CRTC ID from the output struct rather than using the output_index as an index into the array of crtcs --- src/vdagent/x11-randr.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/vdagent/x11-randr.c b/src/vdagent/x11-randr.c index 88f723f..802af5c 100644 ---

[Spice-devel] [PATCH linux vdagent 03/10] fix typo in comment

2018-12-13 Thread Jonathon Jongsma
--- src/vdagent/x11-randr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vdagent/x11-randr.c b/src/vdagent/x11-randr.c index 802af5c..f74f7dd 100644 --- a/src/vdagent/x11-randr.c +++ b/src/vdagent/x11-randr.c @@ -806,7 +806,7 @@ void vdagent_x11_set_monitor_config(struct

[Spice-devel] [PATCH linux vdagent 01/10] Add lookup_xrand_output_for_device_info()

2018-12-13 Thread Jonathon Jongsma
Add a function to look up an xrandr output for a given device display id. This uses sysfs and the drm subsystem to lookup information about a graphics device output. It then compares the drm output name to xrandr output names to try to match that device output to an xrandr output. This is necesary

Re: [Spice-devel] [spice-gtk v1 1/2] Deprecate “color-depth” properties

2018-12-13 Thread Uri Lublin
On 12/11/18 2:48 PM, Victor Toso wrote: From: Victor Toso With commit 1a980f3712 we deprecated some command line options. The color-depth one is the only one which is not used for testing/debug purposes. The intention of this option is to set guest's video driver color configuration, currently

Re: [Spice-devel] [PATCH spice-common 2/2] test: Add a test for subject_to_x509_name function

2018-12-13 Thread Frediano Ziglio
Passes, see https://gitlab.freedesktop.org/fziglio/spice-common/pipelines/12076 > > Signed-off-by: Frediano Ziglio > --- > common/ssl_verify.c | 5 +- > common/ssl_verify.h | 4 ++ > tests/Makefile.am | 20 ++ > tests/test-ssl-verify.c | 141 ++

[Spice-devel] [PATCH spice-common 2/2] test: Add a test for subject_to_x509_name function

2018-12-13 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- common/ssl_verify.c | 5 +- common/ssl_verify.h | 4 ++ tests/Makefile.am | 20 ++ tests/test-ssl-verify.c | 141 4 files changed, 169 insertions(+), 1 deletion(-) create mode 100644 tests/test-ssl

[Spice-devel] [PATCH spice-common 1/2] Use a single copy of subject string

2018-12-13 Thread Frediano Ziglio
A full copy can keep both the key and the value instead of allocating twice the memory. Also this remove a warning produced by Coverity that is assuming that allocating strlen(string_variable) is wrong. Signed-off-by: Frediano Ziglio --- common/ssl_verify.c | 8 1 file changed, 4 insert

Re: [Spice-devel] [spice-gtk v2 5/7] channel-main: clipboard release: don't fail silently

2018-12-13 Thread Uri Lublin
On 12/10/18 1:02 PM, Victor Toso wrote: From: Victor Toso Spice client should listen to SpiceMainChannel::agent-connected notification and avoid calling any clipboard related functions such as spice_gtk_session_paste_from_guest() from client-gtk library. This patch removes the silent return of

Re: [Spice-devel] [spice-gtk v2 4/7] channel-main: clipboard release: wakeup only when needed

2018-12-13 Thread Uri Lublin
On 12/10/18 1:02 PM, Victor Toso wrote: From: Victor Toso This patch makes agent_clipboard_release() to return true only when the message request to the agent is successfully queued to be sent. By checking the return value, we can avoid wakeup the channel unnecessarily at spice_main_channel_cl

Re: [Spice-devel] [spice-gtk v2 3/7] channel-main: clipboard grab: wakeup only when needed

2018-12-13 Thread Uri Lublin
On 12/10/18 1:02 PM, Victor Toso wrote: From: Victor Toso This patch makes agent_clipboard_grab() to return true only when the message request to the agent is successfully queued to be sent. By checking the return value, we can avoid wakup the channel unnecessarily at spice_main_channel_clipbo

Re: [Spice-devel] [spice-gtk v2 1/7] gtk-session: prefer early check to agent connectivity

2018-12-13 Thread Uri Lublin
On 12/10/18 1:02 PM, Victor Toso wrote: From: Victor Toso In case the agent is disconnected, we we don't need to create the we we -> we struct RunInfo, GMainLoop and add handlers to some signals. Before this patch, spice_main_channel_clipboard_selection_request() was always called even if