Synaptic's "Add CD-ROM" option is not nearly as flexible as it could be. The feature makes too many expectations, such as what medium is being used to store a repository. What if someone wants to update from a DVD, a flash drive, a disk image or a directory already on their computer? "Add CD-ROM" still does work, but it needs to be tricked into working by linking /cdrom to whatever directory contains the packages.

The feature is obviously more powerful than it allows itself to be so it should behave more flexibly. It should not make any assumptions as to what medium is being used to store packages.

The current interface also feels clunky for two reasons:

Firstly, it is strange that adding a repository stored locally is any different from adding one that is available via the Internet. It makes sense that the two probably work very differently, but putting them both under the same "Add Repository" interface via Synaptic's menu would make more sense than having the two methods under completely different menu titles!

Secondly, the "Add CD-ROM" interface seems a lot less automatic than it could be. Why can't it detect this for me? Why do I have to tell Synaptic about a disk which has just been mounted right under its nose? Why do I have to follow a precise order of operations, where I first open the "Add CD-ROM" dialog /then/ put the disk in the drive, in order for it to work?


To update to Feisty Herd 5, I saved the Alternate CD ISO onto a USB flash drive using another computer, then I mounted the ISO at /media/cdrom using the command line.

At this point I was aware of Synaptic's "Add CD" option and somewhat willing to use it (after it had worked upgrading from Herd 3 to 4 using a CD), so I opened Synaptic and navigated to Edit->Add CD-ROM. There are a number of problems with the operation of this particular dialog. Firstly, it unmounts whatever was in /cdrom originally. This is confusing in, for example, this situation:

  • Ignorant Bob wants to update Ubuntu to the latest version using the Alternate CD. He puts the disk into the drive, then realizes he must open Synaptic and go to "Add CD-ROM".
  • Synaptic unmounts his disk, and then tells him to "Please insert a disc in the drive." What Bob gathers from this could be one of three things: The disk drive does not work, the disk is broken, or Ubuntu is being dumb. Not fun, since none of those thoughts are true! This can also be confusing for people who do not just have "the drive", but rather have multiple CD ROM drives, flash card slots and floppy drives. Which one is "the" drive?

Back to my adventures: What I did not realize at first was that Synaptic is VERY picky about where this new CD repository is. It checked /cdrom for the repository, so since I mounted my ISO image to /media/cdrom, it did not read my disk. I eventually figured out to mount it to /media/cdrom0 (which is what /cdrom links to for me), then I went to "Add CD-ROM" in Synaptic. It unmounted my image and told me to "insert a disk in the drive", I mounted it again, and all went well.

This is not nearly as nice as it could be!

Use cases

  • Donald wants to update from Ubuntu G to Ubuntu H. He does not want to lose his settings or software so he wishes to perform an upgrade, but he does not wish to download Ubuntu H via apt. Donald's friend has Ubuntu G on a CD, so they copy the CD's contents onto Donald's very big USB drive. Donald then inserts the USB drive and Ubuntu offers to update using the package contained within its pool directory.
  • Generic Software Inc. has released a commercial game and they want it to be installable on Ubuntu. They want it to be easy for their users to insert the game's DVD and have the game become available with minimum fuss in the same way as other Ubuntu software.


  • Synaptic should not limit itself to only updating from CD ROMs. I later linked /cdrom to my flash drive containing the contents of the Herd 5 CD and installing packages from it worked fine. I should not have to trick Synaptic into doing this; it should do it automatically. There are some simple ways it could, too: Synaptic could scan the directories in /media for anything containing a package repository, or Synaptic could bring up a file selector asking me to choose where I want to install packages from instead of /expecting/ to be installing packages from /cdrom, or (as mentioned previously) Ubuntu could automatically recognize a newly mounted medium containing a package repository and let Synaptic know. Of course, the option should then no longer be called "Add CD-ROM". Perhaps it could be a unified "Add Repository" option in the menu and used to add repositories that are both local and online.
  • It would also be effective for package repositories to automatically be detected. Ubuntu should detect when a medium with a package repository available is mounted and offer to open Synaptic. I do have vague recollections of Dapper detecting when its install CD is inserted and offering to open Synaptic, so this can't be too far off. Tucking away "Add CD-ROM" in Synaptic is confusing and not fun for the previously described reasons. If this is not already done, there could be a file placed on the root of any storage medium which contains packages at a particular location, quickly detected and (if present) read.
  • I suppose a lot of this falls under the "that's not Synaptic's job!" category, so I apologize for my ignorance. Adding local repositories to sources.list could happen through an interface separate from Synaptic upon the insertion of a medium containing one (as with the point above this one), so that then the user has a more evident choice to install the new packages or updates through whatever they want, be it Synaptic, Add/Remove programs, apt-get, aptitude, update-manager, or whatever else uses apt.


Cleaner addition of local package repositories

Yes, I'm adding a comment to my own spec at the same date as its original creation. Laugh at me if you wish, but remember this: I'm keeping the doctor away.

After using the install CD to update, it lost its usefulness. In fact, since my "CD" was actually a flash drive, the ISO was deleted. However, Synaptic still listed it (with a very long-winded title!) as an origin for packages and I have unfortunate memories of it telling me to insert CDs which I may not possess anymore in order to download packages. This is alright, in fact kind of cool that it keeps a documentation of which of my disks contains what information, but it is certainly not pretty that the only way to get rid of those disks from my list of repositories is to edit sources.list!

If local package repositories were automatically detected and examined, only when inserted Synaptic could perhaps get away with removing them from sources.list when they are no longer present, simply to keep things tidy.

An alternative would be for the repositories to be remembered, but not cluttering the interface. If someone tries to install a package that Synaptic knows is available on a local storage medium instead of over the Internet, Synaptic could suggest that the package is available locally if the user wishes to insert the medium it is known to be stored on. However, that storage medium would only be explicitly selectable and browseable if it was inserted. (Instead of always being listed).

The rationale for this is that if the user wants to install a package from a particular CD he will probably insert it himself.

--DylanMccall (March 4, 2007)

Fall back gracefully

At present, Synaptic insists that the user insert the CD containing the necessary packages and does not offer any obvious choice not to. This is a significant hindrance! When a wanted source is not immediately available, the system should offer to try a different source such as the Internet or a flash drive known to have the necessary packages.


AddLocalRepositorySpec (last edited 2008-08-06 16:15:49 by localhost)