diff options
-rwxr-xr-x | kvmx | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -249,14 +249,16 @@ function kvmx_spice { xdotool search --name "SPICEc:0" set_window --name $VM fi - # Set screen resolution - if [ "$xrandr" == "1" ]; then - kvmx_xrandr - fi + if [ "$ACTION" == "spice" ]; then + # Set screen resolution + if [ "$xrandr" == "1" ]; then + kvmx_xrandr + fi - # Restart vdagent - if [ "$ssh_support" == "y" ]; then - echo "which kvmx-vdagent > /dev/null && DISPLAY=:0 kvmx-vdagent" | kvmx_ssh + # Restart vdagent + if [ "$ssh_support" == "y" ]; then + echo "which kvmx-vdagent > /dev/null && DISPLAY=:0 kvmx-vdagent" | kvmx_ssh + fi fi } |