4

I need to block the possibility for a single user to change the desktop background, or at least to make it possible only by inserting his password on OS X Lion / Mountain Lion.

I want to lock every possibility, from iPhoto to Safari…

  • did you ever find an answer to this? – arthurlewis Apr 3 '14 at 19:18
  • 1
    Just added a cronjob that checks for the bg and changes it if it's not wallpaper.png. Not the best solution, but works for me. – Napolux Apr 4 '14 at 10:40
  • Thanks. I may be on the verge of a solution. It seems like the system is caching changes to the preference somewhere else, and doesn't look at the actual plist until it's explicitly reloaded. So if I lock the plist by setting permissions and running chflags uchg ~/Library/Preferences/com.apple.desktop.plist, then change the desktop image in System Preferences, the image will change. But it will change back if I log in and log out. I'm looking for ways to force that reload (and thus generalize to other prefs) - the CFPreferences stuff in CoreFoundation looks promising, but nothing quite yet. – arthurlewis Apr 4 '14 at 14:04
  • Sorry to bug you again @Napolux, but I've given up on my solution. How were you able to check for the background image? I was trying to get it with defaults read com.apple.desktop Background, but that has a few nested dictionaries. defaults isn't equipped to parse them, and I don't want to count on Plist Buddy being available. Are you getting the info another way? If you made your response the Answer to this question, I imagine it'd get some serious upvotes. ;) – arthurlewis Apr 7 '14 at 18:12
  • I have to find out where I hide my script and let you know :P – Napolux Apr 8 '14 at 7:54
3

One possible solution would be to set the permissions on ~/Library/Preferences/com.apple.desktop.plist to be read-only for the user.

  • This is proved not to work, at least on Mountain Lion. – Napolux Sep 29 '13 at 14:51
1

Found a way to stop background changing.

  1. Rename /System/Library/Services/Set\ Desktop\ Picture.workflow Change the extension. This stops right clicking a photo to set desktop picture.
  2. Safari: Add 3 files in ~/Library/Safari named
    Safari Desktop Picture.jpg
    Safari Desktop Picture.jpeg
    Safari Desktop Picture.png
    change permissions and lock the 3 files.
    Stops from changing it in Safari.
  3. Firefox download menu editor and take the options out.
  • Forgot to add tested on 10.9.5 good luck!! – Mac_Guy_EdU Dec 11 '14 at 17:33

You must log in to answer this question.

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