Thursday, September 19, 2013

Show only "Free" software in Ubuntu Software Center

In other words, "How to prevent paid software from being listed in Ubuntu Software Center"

Follow three simple steps as root:

1. In the file
somewhere near line 480 find the following lines and add the highlighted line:
        doc = self.make_doc(cache)
        if not doc:
            LOG.debug("%r.index_app_info: returned invalid doc %r, ignoring.",
                      self.__class__.__name__, doc)
        name = doc.get_data()

        if doc.get_value(XapianValues.PRICE) not in (""): return
        if name in seen:
            LOG.debug("%r.index_app_info: duplicated name %r (%r)",
                      self.__class__.__name__, name, self.desktopf)
        LOG.debug("%r.index_app_info: indexing %r",
                  self.__class__.__name__, name)
2. In the file 
find the following lines and commentize the highlighted lines:

        if partner_channel is not None:
        #if get_distro().PURCHASE_APP_URL:
        #    channels.append(for_purchase_channel)
        if new_apps_channel is not None:
3. Issue the command:
# update-software-center
4. Also disable "multiverse" from "Software and Updates" settings panel.