Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Easily restore a lost desktop picture Desktop
I often lose my desktop background and end up with a solid blue desktop when changing between using a monitor and using the built-in PowerBook LCD. Each time it happens, I have to go through the desktop settings panel, where I find that the desired picture is still selected, so I have to choose some other picture then choose the original again.

This is a bit of a pain, so I made this little applescript to avoid having to dance with the preference panel every time. I just compile it into an app and save it on my desktop (or in the scripts menu) to be easily run whenever the desktop turns blue. Sometimes I have to run it twice, but that's easy too.
tell application "Finder"
  set currentPicture to the desktop picture as string
  set the desktop picture to ¬
   ":Library:Desktop Pictures:Solid Colors:Solid Aqua Blue.png"
  set the desktop picture to currentPicture
end tell
If anyone has a real fix instead of this workaround, I would love to hear it.

[robg adds: I noticed this very thing this week while at Macworld; after both of my sessions, when I removed the projector, my desktop went to the standard Aqua blue background...]
    •    
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[21,854 views]  

Easily restore a lost desktop picture | 18 comments | Create New Account
Click here to return to the 'Easily restore a lost desktop picture' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Easily restore a lost desktop picture
Authored by: neighorn on Jan 14, '05 11:43:47AM

I get the plain blue desktop occaisionally, also. I find that it only happens to me when I unplug my monitor without having my PowerBook in sleep mode. Of course, my monitor is used as a second display, rather than a mirrored one, so I'm not sure if that changes anything.



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: leenoble_uk on Jan 14, '05 12:03:55PM

Your timing is impeccable.
I've experienced this numerous times in the past but too spaced apart to bother doing anything about. This week I've been shifting my PB about and plugging and unplugging my monitor quite a bit so this has bugged me to the extent that just today I was thinking of putting my improving AS skills to the task of fixing it.
Then this comes along. Good timing.

---
So, I said ... well, I can't actually remember exactly what I said. But it was one of the most enormously cruel and frighteningly witty put downs ever.



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: aboswell on Jan 14, '05 12:16:11PM
I do this every day transfering from a work monitor to the powerbook display at home. I have found that my best friend is GeekTool. I can specify a picture and tell it how to display.

If that is overkill, I would use your script and download Quicksilver. You can attach global hot keys to just about anything (files/programs/scripts). Simply attach a hot key to your script and any time you are without a background, hit the hot key combo. It doesn't matter what app you are in as long as you use a combo that is not used by another app. I like ctrl+opt+shift+[modifier].

Just my 2 cents.

[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: SWCarson on Jan 14, '05 01:13:18PM

This script is addressing a real flaw. I have the problem on my second monitor as I bring my PowerBook between home and work each day and plug it into a differently sized second monitor in each place. Unfortunately, this script only applies to the main monitor:

"Class application: The Finder
Properties:
desktop picture file -- the desktop picture of the main monitor"

Furthermore, this is listed as a legacy item:
"Legacy suite: Operations formerly handled by the Finder, but now automatically delegated to other applications"

But that suggests hope. What is the application to which the Finder has delegated handling desktop pictures? If that is scriptable then this script could be made general to deal with any number of monitors. Any ideas?



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: ether on Jan 14, '05 01:10:21PM

This always happens to me when I (a) put my machine to sleep, (b) unplug the monitor, (c) wake the machine up without the monitor, and then reverse the process to reconnect to the monitor. The wakeup without monitor step is crucial, or it recalls the picture.

I'd found that using the preference pane to resize the picture (strectch) and then resize it again was the only way to make it reappear. (Simply switching to a new picture didn't.) I checked the applescript dictionaries for Finder and System Preferences, but there seemed to be no entries for these functions.

The strange thing about this hint is that, in addition to only working sometimes, I have to doubleclick the resulting app. If I launch it from a menu or the dock, it opens but doesn't seem to do anything. Most peculiar.



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: leebennett on Jan 14, '05 01:49:49PM

You could always put an alias of your favorite background image on your desktop, right click (or control click) it, and choose the option to set that item as the desktop picture.



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: ChaChi on Jan 14, '05 02:26:14PM

Has anyone tried locking the following file?

/Users/YourUserName/Library/Preferences/com.apple.desktop.plist

Just curious. In testing, this has worked for me…



[ Reply to This | # ]
It's actually not my probelm
Authored by: peragrin on Jan 14, '05 03:40:04PM

I am always using two monitors on my powerbook, and don't have any problems like that. I unplug the monitor and it washes the screen once or twice then restores the display.

I use rotating desktops images though. every 30 minutes the background changes on the powerbook. I tried setting the large monitor to rotate but it picks one image and never changes it. So I picked one picture for the second display, and let the powerbook display rotate.

Try setting your desktop to rotate once a day or so.



---
I thought once I was found but it was only a dream



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: timbloom on Jan 14, '05 04:32:57PM

I actually solved this problem in a somewhat different manner. If you go to the terminal, and kill the dock process, your previous desktop will show back up. Any minimized windows will pop back up to full size too. A friend actually made a really simple program that I keep in my dock that does this. I have to head to work right now, but maybe I can upload it to my webserver and provide you all a link to it. Works like a charm.



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: mnoriega on Jan 14, '05 05:56:16PM

I've recently began to have a related problem. When I disconnect an external monitor (TV) from my Powerbook, the mouse pointer dissapears leaving me helpless to use my Powerbook.

My only solution has been a reboot.

Anyone find a soluton for this?



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: afb on Jan 14, '05 06:02:17PM

this seems like a strange way to fix this bug.

couldn't one just set the pref to show desktop pictures from a folder that has only one picture? and have it change every five minutes or so ...

---
now is the time for all good cows to come to the aid of their pasture.



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: nufoto on Jan 14, '05 11:33:58PM

This is not a Bug this is part of the User settings Apple Started this Back in OS 9, I notice this when my sister brings her G3 PowerBook over for a fix, and when my iBook connects to my Buddys Airport. the desktop picture changes and I think the screen saver changes as well. it restores to the Setting of that specific location or setup.



[ Reply to This | # ]
Very confusing thread...
Authored by: jiclark on Jan 16, '05 12:06:51PM

I've experienced this (losing the desktop pic) when disconnecting from an S-video connection to a TV for demos. And in answer to a couple of posters above, this has nothing to do with different locations, and I also have my desktop pic set to change randomly every 30 minutes. Regardless, I'm always reset to the default blue desktop when I disconnect from the S-video connection. Therefore, I think this is indeed a bug.

I'd love to know more about how the various fixes recommended here work for different people. I like the idea of the script, and plan to test it out, but I'd love to know if there is something else that someone has discovered as a fix.

So keep posting about this, but be as specific as possible about your particular settings and what it is exactly that you find to fix it!



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: skinnyjimmy on Jan 17, '05 12:13:29PM

Mine is kind of related...

I keep a 45MB folder of desktop pictures on my iDisk, so that my desktops are synchronised across different machines.

If I use the desktop pref pane and point to the folder on the iDisk, a logout causes the desktop picture to revert to the Aqua Blue. Going to the pref pane and changing an option (i.e. change every 5 mins to every 30), the system updates and the desktop comes back.

If the folder is local, there are no problems with logging out / restarting etc., the preferences and desktop behave as expected.

A little annoying too - anyone seen this one?



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: zorinlynx on Mar 20, '05 02:21:58PM

This problem has irritated the heck out of me for a long time, and I even submitted it as a bug report to Apple over a YEAR ago and they said they already knew about the problem, but it has yet to be fixed!

My solution was to write an AppleScript like the one already mentioned it, and fire it up automatically using Sleepwatcher. Works nicely!

-Z



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: garret on Apr 01, '05 11:15:03AM

I've been experiencing this almost daily for several years. The problem cropped up in OS X 10.1. OS X 10.0 and the beta worked fine. I've submitted at least one bug report about it, and every year since 10.1 the first thing I test after I get home from WWDC is this bug to see if they finally fixed it. Still waiting...

The easiest way I've found to work around the bug is just to leave the Displays control in the menu bar and when the desktop goes blue, switch to another resolution and then switch back (the first resolution switch restores the background).



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: WarriorVisions on May 20, '06 10:55:56AM

The question I have is only peripherally related to this issue, which I have also encountered. Where is the core blue image or color code actually stored in the running OS X processes? I know the screen is drawn blue during the bootx portion of startup and remains that way in the background behind whatever desktop image is chosen. I simply want to know where that blue is coming from. Any thoughts?



[ Reply to This | # ]
Easily restore a lost desktop picture
Authored by: Maxikubik on Mar 10, '11 01:52:34AM

I have the same problem from time to time, but I can't get this solution to work.
I'm using Snow Leopard and Path Finder.



[ Reply to This | # ]