You are not logged in.

#1 2024-10-18 08:09:44

Fingel
Member
Registered: 2009-02-28
Posts: 105

xdg-open works from terminal, but not from browser.

Hi,

I have a strange issue I've not run into before. I'm developing a desktop app with it's own protocol (deep link). I can get it to launch correctly from the command line using xdg-open <url with custom proto> just fine. But if I paste the same url into Firefox or Chrome, they will both ask me if I want to open the link with the correct app, but then do nothing. Firefox is system installed, chrome is flatpak. Running GNOME.

I'm wondering if there is some weird combo of gnome/wayland that is blocking browsers from being able to use xdg-open? Has anyone experienced something similar?

EDIT:
Firefox successfully launches the app with the custom protocol if firefox is launched via the terminal. Very strange.

Last edited by Fingel (2024-10-18 17:51:17)

Offline

#2 2024-10-20 06:07:50

Cknight70
Member
Registered: 2018-01-24
Posts: 76

Re: xdg-open works from terminal, but not from browser.

Hi Fingel, have you seen this page? I believe it may have the answers you're looking for https://wiki.archlinux.org/title/Default_applications

Offline

#3 2024-10-20 06:45:01

seth
Member
Registered: 2012-09-03
Posts: 60,779

Re: xdg-open works from terminal, but not from browser.

Firefox successfully launches the app with the custom protocol if firefox is launched via the terminal.

Compare the environment of the processes.

tr '\0' '\n' < /proc/$(pidof -s firefox)/environ

Offline

Board footer

Powered by FluxBB