Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!mcsun!ukc!harrier.ukc.ac.uk!elder.ukc.ac.uk!rlh2 From: rlh2@ukc.ac.uk (R.L.Hesketh) Newsgroups: comp.windows.x Subject: Re: printing a selection from xterm Message-ID: <155@elder.ukc.ac.uk> Date: 12 Dec 90 11:22:40 GMT References: <696@lyman.pppl.gov> Reply-To: rlh2@ukc.ac.uk (Richard Hesketh) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 22 In article <696@lyman.pppl.gov> monticel@lyman.pppl.gov (Don Monticello) writes: >I'd like to be able to print the current selection in xterm. >Currently I type "lpr" and paste the selection into standard >input. This is a kludge because it sometimes looses text. Is there a >better way? There certainly is .. its called "xselection" and can be picked up from expo.lcs.mit.edu under contrib/xselection.tar.Z or from a comp.sources.x archive somewhere. I have a button on my screen that does just this .. I select some text and then press the "lpr selection" button. The button runs a script that finds the nearest printer and then does a .. xselection PRIMARY | lpr -P$printer xselection lets you set and retrieve selection property and now cutbuffer contents. xselection is mainly used in shell scripts to do simple interactions in X. Richard Hesketh Computing Officer, Computing Lab., University of Kent at Canterbury, Canterbury, Kent, CT2 7NF, United Kingdom. Tel: +44 227 764000 ext 7620/7590 Fax: +44 227 762811