If you wish to prevent certain partitions or drives appearing on the desktop, you can create a udev rule, for example /etc/udev/rules.d/10-local.rules:
Would show all partitions with the exception of sdaX and sdaY on your desktop.
Notice, if you are using udisk2 the above will not work, due to the UDISKS_PRESENTATION_HIDE no longer being supported, instead you must use UDISKS_IGNORE as follows
Type "gconf-editor" into a terminal window to run the Configuration Editor.
In the left hand tree, browse to apps / nautilus / desktop
In the right hand side, untick the "volumnes_visible" option.
Close the configuration editor. You may have to restart for the changes to take effect.
You can find more information on How-To Geek.
Also take a look at Ubuntu Tweak. It's got a lot of settings that are in gconf-editor in a nice gui setup.
To Hide Selected Partitions
If you wish to prevent certain partitions or drives appearing on the desktop, you can create a udev rule, for example
/etc/udev/rules.d/10-local.rules:
Would show all partitions with the exception of sdaX and sdaY on your desktop.
Notice, if you are using udisk2 the above will not work, due to the UDISKS_PRESENTATION_HIDE no longer being supported, instead you must use UDISKS_IGNORE as follows
This answer was culled from: https://wiki.archlinux.org/index.php/Xfce4#Hide_Selected_Partitions and though it's Arch and xfce it applies since Ubuntu uses /etc/udev/rules.d And udisks is installed as part of gvfs if I'm not mistaken. :-).
ailurus which can be installed from this ppa makes it easy. Once you install it with