Sunday, June 28, 2009

Ubuntu 9.04: Missing Icons on Desktop

I finally decided to give the Jackalope a try. Hardy Heron (8.04) was relatively stable, but gave me some minor trouble with audio and video, and it was a hassle getting the latest software packages that hadn't been approved for 8.04.

The recommended upgrade path was 8.04 -> 8.10 -> 9.04, so I essentially had to upgrade twice. The process was relatively smooth, although time and bandwidth consuming, and I've noticed a number of subtle improvements in the operation of the system. And one very big malfunction: all my icons disappeared.

Now there's a configuration setting in gnome for hiding all your icons; it's useful for obtaining a smooth, uncluttered desktop with a clean view of your wallpaper. Use the gnome configuration editor by looking under the Applications->System Tools menu for "Configuration Editor". If it's not there, it's hidden by the distribution, but easy to reveal using System->Preferences->Main Menu. It's even easier to drop to shell (terminal) and type "gconf-editor". You'll see this window:

The Configuration Editor is a powerful tool that gives you direct control over much of the gnome desktop environment. Misuse it and you'll quickly have to learn how to do everything in the shell (which isn't a bad idea, but if you're anything like me you've no time for that). In the left sidebar, select "apps", then scroll through the list until you see "nautilus". Click that, then click on "preferences". You'll be rewarded with a plethora of options in the name/value window on the right. Scroll through that window until you find "show desktop"; it's a boolean value (a fancy way of saying on or off) and can be turned on by clicking the checkbox to the right of the label. When the box is unchecked, you have no icons. When it's checked you do. Simple.

Unfortunately, in my case, that box was already checked, and no matter how many times I re-checked it, every reboot was greeted with a barren desktop. What now? If you're like me, then you turn to the web and dig through your favorite search engine for a solution. Maybe that's how you found this page. My condolences. I found an interesting solution that recommended deleting the ~.local/share/applications folder. Tilde (~) refers to your account's root directory. I thought this sounded a little extreme, so I just renamed the folder to applications_old and logged out/logged back in. Bingo! Icons on my desktop.

So what's in this applications folder? When I went back to look, there was a new "applications" folder with only one file within: gconf-editor.desktop. Comparing this with the version in the renamed applications folder showed a much smaller file. The original contained tons of remarks in different languages, bloating the file from 405 bytes to about 10 kilobytes. I then looked at some of the other files in the old folder and saw indications that they contained settings that I'd made over the last ten months of using Ubuntu.

So, this was an imperfect solution. By deleting that folder, one risks losing one's efforts at customization. I put everything back except gconf-editor.desktop and relogged.

And all my icons disappeared.

Closer examination showed that along with the other twenty files I'd restored, I'd also moved "nautilus.desktop" back. On a whim, I moved that back out of the applications folder and relogged, and was greeted with an icon-laden desktop.

This is where I've stopped. As far as I'm concerned, something in nautilus.desktop caused the trouble, but I don't know what. I've examined the file, but nothing seems suspicious to me. There is one dangling matter that annoys me, though. If, for some reason I decide in the future that I prefer an icon-less desktop, the setting in gconf-editor for turning this off no longer seems to work. It's now flagged as an unwritable setting; possibly because there is no nautilus.desktop file present.

That's a matter for another day.

7 comments:

Wodr said...

Thank you for your post.

I had the same problem. The icons just disappeared. What worked for me was just to click on the bin icon and suddenly all the missing icons showed up.

SpeedKing said...

Yeah,

Thank for share your experience ...

Some question here ...

It's very stupid clicking in the bin and restore occurs!!!

Perhaps Gnome Development Personnel
should know about this ... but this issue is relatively old in the web posts and there are no efective solution until now ...

Regards

Art

stef said...

in my case, it occurred after letting the disk get full.
I could repair the desktop with :
sudo apt-get install nautilus

Richard said...

Yah... it works just by clicking bin and all desktop icons reappear

Unknown said...

Hi All... I just opened the System>Preferences>Switch Desktop View>Changed it to the Laptop Mode and Again to Classic View... It worked :-)

Olumisti said...

Thank you for your post. The best (for my case) of ALL that I found on internet. However, I cannot change the show_desktop Boolean at all. It says This Key is not writable.

Unknown said...

I had the same problem with a barren desktop. Thank you so much for your help. :D