How to make apt:// urls to open with Gdebi or apturl?
When I click on a apt:// link in Chromium Ubuntu Software Center handles the link. How can I change it to gdebi/apturl?
Gdebi doesn't have functionality of opening apt: links, however apturl does.There is a way to set default application for x-scheme-handler links with xdg-mime
command.
First make sure apturl is installed on your system,
sudo apt-get install apturl
Latest version of chromium already uses xdg-open for any x-scheme-handler links.To configure xdg-open with apturl , go through following steps:
Make sure they are all set correctly:
- Hit Alt+F2
- Enter
gconf-editor
- Navigate to the
/desktop/gnome/url-handlers/apt/command
, it should be set toapturl "%s"
.
Now set apturl default for any apt links:
xdg-mime default apturl.desktop x-scheme-handler/apt
It will set apturl as default application for apt links.You can check it by running xdg-mime query default x-scheme-handler/apt
in the terminal(output would be apturl.desktop
)
Now whenever you click apt in chromium, it will use apturl.
DONE!!