diff options
author | Charles Arnold <carnold@suse.com> | 2020-10-23 15:20:33 -0600 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2020-11-03 12:23:13 -0500 |
commit | 9dc057e3e7641ef67605e310cdf3102b0ad4ae6a (patch) | |
tree | aed755c9e91d6193cf91f71ffa9f4799bd95b624 /virtManager/lib | |
parent | 7cb6a6062a77c34d2287d7ae0ea73eff3a34e9c3 (diff) | |
download | virt-manager-9dc057e3e7641ef67605e310cdf3102b0ad4ae6a.tar.gz |
Add /usr/sbin to search path for non-root user
On a fresh install where no previous connection has been made a
non-root user starting virt-manager won't find the installed libvirtd
because the location is not in the user path.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Charles Arnold <carnold@suse.com>
Diffstat (limited to 'virtManager/lib')
-rw-r--r-- | virtManager/lib/connectauth.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/virtManager/lib/connectauth.py b/virtManager/lib/connectauth.py index cc83e469..71e1b21f 100644 --- a/virtManager/lib/connectauth.py +++ b/virtManager/lib/connectauth.py @@ -204,7 +204,8 @@ def connect_error(conn, errmsg, tb, warnconsole): ################################## def setup_first_uri(config, tryuri): - libvirtd_installed = bool(shutil.which("libvirtd")) + # Add /usr/sbin to the path in case non-root user launches virt-manager + libvirtd_installed = bool(shutil.which("libvirtd", path=os.environ['PATH'] + os.pathsep + "/usr/sbin")) if config.CLITestOptions.fake_no_libvirtd: libvirtd_installed = False |