LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-14-2005, 06:50 AM   #1
seran
Member
 
Registered: Aug 2004
Location: Bangalore
Posts: 64

Rep: Reputation: 16
Autoconfiguring Printer


Hello,
I have to autoconfigure a LOCAL printer.

Currently my situation is like this. When a USB Printer is connected to a linux machine the system has to autodetect the printer, and it has to configure it automatically without any user interaction.

Normally when we configure a LOCAL printer, we need to provide the printer name, printer device and we have to choose the printer driver. In my case all these steps should happen automatically when the user connects the printer. There wont be any user interaction. The user just have to connect the printer and use it. Its like Plug-n-Play.

One of my friend told me that CUPS can do this kind of autoconfiguration. My plan was to retrieve the printer details when the user connects the USB printer, add the parameters into the /etc/printcap.local file and restart the lpd daemon. I want to know how to retrieve the information. Currently I am clueless.

I am looking for some suggestions from you guys. If I get some idea I can proceed fast.

Thanks
Seran
 
Old 10-14-2005, 06:36 PM   #2
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,692
Blog Entries: 9

Rep: Reputation: 45
Your question seems a little vague my friend.

It's my understanding, that there are a few distros that will autoconfigure a printer if it's connected during install. Lot's won't.

If they are USB devices, then you still have to have hotplug and coldplug facilities installed to handle the USB file system. Then if you installed cups, you can log in and configure it from the Q/A configure wizard. You may need some system information though. Depending on how the printer is connected e.g. if it's connected via ethernet, then you'd need IP addresses etc. Parallel printing, well as long as the parallel connection is detected by the distro then you should be able to configure it manually.

Cups can "do" a lot of print drivers, but some printers can, I understand, be a complete PITA to configure (Lexmark ???? don't know, just what I read around the forums).

Sorry I can't really be more specific, all my printer config experience has been by trying on a "hit or miss" basis.

regards

John
 
Old 10-16-2005, 11:09 PM   #3
seran
Member
 
Registered: Aug 2004
Location: Bangalore
Posts: 64

Original Poster
Rep: Reputation: 16
thanks for the reply.

Let me explain again. The user has to connect the USB printer to the system and he should be able to take printouts. He doesn't have to do any configuration work at all. Just connect the printer and use it.

I hope I can finish this is in time.
 
Old 10-17-2005, 05:33 AM   #4
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,692
Blog Entries: 9

Rep: Reputation: 45
Well not too sure how you'd accomplish this then, as I know that, for example, Mandriva, normally detects already connected printers (both parallel and USB), and does a pretty good job of installing the appropriate driver for it, but thats only with some printers. Others are much more effort.

Hell, if you just plug a printer into windows, then it still has to be configured/set up the first time.Linux distros are no different. It shouldn't be so hard if the printer is staying on the one machine after it's connected/setup, but if it's being unplugged and moved etc, then thats a different issue.

Even the selection of an appropriate printer is worth considering. Most HPs and Epsons, pretty much work without much difficulty, but I don't know about them being "very" plug'n play, which is what it sounds like you're looking for.

I'm getting the impression that what you're looking for, could be thought of as "the holy grail". Unfortunately, thats not gonna happen, under windows, let alone a linux distro.

The best you could/should hope for, is the easiest possible - given current techincal/software abilities.

Sorry if thats not very helpful my friend. Good luck with your quest.

regards

John
 
Old 10-17-2005, 08:23 AM   #5
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
If the printer is one of a finite number of supported types, known in advance, I think this may be possible using udev.

When a usb device is plugged in it appears in the /sys directory tree and udev associates it with a particular device according to a set of rules in a configuration file.

Create a rule to associate the different printers with /dev/usb/lp0, /dev/usb/lp1 etc. Set up CUPS with the right driver for each device.

Of course if someone walks in with some printer you have never seen before you have no chance

udev documentation is a bit sparse, but the PDF

http://www.kroah.com/linux/talks/ols...an-OLS2003.pdf

is quite useful, and has a printer example.
 
Old 11-23-2005, 07:05 AM   #6
R00ble
LQ Newbie
 
Registered: Nov 2005
Posts: 1

Rep: Reputation: 0
I thought of this, when you enable usbfs in the kernel and mount it. You can read information out of /proc/bus/usb/devices right? If you grep the usb device and compare it to a list with known usb printers, and compare it with a list of ppd's. You can automate printer recognition. This can work very well in, thin client situations....

I't cant be that hard to script this, right?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora Printer Problem: Brother Laser Printer drops the first one or two centimeters merlinsenger Linux - Newbie 2 05-24-2008 06:13 AM
Gentoo boot, autoconfiguring device harzfled Linux - Newbie 2 03-31-2005 09:53 PM
keeping printer on at bootup keeps printer from printing (some printer modules loaded TheOneAndOnlySM Slackware 1 10-17-2003 07:39 PM
setup printer on client machine(slackware 8) to server (slackware7) network printer changwoo Slackware 9 05-02-2003 05:37 PM
Printer Basics 101 Unistalling previous printer Dirver SPMcRuube Linux - Newbie 1 12-02-2002 03:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration