From: Silvio Rhatto Date: Fri, 20 Apr 2018 21:42:16 +0000 (-0300) Subject: Run kvmx_xrandr and kvmx-vdagent at kvmx_spice only if spice action was called X-Git-Tag: 0.1.0~264 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=a7d1edb75bf481bc7346a91c0f250825f9a3024a;p=kvmx.git Run kvmx_xrandr and kvmx-vdagent at kvmx_spice only if spice action was called --- diff --git a/kvmx b/kvmx index e98921d..6fea637 100755 --- a/kvmx +++ b/kvmx @@ -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 }