0

I am fairly new to OS X, I am trying to disable the screensaver of a user that I recently created with the following commands on the terminal of an account that I'm currently logged in as:

    sudo dscl . create /Users/NewUser

    # More commands are run after this one, but skipping to the important part...

    sudo defaults write /Users/NewUser/Library/Preferences/ByHost/com.apple.screensaver.MAC_UUID.plist idleTime 0

However this doesn't seem to be working. I've noticed that when you create a new user, there is no screensaver plist that exists until the user actually logins. I am not too familiar with plists and Apple in general, any help would be greatly appreciated!

  • what OS version are you using? – Todd Dabney Feb 21 '16 at 6:50
  • Sorry for the late reply, but I have been experimenting with Yosemite and El Capitan. The answer specified below works for both. – programmer2222 Feb 23 '16 at 18:44
1

Have you tried running it as the other user using:

sudo -u NewUser defaults write /Users/NewUser/Library/Preferences/ByHost/com.apple.screensaver.MAC_UUID.plist idleTime 0

The command I found for setting the screensaver to never start was:

sudo -u NewUser defaults -currentHost write com.apple.screensaver idleTime 0
  • The second command works perfectly. Thanks for your help! – programmer2222 Feb 23 '16 at 18:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .