LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Printing to a windows shared printer using Samba (https://www.linuxquestions.org/questions/slackware-installation-40/printing-to-a-windows-shared-printer-using-samba-227725/)

Maskkkk 09-07-2004 10:40 AM

Printing to a windows shared printer using Samba
 
I'm trying to print to a shared printer on my windows XP box using Samba. I just installed Slackware 10, and I don't know how to get it to work.

Here is what I did.

First I checked to see what the XP box was sharing using the command:
$ smbclient -L SONY

It showed me that the printer I wish to print to was indeed shared

Sharename Type Comment
--------- ---- -------
HPDeskJe Printer HP DeskJet 820Cse

so then I typed:
lpadmin -p SONYPRINTER -v smb://SONY/HPDeskJe -P /root/HP-DeskJet 820C-pnm2ppa.ppd

no problem there...

then I typed:

enable SONYPRINTER

to which the prompt displayed:
-su: enable: SONYPRINTER: not a shell builtin

This doesn't seem right to me and this is probably why it doesn't work.

next I typed:
accept SONYPRINTER

(no problem here either)

My directions also said to type the following which also went without a problem:
accept SONYPRINTER

and after that it is supposed to print with a command such as
lp ./doc.txt

But it doesn't print instead it outputs to the shell:
Status Information, attempt 1 of 3:
sending job 'root@localhost+561' to SONYPRINTER@localhost
connecting to 'localhost', attempt 1
cannot open connection to localhost - No such file or directory
Make sure the remote host supports the LPD protocol
Waiting 10 seconds before retry

Thank you...

netopia 09-07-2004 07:16 PM

I could be wrong but I don't think Linux can reliably print to Windows-shared printers. You need to hook up the printer to your Linux box, which can provide printing services to Windows clients. ("Make sure the remote host supports the LPD protocol" should be a good hint)

netopia 09-08-2004 09:33 AM

I WAS wrong. Install "Print Services for Unix" in "Optional Networking Components" on the windows box to enable printing from Linux to a Windows shared printer.

BrianW 09-08-2004 06:06 PM

I know when I did this, I used cups to print, and it worked fine. Install the cups package and goto localhost:631 and configure it and see what you get.

IIRC lpr-cups was the command to print with that I had to switch to since I didnt have lpr linked to cups.

gh5046 09-02-2009 11:39 AM

I found this topic via google search. I see that it was resolved five years ago, but I felt it necessary to clarify something from the original post:

Quote:

Originally Posted by Maskkkk (Post 1160872)
then I typed:

enable SONYPRINTER

to which the prompt displayed:
-su: enable: SONYPRINTER: not a shell builtin

This doesn't seem right to me and this is probably why it doesn't work.

'enable' is a builtin bash command. It's used to enable or disable other builtin bash commands (like cd, kill, pwd, set, and more. Execute 'enable -a' to get a full listing).

Use 'which' or 'whereis' to find the path to the cups 'enable' command then execute it, for example:

Code:

# which enable
/usr/bin/enable



All times are GMT -5. The time now is 01:55 PM.