On 27/01/2021 10:36, Lars Ingebrigtsen wrote:
Executing the command "xdg-open /path/to/file.pdf" in a terminal
(Konsole) works.
The problem may be related to SIGHUP sent to children due to pty created
by emacs and closed as soon as the handler exits:
https://orgmode.org/list/ru4d75$11sc$1...@ciao.gmane.io/
As a workaround you could try to set another handler for PDF files in
mailcap, e.g. okular directly without xdg-open wrapper. Handler should
not try to launch actual application in background with immediate exit.
Currently start-process elisp function is used internally in
org-open-file. Low level (make-process :connection-type 'pipe ...)
should allow to avoid pty+SIGHUP problem. Maybe there are some
consequences of such change that I am not aware of.