PLEASE HELP!! No matching processes belonging to you were found

Joined
Mar 25, 2011
Messages
3
Reaction score
0
Points
1
ok so im trying to write a script in Terminal that keeps you from being able to open a particular application.

Here's the script:

#!/bin/bash
while [ true ]; do
killall iChat
done

When I run the script I get a message that says "No matching processes belonging to you were found". What does this mean and how do i fix it?

Also I would like to run this script in bash so that when I killall Terminal it will continue to run, but when I killall Terminal the whole script stops working.

Please help ive been searching for hours with no answer. Thanks
 
Joined
Oct 26, 2009
Messages
128
Reaction score
8
Points
18
There is no issue and nothing to fix. You tried to kill a process (iChat) that is not running under your user account. If you really want to stop users from running iChat change the permissions on the executable file so only you can run it. Your current approach of running a script in an infinite loop is a very poor choice.

I pasted the path to the iChat executable and its default permissions. The easy solution is create an iChat group, add accounts to the iChat group then change the group from wheel to your custom iChat group then change permissions to 750 on the iChat executable. If none of that makes sense then I suggest buying a book on bash.

grant-macbook:MacOS grant$ pwd
/Applications/iChat.app/Contents/MacOS
grant-macbook:MacOS grant$ ls -al
total 4424
drwxr-xr-x 3 root wheel 102 Jun 16 2010 .
drwxr-xr-x 10 root wheel 340 Jun 16 2010 ..
-rwxr-xr-x 1 root wheel 5853056 Jun 10 2010 iChat
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
A simpler solution may be to use Parental Controls (look in System Preferences). You won't have to change permissions on apps which could potentially cause issues down the line.
 
Joined
Oct 26, 2009
Messages
128
Reaction score
8
Points
18
That's true, Parental Controls is a much better method to disable iChat for a few user accounts. This is an odd forum to post a parental control thread and I would think anyone attempting scripting knows Terminal fairly well. The change I suggested is better suited in a server environment but it would work fine locally and wouldn't cause grief to the system if the owner remains root and you don't change the group permission from 5 as it is by default.
 
OP
T
Joined
Mar 25, 2011
Messages
3
Reaction score
0
Points
1
"No matching processes belonging to you were found"

Ok I get that, but im not trying to run this script as an alternative to using parent controls, or to lock out people from using certain applications on my computer. Im writing this as a prank. Im going to zip it up and send it to a friend. When they open the script it should shut down their ichat. I put the infinite loop in the code so that every time they try to open ichat it will shut back down, until they go into activity monitor and quit bash.

The two problems im having is that once I kill terminal, bash quits. The second is when i do a killall iChat i get the error "No matching processes belonging to you were found".

How do I killall terminal without killing bash proccess, and how do I get rid of the error message, "No matching processes belonging to you were found".

Here is the code:

#!/bin/bash

while [ true ]; do

killall Terminal

killall iChat (or whatever app I choose)

done

Thanks for any help!
 
Joined
Oct 26, 2009
Messages
128
Reaction score
8
Points
18
Script is below. To start it in the background run nohup <script name> from the terminal.

#!/bin/bash
while [ true ]; do
killall iChat &> /dev/null
sleep 60
done
 
Joined
Nov 28, 2007
Messages
25,564
Reaction score
486
Points
83
Location
Blue Mountains NSW Australia
Your Mac's Specs
Silver M1 iMac 512/16/8/8 macOS 11.6
Im writing this as a prank. Im going to zip it up and send it to a friend. When they open the script it should shut down their ichat.

Wonder you got any help at all for something so nasty.
 
Joined
Oct 26, 2009
Messages
128
Reaction score
8
Points
18
C'mon guys, nasty. I don't think so. Pranks among friends are fine and this is not that bad. Are we so politically correct we can't have a little fun at our friend's expense. I always liked Punk'd. The next restart prank over. I wouldn't do it but he was honest about his intentions so I doubt they are nefarious. For that matter the guy actually has to type nohup <script> so there is nothing hidden.
 
OP
T
Joined
Mar 25, 2011
Messages
3
Reaction score
0
Points
1
Thanks Chuck!!!! Works great! and for the record its just a prank it isnt malicious in any way, im not that well versed in unix to even attempt such a thing...
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top