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…

6
  • did you ever find an answer to this? Apr 3, 2014 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, 2014 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. Apr 4, 2014 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. ;) Apr 7, 2014 at 18:12
  • I have to find out where I hide my script and let you know :P
    – napolux
    Apr 8, 2014 at 7:54

2 Answers 2

3

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

1
  • This is proved not to work, at least on Mountain Lion.
    – napolux
    Sep 29, 2013 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.
1
  • Forgot to add tested on 10.9.5 good luck!! Dec 11, 2014 at 17:33

You must log in to answer this question.

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