Re: PRINTER variable not exported in /etc/profile was: Printing under Cygwin on W2K
Is there a secret handshake for http://... style printers? My printer is an IPP connection and lpr gives me an error message saying it cannot find http:\123.456.789.123:80\ipp. I have tried several different combinations of forward and back slashes but to no avail. I am running Cygwin 1.5.9(0.112/4/2) on a W2K box with Service Pack 4 plus a bunch of hotfixes. Steven Read - 812/237-3362 - [EMAIL PROTECTED] Indiana State University Olaf Föllinger[EMAIL PROTECTED] 06/04/2004 3:43:09 AM On Thu, Jun 03, 2004 at 01:39:03PM -0400, Igor Pechtchanski wrote: On Thu, 3 Jun 2004, Chris Carlson wrote: Also according to the documentation, cygwin understands the double-slash form used in Windows. Thus the following should work: bash$ cat myfile.txt //Dc1irv/laser1 This returns: bash: //Dc1irv/laser1: No such host or network path Nope, that shouldn't work. I don't think you can redirect output to a printer name even from the Windows console, much less from Cygwin. In any case, Cygwin doesn't treat printer shares as devices. So, what is the proper method for printing under cygwin? Either lpr or, if you want to get fancier, a2ps or enscript. Igor lpr works just fine here with a minor problem: $ lpr textfile.txt lpr: no printer specified though the printer is specified in /etc/profile. But the printer variable isn't exported there so lpr cannot find it. Should this be fixed? Gruss Olaf Föllinger -- Olaf Föllinger Senior Consultant IT S.E.S.A. Software und Systeme AG -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: PRINTER variable not exported in /etc/profile was: Printing under Cygwin on W2K
Steven, Replies inline below. On Mon, 7 Jun 2004, Steven Read wrote: Is there a secret handshake for http://... style printers? My printer is an IPP connection and lpr gives me an error message saying it cannot find http:\123.456.789.123:80\ipp. I have tried several different combinations of forward and back slashes but to no avail. As far as I understand, Cygwin is able to access the Windows printers that are either defined on your machine or shared via the Windows mechanisms. Usually, whenever you have a printer with some type of connection on the network, Windows needs to be aware of it to be able to print to it. Do Windows applications on your machine allow you to print to the printer using the http://... style address, or do you need to refer to it using another name? If the latter, you'll need to use that same name with Cygwin tools (e.g., PRINTER='printer name' lpr filename). If the former, this feature is not implemented in Cygwin. I am running Cygwin 1.5.9(0.112/4/2) on a W2K box with Service Pack 4 plus a bunch of hotfixes. Steven Read - 812/237-3362 - [EMAIL PROTECTED] Indiana State University Olaf Föllinger[EMAIL PROTECTED] 06/04/2004 3:43:09 AM http://cygwin.com/acronyms/#PCYMTNQREAIYR On Thu, Jun 03, 2004 at 01:39:03PM -0400, Igor Pechtchanski wrote: On Thu, 3 Jun 2004, Chris Carlson wrote: Also according to the documentation, cygwin understands the double-slash form used in Windows. Thus the following should work: bash$ cat myfile.txt //Dc1irv/laser1 This returns: bash: //Dc1irv/laser1: No such host or network path Nope, that shouldn't work. I don't think you can redirect output to a printer name even from the Windows console, much less from Cygwin. In any case, Cygwin doesn't treat printer shares as devices. While I'm replying to this thread, I'd like to apologize for the above misinformation. Redirecting to the shared printer name works just fine, as it turns out. So, what is the proper method for printing under cygwin? Either lpr or, if you want to get fancier, a2ps or enscript. Igor lpr works just fine here with a minor problem: $ lpr textfile.txt lpr: no printer specified though the printer is specified in /etc/profile. But the printer variable isn't exported there so lpr cannot find it. Should this be fixed? HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! I have since come to realize that being between your mentor and his route to the bathroom is a major career booster. -- Patrick Naughton -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: PRINTER variable not exported in /etc/profile was: Printing under Cygwin on W2K
Steven, Please make sure your mailer respects the Reply-To: header -- I set it for a reason. By keeping your replies on the list, you have access to the combined expertise of the list, which is larger than that of any one person. It also saves the questions and the answers in the web archives, so that others with similar problems can benefit from the exchange. On Mon, 7 Jun 2004, Steven Read wrote: Mr Pechtchanski, Thanks very much for your reply. According to the Windows documentation I have seen this type of connection is known as Internet Printing Protocol and was first defined late in Windows 95 (I believe July 99.) Right now the printer shows up in Windows under the Printers Control Panel attached to port http://... but I have since tried assigning it to a LPT style port but the Capture option does not appear when I define it. This doesn't answer my question. What I asked was whether, when you needed to print from a regular Windows application (e.g., notepad), you referred to the printer by some name, or by its http://...-style address. My guess is that it's by name, and the http://... address is hidden in the protocol/port/driver specification in printer properties. In this case, you'll need to use the same name as you use in, say, notepad, for the $PRINTER value. If you can't print to this printer from regular Windows applications, then it's a Windows configuration problem, and has nothing to do with Cygwin. We are on a Novell LAN and my guess is that is only valid for printers attached via MAP or NET USE. I know it is not a Novell issue because I tried this on my Wife's XP box at home and she only has the standard Microsoft network client installed. At first I thought this to be a bug in Cygwin because from the error message displayed from the lpr command they assume everything to be connected using the \\server\share style construct and flip the forward slashes to back slashes which is normally correct. You can also use local printer names. After reading your message I have tried a few different things outside of Cygwin but have yet to get anything to work (Windows command interpreter gives a syntax error and, Write and Notepad say I cannot save to that URL.) Trying to open that URL in a browser it downloads a web page with 411 Length Required which makes sense if it truly is a device channel. You're probably using the wrong method. You have to use the local name that appears in the Printers settings box. From the Novell side (this doesn't help from home though) there is another path to this printer but I need to find out what it is. I have gotten used to coming in from the URL and forgotten the queue name (and it does not help that they just finished moving everything around due to a LAN reorganization.) If you have a driver for an IPP port on your Windows machine, the programs won't care which URL the printer resides at -- only its local name that's attached to the IPP port. Steven Read - 812/237-3362 - [EMAIL PROTECTED] Indiana State University Igor Pechtchanski[EMAIL PROTECTED] 06/07/2004 1:38:44 PM Again, http://cygwin.com/acronyms/#PCYMTNQREAIYR. Steven, Replies inline below. On Mon, 7 Jun 2004, Steven Read wrote: Is there a secret handshake for http://... style printers? My printer is an IPP connection and lpr gives me an error message saying it cannot find http:\123.456.789.123:80\ipp. I have tried several different combinations of forward and back slashes but to no avail. As far as I understand, Cygwin is able to access the Windows printers that are either defined on your machine or shared via the Windows mechanisms. Usually, whenever you have a printer with some type of connection on the network, Windows needs to be aware of it to be able to print to it. Do Windows applications on your machine allow you to print to the printer using the http://... style address, or do you need to refer to it using another name? If the latter, you'll need to use that same name with Cygwin tools (e.g., PRINTER='printer name' lpr filename). If the former, this feature is not implemented in Cygwin. I am running Cygwin 1.5.9(0.112/4/2) on a W2K box with Service Pack 4 plus a bunch of hotfixes. Steven Read - 812/237-3362 - [EMAIL PROTECTED] Indiana State University Olaf Föllinger[EMAIL PROTECTED] 06/04/2004 3:43:09 AM http://cygwin.com/acronyms/#PCYMTNQREAIYR On Thu, Jun 03, 2004 at 01:39:03PM -0400, Igor Pechtchanski wrote: On Thu, 3 Jun 2004, Chris Carlson wrote: Also according to the documentation, cygwin understands the double-slash form used in Windows. Thus the following should work: bash$ cat myfile.txt //Dc1irv/laser1 This returns: bash: //Dc1irv/laser1: No such host or network path [snip] So, what is the proper method for printing under cygwin? Either lpr or, if you want to get fancier, a2ps or enscript. Igor HTH,
PRINTER variable not exported in /etc/profile was: Printing under Cygwin on W2K
On Thu, Jun 03, 2004 at 01:39:03PM -0400, Igor Pechtchanski wrote: On Thu, 3 Jun 2004, Chris Carlson wrote: Also according to the documentation, cygwin understands the double-slash form used in Windows. Thus the following should work: bash$ cat myfile.txt //Dc1irv/laser1 This returns: bash: //Dc1irv/laser1: No such host or network path Nope, that shouldn't work. I don't think you can redirect output to a printer name even from the Windows console, much less from Cygwin. In any case, Cygwin doesn't treat printer shares as devices. So, what is the proper method for printing under cygwin? Either lpr or, if you want to get fancier, a2ps or enscript. Igor lpr works just fine here with a minor problem: $ lpr textfile.txt lpr: no printer specified though the printer is specified in /etc/profile. But the printer variable isn't exported there so lpr cannot find it. Should this be fixed? Gruss Olaf Föllinger -- Olaf Föllinger Senior Consultant IT S.E.S.A. Software und Systeme AG -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: PRINTER variable not exported in /etc/profile was: Printing under Cygwin on W2K
On Fri, 4 Jun 2004, Olaf Föllinger wrote: On Thu, Jun 03, 2004 at 01:39:03PM -0400, Igor Pechtchanski wrote: On Thu, 3 Jun 2004, Chris Carlson wrote: [snip] So, what is the proper method for printing under cygwin? Either lpr or, if you want to get fancier, a2ps or enscript. Igor lpr works just fine here with a minor problem: $ lpr textfile.txt lpr: no printer specified though the printer is specified in /etc/profile. But the printer variable isn't exported there so lpr cannot find it. Should this be fixed? Yep, looks like a base-files bug. /etc/profile should have an export PRINTER after the definition of PRINTER. John? Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! I have since come to realize that being between your mentor and his route to the bathroom is a major career booster. -- Patrick Naughton -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: PRINTER variable not exported in /etc/profile was: Printing under Cygwin on W2K
From: Igor Pechtchanski On Fri, 4 Jun 2004, Olaf Föllinger wrote: On Thu, Jun 03, 2004 at 01:39:03PM -0400, Igor Pechtchanski wrote: On Thu, 3 Jun 2004, Chris Carlson wrote: [snip] So, what is the proper method for printing under cygwin? Either lpr or, if you want to get fancier, a2ps or enscript. Igor lpr works just fine here with a minor problem: $ lpr textfile.txt lpr: no printer specified though the printer is specified in /etc/profile. But the printer variable isn't exported there so lpr cannot find it. Should this be fixed? Yep, looks like a base-files bug. /etc/profile should have an export PRINTER after the definition of PRINTER. John? OK, am playing with updating /etc/profile when it hasn't been modified. I'll add the export for the next version. J. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Printing under Cygwin on W2K
According to the documentation, the following should print on the default printer: bash$ cat myfile.txt PRN What I find is that a new file is created named PRN. Also according to the documentation, cygwin understands the double-slash form used in Windows. Thus the following should work: bash$ cat myfile.txt //Dc1irv/laser1 This returns: bash: //Dc1irv/laser1: No such host or network path So, what is the proper method for printing under cygwin? BTW: uname -a returns: CYGWIN_NT-5.0 jackal 1.5.10(0.116/4/2) 2004-05-25 22:07 i686 unknown unknown Cygwin Thanks in advance. Chris Carlson iStor Networks, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Printing under Cygwin on W2K
Thanks for the quick response! Chris Carlson iStor Networks, Inc. -Original Message- From: Igor Pechtchanski [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 10:39 AM To: Chris Carlson Cc: [EMAIL PROTECTED] Subject: Re: Printing under Cygwin on W2K On Thu, 3 Jun 2004, Chris Carlson wrote: According to the documentation, the following should print on the default printer: bash$ cat myfile.txt PRN What I find is that a new file is created named PRN. Known problem. There's a patch pending for this -- once it's checked in, this functionality should be available again. Until then, use lpr from the cygutils package... Also according to the documentation, cygwin understands the double-slash form used in Windows. Thus the following should work: bash$ cat myfile.txt //Dc1irv/laser1 This returns: bash: //Dc1irv/laser1: No such host or network path Nope, that shouldn't work. I don't think you can redirect output to a printer name even from the Windows console, much less from Cygwin. In any case, Cygwin doesn't treat printer shares as devices. So, what is the proper method for printing under cygwin? Either lpr or, if you want to get fancier, a2ps or enscript. Igor BTW: uname -a returns: CYGWIN_NT-5.0 jackal 1.5.10(0.116/4/2) 2004-05-25 22:07 i686 unknown unknown Cygwin Thanks in advance. Chris Carlson iStor Networks, Inc. -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! I have since come to realize that being between your mentor and his route to the bathroom is a major career booster. -- Patrick Naughton -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Printing under Cygwin on W2K
From: Igor Pechtchanski Sent: Thursday, June 03, 2004 7:39 PM On Thu, 3 Jun 2004, Chris Carlson wrote: According to the documentation, the following should print on the default printer: bash$ cat myfile.txt PRN What I find is that a new file is created named PRN. Known problem. There's a patch pending for this -- once it's checked in, this functionality should be available again. Until then, use lpr from the cygutils package... Also according to the documentation, cygwin understands the double-slash form used in Windows. Thus the following should work: bash$ cat myfile.txt //Dc1irv/laser1 This returns: bash: //Dc1irv/laser1: No such host or network path According to: $ lpr --help this should work. Do you have this printer visible when you use Explorer \\Dc1irv ? Nope, that shouldn't work. I don't think you can redirect output to a printer name even from the Windows console, much less from Cygwin. In any case, Cygwin doesn't treat printer shares as devices. Ehrm? =) I've proven this to be wrong... below. So, what is the proper method for printing under cygwin? Either lpr or, if you want to get fancier, a2ps or enscript. Igor The last two assumes you have a PS printer - I believe... Below: $p is a plain old 'HP Laser Jet 6' shared on 'f1' $ p=//f1/f1_lj6; \ u2d ~/.bash_logout; \ cat ~/.bash_logout $p; \ d2u ~/.bash_logout; \ echo -en $p \r\n\f # The printer produces a paper w the text in courier. # yet another way... $ lpr -d //f1/f1_lj6 ~/.bash_logout $ echo -en //f1/f1_lj6 \r\n\f NOTE: The last echo is _necessary_ in both cases. BTW: uname -a returns: CYGWIN_NT-5.0 jackal 1.5.10(0.116/4/2) 2004-05-25 22:07 i686 unknown unknown Cygwin $ uname -a CYGWIN_NT-5.0 P450 1.5.10s(0.115/4/2) 20040519 13:51:37 i686 unknown unknown Cygwin Hmm... I have a few days earlier version of the dll (a snapshot). If the above doesn't help; check http://cygwin.com/snapshots/ - unpack one of the cygwin1-* things w bunzip, and move it in place while _no cygwin tasks_ are running. Hmm... proofreading? Nah, that's for cowards! ;-) /Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E --76-- ** on a mailing list; please keep replies on that particular list ** -- printf(LocalTime: UTC+%02d\n,(DST)? 2:1); -- --END OF MESSAGE-- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: Printing under Cygwin on W2K
Redface Okay, I was using a script that I'd written a few months ago that worked at the time but doesn't anymore. I forgot we lost our Dc1irv server and moved the printers to another Windows system. Yes, the //Dc2irv/laser1 successfully references our Windows printer. Thanks for the time. It made me dig a bit deeper into the problem. Chris Carlson iStor Networks, Inc. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hannu E K Nevalainen Sent: Thursday, June 03, 2004 1:00 PM To: [EMAIL PROTECTED] Subject: RE: Printing under Cygwin on W2K From: Igor Pechtchanski Sent: Thursday, June 03, 2004 7:39 PM On Thu, 3 Jun 2004, Chris Carlson wrote: According to the documentation, the following should print on the default printer: bash$ cat myfile.txt PRN What I find is that a new file is created named PRN. Known problem. There's a patch pending for this -- once it's checked in, this functionality should be available again. Until then, use lpr from the cygutils package... Also according to the documentation, cygwin understands the double-slash form used in Windows. Thus the following should work: bash$ cat myfile.txt //Dc1irv/laser1 This returns: bash: //Dc1irv/laser1: No such host or network path According to: $ lpr --help this should work. Do you have this printer visible when you use Explorer \\Dc1irv ? Nope, that shouldn't work. I don't think you can redirect output to a printer name even from the Windows console, much less from Cygwin. In any case, Cygwin doesn't treat printer shares as devices. Ehrm? =) I've proven this to be wrong... below. So, what is the proper method for printing under cygwin? Either lpr or, if you want to get fancier, a2ps or enscript. Igor The last two assumes you have a PS printer - I believe... Below: $p is a plain old 'HP Laser Jet 6' shared on 'f1' $ p=//f1/f1_lj6; \ u2d ~/.bash_logout; \ cat ~/.bash_logout $p; \ d2u ~/.bash_logout; \ echo -en $p \r\n\f # The printer produces a paper w the text in courier. # yet another way... $ lpr -d //f1/f1_lj6 ~/.bash_logout $ echo -en //f1/f1_lj6 \r\n\f NOTE: The last echo is _necessary_ in both cases. BTW: uname -a returns: CYGWIN_NT-5.0 jackal 1.5.10(0.116/4/2) 2004-05-25 22:07 i686 unknown unknown Cygwin $ uname -a CYGWIN_NT-5.0 P450 1.5.10s(0.115/4/2) 20040519 13:51:37 i686 unknown unknown Cygwin Hmm... I have a few days earlier version of the dll (a snapshot). If the above doesn't help; check http://cygwin.com/snapshots/ - unpack one of the cygwin1-* things w bunzip, and move it in place while _no cygwin tasks_ are running. Hmm... proofreading? Nah, that's for cowards! ;-) /Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E --76-- ** on a mailing list; please keep replies on that particular list ** -- printf(LocalTime: UTC+%02d\n,(DST)? 2:1); -- --END OF MESSAGE-- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Printing under Cygwin on W2K
At 01:39 PM 6/3/2004, you wrote: On Thu, 3 Jun 2004, Chris Carlson wrote: According to the documentation, the following should print on the default printer: bash$ cat myfile.txt PRN What I find is that a new file is created named PRN. Known problem. There's a patch pending for this -- once it's checked in, this functionality should be available again. Until then, use lpr from the cygutils package... Also according to the documentation, cygwin understands the double-slash form used in Windows. Thus the following should work: bash$ cat myfile.txt //Dc1irv/laser1 This returns: bash: //Dc1irv/laser1: No such host or network path Nope, that shouldn't work. I don't think you can redirect output to a printer name even from the Windows console, much less from Cygwin. In any case, Cygwin doesn't treat printer shares as devices. No, the above works fine, even in cygwin 1.5.10, if the network printer is set up properly. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/