Anybody going to try set different desktop backgrounds in 10.9?

andrew_stenehje
Contributor

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...

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 8

bentoms
Release Candidate Programs Tester

I'm using Greg Neagle's Python method.

Less obtrusive as doesn't restart the dock.

franton
Valued Contributor III

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.

andrew_stenehje
Contributor

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.

franton
Valued Contributor III

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 ...

b3nn
New Contributor II

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

andrew_stenehje
Contributor

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.

franton
Valued Contributor III

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

b3nn
New Contributor II

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