Reading PDFs on the command line (with misc/lesspipe)
lists at bertram-scharpf.de
Wed Jun 29 12:16:10 UTC 2016
On Wednesday, 29. Jun 2016, 13:26:33 +0200, Ralf Mardorf via freebsd-questions wrote:
> > Since I use mutt to read emails on my server, I would like to
> > read PDFs on the command line. How can I do that?
> On Wed, 29 Jun 2016 12:29:45 +0200, Niklaas Baudet von Gersdorff wrote:
> > $ less some.pdf
> I wonder how it is handled assumed "some.pdf" is just a scanned picture
> of text converted to pdf ;).
I do the following (from the shell, not yet from mutt):
- Forward X to the desktop machine:
local h l d
ssh $h "
xhost $l 1>&2
xauth extract - $d
" | xauth -f ~/.Xauthority merge -
- Run xpdf.
Of course, this requires xpdf and a lot of X client stuff to
be installed on the (anything but X) server.
You could also try to scp the PDF to the desktop and run
xpdf there via ssh.
More information about the freebsd-questions