I am using Linux Mint 18, compiling with pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016) and Xreader to view PDF files.

Some days ago I observed that the viewer closes when I compile using TeXstudio. I asked about this on SourceForge and I got from Tim:

Tim Hoffmann - 2016-09-28

This is on purpose. Some PDF viewers keep a file handle to the file they display and thus would prevent generation of a new PDF during compilation.

Therefore, TXS closes external pdf viewers prior to a compilation. This does only work with viewers opened from within TXS because they are a subprocess we can control. We cannot influence viewers opened in another way.

But today I observed that even if I compile from terminal with pdflatex the PDF viewer closes. This is annoying since I have to open it everytime after compiling.

Is there some change on pdflatex? TeXLive is updated.

  • Designed for Windows, by the sound of it. TeXStudio, I mean - not pdfTeX. This has zilch to do with pdfTeX or pdfLaTeX. So long as it can write to the requested file, the compiler doesn't give a monkey's. It doesn't know or care whether you even have a viewer, let alone whether you are using it. A viewer can interfere by locking the file on Windows. But the compiler only knows it can't write to the file. This is TeX Studio being designed for the LCD. This should be a preference if they want to support broken behaviour - not required.
    – cfr
    Oct 9, 2016 at 1:50
  • Although the breaking of your workaround is presumably the viewer's fault as TeXStudio has nothing to do with it either.
    – cfr
    Oct 9, 2016 at 1:55
  • @cfr, the Unix.SE link below in hbaderts' answer is the same. There is a bug with Xreader.
    – Sigur
    Oct 9, 2016 at 1:56

1 Answer 1


First, pdflatex know nothing about your PDF reader. The only way[Citation needed] it can be influenced by the PDF reader is, if the reader has a lock on the PDF file, so pdflatex can not change it.

What you describe appears to be a known bug in Xreader. Here is a cross-site duplicate on Unix.SE, describing the same problem. The bug was fixed with this commit on Github in July 2016. As there has been no release since June 2016 to this date, the only solution is to manually build Xreader from the sources.

You must log in to answer this question.

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