Ubuntu – xdg-open can’t open applications from links

kubuntuxdg-open

I'm using Kubuntu 19.10 and I have a problem with xdg-open.

Every link that redirects to an application doesn't work. For example slack links: I am on their website, when the link of accessing a workspace appear I only get the popup: "Open xdg-open?" and then nothing happens.

Same thing for zoom video calls. I click the link that should redirect me from the browser to the zoom application, same pop-up and nothing happens.

How can I fix it? The only thing that looks correct is the browser, so if I run in my terminal: xdg-open www.google.com it opens the window on my default browser

Best Answer

I had the same problem. I run Debian Buster
Stevel's answer here on the Linux stack exchange helped me solve it.

To elaborate on how to apply the fix.

  1. Open up the the xdg-open file as a superuser so you can edit and save the file.
    You should find the file at usr/bin/xdr-open
    Alternatively run the command which xdg-open in your terminal to find the path to the xdg-open file
  2. Find the line that reads if pcmanfm --help >/dev/null 2>&1 -a is_file_url_or_path "$1"; then using Ctrl+F or however you want.
  3. Edit the -a on that line to &&
    Your edited line should read if pcmanfm --help >/dev/null 2>&1 && is_file_url_or_path "$1"; then
  4. Save and test.

Good luck!