Disabling wallpaper contextual menu item

Locking com.apple.desktop.plist no longer works on 10.9 and later.

The following tip works on 10.9 and later, but on 10.11 you must disable SIP.

To disable SIP (10.11+):

  • Reboot your Mac into Recovery Mode by restarting your computer and holding down Command+R until the Apple logo appears on your screen.
  • Click Utilities > Terminal.
  • In the Terminal window, type in csrutil disable and press Enter.
  • Restart your Mac.

To disable the contextual menu item (10.9+):

  • Go to /System/Library/Services/
  • Rename Set Desktop Picture.workflow to Set Desktop Picture.txt
  • Enter admin credentials
  • When you try to set the wallpaper by control-clicking a picture on the desktop, it will now give an error.

To re-enable SIP (10.11+), follow the directions for disabling but type csrutil enable

To disable in Firefox:

On your master image, go to your Firefox profile folder (some random characters with “.default” at the end)
If there is not a folder called “chrome” (all lowercase) make one now
Inside that create a plain text file called userChrome.css
In that file, add the following line:
#context-setDesktopBackground { display: none !important; }

This will remove the option to set as wallpaper from the right-click menu.
To disable in Safari (10.9 and earlier?):
Place folders with the following names into /Users/student/Library/Preferences/Safari and lock them.
SafariDesktopPicture
SafariDesktopPicture.jpeg
SafariDesktopPicture.jpg
SafariDesktopPicture.bmp
SafariDesktopPicture.png
SafariDesktopPicture.tif
(any commonly used graphic suffix should be added)
This makes it so students are unable to right click in Safari and set the background.
To disable in Safari (10.10 and later?):
Place folders with the following names into /Users/student/Library/Safari (note the different location) and lock them.
Safari Desktop Picture.jpg
Safari Desktop Picture.jpg
(the rest is the same as above, note the space)

From: David Nelson and James Grubic, January 26, 2016

 

Posted in: Applications, Imaging