Home > Windows Server Tips > > Printing to a Windows share in Linux
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 


Printing to a Windows share in Linux


Barrie Sosinsky
12.03.2003
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


If you're running Linux machines on a Windows network, you may want to use a shared Windows printer as your output device. To do this, though, you will have to work in both operating systems to make sure all is set up properly for the printing to happen.

In the Windows operating system, set up the share on the printer as you would for any network share. Then, before you do anything else, make sure that you test the printer from another Windows system on the network, and then you're ready to move on to the setup in the Linux environment.

Now, on the Linux machine from which you want to print:

Open the /etc/printcap directory, create a directory for your printer at /var/spool/lpd/<printer name>/.config, and then enter the following:

# HP4MP
hp:
:sd=/var/spool/lpd/Epson:
:mx#0:
:sh:
:if=/var/spool/lpd/hp/filter:
:lp=/dev/null:

Once you have done this, check that any users you wish to print to the Windows share have access to your printer directory. Next enter the following into the .config file:

share='<servername>HP4MP
hostip=<print server IP#>

Go to the command prompt to enable the print share:
$ lpc up hp
$lpc enable hp

Finally, test your print share by sending it a file:
$ lpr <path>/<filename>


Barrie Sosinsky is president of consulting company Sosinsky and Associates (Medfield MA). He has written extensively on a variety of computer topics. His company specializes in custom software (database and Web related), training and technical documentation.


Rate this Tip
To rate tips, you must be a member of SearchWindowsServer.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts