How to use
su on a Mac?
When I run
su pkill -9 "RFBEventHelperd" in the terminal I get
su: Sorry (but works as sudo). I am looking for a way to kill this process from inside a script that runs as
I use SleepWatcher in MacOS to open Screen Sharing apps on wake up. After launching Screen Sharing app I want to kill the process
RFBEventHelperd as this gives back Command+Tab to Mac instead of being bound to OS running in Screen Sharing.
SleepWatcher runs wake script as
$ su - $user -c "$home/.wakeup"
How can I put the
pkill -9 "RFBEventHelperd" into my script, and have it kill a process that's running as another user.