Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-24-2004, 09:56 PM
|
#1
|
LQ Newbie
Registered: Jan 2004
Location: Toronto, Canada
Distribution: slackware
Posts: 13
Rep:
|
samba/cups: lp from linux to Windows
Hi,
Linux newbie running slackware kernel 2.4.22.
I have samba working for file sharing... I can get files back and forth from my Linux PC to my Windows XP PC.
I've been trying to get the "lp" command working so that I can print files from my Linux PC to the printer attached to my Windows PC. I am able to print directly if I used the smbclient like this:
echo "hello world"| smbclient //desktop2004/Printer -N -c "put -"
I have been trying to use the following commands to set up my lp command to do the same sort of thing, but it's not working. Here's what I did:
/usr/sbin/lpadmin -p HPOfficeJetG55 -v smb://DESKTOP2004/Printer -P /root/HP-OfficeJet_G55-hpijs.ppd
/usr/bin/enable HPOfficeJetG55
/usr/sbin/accept HPOfficeJetG55
/usr/sbin/lpadmin -d HPOfficeJetG55
And here's what happens when I try to use lp:
root:/etc/cups > echo "hello world"| lp
Status Information, attempt 1 of 3:
sending job 'root@MyLinuxBox+449' to HPOfficeJetG55@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
The lp command seems to default to "localhost", even though I've used the lpadmin command to set the default printer to use the windows printer through samba. I have the cups server running with the default .conf files.
Does anyone have any ideas on how I could fix this?
|
|
|
01-25-2004, 12:45 PM
|
#2
|
Member
Registered: Jul 2003
Distribution: Red Hat Linux 9.0; Old and Solid
Posts: 674
Rep:
|
i don't think it's neccessary to go through all that stuff it your linux and wind* have the same workgroup.
linux should automatically see that printer and all you have to do was add a network printer.
|
|
|
01-25-2004, 05:08 PM
|
#3
|
LQ Newbie
Registered: Jan 2004
Location: Toronto, Canada
Distribution: slackware
Posts: 13
Original Poster
Rep:
|
I have changed my Linux workgroup to be the same as my Windows work group, by modifying smb.conf, if that's what you mean. In Network Places, my Windows PC and Linux PC now appear under the same workgroup. But nothing else has changed.
"linux should automatically see that printer" Where? Which command do I run to automatically see that printer?
"and all you have to do was add a network printer" I don't understand... I thought network printers have there own IP addresses, whereas a printer attached to a Windows PC is accessed through Windows Networking or samba? And if I were to add it as a network printer how would I do so? All my research on Linux printing keeps on pointing me back to samba and cups....
|
|
|
01-26-2004, 11:33 AM
|
#4
|
Member
Registered: Jul 2003
Distribution: Red Hat Linux 9.0; Old and Solid
Posts: 674
Rep:
|
what name are you using to share your printer?
i assume that you shared it as "lp" and that computer's ip address was 192.168.0.1.
then the printer's ip address would be "\\192.168.0.1\lp".
also, you have to use the same user passwd in order to print.
just use samba to see if it can see your shared printer.
you add your printer by running "redhat-config-printers" or "redhat-config-printer" can't remember which one was right.
|
|
|
01-26-2004, 12:16 PM
|
#5
|
LQ Newbie
Registered: Jan 2004
Location: Toronto, Canada
Distribution: slackware
Posts: 13
Original Poster
Rep:
|
As per my initial post, the name I am using to share my printer is //desktop2004/Printer. This works with the smbclient, as described above.
My windows computer is on 192.168.1.2 I am running slackware, not redhat.
more info:
root:/root > smbclient -L desktop2004 -N
added interface ip=192.168.1.3 bcast=192.168.1.255 nmask=255.255.255.0
Got a positive name query response from 192.168.1.2 ( 192.168.1.2 )
Domain=[DAVESWORLD] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
Sharename Type Comment
--------- ---- -------
E$ Disk Default share
IPC$ IPC Remote IPC
print$ Disk Printer Drivers
SharedDocs Disk
G$ Disk Default share
Downloads Disk
CDRW Disk
F$ Disk Default share
Printer2 Printer CutePDF Printer
ADMIN$ Disk Remote Admin
C$ Disk Default share
Printer Printer hp officejet g series
Server Comment
--------- -------
DESKTOP2004 Home Office Desktop PC
MYHOST Samba Server
Workgroup Master
--------- -------
DAVESWORLD DESKTOP2004
|
|
|
10-31-2005, 09:45 AM
|
#6
|
LQ Newbie
Registered: Oct 2005
Location: Italy
Posts: 2
Rep:
|
Hello
I have now the same problem you had on "network printing" with Linux.
And I am much more novice than you were.
Have you solved that problem?
How ?
I have the printer on an XP Professional PC.
Attached to an Ethernet cable I have a PC without printers and with:
--XP Home
--Debian Linux.
Bye and thxs
|
|
|
All times are GMT -5. The time now is 06:28 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|