Date: Wed, 29 Jun 2016 14:16:00 +0200 From: Bertram Scharpf <lists@bertram-scharpf.de> To: freebsd-questions@freebsd.org Subject: Re: Reading PDFs on the command line (with misc/lesspipe) Message-ID: <20160629121600.GA46483@becker.bs.l> In-Reply-To: <20160629132633.106636d7@archlinux.localdomain> References: <20160629102945.GA24197@box-hlm-03.niklaas.eu> <20160629132633.106636d7@archlinux.localdomain>
next in thread | previous in thread | raw e-mail | index | archive | help
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:
xto() {
local h l d
h=${1:-desktop}
l=`hostname -f`
d=":0"
ssh $h "
export DISPLAY=$d
xhost $l 1>&2
xauth extract - $d
" | xauth -f ~/.Xauthority merge -
export DISPLAY=$h$d
}
- 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.
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160629121600.GA46483>
