LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to print on a winxp-shared printer from inux? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-print-on-a-winxp-shared-printer-from-inux-449626/)

pusrob 05-29-2006 11:18 AM

how to print on a winxp-shared printer from inux?
 
Hello.

I have a WinXP on my old computer, and a HP PhotoSmart 7660 is connected to it. On my laptop I have a Debian linux (originally only a WinXP Home was installed, not by me, but since its a legal copy of Win, I didn't delete it.). You can understand, that I cannot connect the printer to my laptop, becouse I use it as it is designed to be used (carry it everywhere). Now. Somehow (I didn't spent too much time to make it work, but it works) my home network works with Samba, so I see the shares on XP and on Deb. BUT! I cannot see my shared printer (shared on XP) via Samba. And now, the question: How can I use my printer via the network? How can I make it visible to my Deb? Thanks for reading (and answering).

theNbomr 05-29-2006 02:22 PM

Quote:

Originally Posted by pusrob
I cannot see my shared printer (shared on XP) via Samba.

First things first. How are 'seeing' any shares from your linux system?

If, at a bash command line, you do

Code:

smbclient -L //YourWinXpHost
do you see your shared printer?

If yes, the simplest way to set it up is probably with the Cups web interface.

Code:

http://localhost:631
Otherwise, give us some more details and look back here.

(You should confirm that the printer you are trying to access actually has a Linux driver).


--- rod.

pusrob 05-30-2006 11:03 AM

Dear theNbomr.

I can see win-shares from Linux, as I wrote it in my original post (" so I see the shares on XP and on Deb."). I can read/write my win-shares from Linux. Well. If its clear now, then lets talk about the printer business: HOW to make it visible by linux? Of course, I will try the commands posted by U, but no warranty. Now, about the details. What do you exactly wanna know? What kind of "details" do you need? Please write it, becouse I can give you useless info, if I need to return here. Thanks.

theNbomr 05-30-2006 02:09 PM

Quote:

Originally Posted by pusrob
Dear theNbomr.

I can see win-shares from Linux,

Define what you mean by this. What exactly are you using to see this?

--- rod.

pusrob 05-31-2006 07:22 AM

seeing means what is sais
 
Dear theNbomr

I mean by "seeing" that I can SEE it. Or I can say it is visible by Linux. Windows shares are READABLE and WRITABLE (browsable) from Linux. What is not understandable here? I use Konqueror to browse these folders. This is possible, becouse I have Samba installed too. And, if I can see it in Konqueror, than I can see Win-shares. OK? I think (at least I did) it can be understood by everybody. Any other questions?

theNbomr 05-31-2006 09:11 AM

Quote:

Originally Posted by pusrob
I use Konqueror to browse these folders.

There, now that's what I wanted to know. So, since Konqueror is a filesystem browser, where were you expecting to 'see' printers?

Did you do

Code:

smbclient -L //SomeWindowsHost
What did you 'see'?

If you use the web-based cups configuration tool, you should be able to 'see' the windows shared printers.

When you have done this, and if you still have problems, then ask some more here. PLease try to be specific, naming the tools you are using, and any configurations and options that may be pertinent. Linux is a big place, and you need to narrow the terms of reference a bit. Provide clips of program outputs for interpretation (as in the smbclient output, for example).

--- rod.

pusrob 06-01-2006 08:02 AM

I know...
 
Dear theNbomr.

I didn't even wanted to see my printer in konqueror. I tried to see it with the KControls printer setup tool, but I didn't see shared printers. I tried than your command the: smbclient -L //SomeWindowsHost and it listed the file shares, but not the printer. After that, I tried the Smb4K and surprisingly it could see it. But the localhost:631: nothing again. Only Smb4K can see it. What to do now?
I'm using Debian testing/unstable, KDE 3.5.3, samba 3.0.22, smbclient 3.0.22, smb4k 0.6.9 swat 3.0.22. What else do I need? Thanks.

theNbomr 06-01-2006 11:04 AM

Just to clarify, you have a single printer on a single WinXP workstation. That printer is visible to other Windows workstations, but not to other Debian workstations, except with smb4k. Correct?

Since smb4k is now based on the net utility, as opposed to smbclient, perhaps you can use net to glean more information about the shared printer. Try

Code:

net rap share --server=YourXpHost -l
Is your shared printer listed?

I'm going to take a bit of a leap, here. Is there a linux driver for the printer? If no, I'm guessing that the printer is specifically a Win printer, and that there is something about the driver which makes it invisible/incompatible at the windows networking level. To test this theory, could you create a fictitious printer that comes from the standard Windows driver distribution (you can install the driver and configuration, without having an actual physical printer, I beleive). Having done this, and made the printer shareable, is that shared printer visible to smbclient and other linux tools? Alternatively, do you have a way to put a known linux-visible and linux-functional printer on your network. I am trying to establish whether the problem is linux-based, or Windows-based.

I was perhaps too terse in my comment that the cups (localhost:631) tool could see the printer. Have you tried using cups to install a new network-attached printer, using the network share name of the printer, as identified by smb4k? If yes, what about the installation failed?

--- rod.

pusrob 06-02-2006 07:30 AM

You're right...
 
Dear theNbomr!

It is very nice, that you're trying to help me with such adherence. Its rare. Others would give it up after this time. Thank you.
Now. About the printer. Of course, I will try what you said. This printer (HP PhotoSmart 7660) has a Linux driver. I can use it (under linux of course), if I connect it directly. Plus, I can use it like a card reader device (you can plug in SD, Compact Flash... cards). I installed all those needed HP stuff I found on deb repositories. It Works that way. Everything works here what works under Win. BUT. Its not easy to connect it directly to my laptop, becouse the cable is not very long, and I have to put my laptop on the bed this way. It is painful. So. I dont think its Linux's fault. Something else. If I try your net command, I'll tell you what happend.
And finally: your "Just to clarify, you have a single printer on a single WinXP workstation. That printer is visible to other Windows workstations, but not to other Debian workstations, except with smb4k. Correct?" writing is correct. It is like you said. Just an Xp-comp and a Deb-comp connected with a single simple crosswired LAN cable. Nothing else.

theNbomr 06-02-2006 09:34 AM

Okay, we've eleminated my theory about the Win-printer. Do you have a way to confirm that ANY windows-attached printer can be seen from your Debian system. I am no expert on Window networking, but as I understand it, there are a couple of different schemes used for managing Windows shared resources. Something related to Workgroup vs. Domain based management. Can you change whatever system you are using on the XP host to the 'other', and try that?

As you can see, I am at the point where I am just fishing, now.

--- rod.

pusrob 06-02-2006 01:05 PM

wait....!!!!
 
Dear theNbomr.
I tried what you said, I mean I tried everything you said. Well. For the localhost:631 It couldn't find enything. The smb4k still can see it. The smbclient -L //Winhost does not work. The net rap share --server=Winhost -l does not work. After these I installed on my Win a Canon PS printer (I don't have it, installed it just for a try as you said), and it worked with all of them!!! with the net, smbclient and KControls printer setup tool. Amazing. You were right. Its something with my Debian, but I don't know what. If I connect it directly, it works. If I wanna see it through LAN it doesn't work. Any ideas? I have drivers ("hpijs-ppds.deb" package) installed. This problem is interesting... If you need to see a printscreen of my console after these commands, I can send one. Just say where. Thanks again.

theNbomr 06-02-2006 01:30 PM

Quote:

Originally Posted by pusrob
If you need to see a printscreen of my console after these commands, I can send one. Just say where.

Please post them on this forum. This will let the most number of people bring their knowledge to bear on your problem, and also provide a record for others to use in solving their future problems. If you use 'konsole' as your console, it is easy to cut and paste text from the terminal into a text entry. BTW, it is best if these screen-grabs are wrapped in '[CODE]' boxes to preserve the fixed width formatting. Don't be afraid to post lots of this kind of information. Often it reveals something unexpected that leads to a solution.

I'll throw out another hunch, here, although I can't quite see a mechanism that makes it valid. Did you ever install the Linux drivers for that printer and run it on the linux host? I'm theorizing that the driver/configuration has left something around that gets messed up when the printer is no longer attached directly, but is now on a network.

--- rod.

pusrob 06-03-2006 04:25 AM

Unbelivable!!!
 
Dear theNbomr!

You will be amazed! Check this out what happend yesterday. After I sent you the reply, I tried something, becouse why not. I started kcontrols print setup tool, and there I selected the samba shared printer. Of course it couldn't find anything. And here I decided to type in the workgroup, host and printer name manually. After this I selected the needed driver, and sent to the printer a test page. And it printed that out!!! I was very very happy, but not for long. Then I asked myself: why not to print something, just to be sure. And shit! Something went wrong. The prineter started to do something. On the first page it printed a single line, with a kind of stupid, not understandable text. The caraters were OK, but not the text. And after that the printer started to give empty papers out. I think it would've continue, if don't press the "cancel print" button. Now what? I don't understand anything from now on. I tried to print with openoffice and kate. Thats all. Something IS wrong here. Any ideas? Thanks.

theNbomr 06-03-2006 02:05 PM

Try creating a 'Generic' (I forget what they call it, some words to that effect) printer on your Windows host, which uses the printer you are trying to share. The printer driver should do no processing, only pass data straight through to the printer. Use that as the shared printer for linux hosts.

--- rod.

pusrob 06-16-2006 05:33 AM

Dear theNbomr!

Finally I had some time to make a copy of the printouts. Well, look:

LinHost:~# smbclient -L //WinHost
Password:
Domain=[WinHost] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment
--------- ---- -------
E$ Disk Default share
IPC$ IPC Remote IPC
D$ Disk Default share
print$ Disk Printer Drivers
SharedDocs Disk
Archive Disk
DVD-RAM Disk
Upload Disk
Rock Disk
ADMIN$ Disk Remote Admin
C$ Disk Default share
Domain=[WinHost] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Server Comment
--------- -------

Workgroup Master
--------- -------


LinHost:~# net rap share --server=WinHost -l
Password:

Enumerating shared resources (exports) on remote server:


Share name Type Description
---------- ---- -----------
E$ Disk Default share
IPC$ IPC Remote IPC
D$ Disk Default share
print$ Disk Printer Drivers
SharedDocs Disk
Archive Disk
DVD-RAM Disk
Upload Disk
Rock Disk
ADMIN$ Disk Remote Admin
C$ Disk Default share

Well, it does not show any printers shared... Any ideas?
Sorry, but LQ delets out the extra spaces, so it is hard to read.


All times are GMT -5. The time now is 08:22 PM.