RE: Printing locally

2002-03-06 Thread Heribert Dahms

Hi Karl,

does your file have a formfeed at end?
If not, you may create a helper file and try

cat file ff > prn


Bye, Heribert ([EMAIL PROTECTED])

> -Original Message-
> From: Karl M [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, March 06, 2002 00:39
> To:   [EMAIL PROTECTED]
> Subject:  Re: Printing locally
> 
> Hi All...
> 
> Having watched this thread, I decided to give the printing a try (in the 
> past, I have only done Windows based printing).
> 
> If I do
> 
> cat file > prn
> 
> or
> 
> cat file > //machine/DeskJet
> 
> from a bash shell the file is sent to the printer, but the printer gets an
> 
> error (flashing error light on the printer) that must be cleared before
> the 
> file prints. After clearing the error, the page I printed for testing is 
> printed.
> 
> If I do
> 
> print file
> 
> from a bash shell, it prints just fine.
> 
> My system is a Win2kpro with everything current as of this morning.
> 
> Thanks,
> 
> Karl
>  
[Heribert]  [snip] 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Printing locally

2002-03-05 Thread Karl M

Hi All...

Having watched this thread, I decided to give the printing a try (in the 
past, I have only done Windows based printing).

If I do

cat file > prn

or

cat file > //machine/DeskJet

from a bash shell the file is sent to the printer, but the printer gets an 
error (flashing error light on the printer) that must be cleared before the 
file prints. After clearing the error, the page I printed for testing is 
printed.

If I do

print file

from a bash shell, it prints just fine.

My system is a Win2kpro with everything current as of this morning.

Thanks,

Karl

>From: "Larry Hall (RFK Partners, Inc)" <[EMAIL PROTECTED]>
>To: Brian Salter-Duke <[EMAIL PROTECTED]>,fergus at bonhard dot 
>uklinux dot net <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: Printing locally
>Date: Mon, 04 Mar 2002 11:22:51 -0500
>
>At 07:24 PM 3/3/2002, Brian Salter-Duke wrote:
> >On Sun, Mar 03, 2002 at 10:49:53AM -, fergus at bonhard dot uklinux 
>dot net wrote:
> > > What about this? Any good?
> > > If the file a.txt is DOS terminated, try
> > > cp a.txt prn
> > > OR
> > > cat a.txt > prn
> > > and if a.txt is Unix-terminated, try
> > > cat a.txt | unix2dos > prn
> > > Fergus
> >
> >This was a good suggestion but it still does not work. It just does
> >nothing as does directing the output to PRINT or LPT1.
> >
> >The file a.txt if put into Notepad either in dos or unix format prints
> >fine.
>
>
>Hm, then there must be some issue locally.  I have used both
>
>cat file.txt > prn
>
>and
>
>cat file.txt > ///
>
>with no problems in the past.  If one or both of these don't work for you,
>you may be stuck trying to debug it.  In anticipation of your next 
>question,
>you might try running one or both of these with 'strace'.  See strace 
>--help
>for more details of the options.  The output may give you an idea of where
>things are going wrong for you.
>
>
>
>Larry Hall  [EMAIL PROTECTED]
>RFK Partners, Inc.  http://www.rfk.com
>838 Washington Street   (508) 893-9779 - RFK Office
>Holliston, MA 01746 (508) 893-9889 - FAX
>
>
>--
>Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
>Bug reporting: http://cygwin.com/bugs.html
>Documentation: http://cygwin.com/docs.html
>FAQ:   http://cygwin.com/faq/
>


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Printing locally

2002-03-05 Thread Larry Hall (RFK Partners, Inc)

At 04:21 AM 3/5/2002, Brian Salter-Duke wrote:
>On Mon, Mar 04, 2002 at 11:22:51AM -0500, Larry Hall (RFK Partners, Inc) wrote:
> > 
> > Hm, then there must be some issue locally.  I have used both 
> > 
> > cat file.txt > prn
>
>I have noticed that if you have the printer window open, it has a brief
>message saying the file has no name but is being spooled. Nothing
>prints.


Then don't leave the printer window open. ;-)


> > and
> > 
> > cat file.txt > ///
>
>Does this work only if the printer is remote. I replaced 
>by BSALTERDUKE1 which is what the printer test page saying machine name
>is and  by CanonBJC-1000SP which is what the same
>page says is the printer name. The printer is local. It reports that it
>can not find that node.


OK.  Must be a network problem there then.


> > with no problems in the past.  If one or both of these don't work for you,
> > you may be stuck trying to debug it.  In anticipation of your next question,
> > you might try running one or both of these with 'strace'.  See strace --help
> > for more details of the options.  The output may give you an idea of where 
> > things are going wrong for you.
>
>I tried all sorts of options and got no output with any of them.
>
>I private message from someone else suggested:-
>
>notepad /p file.txt
>
>This works!


OK.



Larry Hall  [EMAIL PROTECTED]
RFK Partners, Inc.  http://www.rfk.com
838 Washington Street   (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Printing locally

2002-03-05 Thread Rick Rankin

What kind of printer is it? If, for example, it's a Postscript printer and you
cat plain text to it, you will get nothing. You would need to use enscript or
a2ps to convert the plaint text to Postscript. Printing through Notepad would
do this for you.

Just a thought.

--Rick
--- Brian Salter-Duke <[EMAIL PROTECTED]> wrote:
> On Mon, Mar 04, 2002 at 11:22:51AM -0500, Larry Hall (RFK Partners, Inc)
> wrote:
> > At 07:24 PM 3/3/2002, Brian Salter-Duke wrote:
> > >On Sun, Mar 03, 2002 at 10:49:53AM -, fergus at bonhard dot uklinux
> dot net wrote:
> > > > What about this? Any good?
> > > > If the file a.txt is DOS terminated, try
> > > > cp a.txt prn
> > > > OR
> > > > cat a.txt > prn
> > > > and if a.txt is Unix-terminated, try
> > > > cat a.txt | unix2dos > prn
> > > > Fergus
> > >
> > >This was a good suggestion but it still does not work. It just does
> > >nothing as does directing the output to PRINT or LPT1.
> > >
> > >The file a.txt if put into Notepad either in dos or unix format prints
> > >fine.
> > 
> > 
> > Hm, then there must be some issue locally.  I have used both 
> > 
> > cat file.txt > prn
> 
> I have noticed that if you have the printer window open, it has a brief
> message saying the file has no name but is being spooled. Nothing
> prints.
>  
> > and
> > 
> > cat file.txt > ///
> 
> Does this work only if the printer is remote. I replaced 
> by BSALTERDUKE1 which is what the printer test page saying machine name
> is and  by CanonBJC-1000SP which is what the same
> page says is the printer name. The printer is local. It reports that it
> can not find that node.
> 
> > with no problems in the past.  If one or both of these don't work for you,
> > you may be stuck trying to debug it.  In anticipation of your next
> question,
> > you might try running one or both of these with 'strace'.  See strace
> --help
> > for more details of the options.  The output may give you an idea of where 
> > things are going wrong for you.
> 
> I tried all sorts of options and got no output with any of them.
> 
> I private message from someone else suggested:-
> 
> notepad /p file.txt
> 
> This works!
>  
> Cheers, Brian.
> 
> -- 
>Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]  
> Honorary Fellow in Chemistry, NT University, Darwin, NT 0909, Australia.
>  Phone 08-89881600.Fax 08-89881302.http://lacebark.ntu.edu.au/
> 
> --
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ:   http://cygwin.com/faq/
> 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Printing locally

2002-03-05 Thread Brian Salter-Duke

On Mon, Mar 04, 2002 at 11:22:51AM -0500, Larry Hall (RFK Partners, Inc) wrote:
> At 07:24 PM 3/3/2002, Brian Salter-Duke wrote:
> >On Sun, Mar 03, 2002 at 10:49:53AM -, fergus at bonhard dot uklinux dot net 
>wrote:
> > > What about this? Any good?
> > > If the file a.txt is DOS terminated, try
> > > cp a.txt prn
> > > OR
> > > cat a.txt > prn
> > > and if a.txt is Unix-terminated, try
> > > cat a.txt | unix2dos > prn
> > > Fergus
> >
> >This was a good suggestion but it still does not work. It just does
> >nothing as does directing the output to PRINT or LPT1.
> >
> >The file a.txt if put into Notepad either in dos or unix format prints
> >fine.
> 
> 
> Hm, then there must be some issue locally.  I have used both 
> 
> cat file.txt > prn

I have noticed that if you have the printer window open, it has a brief
message saying the file has no name but is being spooled. Nothing
prints.
 
> and
> 
> cat file.txt > ///

Does this work only if the printer is remote. I replaced 
by BSALTERDUKE1 which is what the printer test page saying machine name
is and  by CanonBJC-1000SP which is what the same
page says is the printer name. The printer is local. It reports that it
can not find that node.

> with no problems in the past.  If one or both of these don't work for you,
> you may be stuck trying to debug it.  In anticipation of your next question,
> you might try running one or both of these with 'strace'.  See strace --help
> for more details of the options.  The output may give you an idea of where 
> things are going wrong for you.

I tried all sorts of options and got no output with any of them.

I private message from someone else suggested:-

notepad /p file.txt

This works!
 
Cheers, Brian.

-- 
   Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]  
Honorary Fellow in Chemistry, NT University, Darwin, NT 0909, Australia.
 Phone 08-89881600.Fax 08-89881302.http://lacebark.ntu.edu.au/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Printing locally

2002-03-04 Thread Larry Hall (RFK Partners, Inc)

At 07:24 PM 3/3/2002, Brian Salter-Duke wrote:
>On Sun, Mar 03, 2002 at 10:49:53AM -, fergus at bonhard dot uklinux dot net wrote:
> > What about this? Any good?
> > If the file a.txt is DOS terminated, try
> > cp a.txt prn
> > OR
> > cat a.txt > prn
> > and if a.txt is Unix-terminated, try
> > cat a.txt | unix2dos > prn
> > Fergus
>
>This was a good suggestion but it still does not work. It just does
>nothing as does directing the output to PRINT or LPT1.
>
>The file a.txt if put into Notepad either in dos or unix format prints
>fine.


Hm, then there must be some issue locally.  I have used both 

cat file.txt > prn

and

cat file.txt > ///

with no problems in the past.  If one or both of these don't work for you,
you may be stuck trying to debug it.  In anticipation of your next question,
you might try running one or both of these with 'strace'.  See strace --help
for more details of the options.  The output may give you an idea of where 
things are going wrong for you.



Larry Hall  [EMAIL PROTECTED]
RFK Partners, Inc.  http://www.rfk.com
838 Washington Street   (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Printing locally

2002-03-03 Thread Brian Salter-Duke

On Sun, Mar 03, 2002 at 10:49:53AM -, fergus at bonhard dot uklinux dot net wrote:
> What about this? Any good?
> If the file a.txt is DOS terminated, try
> cp a.txt prn
> OR
> cat a.txt > prn
> and if a.txt is Unix-terminated, try
> cat a.txt | unix2dos > prn
> Fergus

This was a good suggestion but it still does not work. It just does
nothing as does directing the output to PRINT or LPT1.

The file a.txt if put into Notepad either in dos or unix format prints
fine.

Cheers, Brian.
-- 
   Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]  
Honorary Fellow in Chemistry, NT University, Darwin, NT 0909, Australia.
 Phone 08-89881600.Fax 08-89881302.http://lacebark.ntu.edu.au/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Printing locally

2002-03-03 Thread fergus at bonhard dot uklinux dot net

What about this? Any good?
If the file a.txt is DOS terminated, try
cp a.txt prn
OR
cat a.txt > prn
and if a.txt is Unix-terminated, try
cat a.txt | unix2dos > prn
Fergus


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Printing locally.

2002-03-03 Thread Brian Salter-Duke

On Sat, Mar 02, 2002 at 11:40:47PM -0500, David Means wrote:
> I don't have my cygwin machine handy, so I've got to ask:
> 
> how about this:
> 
> cat a.txt > /cygdrive/c/WINNT/lpt1
> 
> that's probably not the ultimate solution, but does it work?

No. It reports nothing and does nothing. There is nothing in any printer
queue.

PRINT a.txt

reports that /a.txt is currently being printed, but again
nothing happens and there is nothing in the queues.

Thanks for the suggestion. I remain very puzzled.

Brian.
 
> David
> 
> 
> 
> On Sat, 2002-03-02 at 21:52, Brian Salter-Duke wrote:
> > On Sat, Mar 02, 2002 at 02:45:57AM -0500, Paul McFerrin wrote:
> > > Brian:
> > > 
> > > I used to be able to print from cygwin by refering to /dev/lpt1
> > > 
> > > -paul mcferrin
> > 
> > There is no /dev directory! "which lpt1" gives "/cygdrive/c/WINNT/lpt1",
> > but typing "lpt1 file" gives permission denied and looking in WINNT with
> > Windows Explorer I do not find it. I'm even more puzzled.
> > 
> > Cheers, Brian.
> > 
> > [my original query about how to print to a local printer deleted.]
> >  
> > -- 
> >Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]  
> > Honorary Fellow in Chemistry, NT University, Darwin, NT 0909, Australia.
> >  Phone 08-89881600.Fax 08-89881302.http://lacebark.ntu.edu.au/
> > 
> > --
> > Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> > Bug reporting: http://cygwin.com/bugs.html
> > Documentation: http://cygwin.com/docs.html
> > FAQ:   http://cygwin.com/faq/
> -- 
> 
> No trees were killed in the sending of this message. However,
> a large number of electrons were terribly inconvenienced.



-- 
   Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]  
Honorary Fellow in Chemistry, NT University, Darwin, NT 0909, Australia.
 Phone 08-89881600.Fax 08-89881302.http://lacebark.ntu.edu.au/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Printing locally.

2002-03-02 Thread David Means

I don't have my cygwin machine handy, so I've got to ask:

how about this:

cat a.txt > /cygdrive/c/WINNT/lpt1

that's probably not the ultimate solution, but does it work?

David



On Sat, 2002-03-02 at 21:52, Brian Salter-Duke wrote:
> On Sat, Mar 02, 2002 at 02:45:57AM -0500, Paul McFerrin wrote:
> > Brian:
> > 
> > I used to be able to print from cygwin by refering to /dev/lpt1
> > 
> > -paul mcferrin
> 
> There is no /dev directory! "which lpt1" gives "/cygdrive/c/WINNT/lpt1",
> but typing "lpt1 file" gives permission denied and looking in WINNT with
> Windows Explorer I do not find it. I'm even more puzzled.
> 
> Cheers, Brian.
> 
> [my original query about how to print to a local printer deleted.]
>  
> -- 
>Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]  
> Honorary Fellow in Chemistry, NT University, Darwin, NT 0909, Australia.
>  Phone 08-89881600.Fax 08-89881302.http://lacebark.ntu.edu.au/
> 
> --
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ:   http://cygwin.com/faq/
-- 

No trees were killed in the sending of this message. However,
a large number of electrons were terribly inconvenienced.



signature.asc
Description: This is a digitally signed message part


Re: Printing locally.

2002-03-02 Thread Brian Salter-Duke

On Sat, Mar 02, 2002 at 02:45:57AM -0500, Paul McFerrin wrote:
> Brian:
> 
> I used to be able to print from cygwin by refering to /dev/lpt1
> 
> -paul mcferrin

There is no /dev directory! "which lpt1" gives "/cygdrive/c/WINNT/lpt1",
but typing "lpt1 file" gives permission denied and looking in WINNT with
Windows Explorer I do not find it. I'm even more puzzled.

Cheers, Brian.

[my original query about how to print to a local printer deleted.]
 
-- 
   Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]  
Honorary Fellow in Chemistry, NT University, Darwin, NT 0909, Australia.
 Phone 08-89881600.Fax 08-89881302.http://lacebark.ntu.edu.au/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Printing locally.

2002-03-01 Thread Paul McFerrin

Brian:

I used to be able to print from cygwin by refering to /dev/lpt1

-paul mcferrin

Brian Salter-Duke wrote:
> 
> Gygwin is a great product and it allows me to do much unix work but on
> top of windows. I am essentially a unix person.
> 
> Now I am trying to simply print text mutt mail messages to a local
> printer plugged into the back of my machine, which is running
> Windows2000.  I have read the FAQ and searched the mailing list
> archives. Most of what I find refers to remote printing or clever stuff
> using a2ps etc. My problem is that I do not know how to refer to the
> printer. This is probably my lack of knowledge of Win2000.
> 
> Here is the bit in the FAQ:-
> 
> FAQ>Alternatively, on NT, you can use the Windows `print' command. (It does
> FAQ>not seem to be available on Win9x.) Type
> 
> FAQ>bash$ print /\?
> 
> FAQ>for usage instructions (note the `?' must be escaped from the shell).
> 
> OK, I do this and get:-
> 
> $ PRINT /\?
> Prints a text file.
> 
> PRINT [/D:device] [[drive:][path]filename[...]]
> 
>/D:device   Specifies a print device.
> 
> OK, so I have PRINT. If I type "PRINT a.txt" where a.txt is a simple text file,
> it says it has printed it, but nothing prints. What does /D:device mean?
> I can find nothing to help me on this.
> 
> FAQ>Finally, you can simply `cat' the file to the printer's share name:
> 
> FAQ>bash$ cat myfile > //host/printer
> 
> What does //host/printer mean? I have seen this with remote printing,
> but I just want to print to the default printer plugged into the back of
> my machine. It is called "CanonBJC-1000SP". How do I refer to it?
> 
> I would much appreciate some help on this point.
> 
> Regards, Brian.
> --
>Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]
> Honorary Fellow in Chemistry, NT University, Darwin, NT 0909, Australia.
>  Phone 08-89881600.Fax 08-89881302.http://lacebark.ntu.edu.au/
> 
> --
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ:   http://cygwin.com/faq/

-- 
NOTE***  This email looks it came from [EMAIL PROTECTED] but in
  reality it came from [EMAIL PROTECTED]  If you send
  a reply to this message, it *should* get delivered to the
  correct place.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Printing locally.

2002-03-01 Thread Brian Salter-Duke

Gygwin is a great product and it allows me to do much unix work but on
top of windows. I am essentially a unix person. 

Now I am trying to simply print text mutt mail messages to a local
printer plugged into the back of my machine, which is running
Windows2000.  I have read the FAQ and searched the mailing list
archives. Most of what I find refers to remote printing or clever stuff
using a2ps etc. My problem is that I do not know how to refer to the
printer. This is probably my lack of knowledge of Win2000.

Here is the bit in the FAQ:-

FAQ>Alternatively, on NT, you can use the Windows `print' command. (It does
FAQ>not seem to be available on Win9x.) Type

FAQ>bash$ print /\?

FAQ>for usage instructions (note the `?' must be escaped from the shell).

OK, I do this and get:-

$ PRINT /\?
Prints a text file.

PRINT [/D:device] [[drive:][path]filename[...]]

   /D:device   Specifies a print device.

OK, so I have PRINT. If I type "PRINT a.txt" where a.txt is a simple text file,
it says it has printed it, but nothing prints. What does /D:device mean?
I can find nothing to help me on this.

FAQ>Finally, you can simply `cat' the file to the printer's share name:

FAQ>bash$ cat myfile > //host/printer

What does //host/printer mean? I have seen this with remote printing,
but I just want to print to the default printer plugged into the back of
my machine. It is called "CanonBJC-1000SP". How do I refer to it?

I would much appreciate some help on this point.

Regards, Brian.
-- 
   Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]  
Honorary Fellow in Chemistry, NT University, Darwin, NT 0909, Australia.
 Phone 08-89881600.Fax 08-89881302.http://lacebark.ntu.edu.au/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/