terminal command which set background a picture

hello
i am search 2 days now to find a terminal command which set a picture as wallpaper but i didnt find anything.
System/Library/Frameworks/ScreenSaver.framework/Resources/
ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background
I found that this set as background the screen saver. I tried use the path of wallpaper and then -bakcground but i got the message "permission denied".

macbook pro ma96ll, Mac OS X (10.5.2)

Posted on Jun 15, 2008 6:40 AM

Reply
6 replies

Jun 15, 2008 7:50 AM in response to mavrismike

the easiest way to do that is using apple script as follows:

----------------

tell application "System Events"
-- SET DESKTOP TO SPECIFIC PICTURE
tell current desktop
set picture rotation to 0 -- (0=off, 1=interval, 2=login, 3=sleep)
set picture to file "Mac OS X:Library:Desktop Pictures:Plants:Agave.jpg"
end tell
end tell

------

you can call an apple script from a shell script using osascript command. You can also directly embed it into a shell script using osascript with -e switch.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

terminal command which set background a picture

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.