LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Network printer between 2 linux computers with samba and cups. (https://www.linuxquestions.org/questions/slackware-14/network-printer-between-2-linux-computers-with-samba-and-cups-757387/)

glore2002 09-23-2009 08:43 PM

Network printer between 2 linux computers with samba and cups.
 
Hello!

I have two linux computers connected in a LAN and sharing folders through samba. I've also configured Cups.

There are also windows computers in the network. From those computers I can send print jobs to the linux (ubuntu box) and they are printed.

How do I access the remote printer connected to the Ubuntu computer from my Slackware box?

Thanks for your help!

gargamel 09-24-2009 04:59 AM

I guess you don't need Samba for your Linux clients. Just open the CUPS web UI with your favourite web browser: http://localhost:631/admin.

On this page you can "publish" a printer and/or make printers published by other computers in your networks "visible" to CUPS and applications. Just select the options you want.

AFAIK it's also possible to print via Samba from Linux, but I have never used it, because the above always worked fine for me.

gargamel

tallship 09-24-2009 01:29 PM

You can also use lp

acummings 09-25-2009 01:04 AM

I use lp (lpd). All of my printers are network printers (on print servers)

You would do the same as I -> ie

lpd://IP_address_of_ubuntu_box/Par_port

you need to know what to replace the Par_port part with (or usb if is usb interface)

I used (Firefox) in the address bar -> localhost:631

to set it up. (be sure cups is running) ie

ps aux | grep cups

if cups shows up, fine -- if not, then the next 2 lines fires up cups

chmod +x /etc/rc.d/rc.cups

sh /etc/rc.d/rc.cups start


Next (below the ls) is my printers.conf file (the outcome of/from doing localhost:631 in the web browser)

Code:

root@P5Q:/etc/cups# pwd
/etc/cups
root@P5Q:/etc/cups#

root@P5Q:/etc/cups# ls
command.types  cupsd.conf.2debug  cupsd.conf.orig  mime.convs  ppd/          printers.conf.O  snmp.conf
cupsd.conf    cupsd.conf.default  interfaces/      mime.types  printers.conf  pstoraster.convs  ssl/

root@P5Q:/etc/cups# cat printers.conf
# Printer configuration file for CUPS v1.3.10
# Written by cupsd on 2009-07-04 21:03
<Printer deskjet952c_LPT2>
Info dskjt 952c
Location hps12u_ip_253
DeviceURI lpd://192.168.1.253/LPT2
State Idle
StateTime 1234930110
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
<Printer deskjet960c_LPT2>
Info 960c 192.168.1.250/LPT2
Location LPT2
DeviceURI lpd://192.168.1.250/LPT2
State Idle
StateTime 1234065679
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
<Printer deskjet960c_LPT3>
Info 960c 192.168.1.250/LPT3
Location LPT3
DeviceURI lpd://192.168.1.250/LPT3
State Idle
StateTime 1234066312
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
<Printer deskjet970cxi_LPT1>
Info pro dskjt 970cxi
Location hps12u_ip_253
DeviceURI lpd://192.168.1.253/LPT1
State Idle
StateTime 1236490228
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
<Printer dskjt970cxi_undr_desk>
Info 970cxi 192.168.1.250/LPT1
Location 970cxi (under desk) 192.168.1.250/LPT1
DeviceURI lpd://192.168.1.250/LPT1
State Idle
StateTime 1246766605
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
root@P5Q:/etc/cups#

--
Alan.

adriv 09-25-2009 03:55 PM

Perhaps my struggle with this matter will help you any further?
I got it working, in the end. ;)

acummings 09-25-2009 07:36 PM

Hi again,

I suppose it's possible an (iptables) firewall on Ubuntu box and/or the "allowed" in Ubuntu box's cupsd.conf file as well as the Ubuntu box's "hosts" file -- what's allowed in said hosts file.

Any of above 3 different things might block (not allow print to work).

AFAIK when using Samba, Samba has its own .conf file which I think circumvent the above (with/through Samba the above 3 items very well may not apply) (probably don't apply).

It's no cake walk with print server (ps) though some ps are very significantly more Linux friendly than others.

I have / use two of Hawking HPS12U print servers (you may have guessed it from seeing my printers.conf file). One is set at IP of 192.168.1.250 the other I set at 192.168.1.253

These are rather Linux friendly ps. Always work for me. Printer run out of ink is the worst of my prob that happens.

No messing with the top 3 (above) (Linux) items (that block / not_allow print) when using these ps.

After my experience with these ps, I'll not do it any other way than with these Hawking ps and how I'm currently doing it.

I like the freedom of printing to the network. I've sufficient printing redundancy [U saw my 5 or 6 printers and 2 different ps in my printers.conf] that I "always can print" "no matter what" with exception perhaps of during a building fire.

BTW localhost:631 also gets printer driver installed (in addition to creating printers.conf) -- may also do more (essentially, gets printer(s) set up and working).

--
Alan.

glore2002 09-26-2009 11:04 AM

Thanks for all the help provided.

My computer can boot in Debian, Slackware and win.

From Debian I can print to the printer connected to the ubuntu box.

It was easy: System, printing and network printer. After that, it worked (gnome).

If I go to the path Debian wrote down to access the printer, I see:

Quote:

smb://INICIOMS/VENTANA/HP-LaserJet-1018
Driver used: HP LaserJet 1018 Foomatic/foo2zjs (recommended)

INICIOMS/VENTANA is the computer where I would like to print (ubuntu).
HP-Laserjet-1018 is the printer connected to the ubuntu box.

I thought in KDE things were easier to set up but I can't find a printer settings such as in gnome. So, I have to go to cups (localhost:631).

Any further advice will be very welcome.

Thanks again!

acummings 09-27-2009 04:02 AM

Code:

Device URI for my_printer
Device URI:        smb
        Examples:

    http://hostname:631/ipp/
    http://hostname:631/ipp/port1

    ipp://hostname/ipp/
    ipp://hostname/ipp/port1

    lpd://hostname/queue

    socket://hostname
    socket://hostname:9100

See "Network Printers" for the correct URI to use with your printer.

localhost:631

chose "add printer"

then chose type "Win, Samba, smb"

above is snippet from near the 2nd or 3rd "continue"

Perhaps of importance, it already has "smb" loaded into the slot. It *might* be worth your while to try replicate your Debian entry (path to Ubuntu printer) in place of where smb is in that field/slot.

"Continue" and choose a driver matches your printer.

Worst you could do is have a non working printer entry.

If so, "add printer" name this one with a 2 in its name and/or "delete printer" the non working then "add printer"

I grew accustomed to using IP address of my print server (there's no name resolve on/for my LAN) (IP's work).

I'm yet to print (from Linux) to Win/Samba/SMB

Thus I've not yet set up a Linux box to print to that there like you did with Debian.

http://www.google.com/linux?q=Carla+...rch&hl=en&sa=2

That may be only what you already did with Ubuntu box.

http://localhost:631/help/network.html

--
Alan.


All times are GMT -5. The time now is 09:18 PM.