| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of this patch consists in code being shuffled around to fit the
expected flow while using the new APIs. I tried my best to make this
patch the less intrusive as possible. Main changes are:
- Updated build requirements
* glib version 2.38
* gtk+ version 3.10
* gio
- VirtViewerApp is now a subclass of GtkApplication.
Some mainloop calls were replaced:
* gtk_main() -> g_application_run()
* gtk_quit() -> g_application_quit()
- Unified command line option handling.
The logic has moved from the main functions and split in common
options, and specific ones for each application. With this, the main
functions were highly simplified, and now basically responsible for
instantiating the App object and running the main loop.
- All Window objects must be associated with the Application.
With this, there is no need to emit our own 'window-added'/'window-
removed' signals, as those will be emited by GtkApplication whenever
gtk_application_add_window() and gtk_application_remove_window() are
called. Also, 'window-removed' was not being used anywhere.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When starting virt-viewer with the --reconnect switch to a guest that
has a password, if the user cancels the authentication dialog (e.g.
pressing 'Esc'), the window will display "Waiting for guest domain to
restart". Obviously, the domain will never restart because it's already
running.
After this fix, the application will simply exit when the user cancels
authentication, even if the --reconnect switch is used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
File->Screenshot, File->Preferences, View->Zoom and Send keys are now
sensitive only while quest is connected.
Changed behaviour of zoom:
Previously, zoom could be set while quest wasn't connected. The zoom
would then be set on connection. There was no indication of current zoom
level while not connected to guest.
Now, the menu is not sensitive while not connected to guest. Zoom can
now be only modified while connected to guest, or from the command line.
|
|
|
|
|
|
|
| |
By convention functions that take GError parameters should return FALSE
(or NULL) or error.
Related: rhbz#1085216
|
|
|
|
|
|
|
|
|
|
|
| |
This is part of a small re-factoring that will have all connection
errors, when we won't be able to connect regardless of what changes on
the remote host, being treated by virt_viewer_app_initial_connect(),
avoiding weird behaviors as we have nowadays (like more than one error
dialog being shown or having the virt-viewer waiting forever for a guest
that will never show up).
Related: rhbz#1085216
|
|
|
|
|
|
|
|
|
| |
This applies for:
libvirt authentication dialog (e.g. virt-viewer --attach guest)
'recent connection' dialog (e.g. remote-viewer)
'vm choose' dialog when connecting without specifying the vm name
This is done by using a new GError VIRT_VIEWER_ERROR_CANCELLED.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using the configuration file to specify which remote monitors should be
enabled when using the --full-screen option, it sometimes left additional
displays enabled, or didn't place the displays on the right monitor, or didn't
fullscreen them.
This was especially true when not enabling the first display on the remote
host. For example:
monitor-mapping=2:2;3:3
(note that configuration file uses 1-based indexes, rather than 0-based
indexes, so the numbers used below will be 1 less than those above)
Previously, when performing fullscreen auto-conf, we were configuring displays
starting at #0 and ending at ndisplays. So for the previous configuration, we
looped from i = 0 to i < 2 (i.e. display #0 and #1) even though we should have
configured display #1 and #2. After this fix, we configure the exact displays
that were specified in the monitor-mapping configuration.
Resolves: rhbz#1200750
|
|
|
|
| |
Add a menu item Preferences under File and show the preferences dialog
|
|
|
|
|
| |
This is libvirt specific, no need to share it in the VirtViewerApp base
class.
|
|
|
|
|
| |
Use a list to store the application's windows. This is another step
towards separating the window from the guest display ID.
|
|
|
|
|
|
| |
This allows the user to obtain the GUID and vm name of the currently-connected
guest. Obviously, this only works with spice. In the future, it will allow them
to set guest-specific configuration options (using a GUID as a key)
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <vmname>
virt-viewer <vmname> <vmname> <vmname>
virt-viewer <uuid> <uuid> <vmname>
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 <vmname> <vmname> <vmname>
virt-viewer <uuid> <uuid> <vmname>
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This function was removed in bd914bdea2e85d62d5f67eb567ce200f526c6bab, but the
declaration was missed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=864026
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Add a new flag --attach, which instructs virt-viewer to attach
to the target display using virDomainOpenGraphics, instead of
initiating a VNC/SPICE connection directly.
|
|
|
|
|
|
| |
- virt_viewer_app_get_windows()
- virt_viewer_window_get_builder()
- "VirtViewerSessionSpice:spice-session" property
|
|
|
|
| |
since other equivalent methods are already overridable.
|
| |
|
|
|
|
| |
If specified, use URI for connection details
|
|
|
|
|
| |
Similar to previous virt_viewer_app_show_status().
Used later on by Spice controller to switch between display and status.
|
|
|
|
|
|
| |
The split virt_viewer_notebook_show_status() to
virt_viewer_notebook_show_status_va() is unnecessary
in the end, but it's more future-proof.
|
| |
|
| |
|
| |
|
|
Make it a real GObject.
The parts specific to virt should go in virt-viewer.c
|