How to Edit /System/Library/LaunchAgents/

In OS X Catalina how does one go about editing the System Launch Agents? In previous OS X versions you would disable SIP, make the mods and reenable SIP. This no longer works as the volume seems to be read only.


So I need to modify files in the paths:


/System/Library/LaunchAgents/

/System/Library/LaunchDaemons/


Any ideas would be appreciated.


Thanks

Do it through terminal using the sudo nano command

I suggest not editing anything in /System. No good will come from that.


However, if you insist, you should be able to disable any system launch daemons. Then, make a duplicate of the disabled plist file in the appropriate directory in /Library, make your changes there, and restart.

Yes, the problem is that with Catlina it won't allow for editing. Disabled SIP, booted into recovery mode doesn't even allow editing. How can one disable System Launch agent in Catlina??

Right but the problem is that the file system is marked read only. I tried to boot into recovery mode but it is still read only. Won't allow for any edits. This is new in Catalina.

Did you try sudo chmod 555 filename


If this really is locked down tight it's going to be annoying - I'm constantly removing agents installed by applications that really don't need to be running in the background.

The /System folder is stored on a read-only volume, so it cannot be changed while Catalina is running.


To edit files in this folder, you will need to use a second operating system, e.g. the recovery system.

As I said before, don't attempt to modify anything in /System. Technically it is possible to boot into another OS or recovery and hack it up. But that is simply ridiculous. Learn how the system is supposed to work and just use the facilities that already exist.


To clarify some confusing points:

1) Catalina is a new version of the operating system and is currently in beta.

2) Review point 1 above. This means that THINGS HAVE CHANGED.

3) Apple system files are installed at /

4) User files are installed at /System/Volumes/Data

5) The while filesystem then has a layer of fairy dust applied to make it all look like it did before, with a single / file system


Give point 5 above, all you really need to worry about is that system files are at /System. Files in /Library are technically at /System/Volumes/Data/Library but you can just think of them being at /Library. /Library is therefore mounted read-write and you can modify it as root.


Copy the plist file you want to modify into /Library/LaunchAgents

Make your changes

You will still need to disable SIP to make system changes

sudo launchctl unload -Fw /System/Library/LaunchAgent/com.apple.service.to.hack.up.with.plist

Re-enable SIP

sudo launchctl load -Fw /Library/LaunchAgent/com.apple.service.to.hack.up.with.plist


I just tested this and it seem to work. I didn't actually try to test my hacked up version of fontmover because fontmover is an Apple service and I have no clue what it does. I assume it moves fonts, but I don't know. Hopefully you have more intimate knowledge of the service you are trying to hack up.


Given all the above, I am still curious about why you thought you ever needed to modify files in /System to being with? Are you following instructions on Stack Overflow or some other internet site? Please don't do that! If you weren't already aware, the internet is chock full of misinformation and falsehoods.


You really, really shouldn't be modifying Apple services in the first place. If you do have a legitimate need to do so, you really should be aware of how the operating system has worked for the past several years. If you follow these instructions, you can successfully change the operating system behaviour and your changes should even persist across system updates. I have no doubt that your hacked up plist will likely fail and cause a cascade of other system failures, but that's the risk you take when you start hacking on other people's software.

I need to create a new file /System/Library/LaunchDaemons/nothrottle.plist to make Time Machine speed setting persistent.

So it seems that I cannot unload a file that does not exist and then cannot edit or sed it.

Tried calling commands with sudo or interactively using root.

Everything was ok up to Mojave, from Catalina and beyond, it's broken.

These locking are not good at all !!! For example i would like to edit /System/Library/LaunchDaemons/tftp.plist just to add -l option for logging to system.log and it is nearly impossible !

How to Edit /System/Library/LaunchAgents/
 
 
Q