[Tex/LaTex] Zathura not opening hyperlinks

hyperrefviewers

I am using neovim with zathura as my LaTeX editor. I am using the hyperref and URL packages to insert a link to a website. I know zathura has recognised the hyperlink because it places a box around it (see below). However, clicking on this link does not open the corresponding page unless a firefox window is already open, in which case it opens a new tab with the corresponding URL. Can anyone explain this unusual behaviour?

Note: I am running the Pop!_OS 20.04 (ubuntu based) distro.
zathura highlights links

Best Answer

I think the problem is that Zathura sandboxes the process, which disable the feature to create a sandbox (and browsers need that feature).

To fix the issue (as far as I know) there are 2 ways

  1. Disable Zathura's sandbox. Add this

    set sandbox none
    

    in zathurarc file (usually in ~/.config/zathura/zathurarc). See man zathurarc for possible options.

    Note that setting the option by typing set sandbox none in Zathura's command line may not work.

  2. Disable browser's sandbox.

    Zathura uses xdg-open to open the URL. So you would need to modify xdg-open's settings.

    A simple way to test executing commands in Zathura is exec firefox (or similar).

    For Firefox use

    env MOZ_DISABLE_CONTENT_SANDBOX=1 firefox
    

    Source: https://wiki.mozilla.org/Sandbox


    Related: if you use Chrome instead, it will raise the error

    ERROR:nacl_fork_delegate_linux.cc(323)] Bad NaCl helper startup ack (0 bytes)
    

    In that case

    google-chrome-stable --no-sandbox
    

    works. (source: https://superuser.com/questions/971922/google-chrome-on-a-fresh-centos-7-1-not-starting-up)

Related Question