Linux - GeneralThis 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
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.
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.
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.
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.
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.
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.
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
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....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.