If you're new here, you may want to subscribe to my RSS feed and if you have questions related to your ubuntu system post question to our forums. Thanks for visiting!
Go to System--->Preferences--->Removable Drives and Media

Once it Opens You should see the following screen

Now you need to click on Multimedia tab you can just uncheck the box for the disc type you don’t want to autoplay

Once you unselect all the options you should see similar to the following screen now you need to click on close

If you are using Feisty by default this is unchecked.




It doesn’t work like this any more in Hardy Heron, instead the settings can be found in Nautilus (the file browser) under Edit->Preferences->Media . See http://ubuntuforums.org/showthread.php?t=713724 for more details.
Thanks Costas. Still works like that in Intrepid but might change for Jaunty.