I've been thinking for some months of replacing MacOS X with Ubuntu as my primary OS. I've been using Ubuntu for a couple of years on my good old T22 and felt that each year Linux was getting closer to what I expected. I actually made the full move a couple of weeks ago and Ubuntu 8.04 is now my OS of choice for my everyday work -- but I missed some extras that were only available in OSX.

One of these is Camouflage, a small utility that lets you toggle the display of desktop icons. My desktop can become rather messy, and I like to get rid of unnecessary information when I need to concentrate. After some research, I realized there was no utility to do that easily on Linux, so I wrote a simple one.

Toggle Desktop In Action

By clicking on the "toggle desktop" icon, my desktop icons disappear or appear, which is really like the inverse from the "show desktop" icon next to it. To implement this feature, you simply have to create this script somewhere in your filesystem:

#!/usr/bin/tcsh
if ( `gconftool --get /apps/nautilus/preferences/show_desktop` == "true" ) then
       gconftool --set /apps/nautilus/preferences/show_desktop \
                 --type boolean false
else
       gconftool --set /apps/nautilus/preferences/show_desktop \
                 --type boolean true
endif
# EOF

Then right-click on an empty space in your top or bottom gnome panel, select the "Add to panel" menu entry. Fill in the form in a similary way as illustrated below, making sure that you give the path to the script you just saved (also make sure the script has +x rights).

Toggle Desktop Properties Toggle Desktop Icon

You can also get the icon file here if you want to give it the same look as on the illustration. It seems like Nautilus sometimes has problems when toggling the show_desktop properties, and I have to restart it manually.