From owner-freebsd-questions@freebsd.org Wed Jun 29 12:16:10 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13303AC5429 for ; Wed, 29 Jun 2016 12:16:10 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 650B22ED6 for ; Wed, 29 Jun 2016 12:16:09 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from becker.bs.l ([85.180.5.12]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0M73gb-1bWAQm0nfZ-00wq7p for ; Wed, 29 Jun 2016 14:16:01 +0200 Received: from bsch by becker.bs.l with local (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bIEPQ-000C9T-9g for freebsd-questions@freebsd.org; Wed, 29 Jun 2016 14:16:00 +0200 Date: Wed, 29 Jun 2016 14:16:00 +0200 From: Bertram Scharpf To: freebsd-questions@freebsd.org Subject: Re: Reading PDFs on the command line (with misc/lesspipe) Message-ID: <20160629121600.GA46483@becker.bs.l> Mail-Followup-To: freebsd-questions@freebsd.org References: <20160629102945.GA24197@box-hlm-03.niklaas.eu> <20160629132633.106636d7@archlinux.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160629132633.106636d7@archlinux.localdomain> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: Bertram Scharpf X-Provags-ID: V03:K0:+KjdmcTRjro5oBS9RsoZTuesl5Wj7zkwcztjCIhdhaqlufBMfY2 suUpMMtlk1v5tHy1oT3No7vdTheLZ0kxHTJK0lvxilToTwjZxxn/yMoJlkI9Eii48YeB7Yl Nw5Zzzm5N1Rv2onxo93eGwI2oQMuJNNpy5PYVvfNsgCd3n0aFykx1NKbZdMeXVv8aKP1ZLZ sWQ0RySCsWVFN2Vish7cg== X-UI-Out-Filterresults: notjunk:1;V01:K0:LskeAsLuLk8=:Qqc7qOrXxtUFI4sQ1OZ4TJ 5syaYaHG2tUcqYxvBBc36vYZMY7VJyQJMgigWLWfyeSF2N4p25Q1I1dg4BKBptlkhRBIxKS7E UV4wqGJsahxsXanbezjK0HK/sx3rpSE4YR0b/HAf6/Nt/s/KjoVsuyYm+rrDx+oIHHAVfhJkE 4cYgqzHk6lqOPqFV606V9hNXae5/AffFaNNHzwNWGTgT76/DhE8NPR2xOWjtvMmayVAZR7nJv UNRfwer/MK6wW88T8//vhLm93+enWj+86nwHqVySo24GLZojGaWMbLFsxNryS1ajm/aR7qiOT /c19B3jQX12BWc+23YScgnCNry8ZsfCkTcPECoDmKXhEFqKlbUH1ZfDeagO3cz6bDj0TQ4Oy0 Hbh+Zf608cSbqSsjN0DiQkdgaXfXwea5lX0+mzJ4XD5vEo4EyI7MxjavcNOBtB1iOdx2nfkrm OBvIYsjjBF+7olAmXYjXe4m865HbSNnT8BcSwLud7tIpCaT4DxLFH5mYaUrwijsQYUJQJaDrc VWftrBtpyGITMr70wh91a3yzVuyHIsGuT9sKsceA0P9oD21eoC8wl5eZ139DNMhimV9fHCM3n 6HYmJAa6PjpbOUZoZDm0MMVfY+oAFzT5YdZXxMYqMdnY+N8TSRDFCNl7V4P+cvPp+q7+yeyox Qf5850hN96zeS9djsgd8XQaM5mt2cVDl96MCzsgvad2V2h5c/i+KL97VtogjVw/zsj1Y= X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2016 12:16:10 -0000 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