Profile Manager how to distribute Desktop Wallpapers

James Wilkinson
James Wilkinson used Ask the Experts™
on
We have recently setup an Apple server in our Active Directory Managed Domain, all is going well with users logging in and mobile accounts is working well too. I have been asked to sett all the user desktop wallpapers to a specific JPEG\PNG file and I cannot seem to find where or how to do this in Profile Manager. Could anyone point me in the right direction please?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
In the Profile Manager, look under Restrictions for both iOS and Os X, Desktop a& Screen Savers.
James WilkinsonNetwork Security Analyst

Author

Commented:
The restrictions tab only allows me to enable or disable the users ability to see Desktop and Screensaver settings. is this somewhere else possibly?
If I remember correctly the point is that you distribute the wallpaper using Apple Remote Desktop or similar and the user cannot change it to anything else because of the restriction.
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

James WilkinsonNetwork Security Analyst

Author

Commented:
I will look into that as i have Apple Remote Desktop Installed. I have read that i need to create a new account and then export the com.apple.desktop.plist file. I have done this from a mac with the correct logo. But now do not know what to do with the com.apple.desktop.plist file.

Any ideas? is this what i need to send with remote desktop?

I will do more research in the mean time
I have not done this myself but this should be fairly easy if you use Apple Remote Desktop. You should get a copy at the AppStore. It's not that expensive and really helpful if you do administrator of any kind for macs.

Using ARD you could prepare the image you need for as a desktop picture. Change the ownership and permissions to be writable only by root but still readable by everyone else.
Also lock the picture (Info: Lock)

Select this desktop picture for your computer.

In ARD you copy those two things and use the setting: Same Relative Location.

Now when the picture is in place you can update the profiles restriction so the users can not change this setting.
James WilkinsonNetwork Security Analyst

Author

Commented:
Could not manage to do this  could you provide a link to a reliable guide please?
I know this is an old thread, but, in case you still need it, here's how you would do it via the command line.

cp IMAGEFILE.jpg "/Library/Desktop Pictures/"
/usr/bin/defaults write /Users/ACCOUNT/Library/Preferences/com.apple.desktop Background '{default = {ImageFilePath = "/Library/Desktop Pictures/IMAGEFILE.jpg"; };}'
chown ACCOUNT /Users/ACCOUNT/Library/Preferences/com.apple.desktop.plist

Open in new window


You'll have to enable remote login if you want to copy the file to the user's computer remotely:
for REMOTE_COMP in `cat file_with_computer_list` ; do scp IMAGEFILE.jpg root@$REMOTE_COMP:"Library/Desktop Pictures/"; done

Open in new window


Then run the command remotely as a one liner.
for REMOTE_COMP in `cat file_with_computer_list` ; do ssh root@$REMOTE_COMP "cp IMAGEFILE.jpg /Library/Desktop\ Pictures/; /usr/bin/defaults write /Users/ACCOUNT/Library/Preferences/com.apple.desktop Background '{default = {ImageFilePath = /Library/Desktop\ Pictures/IMAGEFILE.jpg; };}';  chown ACCOUNT /Users/ACCOUNT/Library/Preferences/com.apple.desktop.plist"; done

Open in new window


I used ARD for a short while, but I eventually found it cumbersome.  ARD is great for a junior admin starting out or for spying on your users' desktops, but it's tedious when you have too many systems to manage.  I only enable remote login now, since I can enable remote management(ARD) or any other sharing from the command line as needed.  If you don't want them to change the background, it's easy enough to change the permissions
chown root  /Users/ACCOUNT/Library/Preferences/com.apple.desktop.plist

Open in new window

James WilkinsonNetwork Security Analyst

Author

Commented:
Hi thank you for this and apologies for the delay.

What exactly does that command do?

Kind regards

I would like a script to set a specific desktop wallpaper and remove permissions. I have built in our jpeg into the main image we use for the macs.

Im hoping for a script which will select the corporate image and then remove the users access to change it

Many thanks again
Wow!  That's an old one.  Somehow, I never got a notification of your response in May after I posted that.  I only see an email notification of your final answer acceptance today.  I keep my emails from this site and don't see it anywhere.

Here's the script does exactly what you want, but you must know this by now.  I replaced chown ACCOUNT with chown root.

for REMOTE_COMP in `cat file_with_computer_list` ; do ssh root@$REMOTE_COMP "cp IMAGEFILE.jpg /Library/Desktop\ Pictures/; /usr/bin/defaults write /Users/ACCOUNT/Library/Preferences/com.apple.desktop Background '{default = {ImageFilePath = /Library/Desktop\ Pictures/IMAGEFILE.jpg; };}';  chown root /Users/ACCOUNT/Library/Preferences/com.apple.desktop.plist"; done

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial