Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

Change desktop picture without Finder restart Desktop
Here is a script to change the desktop picture without relaunching the Finder (as was required in the method listed in this hint). I've included an example I use to get a webcam image and make that image the desktop. Customize at will. The trick is using osascript to run an AppleScript program. Here's the script:
#!/bin/csh -f

rm -f ./BURLINGTONLARGE.JPG
wget http://www.hazecam.net/images/photos-large/
BURLINGTONLARGE.JPG >& /dev/null
set pic=BURLIGNTONLARGE.JPG
set here=`pwd`
set myFile=$here/$pic

/usr/bin/osascript <<END
tell application "Finder"
set pFile to POSIX file "$myFile" as string
set desktop picture to file pFile
end tell
END
NOTE: The 'wget' line has been broken into two rows for easier reading. Enter it as one line with no spaces between the "/" and the "BUR..." bit. Save the script, make it executable (chmod 755), and it's ready for use!
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[8,207 views]  

Change desktop picture without Finder restart | 5 comments | Create New Account
Click here to return to the 'Change desktop picture without Finder restart' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
SwitchPic
Authored by: zephc on Tue, Aug 6 2002 at 4:37PM PDT
get SwitchPic, a nice System Preferences plugin that (also operable via a menubar item) which will let you set the desktop to any pic u want and actually let you keep the pic size correct on the desktop rather than being just tiled or stretched. In addition, it will rotate the the pic at any given interval, and you can create collections of pics (ala iTunes playlists) that it can select from, and even the frequency (lowest, lower, normal, higher, highest) at which it rotates.
check out http://homepage.mac.com/maceuph/apps/SwitchPic

[ Reply to This | # ]
Multiple monitors
Authored by: Skipper on Wed, Aug 7 2002 at 2:22AM PDT
How do you modify this to tell the finder to change the desktop picture of a second monitor?

[ Reply to This | # ]
Multiple monitors
Authored by: Skipper on Wed, Aug 7 2002 at 2:30AM PDT
How do you modify this to tell the finder to change the desktop picture of a second monitor?

[ Reply to This | # ]
Multiple monitors
Authored by: laytonred on Fri, Jan 28 2005 at 3:02PM PST
did you ever get this to work.....i can't seem to get applescript to specify what monitor....although using quicktime Pro you can specify which monitor within the present movie option...so i would think it is possible.

[ Reply to This | # ]
THIS HINT REQUIRES FINK
Authored by: perdedor on Wed, Aug 7 2002 at 11:31AM PDT
wget is not part of the standard os x install, therefore this hint won't work unless you installed fink and then wget, or wget from source, or the forked.net people released a port.

changing the wget line to:
curl -O http://www.hazecam.net/images/photos-large/BURLINGTONLARGE.JPG


should allow this to work on a standard OS X install.

[ Reply to This | # ]