You are not logged in.

#1 2004-08-22 16:11:13

orjanp
Member
From: Tromsoe, Norway
Registered: 2004-07-03
Posts: 337

Add a samba shared printer to a linux client with cups

I have a linux box that I use to share files and a printer.

It's no problem to use the printer fram a windows machine, But how can I add the printer to a linux client with cups. What will go into "device URI" when the printer is a shared samba printer? I have tried a fiew things with no luck.

Or, should I use a different printserver to share the printer on a windows/linux network?


Ørjan Pettersen

Offline

#2 2004-08-22 17:40:09

scottro
Member
From: NYC
Registered: 2002-10-11
Posts: 452
Website

Re: Add a samba shared printer to a linux client with cups

I have a page on cups that might help

http://home.nyc.rr.com/computertaijutsu/cups.html

If it's on server 192.168.1.100 on the client machine,

lpadmin -p PRINTER -E -v lpd://192.168.1.100/PRINTER -m laserjet.ppd


This would be assuming that the printer's name on the server is PRINTER and that it's a laserjet. 

Sometimes lpoptions -l will give the available ppd's.  Otherwise, you might be better off using the web interface, which shows all the available ppd's.

Anyway, judging from your post, it seems the thing you might be missing is the lpd://192.168.1.100/PRINTER thingie.

The second thing is that then in /etc/cups/client.conf you have to change the server name.  It'll be, commented out with

ServerName   myhost.mydomain.com

Uncomment it and change it to

ServerName 192.168.1.100

Offline

#3 2004-08-22 20:44:30

orjanp
Member
From: Tromsoe, Norway
Registered: 2004-07-03
Posts: 337

Re: Add a samba shared printer to a linux client with cups

Thanks. I have read your coups and samba pages. When I try the lpadmin command, this happend.

[root@ArchThinkpad ms]# lpadmin -p HP750 -E -v lpd://10.0.0.104:631/HP750 -m HP750.ppd
lpadmin: add-printer (set model) failed: server-error-internal-error

I have added a printer with cups webadmin. The device URI is set to lpd://10.0.0.104:631/hp750
When I try to print a test page I get the following error in the error_log file on my server.

d [22/Aug/2004:22:15:03 +0200] AcceptClient(0x8088150) 0 NumClients = 0
D [22/Aug/2004:22:15:03 +0200] AcceptClient() 5 from 10.0.0.102:631.
d [22/Aug/2004:22:15:03 +0200] AcceptClient: Adding fd 5 to InputSet...
d [22/Aug/2004:22:15:03 +0200] ReadClient() 5, used=0
E [22/Aug/2004:22:15:03 +0200] Bad request line "^Bhp750"!
D [22/Aug/2004:22:15:03 +0200] SendError() 5 code=400 (Bad Request)
d [22/Aug/2004:22:15:03 +0200] ShutdownClient: Removing fd 5 from InputSet...

What is this bad request thing?


Ørjan Pettersen

Offline

#4 2004-08-23 00:04:50

Win
Member
Registered: 2004-03-04
Posts: 155

Re: Add a samba shared printer to a linux client with cups

This is just slightly off topic in that the formula below describes how to use CUPS as a cross-platform printer server (i.e., you don't need Samba at all). This formula simple and easy to set up.  This is a copy of what Carla Schroder has posted this at the Libranet support site:

"You don't need Samba to share CUPS printers. In fact CUPS makes a nice cross-platform print server.

This is a complete sample cupsd.conf. You can copy this as it is, using your own IPs of course. And you must have name resolution working, either /etc/hosts or DNS

LogLevel info
Port 631
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.1.*
</Location>
BrowseAddress 192.168.1.255

This is the simplest working cupsd.conf that I know of. This will automatically broadcast to your Linux cups clients, which need no configuration.

To share with Windows PCs, you do not need Samba. Again, with name resolution working, yo

u can connect to a CUPS printer from Winnt/2k/XP:

On Windows NT install Control Panel -> Network -> Services tab -> Add Microsoft TCP/IP Printing

On Windows2000/XP, install TCP/IP Print Services. from. Network and Dial-up Connections-> Advanced Menu -> Optional Networking Components -> Other Network File and Print Services.

Next, fire up the Add Printer wizard. Select Network Printer; then add the printer URI. This consists of the IP address or server name, port number, and /printers/printer name. Be sure to use the exact name you gave the printer, like this:

http://192.168.1.5:631/printers/hp6L

or like this:

http://cupsservername:631/printers/hp6L

When Windows first connects to the CUPS server, it will install its own local printer drivers, and print its own test page, rather than the CUPS test page.

Windows 95/98/ME need the wpnpins.exe file installed. Get it from http://www.microsoft.com/windows98/downloads/, look for "Internet Print Services." Then install a network printer just like for Winnt etc. You should archive a copy of this file, who knows how long it will be available."

http://libranet.com/support/2.8/sharingcups

Offline

#5 2004-08-23 00:07:31

scottro
Member
From: NYC
Registered: 2002-10-11
Posts: 452
Website

Re: Add a samba shared printer to a linux client with cups

Hrm, haven't seen that particular error before.  I'm not sure.  It's probably some simple thing we're overlooking.

Offline

#6 2004-08-23 07:39:49

orjanp
Member
From: Tromsoe, Norway
Registered: 2004-07-03
Posts: 337

Re: Add a samba shared printer to a linux client with cups

Thanks Win. I set up a cups server thing and my printer worked fine printing from a linux client. For windows clients the printer is still shared with samba, and working. So for now, I leave it that way. I'll try the cups server - windows clients when I have more spare time on my hand.


Ørjan Pettersen

Offline

#7 2004-08-23 08:55:49

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,260

Re: Add a samba shared printer to a linux client with cups

if you like to print from windows to linux
and the windows pcs should use their own driver
you have to enable raw printing in /etc/cups/mime.types and mime.convs:

application/octet-stream

additional:
for smb.conf in printer section use:
use client driver = yes

Offline

#8 2004-08-23 09:34:06

orjanp
Member
From: Tromsoe, Norway
Registered: 2004-07-03
Posts: 337

Re: Add a samba shared printer to a linux client with cups

Printing from windows to linux works fine using a samba shared printer.

I did test the cups server thing from windows. It did work without installing anything exstra(there was nothing called TCP/IP print service). I just added the printer with the url http://10.0.0.104:631/printers/HP750. Then I could print from windows to linux without samba.


Ørjan Pettersen

Offline

Board footer

Powered by FluxBB