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?
I have a page on cups that might help
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
Uncomment it and change it to
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?
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
Deny From All
Allow From 127.0.0.1
Allow From 192.168.1.*
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:
or like this:
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."
Hrm, haven't seen that particular error before. I'm not sure. It's probably some simple thing we're overlooking.
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.
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:
for smb.conf in printer section use:
use client driver = yes
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.