Commit Graph

32 Commits

Author SHA1 Message Date
WGH fae3fecc1e Improve Secret Service interoperability
The current implementation of Secret Service keyring client assumes that
the last component of an item path is integer, which is not true for some
Secret Service server implementations (e.g. KeePassXC). Besides,
the Secret Service API documents advises against recording object path
(not to mentioning parsing it in any way), recommending using lookup attributes
instead[1].

This commit fixes the code to behave in more interoperable way.

- The item path (called "keyid" in code) is no longer parsed and stored anywhere.
- The secret item is looked up in the Secret Service using hvuri and machine
  uuid attributes.
- /console-password with (username, keyid) is removed from GSettings
  storage. Instead, only username is stored in /console-username.

[1] https://specifications.freedesktop.org/secret-service/latest/ch03.html

Resolves: #237
2021-04-06 18:30:08 -04:00
Cole Robinson 295c8a86dd details: Add host-passthrough as an explicit CPU UI choice
Historically we have not advertised host-passthrough because it was
not recommended for general usage. That stance is softening,
tools like gnome-boxes already set it as the default, and users
continue to ask about it.

We may change the default in virt-manager but it will take more
discussion. This is a tiny move in the direction of hiding it less
than we already do.

Drop the label for host-model and call it by its libvirt XML name,
since otherwise it's hard to tell which combo choice is for each
value

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 18:21:43 -04:00
Cole Robinson 6a88f92fd0 preferences: Unconditionally add VM sound devices
This is another preference that was added before anyone ever asked
for it. I'm fine with suggesting users remove the device manually
if they don't want it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 17:10:19 -04:00
Cole Robinson 748639702e preferences: Unconditionally add usbredir devs for spice
Remove the preference option to disable this. This was added with
the initial usbredir support because I was afraid people would
complain. They did complain, but only about the auto redir behavior
of the spice client. We still have a toggle to disable that behavior

If people don't want usbredir devices, I'm comfortable telling
them to remove them manually, or use virt-install

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 17:10:19 -04:00
Cole Robinson ac8591192f console: Add option to disable autoconnect
As part of making virt-manager cooperate better with external viewers,
add an option to disable console autoconnect. When opening a VM window
for a running VM, you'll see a 'Connect to console' button in place
of the spice/vnc viewer. Click that and things proceed like normal.

This is useful to prevent virt-manager from disconnecting a virt-viewer
instance that's already attached to a VM

https://bugzilla.redhat.com/show_bug.cgi?id=1793876

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 19:59:31 -04:00
Cole Robinson 33a61f7f30 prefs: Remove 'Force console accels' option
This is very obscure and definitely not in line with our DESIGN.md
nowadays

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 09:15:53 -04:00
Cole Robinson 408b3023bc viewers: Remove hidden grab-keyboard gsettings
This was added in 2014 per user request but we never exposed it in the
UI. This is fairly advanced needs from the console viewer IMO and is
better left to console specific tools like virt-viewer, per our
DESIGN.md

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-01 14:27:11 -04:00
Cole Robinson 01ccaf03be setup: Run codespell on more files
And fix the results

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 14:31:28 -05:00
Cole Robinson 0bf65e6ce8 preferences: Remove old Interface confirm option
This hasn't been relevant since that UI was removed

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson 2266b650a5 preferences: Disable XML editing by default
This adds a field in gsettings and preferences UI to enable
XML editing. It's off by default. The XML tab page is still visible,
but the textview is not editable, and there's a warning at the top:

  XML editing is disabled in 'Preferences'.
  Only enable it if you know what you are doing.

When the setting is enabled, the warning goes away and the textview
is editable. This puts a roadblock up for people that don't know what
they are doing, but still advertises the feature and keeps the
UI surface difference fairly small between on/off states.
2019-06-13 07:17:34 -04:00
Cole Robinson de773179ef host: Remember window dimensions
Like we do for details and manager windows, save window size in
gsettings and remember it across app runs
2019-04-14 17:05:14 -04:00
Cole Robinson 6b1278ccda prefs: Add a setting to enable/disable libguestfs inspection
Rather than key it on the library being available. Makes it much
easier to test both modes of behavior.

Fix up a few inspection bugs while I'm in the area, and convert
it to be more singleton like.
2018-03-15 21:24:48 -04:00
Radostin Stoyanov 12962ece71 gschema: Populate/Store previous container URLs 2017-07-10 15:06:01 -04:00
Cole Robinson 3d2afbaf6f connection: Allow setting a custom 'pretty name' (bz 784701)
We've had multiple requests over the years for something similar. People
might have to connect to multiple IP addresses, or really large hostnames,
that become difficult to distinguish in the UI.

Add a field in the host details page that allows setting a custom name,
and store it in gsettings.
2015-04-11 13:39:25 -04:00
Kjö Hansi Glaz 66d146acee Add a gsetting key to disable keyboard grabbing
Add a gsetting key to disable keyboard grabbing that works the same way
as spicy when unchecking "Options" > "Grab keyboard when active and
focused".
2014-03-10 14:54:58 -04:00
Cole Robinson b1697056e4 prefs: Change the tick interval to 3 seconds
Most libvirt usage now shouldn't need a high tick interval, since
we are using async events. So raise it.
2014-02-11 15:45:05 -05:00
Cole Robinson d220cc5d52 preferences: Allow disabling VM CPU poll
With this, the only libvirt API call we hit on each tick is the
connection nodeinfo.
2014-02-11 15:45:05 -05:00
Cole Robinson f6de5331ba prefs: Disable memory polling by default
This path hits the qemu monitor, and leads to the virt-manager UI being
locked up when performing asynchronous tasks like creating a snapshot.
So make it opt in for people that want it.
2014-02-10 15:14:10 -05:00
Cole Robinson f5c32063e4 wip 2014-02-05 14:09:05 -05:00
Cole Robinson 8618a3abd7 prefs: Add 'Add SPICE USB redirection' option, enable it
For qemu guests that are using spice, add 4 redirdevs so USB redirection
happens for free. This can be disabled in the preferences dialog.
2014-02-04 15:27:56 -05:00
Cole Robinson bff94f2365 console: Support spice 'resize-guest' (bz 754559)
This will auto change the guest resolution to match the window size.
Off by default, can be enabled like scaling preferences.
2014-01-31 10:08:18 -05:00
Cole Robinson 7003a3a528 prefs: Allow changing the default VM CPU mode/model config
Add a preference for changing the default CPU mode/model. The options are:

- default (whatever virt-manager chooses as the default)
- hypervisor default (no <cpu> block, what we've always done)
- nearest host cpu model (just the 'model' from caps->host->cpu)
- copy host cpu (the entire <cpu> block from caps->host)

The setting only applies to KVM guests, not tested with anything else.
The default is left as is for now (hypervisor default).

copy host CPU will one day use mode='host-model', when it does what
we want. At that point we will probably make it the default
2014-01-17 17:41:26 -05:00
Cole Robinson 55d6b7f377 prefs: Allow disabling all memorystats polling
Similar to how we allow disabling disk/net polling, not sure yet what
effect it might have on remote connections, so best to add this option
just to be safe.

Unlike disk/net stats, we enable this checking by default.
2014-01-12 17:39:21 -05:00
Thorsten Behrens 77b1143965 Add memory stats widget also to manager tree view.
(crobinso: Fix an initialization issue)
2014-01-06 12:08:55 -05:00
Guannan Ren dbdf6c0f43 add new "spice-disable-usbredir" option to disable autoredir feature
The value is stored in gsettings. By default, we use spice autoredir
feature for usb redirection.
2013-07-01 14:32:21 -04:00
Cole Robinson bde9943221 gsettings: Fix default for perms-fix-ignore (bz 962569) 2013-05-15 15:35:55 -04:00
Cole Robinson b68faac8e8 Fix crash when creating guest from ISO media (bz 958641)
Accessing another unknown gsettings key. Should be the last one
though...
2013-05-09 20:07:29 -04:00
Cole Robinson 1b18ddea3a gsettings: Simplify remembering last used paths 2013-04-23 14:21:46 -04:00
Cole Robinson 2f09a3665c prefs: Remove distinction between local and remote sound
Remote sound works fine these days. If people want to turn the
preference off, they probably want to do it in all cases, and can
'customize before install' to alter the rest.
2013-04-23 14:21:46 -04:00
Cole Robinson f84ccc0cf9 prefs: Remove preference for 'history length'
Also kinda pointless, and I've never heard of anyone actually
tweaking it.
2013-04-23 14:21:45 -04:00
Cole Robinson cd8dbad8b2 gsettings: Remove url-list-length
Kinda pointless, just default to 10
2013-04-23 12:42:22 -04:00
Cole Robinson 7e23244096 Port from gconf to gsettings
This unfortunately has a decent amount of fallout: add a wrapper class
in config.py that reduces much of the churn.

Another big piece is that gsettings can't accept arbitrary paths like
gconf would, everything needs to be described in the schema.

Also do a bunch more RPM spec modernizing
2013-04-18 12:43:16 -04:00