17

I have a pretty picture set as my desktop background, but I've lost the original file. However, my desktop is still set to this picture. How can I get back my picture?

Bruno Pereira
  • 73,643

4 Answers4

21

Open up the file browser and press Ctrl+H, to show hidden files (ones that start with a .), now navigate to .cachewallpaper.

Or hit Alt+F2 and type nautilus .cache/wallpaper/

alt text

8128
  • 28,740
  • These seem to be zoomed versions of the original. Does Ubuntu also store the original file somewhere? – Ryan C. Thompson Jan 02 '11 at 17:51
  • No, it doesn't - unfortunately. You can use find / 2> /dev/null | grep warty to search everywhere on your disk. Replace warty with something that you would expect in the file name of the image. Perhaps there happens to be a copy somewhere, but nautilus doesn't create one. – Stefano Palazzo Jan 02 '11 at 18:00
4

If your image came from the internet, then I would suggest taking a Screenshot (Applications->Accessories->Take Screenshot).

Then upload your screenshot to TinEye.com. On the results page select "Biggest Image" from the left hand side navigation. Then look to see if the website has found your image.

This "Reverse Image Search" has enabled me to do what you're doing before.

8128
  • 28,740
3

If you run gconftool --get /desktop/gnome/background/picture_filename in a terminal then it will output the location of the image file.

(GConf is the GNOME settings manager, and /desktop/gnome/background/picture_filename is the particular setting you are retrieving. You can also browse these settings graphically by using the gconf editor.)

Or hit Alt+F2 and type

 eog `gconftool --get /desktop/gnome/background/picture_filename`

(this opens your image with the default image viewer, Eye of GNOME)

8128
  • 28,740
0

In the case when you absolutely misplace a file and aren't able to get online to ask about the location of where it might be stored, always remember this... it has helped me a lot throughout the years.

CTRL + ALT + T to get shell, then:

locate (type file name you are looking for here, without the parentheses)

NOTE: if you've never used locate before you'll need to run updatedb first like this:

sudo updatedb

or if you are already root, just run updatedb, usually it can take time so I run it in the background like this:

sudo updatedb &

the & causes the command to be run in the background, you can type jobs to see if its still running, but you'll get notified when it terminates like this:

[1]+ Done     updatedb

Some people hate the shell, but even so, I have found it good to learn both GUI and shell no matter what OS you are using. There ARE going to be times when something can't be done via the GUI, esp in a linux environment. This was very true when it came to bridging ethernet interfaces, etc..

Aditya
  • 13,416