A script for restarting the VMware Tools user process when clipboard sharing stops working.
Clipboard sharing between the host and a Kali guest sometimes stops working after a suspend/resume cycle. Restarting the VMware Tools user-mode process usually fixes it without needing a reboot.
#!/bin/bashprocessString=$(ps -ef | grep '[0-9][0-9]:[0-9][0-9]:[0-9][0-9] /usr/bin/vmtoolsd -n vmusr') # Find the running vmtoolsd processtokens=( $processString )kill "${tokens[1]}" # Kill it by PID/usr/bin/vmtoolsd -n vmusr & > /dev/null 2>&1 # Restart itIf clipboard sharing still doesn’t come back, restarting the desktop session’s user process can help too:
vmware-user



