PDA

View Full Version : How to PERMANENTLY kill an activity/process?




ABDacome
Apr 17, 2013, 10:34 PM
Hello all,

So I have been having trouble with iMessage, and I already tried everything I could find, until ONE solution worked...
Every time I would try to log in to iMessage, it will APPEAR to work, but the " Enable" part never verfies...
408355

A moment later, it returns with this error message:
408356

After hours of trying to resolve this problem, I found ONE solution that works, and what I have to do is kill a process called "imagent" in Activity Monitor:
408357

After I quit that process, I log in to iMessage ( very quickly ) and it works, enabling the account...

... Until the process "imagent" starts up again, causing iMessage to return with the same error message as earlier, logging me out.

Does anyone know how to permanently make a process stop running ? It would help me so much.

Thank you!



justperry
Apr 17, 2013, 10:42 PM
Hello all,

So I have been having trouble with iMessage, and I already tried everything I could find, until ONE solution worked...
Every time I would try to log in to iMessage, it will APPEAR to work, but the " Enable" part never verfies...
408355

A moment later, it returns with this error message:
408356

After hours of trying to resolve this problem, I found ONE solution that works, and what I have to do is kill a process called "imagent" in Activity Monitor:
408357

After I quit that process, I log in to iMessage ( very quickly ) and it works, enabling the account...

... Until the process "imagent" starts up again, causing iMessage to return with the same error message as earlier, logging me out.

Does anyone know how to permanently make a process stop running ? It would help me so much.

Thank you!

I tell you only because you want it to stop, it probably won't hurt the System but as always keep a backup.

The file to move is /System/Library/LaunchAgents/com.apple.imagent.plist
If you do it this way you have to restart, however you also could unload the process with terminal like this:

sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.imagent.plist

ABDacome
Apr 17, 2013, 10:45 PM
justperry, so do I delete that file, or can I simply just move it to the desktop ? I feel like if I delete it, it will just re-create in the folder.

GGJstudios
Apr 17, 2013, 10:46 PM
justperry, so do I delete that file, or can I simply just move it to the desktop ? I feel like if I delete it, it will just re-create in the folder.
Yes, you can move it to the desktop or delete it. It will not automatically re-create it in the LaunchAgents folder on restart.

ABDacome
Apr 17, 2013, 10:51 PM
Yes, you can move it to the desktop or delete it. It will not automatically re-create it in the LaunchAgents folder on restart.

I navigated to the specified folder, and there was no such file there ):
408358

So I tried pasting --

sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.imagent.plist

into the terminal, the first time around, it asked for my password, so I entered it in, and it tells me there is an error removing the file... is that because it is not there ?
408359

However, When I open up Activity Monitor, there is imagent, just mocking me ):

GGJstudios
Apr 17, 2013, 10:52 PM
I navigated to the specified folder, and there was no such file there ):
408358

So I tried pasting --

sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.imagent.plist

into the terminal, the first time around, it asked for my password, so I entered it in, and it tells me there is an error removing the file... is that because it is not there ?
408359

However, When I open up Activity Monitor, there is imagent, just mocking me ):

Your Library folders are hidden by default in Lion and ML. To get to your /Library or /Users/yourusername/Library (also known as the ~/Library) folders in Lion and ML:

Launch Finder and click Go > Go to Folder and type: /Library or ~/Library

Hold the Option key while clicking the Go menu item, which reveals your ~/Library folder in the menu.



Check the following locations for imagent or any other apps/processes that automatically launch on startup and delete any you don't need/want:

System Preferences > Accounts > yourusername > Login Items
(Lion and ML users: System Preferences > Users & Groups > yourusername > Login Items)


/Library/LaunchAgents/
(Lion and ML users: In Finder, click Go > Go to Folder > then enter the path above)


~/Library/LaunchAgents/
(Lion and ML users: In Finder, click Go > Go to Folder > then enter the path above)


/Library/StartupItems/
(Lion and ML users: In Finder, click Go > Go to Folder > then enter the path above)

justperry
Apr 17, 2013, 10:52 PM
justperry, so do I delete that file, or can I simply just move it to the desktop ? I feel like if I delete it, it will just re-create in the folder.

Do not ever delete System Files, you can move that file to /System/Library and leave it there.
I prefer to move the file instead of unloading it, reason is you can still see the file so you remember you moved it while if you unload it there is no visible way to see if it is disabled.

If you want to move the file you need root access, the easiest way is with Terminal, here it is.

sudo mv /System/Library/LaunchAgents/com.apple.imagent.plist /System/Library
Hit Enter
Enter Password

Do NOT move that Folder, if you do sos your System will almost sure not startup, only move the above file, restart after.

Again, always have a bootable backup if you do anything like this, if you mess up it is easily undone by booting from another disk.

ABDacome
Apr 17, 2013, 10:56 PM
Your Library folders are hidden by default in Lion and ML. To get to your /Library or /Users/yourusername/Library (also known as the ~/Library) folders in Lion and ML:

Launch Finder and click Go > Go to Folder and type: /Library or ~/Library

Hold the Option key while clicking the Go menu item, which reveals your ~/Library folder in the menu.
[/INDENT]

Check the following locations for apps/processes that automatically launch on startup and delete any you don't need/want:
[LIST]
System Preferences > Accounts > yourusername > Login Items
(Lion and ML users: System Preferences > Users & Groups > yourusername > Login Items)


/Library/LaunchAgents/
(Lion and ML users: In Finder, click Go > Go to Folder > then enter the path above)


~/Library/LaunchAgents/
(Lion and ML users: In Finder, click Go > Go to Folder > then enter the path above)


/Library/StartupItems/
(Lion and ML users: In Finder, click Go > Go to Folder > then enter the path above)


That's what I tried the first time around, opening Finder, Holding down option, and clicking Library, navigating to the Launch Folder, and only two files are there...
408360

should I give my system a reboot, try your suggestion once more, and see if the file appears ? I don't know why it would do that, but I guess it's worth a try. Unless there is another option I could try, that would be very helpful

GGJstudios
Apr 17, 2013, 10:58 PM
hould I give my system a reboot, try your suggestion once more, and see if the file appears ?
Restarting is certainly a good option.

ABDacome
Apr 17, 2013, 10:59 PM
Do not ever delete System Files, you can move that file to /System/Library and leave it there.
I prefer to move the file instead of unloading it, reason is you can still see the file so you remember you moved it while if you unload it there is no visible way to see if it is disabled.

If you want to move the file you need root access, the easiest way is with Terminal, here it is.

sudo mv /System/Library/LaunchAgents/com.apple.imagent.plist /System/Library
Hit Enter
Enter Password

Do NOT move that Folder, if you do sos your System will almost sure not startup, only move the above file, restart after.

Again, always have a bootable backup if you do anything like this, if you mess up it is easily undone by booting from another disk.


I entered the command for root access into terminal, navigated back to the folder, and still only two files appear. I never moved the file or deleted it beforehand, it's just not there for some reason

----------

Okay, will give it a reboot and get back to you guys on that.

justperry
Apr 17, 2013, 11:00 PM
That's what I tried the first time around, opening Finder, Holding down option, and clicking Library, navigating to the Launch Folder, and only two files are there...
408360

should I give my system a reboot, try your suggestion once more, and see if the file appears ? I don't know why it would do that, but I guess it's worth a try. Unless there is another option I could try, that would be very helpful

The LaunchAgent you are looking for is in the Folder I mentioned above, it is not in GGJStudios Folders.

It is here: /System/Library/LaunchAgents/com.apple.imagent.plist

Try again with:

sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.imagent.plist

ABDacome
Apr 17, 2013, 11:22 PM
The LaunchAgent you are looking for is in the Folder I mentioned above, it is not in GGJStudios Folders.

It is here: /System/Library/LaunchAgents/com.apple.imagent.plist

Try again with:

sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.imagent.plist

I found that file in Library>Preferences its titled com.apple.imagent.plist ...

if I move that file into LaunchAgents, and then use the terminal command to unload it, will that work ?

justperry
Apr 17, 2013, 11:28 PM
I found that file in Library>Preferences its titled com.apple.imagent.plist ...

if I move that file into LaunchAgents, and then use the terminal command to unload it, will that work ?

No, this has nothing to do with it, I have one in my Home Preferences Folder as well.

Enter the following commands in Terminal and see if it is there

cd /System/Library/LaunchAgents
Hit Enter
ls
Hit Enter

Is it there?

ABDacome
Apr 17, 2013, 11:40 PM
No, this has nothing to do with it, I have one in my Home Preferences Folder as well.

Enter the following commands in Terminal and see if it is there

cd /System/Library/LaunchAgents
Hit Enter
ls
Hit Enter

Is it there?

I opened the file that was in preferences to take a look at what was inside and i accidentally hit a key on my keyboard, editing the string inside com.apple.imagent.plist and now my messages app will not launch... are all of the files on all macs the same ? if so, can you copy and paste the contents of yours so I can fix that ?

justperry
Apr 17, 2013, 11:52 PM
I opened the file that was in preferences to take a look at what was inside and i accidentally hit a key on my keyboard, editing the string inside com.apple.imagent.plist and now my messages app will not launch... are all of the files on all macs the same ? if so, can you copy and paste the contents of yours so I can fix that ?

I told you before to have a backup, if you don't do so you can into troubles like this, if you don't heed warnings you will mess up one day.

If the File was in /Users/yourname/Library/Preferences you can safely delete it since it should not interfere, I think the problem is ImAgent just crashes because the file is unreadable.
Only delete the file if it is there.

plist files are personal preference files and are almost always different on other Macs.

Edit: You did not answer my last question in my last post.

cd /System/Library/LaunchAgents
Hit Enter
ls
Hit Enter

Is it there?

ABDacome
Apr 18, 2013, 12:18 AM
No, this has nothing to do with it, I have one in my Home Preferences Folder as well.

Enter the following commands in Terminal and see if it is there

cd /System/Library/LaunchAgents
Hit Enter
ls
Hit Enter

Is it there?

Just like this ?
408366

justperry
Apr 18, 2013, 12:27 AM
Just like this ?
408366

It's wrong, it is LS from LIST but not capitalised, so ls

Copy and paste is always better than just entering text, that's why I think you had the command wrong before as well.

ABDacome
Apr 18, 2013, 12:34 AM
It's wrong, it is LS from LIST but not capitalised, so ls

Copy and paste is always better than just entering text, that's why I think you had the command wrong before as well.

Ah, I thought you posted "is" okay, will retry that

ABDacome
Apr 18, 2013, 12:38 AM
I told you before to have a backup, if you don't do so you can into troubles like this, if you don't heed warnings you will mess up one day.

If the File was in /Users/yourname/Library/Preferences you can safely delete it since it should not interfere, I think the problem is ImAgent just crashes because the file is unreadable.
Only delete the file if it is there.

plist files are personal preference files and are almost always different on other Macs.

Edit: You did not answer my last question in my last post.

cd /System/Library/LaunchAgents
Hit Enter
ls
Hit Enter

Is it there?

I don't see com.apple.imagent.plist in this list, although it should be somewhere in the highlighted area.
408369

ABDacome
Apr 18, 2013, 12:40 AM
I just installed ML yesterday, so doing a clean install shouldn't be a problem. I'm going to try that, if the problem persists, I will try all the above instructions again. At first, simply quitting the activity did the trick.

Thanks!

justperry
Apr 18, 2013, 12:43 AM
I don't see com.apple.imagent.plist in this list, although it should be somewhere in the highlighted area.
408369

I wanted to ask you before but slipped my mind, what OS X version you are running, Mountain Lion or Lion or even earlier?
Look at mine, plenty more than yours and I am on Mountain Lion.

Edit: I wrote this while you posted again.

ABDacome
Apr 18, 2013, 03:02 AM
I wanted to ask you before but slipped my mind, what OS X version you are running, Mountain Lion or Lion or even earlier?
Look at mine, plenty more than yours and I am on Mountain Lion.

Edit: I wrote this while you posted again.


I was running OS X 10.8.3. Now that I did a clean install, I'm back at 10.8, downloading combo update now. iMessage still gives me the same error, wil enter that last command into terminal though

----------

And wouldn't you know it, there it is...

408384

now, what is my next step to take ?