Home | Fedora Core 4 Tutorial | Linux Tutorials | Linux Games | Linux Java | Linux Kernal | Linux Firewall | Linux Database | Linux Distributions | Linux Firewall GUI | Linux Distributions | Linux Firewall

 


 

Search Host

Monthly Fee($)
Disk Space (MB)
Register With us for Newsletter!
Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Have tutorials?
Add your tutorial to our Java Resource and get tons of hits.

We offer free hosting for your tutorials. and exposure for thousands of readers. drop a mail
roseindia_net@yahoo.com
 
   

Tutorials

Java Server Pages

JAXB

Java Beans

JDBC

MySQL

Java Servlets

Struts

Bioinformatics

Java Code Examples

Interview Questions

 
Join For Newsletter

Powered by groups.yahoo.com
Visit Group! Post Questions!

Web Promotion

Web Submission

Submit Sites

Manual Submission?

Web Promotion Guide

Hosting Companies

Web Hosting Guide

Web Hosting

Linux

Beginner Guide to Linux Server

Linux Distribution

Major Linux Distribution

Linux FTP Software

Frameworks

Persistence Framework

Web Frameworks

Free EAI Tools

Web Servers

Aspect Oriented Programming

Free Proxy Servers

Softwares

Adware & Spyware Remover

Open Source Softwares

3. Printing To Windows PCs

3.1. Connecting To Windows

Figure 2. Network Printing

SMB and CIFS are the Windows file and printer sharing protocols. We use Samba to speak to the Windows PCs using these protocols. Before configuring CUPS we should make sure we can connect to the Windows PC with smbclient, the Samba SMB/CIFS client Figure 2.

The following is an example of creating a connection to a Windows PC:
/usr/bin/smbclient -L rice -U fred

added interface ip=10.6.7.234 bcast=10.6.7.255 nmask=255.255.255.0
Got a positive name query response from 10.6.7.8 ( 10.6.7.8 )
Password: (not shown)

Sharename  Type  Comment
PRINTER$   Disk
INKJET     Printer
STUFF      Disk
IPC$       IPC    Remote Inter Process Communication 

The command shown asks for a list of shares on a Windows PC named "rice", with the user id "fred". The result shows a printer named "INKJET".

If Windows naming service is unavailable you will need to specify the IP address of the Windows PC with the -I switch as in:
/usr/bin/smbclient -I 10.6.7.8 -L rice -N

For more information see the Samba documentation about smbclient usage.

3.2. CUPS Configuration

Once you have found a Windows printer you may configure CUPS. First verify that your installation of CUPS has the smb backend with the following command:
ls -l /usr/lib/cups/backend/smb

If this file does not exist create it by issuing the following:
ln -s `which smbspool` /usr/lib/cups/backend/smb

The following is an example of setting up the printer shown above. You will have to become root or use sudo to execute these commands:
/usr/sbin/lpadmin -p RicePrinter -v smb://fred:mypass@rice/INKJET -P /root/inkjet.ppd
/usr/bin/enable RicePrinter
/usr/sbin/accept RicePrinter
/usr/sbin/lpadmin -d RicePrinter

As mentioned above, bash has a builtin command called enable, so bash users must use the full path (/usr/bin/enable) to enable printers.

The "lpadmin" command sets up a the shared Windows printer by giving the username, password, netbios name and printer name as a single parameter. See Section 2.3 for a further explanation of the commands above.

Your printer is now ready to test. Send a file to the printer with the lp command followed by a filename, or by printing a document from within an application.

Search Tutorials

Linux Distributions

Fedora

Slackware
SuSe
Mandrake
Knoppix
Mepis
Debian
All Distors....
 

 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2004. All rights reserved.