I am trying to open a pdf file from a python app that I am developing with Gnome Builder. I have:
import subprocess subprocess.call(["xdg-open", pdf_path])
This opens an “Open with” dialog showing various application to open the pdf file. The same code on a simple python script opens the pdf file with Evince without asking anything.
How would I specify Evince as a default program to use when doing xdg-open from a flatpak’d app?