XEarth + Desktop Backgrounds.

garlic_b

Registered
So is there a command for the command line that sets the desktop background?

And if so has anyone tried to dump the output from XEarth to it.

Or in a script like so. The bottom command line is what I am curious about. Is there something like that?

#!/usr/bin/tcsh
xearth -proj orthographic -pos sunrel,0,0 -size 1048,768 -shift 0,0 -shade -day 100 -night 0 -ncolors 256 -stars -starfreq .002 -gif > temp_background.gif

defaults write com.apple.Desktop Background temp_background.gif
 
That sounds ass-slow.

Doesn't Neko replace the desktop image with animated cats? You might try contacting that author.
 
Of course it's ass slow. It doesn't need to be a continuous update. You have 1440 minutes per day. The earth rotates 360 degrees per day. That means that if you want it to refresh for each degree, you would only need to have the script execute every 4 minutes. Maybe at some point someone can do a more efficient version.

-g
 
This brings up a lot of interesting things.

<TT>
[axlotl:~] zpincus% defaults read com.apple.finder DesktopViewOptions
{
ArrangeBy = grid;
BackgroundFlags = 0;
BackgroundPictureURL = "file://localhost/omega/pictures+movies/Desktops/fezpower_1024.jpg";
BackgroundType = PctB;
IconSize = 64;
}
</TT>
So here's where the path to the view options is stored. I have yet to figure out how to make defaults read/write able to pull out an item nested within the heirarchy.

But, there are other ways to edit plists. Using Apple's tools, I changed the "URL" to point to a web image. Nothing. I then force quit desktop.app, but when it reappeared, the old image came back (from where did it get the path?)
Next, I tried pointing the URL at a different file in the same folder. After restarting desktop.app, the ugly blue desktop pattern came up, and a message popped up saying "some minor problems have been fixed..."
Next, I tried swapping in a new (identically-sized) file for the old one, and then killing desktop.app. Again, the original blue picture came up with the message about minor problems.

So, desktop.app clearly caches a link or something to the file and knows when you've monkeyed with it. Also, I can't make Desktop.app try to re-read the image file except when it is starting up.

So, it sounds like you need to figure out if apple included an API for changing the desktop pattern and/or forcing the desktop to update its image.

Zach
 
I guess another option would be to determine whether the Control panel for setting the desktop background is apple scriptable, and if so perhaps we could do it that way.

-GB
 
Back
Top