This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: xterm and right click and 'print window'


Igor Pechtchanski <pechtcha@cs.nyu.edu> wrote in
Pine.GSO.4.61.0506091349200.23557@slinky.cs.nyu.edu:">news:Pine.GSO.4.61.0506091349200.23557@slinky.cs.nyu.edu: 

> On Thu, 9 Jun 2005, J. David Boyd wrote:
> 
>> Igor Pechtchanski <pechtcha@XX.XXX.XXX> wrote:
> 
><http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Thanks.
> 
>> > On Wed, 8 Jun 2005, J. David Boyd wrote:
>> >
>> >> Has anyone found a way to make this feature work, on any version
>> >> of windows, with any printer?
>> >
>> > This works for me.  WinXP, networked printer.  As long as the
>> > PRINTER variable is exported.
>> >
>> >> I've had no luck so far, and am grasping for clues.
>> >>
>> >> I've defined my $PRINTER as //quantex2/hplaserj, which prints okay
>> >> from windows, but not cygwin.
>> >
>> > Open a regular bash window (no X), and type "echo $PRINTER".  If
>> > that prints the correct thing, try "bash -c 'echo $PRINTER'".  If
>> > that works too, type "xterm -display 127.0.0.1:0", and from that
>> > xterm type "echo $PRINTER".  If you see the correct printer in all
>> > 3 cases, the "Print Window" command should work (it does for me).
>> >
>> > Alternatively, since all xterm does is pipe stuff to lpr, does "lpr
>> > -P //quantex2/hplaserj /etc/passwd" print /etc/passwd to that
>> > printer (just to make sure lpr works)?
>> >      Igor
>>
>> All the variable expansion looks fine, so maybe it is an lpr problem.
>>
>> When I try the command line
>>
>> "lpr -P //quantex2/HPLaserJ /etc/passwd"
>>
>> I get the error printer name is invalid.
>>
>> When I go back to what my profile set up, which is
>> "HP LaserJet 6P", I actually get output.  I was thinking all along
>> that I couldn't use that name, but perhaps cygwin's lpr has been
>> patched to use the windows resource name?
> 
> lpr interacts directly with the print spooler, so whatever name is
> used for the printer in Windows, lpr will also use.
> 
>> I also noticed that nothing came out of the printer until I
>> sent another file...
> 
> That may be because your driver needs to be set up to send a FF after
> each job.  There may be an lpr option for that as well, not sure.
> 
>> And, are you setup for DOS endings or Unix?
> 
> Unix, of course.  But it doesn't matter for lpr -- it's all pipes
> anyway. 
> 
>> So, I can print from the command line.  But, after closing my
>> terms and opening some new ones (just to be sure I have the correct
>> environment), and verifying that $PRINTER is still "HP LaserJet 6P",
>> I get nothing from 'Print window', and I don't see any errors.
>> I wonder if there is a log somewhere that I can peruse.
> 
> If you start an xterm from a bash console window, all error messages
> from that xterm go into the console window.  Otherwise, you can
> redirect the stdout/stderr of the xterm to a file.
> 
>> Anyway, thanks for the help. I guess I won't worry about it
>> for now.  I can always do an Alt-PrtScn and paste it
>> somewhere to print it.
> 
> It would be interesting to find out why your config doesn't work.  Do
> you have PRINTER set in the global Windows environment?  How do you
> start your xterm?
>      Igor


I start my xterm from startxwin.bat.  Four of them.

I've tried defining PRINTER in startxwin.bat, but it seems to make no 
difference.

Oh well, I have to go to Oregon tomorrow morning for a week, so I'll look 
into this when I get back.

Thanks again,

Dave


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]