Installing GDebi ruins apt links

Category:bug report

apt hyperlinks (e.g. apt:icecat) are supposed to be opened with Apturl-gtk, but installing GDebi (package gdebi) causes them to be opened with this program instead, which causes these links to fail. This user failed to install IceCat via the link in Abrowser, for example:

I tested it and found that installing GDebi caused apt links to be opened with GDebi, and uninstalling it caused them to be opened with Apturl-gtk again.

Tue, 12/02/2014 - 12:46

When you installs gdebi, it is set to open x-scheme-handler/apt. You can see setting from /etc/gnome/defaults.list

$ cat /etc/gnome/defaults.list | grep apt

If you want to change in order to open again with AptUrl then replace gdebi.desktop with apturl.desktop for x-scheme-handler/apt:

  1. Open /etc/gnome/defaults.list by `sudo gedit /etc/gnome/defaults.list` (be careful as sudo)
  2. Replace x-scheme-handler/apt=gdebi.desktop with x-scheme-handler/apt=apturl.desktop
  3. Save file and exit

Now apt links handled with apturl.

Alternatively you may run following command:
sed 's/x-scheme-handler\/apt=gdebi.desktop/x-scheme-handler\/apt=apturl.desktop/' /etc/gnome/defaults.list | sudo tee /etc/gnome/defaults.list

Wed, 02/17/2016 - 19:03
Fri, 03/11/2016 - 13:18

try executing:
xdg-mime default apturl.desktop x-scheme-handler/apt


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 to apturl "%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.