Reinstall Cups after unloading/removing its LaunchDaemon
On one of our laptops, we had popups about printer settings update 200 times per day. It was getting really annoying and so without thinking about it enough, I've unload and remove cups service.
sudo launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist
sudo launchctl remove /System/Library/LaunchDaemons/org.cups.cupsd.plist
Popups are gone. But unfortunately, now we need Cups back and I can't figure out how to install it again. Could you explain the installation process for Cups? and launchdaemons maybe?
Running any lpadmin
command return lpadmin: Unable to connect to server: Bad file descriptor
.
Here are the commands I ran to solve this issue:
sudo launchctl stop org.cups.cupsd
sudo mv /etc/cups/cupsd.conf /etc/cups/cupsd.conf.backup
sudo cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf
sudo mv /etc/cups/printers.conf /etc/cups/printers.conf.backup
sudo launchctl start org.cups.cupsd
Then I've reset the Printing System as suggested here: https://support.apple.com/en-gb/HT203343
Then simply add your printers again.