diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-04-20 18:42:16 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-04-20 18:42:16 -0300 |
commit | a7d1edb75bf481bc7346a91c0f250825f9a3024a (patch) | |
tree | 207a61e1dbe26d84210f499da41e65499124773d | |
parent | 3aa08bd1f537faa8b3ebf013d1be0318d2ec498c (diff) | |
download | kvmx-a7d1edb75bf481bc7346a91c0f250825f9a3024a.tar.gz kvmx-a7d1edb75bf481bc7346a91c0f250825f9a3024a.tar.bz2 |
Run kvmx_xrandr and kvmx-vdagent at kvmx_spice only if spice action was called
-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 } |