Skip to main content
Question

Anybody going to try set different desktop backgrounds in 10.9?

  • November 14, 2013
  • 8 replies
  • 12 views

Forum|alt.badge.img+8

I know about the changes to the desktop background pref in 10.9 as previously discussed here, among other places:

http://derflounder.wordpress.com/2013/10/26/mavericks-desktop-background-picture-settings-moved-from-librarypreferencescom-apple-desktop-plist/

Being a K-12, we've always set different desktop backgrounds for different users... e.g. students get one background, staff get one, admin gets one, etc. In 10.9, I've played around with login scripts using applescript to modify them for different users, and it works, but because of the delay their background changes after a few seconds. Not ideal and a lot of hassle to differentiate for different users.

My questions is, are other orgs who have traditionally set or managed desktop pictures for multiple (more than 2) users going to continue that practice with 10.9 or get out of the desktop picture business altogether?

8 replies

bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • 4331 replies
  • November 15, 2013

I'm using Greg Neagle's Python method.

Less obtrusive as doesn't restart the dock.


Forum|alt.badge.img+23
  • Esteemed Contributor
  • 850 replies
  • November 15, 2013

How exactly are you getting that to work? I ran into the stumbling block that Casper was running it as our management account. I'm not experienced enough with Python to try taking $3 and running the commands as that user.


Forum|alt.badge.img+8
  • Author
  • Contributor
  • 117 replies
  • November 15, 2013

I'm wondering the same thing as @franton. I haven't had success running it as a Launch Agent either. Also, that looks like it's choosing a random picture (or in my case I just hard coded a picture), but would still need a lot of logic needed to do something specific per user, based on group membership. I'm thinking I might just inject the db file with the pic I want into the User Templates and let everyone have the same one.


Forum|alt.badge.img+23
  • Esteemed Contributor
  • 850 replies
  • November 15, 2013

I may go the applescript route and scope accordingly.

osascript -e "tell application "System Events" to set picture of every desktop to "/Library/Desktop Pictures/pic.jpg""

EDIT: except that didn't work at all for me with no error messages ...


Forum|alt.badge.img+4
  • Contributor
  • 12 replies
  • November 15, 2013

If you use the AppleScript option, use this.

osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/path/to/image/file.jpg"'

and then Killall Finder or Dock, i don't remember what one I did before


Forum|alt.badge.img+8
  • Author
  • Contributor
  • 117 replies
  • November 15, 2013

I've tested the applescript route and checking the user group membership, then assigning a different pic based on that. What I don't like is the delay in it applying; the user logs in and sees a picture, which changes 3-5 seconds after login.


Forum|alt.badge.img+23
  • Esteemed Contributor
  • 850 replies
  • November 19, 2013

How exactly did you do that? I've tried a few things and they keep throwing applescript errors at me.


Forum|alt.badge.img+4
  • Contributor
  • 12 replies
  • November 20, 2013

Seems its changed a little. You have to set the file path as a variable with a POSIX path, like so;

set desktopImage to POSIX file "Path/to/image.png"
tell application "Finder"
    set desktop picture to desktopImage
end tell