I want to remove the Ubuntu Software Center Suggestions from the Dash in Ubuntu 12.10. How to do that?
Ubuntu – How to remove the Ubuntu Software Center Suggestions from the Dash
software-centerunityunity-dash
Related Solutions
For 12.04
Derived from Pavlos G. answer and inspiration from Darmien answer.
Different version? Go to the list.
See the end of the post if you are in trouble and want to revert the changes.
1. Ignore the purchasable apps
Open a terminal (Ctrl + Alt + T) and type:
gksu gedit /usr/share/software-center/softwarecenter/db/update.py
And press Enter. You'll be prompted for your password.
Then an editor will appear. Locate the following lines (hint: Ctrl + F may help):
doc = make_doc_from_parser(parser, cache)
if not doc:
LOG.debug("make_doc_from_parser() returned '%s', ignoring" % doc)
return
term_generator.set_document(doc)
name = doc.get_data()
Immediately after those lines, paste the following (including the spaces!):
if doc.get_value(XapianValues.PRICE) not in (""): return
Note: if you want to keep stuff that doesn't cost money, but has to be "purchased"
(like trials, magazines and other propietary stuff), replace ("")
with ("0.00", "")
.
Save the file (Ctrl + S), open the Software Center and… voila!
There are no commercial programs!
You can close the editor and the terminal now.
2. Remove the "For purchase" channel (optional)
To also remove that "For purchase" item in the menu, open a terminal and type:
gksu gedit /usr/share/software-center/softwarecenter/backend/channel_impl/aptchannels.py
Locate these lines:
if get_distro().PURCHASE_APP_URL:
channels.append(for_purchase_channel)
And disable them by putting a #
in front of every line:
#if get_distro().PURCHASE_APP_URL:
# channels.append(for_purchase_channel)
Save and enjoy a software center without ads!
Side notes: The. files. are. packaged.
What does this mean, you ask? This means that,
whenever you upgrade your Software Center, the changes
will be reverted and you'll have to do this steps again.
Undo the modifications
If you want to restore the original state of the files,
open a terminal and type:
sudo apt-get install --reinstall software-center && exit
Again, you will be prompted for your password, this time on the terminal.
Type it and press ENTER. Don't worry if nothing appears when you type, it's to hide your password.
The terminal will automatically close when finished.
This instance of the problem might be caused by a bug; I recommend considering reporting this as a bug in PolicyKit.
However, this problem can occur with or without a bug, for example, as a consequence of manual PolicyKit configuration changes (or deinstallation). Therefore, it merits an answer here.
This is happening because the PolicyKit service is not running. Here's a couple ways to fix this:
Make sure the necessary PolicyKit packages are installed.
Open a Terminal (Ctrl+Alt+T) and run:
sudo apt-get update && sudo apt-get install policykit-1 policykit-1-gnome
Then reboot and see if the problem is fixed. (Logging out and back in might fix the problem too.)
Run the Software Center with gksu
/gksudo
instead of PolicyKit.
If that doesn't work, you can still run the Software Center by working around the problem. PolicyKit is one way an authorized user (typically an administrator) can perform actions as root
in a typically configured Ubuntu system, but it is not the only way. sudo
is the other.
For graphical programs, running them with sudo
directly often will work (as in Thomas's answer). But it is not recommended, primarily because it can cause the non-root user's configuration files to become owned by root.
- For graphical programs that don't store configuration files in a user's home directory, this doesn't matter. But most do, and the Software Center is no exception. (It uses
~/.config/software-center
, where~
is your home directory.)
So it's recommended to use a non-graphical frontend instead: gksu
/gksudo
, or (if you're running Kubuntu) kdesudo
.
So, press Alt+F2 and run:
gksu software-center
(This works in all desktop environments, not just Unity, though of course it looks different in others.)
Then you'll be prompted for your password. Enter it, and the Software Center will run as root
.
Please note that this is a little different from the way Software Center usually runs. Ordinarily, it runs as a normal user, and uses PolicyKit to perform actions as root just when it is needed. It would be non-trivial to get it to use gksu
/gksudo
or kdesudo
to do that.
But running it as root
typically works fine and causes no problems.
Other graphical utilities can be run as root
with graphical sudo
frontends, too.
The problem itself doesn't appear related specifically to the Software Center--any program that uses PolicyKit will fail. Some, like users-admin
, cannot be run successfully as root
. But most can. Here's how to do it, for some of the commonly used utilities:
Software Sources —
gksu software-properties-gtk
(In Kubuntu:kdesudo software-propertiies-kde
)Software Updater (called Update Manager before 12.10) —
gksu update-manager
(If you just want to install updates normally, though, you may be able to do that without becoming root at all, as there is a separate service that allows this.)System Settings... —
gksu gnome-control-center
Best Answer
Install dconf-tools
sudo apt-get install dconf-tools
then rundconf-editor
. Go to desktop/unity/lenses/applications and uncheck display available apps.Lets hope they make this easier in future versions.