Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing from cygwin

Status
Not open for further replies.

spyghost

Technical User
Jan 17, 2003
52
HK
hi,

here is the setup...

i am currently connecting to an application hosted in a unix server (solaris) through cygwin emulation in a windows pc. in the windows pc that i have, there is a local printer (lpt).

how would i be able to print to the local printer from cywin?
 
If this is just and exported display, the printer will have to configured on the Solaris machine.




"If you always do what you've always done, you will always be where you've always been."
 
yes, exported display...

so you mean there is no way of being able to print from a locally connected printer in windows?

i don't know if this is right, but what about samba (unix) and printer sharing (windows)?
 
Yes, you can use smbprint
It needs to be setup on the Solaris box to point to your shared printer on windows.
View the smbprint file in /usr/local/samba/bin (or where ever your samba binaries are stored)



"If you always do what you've always done, you will always be where you've always been."
 
please tell me if i am on the right track...

first thing to do is to share the local printer on the windows pc... right?

second thing to do is to enable samba on the unix server... right?
 
Yes,
Share the printer.
Configure you Samba settings
Use smbprint as a guide to installing a printer.
Hope that helps.

Just thought of something. Why no install Microsoft Print Services for Unix on your windows box and then just add a normal printer on Solaris?



Head of my smbprint file:

#!/bin/sh

# This script is an input filter for printcap printing on a unix machine. It
# uses the smbclient program to print the file to the specified smb-based
# server and service.
# For example you could have a printcap entry like this
#
# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
#
# which would create a unix printer called "smb" that will print via this
# script. You will need to create the spool directory /usr/spool/smb with
# appropriate permissions and ownerships for your system.

# Set these to the server and service you wish to print to
# In this example I have a WfWg PC called "lapland" that has a printer
# exported called "printer" with no password.

#
# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
# so that the server, service, and password can be read from
# a /usr/var/spool/lpd/PRINTNAME/.config file.


"If you always do what you've always done, you will always be where you've always been."
 
what would be the difference/impact if i would use the ms print services for unix?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top