I am currently remoted into my linux workstation's command line environment (bash shell) using SSH with X11 forwarding enabled.

I am using the mendeley citation manager's desktop application to organise my references and their PDFs.

Now, when I click on open PDF using external application, it opens up the PDF using another PDF software.

I wish to use the zathura PDF viewer installed on this workstation for opening and viewing these PDFs. Similar to settings like EXPORT EDITOR=vim is there an environment variable that I can set in bashrc for setting the default PDF variable to zathura?

  • That should be a setting with the citation manager. If that uses the "system" default application for PDFs, check your desktop environment's preferences. Your shell's environment would not enter into it, I wouldn't think. Commented Apr 14, 2018 at 13:45
  • You do not mention which desktop environment you are using, but there should be some setting regarding file associations. Change your PDF file association to whatever app you would like it to be associated with. Commented Apr 14, 2018 at 17:39
  • @GracefulRestart this is just an ssh X11 login from a terminal emulator. I am not running any desktop environment Commented Apr 14, 2018 at 20:12

2 Answers 2


I know it's late but I wanted to provide a correct answer, since I was searching for this exact question, and I got here, and the only answere there is, is wrong, so if anyone gets here searching the same question, here's the correct answer:

$ xdg-mime default org.pwmt.zathura.desktop application/pdf

I got it from the arch wiki, here's the link, in case you want to chek it out:



You can use your file manager (e.g. Nautilus or Nemo) and use set zathura as default open with option for pdf in the properties menu.

However, the standard way is to use XDG-MIME in the command line. First you can find what is the name of mime for particular file (here pdf). Then you'll see your current pdf viewer and finally you can set your preferred pdf:

To find out the default app for a particular type of file

> xdg-mime query filetype Documents/test.pdf


To find out the mime for the extension

> xdg-mime query default application/pdf


to set default app for an mimetype

> xdg-mime default zathura.desktop application/pdf

to test if applied successfully

> xdg-open test.md

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .