You are not logged in.

#1 2009-04-21 23:36:55

hypnotic_meat
Member
Registered: 2009-04-15
Posts: 32

Automatically detecting printers

Is there a way to configure CUPS so that it automatically finds both local printers and network printers?  I'm trying to make a kiosk style live CD that can be distributed to several workstations independent of the printers those workstations might use.  Any help is greatly appreciated.

Offline

#2 2009-04-22 00:42:19

bwh1969
Member
Registered: 2008-01-05
Posts: 151

Re: Automatically detecting printers

I hope so.  Ubuntu kind of has it over Arch for this.  The last time I installed Ubuntu, my printer was attached during the install and it "just worked."  I know the nifty thing about Arch is that it is "light" but printer setup has always required some jumping through loops, at least for me.

Offline

#3 2009-04-23 12:36:33

hypnotic_meat
Member
Registered: 2009-04-15
Posts: 32

Re: Automatically detecting printers

I've done some digging and found that automatically detecting network printers seems to be impossible for CUPS as I'd need at the very least the IP address.  Limiting things strictly to printers that are directly connected via USB then, would it be possible to write a shell script that runs on startup that would automatically install those printers without me having any knowledge about their specifics?

Offline

#4 2009-04-23 13:02:45

robmaloy
Member
From: Germany
Registered: 2008-05-14
Posts: 263

Re: Automatically detecting printers

i have a lexmark c544
cups found it but i had to provide a ppd file


☃ Snowman ☃

Offline

#5 2009-04-23 13:28:47

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: Automatically detecting printers

So I don't have to open another thread, has anyone had any luck with having a printer that is by its own on the network being automatically detected by cups?

With 1.3.9 I just add printer, put name and in the next dialog, all my network printers appeared in the list so I just choose the one I needed and the ppd and that was about it.

With 1.3.10 it is near impossible to do this for me, I have browsing on and the likes, I copied the default.conf of cups to the original one, nothing works.


Follow me in: Identi.ca, Twitter, Google+

Offline

#6 2009-04-24 14:02:35

hypnotic_meat
Member
Registered: 2009-04-15
Posts: 32

Re: Automatically detecting printers

I've made a bit of progress, though this solution might not work for everyone depending on your cups configuration.  I wrote a simple script that runs on startup and parses the output of lpinfo -v.  Right now, I'm successfully finding and installing network printers and it'd be a piece of cake to add support for direct usb/parallel.  Anyways, here's the script (I'm sure it could be improved in many ways as I am by no means good at scripting:

PORT=9100

for entry in $(lpinfo -v | cut -c 1-); do
  if [[ $entry == socket://* ]]
    then
      entry=$entry$PORT
      echo "Enter a name for the printer at: $entry"
      echo "Or, enter -n to skip this printer"
      read NAME
      if [[ $NAME != "-n" ]]
        then
          lpadmin -p $NAME -v $entry
          cupsenable $NAME
          accept $NAME
      fi
      continue
  fi
done

Offline

#7 2009-04-25 00:06:48

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Automatically detecting printers

kensai wrote:

So I don't have to open another thread, has anyone had any luck with having a printer that is by its own on the network being automatically detected by cups?

A friend of mine has an Arch laptop that I put together for her that found all of the public printers at her work automatically. I have the avahi daemon set up in rc.conf, but I don't know if that's the reason why it works.

Offline

#8 2009-04-25 01:02:55

whukes
Member
Registered: 2008-07-18
Posts: 34

Re: Automatically detecting printers

I have a HP all-in-one on my network that gets detected automatically by cups.  I have no special daemons or anything running besides cups.

EDIT:
I forgot to add that my work laptop is also able to automatically detect all the printers at my office.  I wonder why cups just "works" for me.

Last edited by whukes (2009-04-25 01:05:24)

Offline

Board footer

Powered by FluxBB