| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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=<optimized out>,
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=<optimized out>) 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=<optimized out>,
signal_id=<optimized out>, detail=<optimized out>,
var_args=var_args@entry=0x7fffffffcc60) at gsignal.c:3330
#8 0x00000035bb02a3af in g_signal_emit (instance=<optimized out>,
signal_id=<optimized out>, detail=<optimized out>) 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=<optimized out>,
object=0x894190) at gobject.c:1141
#11 g_object_notify (object=0x894190, property_name=<optimized out>) 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=<optimized out>,
signal_id=<optimized out>, detail=<optimized out>,
var_args=var_args@entry=0x7fffffffd140) at gsignal.c:3330
#17 0x00000035bb02a3af in g_signal_emit (instance=<optimized out>,
signal_id=<optimized out>, detail=<optimized out>) 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=<optimized out>,
object=0xa2c250) at gobject.c:1141
#20 g_object_notify (object=0xa2c250, property_name=<optimized out>) 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=<optimized out>,
signal_id=<optimized out>, detail=<optimized out>,
var_args=var_args@entry=0x7fffffffd700) at gsignal.c:3330
#28 0x00000035bb02a3af in g_signal_emit (instance=<optimized out>,
signal_id=<optimized out>, detail=<optimized out>) 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=<optimized out>)
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()
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This needs spice-gtk >= 0.19.7 and will warn with lower version
|
|
|
|
|
|
|
| |
This allows reconfiguration of extra monitors whenever the agent is
back, for example after reboot.
https://bugzilla.redhat.com/show_bug.cgi?id=918997
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Rebuild menu when agent is connected. Only when the agent is running
may a display be enabled/disabled.
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Do keep client monitor position, do not align monitors automatically.
The align property is only available since v0.12.101.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
The USB device selection applies immediately, so the dialog
should be using 'Close' instead of 'OK' for its primary button
|
| |
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Do not disconnect session when switching host (non-seamless migration
method).
Also, handle a bit better main channel events and do not disconnect on
unknown events, however raise unhandled event message to warning
level.
|
| |
|
|
|
|
|
|
|
| |
- auto-conf is an optionnal argument to --fullscreen:
it will set the guest display configuration to match the client
display configuration, by sending the client monitors size and
position to capable guests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch session-spice would emit the disconnected signal as soon
as the main channel is closed, but other channels may still be open at
that time and raising the disconnected signal usally leads to the app class
calling gtk_main_quit, at which point the other channels never get properly
finalized (as there co-routines still hold a reference to them).
This is esp. bad for usbredir channels as these re-attach the kernel driver
for redirected devices when finalized. So exiting without properly finalizing
them leads to the formerly redirected devices not being usuable until the
driver is manually reloaded or the device is unplugged and re-plugged
(the kernel does not automatically re-bind kernel drivers when userspace
closes a usbfs node).
This patch fixes this by delaying the emitting of the disconnect signal
until the last channel has been destroyed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
| |
These changes match the changes already made to the spice-gtk
usb device selection widget to match the spacing advised by the Gnome HIG.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
| |
spice_session_connect() will attempt to connect directly to the
server, we need to continue calling spice_session_open_fd() for ssh
tunnel to work.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When doing unref() on a channel, channel-destroy signal may be emitted
during object dispose time, and it will attempt to unref() the channel
again likely leading to a crash.
It may be that spice-gtk should have a different/simpler object
life-cycle model, but it's also a good assumption to not take strong
references on the channels, but just keep a weak reference as the
session is really the channel life-cycle manager.
https://bugzilla.redhat.com/show_bug.cgi?id=797082
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The standard SPICE widget guest resize implementation does not
take into account the zoom level settings in virt-viewer, because
it has no knowledge of this functionality. The guest resize can,
however, be done by calling spice_main_set_display() directly.
This allows virt-viewer to resize the guest taking into account
zoom levels.
ie, if virt-viewer is run with --zoom 50 and the window
is resized to 400x300, then the guest agent should
be told to set its resolution to 800x600
|
| |
|
| |
|
| |
|
| |
|
| |
|