diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-02-17 09:40:59 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-02-17 09:40:59 -0200 |
commit | c776901a8415cf350e1886fd83309add3a0ad4d4 (patch) | |
tree | f57f29c9561ba7d876b4fbc22316aef41364b9be /kvmx | |
parent | 0e44ec5ad1ea59194968b259d70b689100596b30 (diff) | |
download | vbox-c776901a8415cf350e1886fd83309add3a0ad4d4.tar.gz vbox-c776901a8415cf350e1886fd83309add3a0ad4d4.tar.bz2 |
Adds clip action into kvmx
Diffstat (limited to 'kvmx')
-rwxr-xr-x | kvmx | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -41,4 +41,16 @@ if [ "$ACTION" == "up" ]; then # Fix window titles xdotool search --name "SPICEc:0" set_window --name $VM +elif [ "$ACTION" == "clip" ]; then + local instances="`ps -o pid,command -e | grep "spice-vdagent$" | cut -d ' ' -f 2 | xargs`" + + # Kill old instances + for pid in $instances; do + kill -9 $pid &> /dev/null + done + + # Just to make sure we're inside a virtual machine + if which spice-vdagent; then + spice-vdagent + fi fi |