Skip to content

Instantly share code, notes, and snippets.

@Nexarian
Created January 24, 2024 00:36
Show Gist options
  • Save Nexarian/da324290dcff10a66129da374260c4e3 to your computer and use it in GitHub Desktop.
Save Nexarian/da324290dcff10a66129da374260c4e3 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
function kill_all() {
process=$1
for i in $(ps aux | grep $process | tr -s ' ' | cut -d" " -f 2)
do
sudo kill -9 $i
done
}
sudo -v
kill_all "xrdp"
kill_all "Xvnc"
kill_all "xorgxrdp_helper"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment