How to set desktop wallpaper and screen-saver from cocoa app?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re on Mac OS X 10.6, NSWorkspace has some new methods for setting the desktop picture. The one you want is setDesktopImageURL:forScreen:options:error:.
As for screen saver, there’s no supported way to do this programatically. You could modify the com.apple.screensaver plist file and set the following keys:
However, this could break at any time so I would not rely on it.