mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
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>
This commit is contained in:
committed by
Cole Robinson
parent
7cb6a6062a
commit
9dc057e3e7
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user