From 028fdf2c35dff5d1e6f36787124f53f6514caae1 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 10 Oct 2024 10:46:40 -0400 Subject: [PATCH] man: virt-manager: document fork behavior and VIRT_MANAGER_DEFAULT_FORK Signed-off-by: Cole Robinson --- man/virt-manager.rst | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/man/virt-manager.rst b/man/virt-manager.rst index 89cb14091..c4270d627 100644 --- a/man/virt-manager.rst +++ b/man/virt-manager.rst @@ -54,13 +54,14 @@ The following options are accepted when running ``virt-manager`` ``--no-fork`` - Don't fork ``virt-manager`` off into the background: run it blocking the - current terminal. Useful for seeing possible errors dumped to stdout/stderr. + Don't fork ``virt-manager`` off into the background. + See ``VIRT-MANAGER, SSH, AND FORKING`` section for more info. ``--fork`` Force forking ``virt-manager`` off into the background. This is the default behavior. + See ``VIRT-MANAGER, SSH, AND FORKING`` section for more info. DIALOG WINDOW OPTIONS @@ -104,6 +105,34 @@ manual ``--connect`` URI. But it supports ``--connect`` URI as well: Launch virt-manager only in system tray +VIRT-MANAGER, SSH, AND FORKING +============================== + +On startup virt-manager will detach from the running +terminal and fork into the background. This is to force any usage of +ssh to call ssh-askpass when it needs a password, rather than silently +asking on a terminal the user probably isn't watching. + +Users can opt out of this forking behavior with ``--no-fork``, or +by setting the ``VIRT_MANAGER_DEFAULT_FORK=no`` environment variable. + +openssh 8.4p1 released in Sep 2020 added the SSH_ASKPASS_REQUIRE +environment variable that saves us from having to do the fork dance. +https://man.openbsd.org/ssh.1#SSH_ASKPASS_REQUIRE + +virt-manager now sets SSH_ASKPASS_REQUIRE=force. +However to get this to work with libvirt ssh connections, you'll need +libvirt 10.8.0 released in October 1st 2024. + +In the future, virt-manager will likely stop forking by default. +You can future proof request forking with ``--fork`` or by +settings the ``VIRT_MANAGER_DEFAULT_FORK=yes`` environment variable. + +However if you find you need forking for a usecase other than temporarily +working around libvirt version issues, please let the virt-manager developers +know by filing a bug report. + + BUGS ====