I was solving yet another problem with deployment where we replace a printer with one interface (a parallel port /dev/lp0) with the same printer with a different interface (a usb port /dev/usb/lp0). Our junior programmer solved this ultimately, however udev worked perfectly for this. I wanted the /dev to automatically switch back and forth between the printers while cups pointed to one /dev. This allows one to have a static /etc/cups/printers.conf yet dynamically react to these printer changes.
Please note that since its the same printer, and we won’t have two of them at the same time, one wants the user to not notice that a configuration change was necessary.
The rule in udev was:
KERNEL==”lp0″, SYMLINK+=”lblprinter”
and for the usb
SUBSYSTEM==”usb”, (printer id here), SYMLINK+=”lblprinter”
What our programmer found was that the lp0 symlink would NOT be created (called TRIGGERED) until some event occurs with /dev/lp0. Interestingly odd since the normal “device is detected” triggers the rules in udev.
To solve this we put “touch /dev/lp0″ into the SUSE 11 /etc/initscript and poof when it boots it creates the symlink. This is the desired behaviour.
What is cool, is that I plugged the usb printer in, the /dev/lblprinter symlinked to /dev/usb/lp0. It worked fine. Then when I unplugged the usb printer, the original symlink appeared.
Waycooool. Life is good.
-T-
Subscribe to this Blog
Subscribe to just Comments
Facebook? Whatever…
Tweets for us Twits
- "Design for the future, program for today" - Tom Hollins [jb] 2010/08/01
- http://bit.ly/bl56bC The term "engineer" is greatly overused, but so what? 2010/07/30
- Three hour meeting late pm on details of next marketing campaign, PHEW! Good news? Lots of programming opportunities even during recession! 2010/07/02
- http://bit.ly/9ZRbAJ We should all brainstorm on solutions for the oil spill cleanup. Surely there must be a simple and effective process. 2010/06/04
- Working for a dot com: It's Nuts! Enjoy the video while we research the Denial Of Service attack at joroto.com... http://twitvid.com/89IRG 2010/05/27
- http://bit.ly/dhc7Oh I think we have the solution to Rhapsody Software refusing to play music. (One of its primary purposes...sheesh) 2010/05/23
- http://bit.ly/bOxIdO For non-techies at startups. My comments are in-line also. 2010/05/01
- Coolness Has its Price - Entrepreneur.com http://shar.es/muqF0 See our blog for our response to this ridiculousness! 2010/04/24
- http://bit.ly/aHuPqD Apple, third party software, developers, and Gruber's analysis. Tom's own analysis. (Loves to hear himself talk) 2010/04/14
- http://bit.ly/979YjK Joroto can re-do the U.S. Government Census Project! 2010/04/02
- What is up with YouTube? IP V6 gottem down? 2010/03/27
- RE http://bit.ly/ayTf6J Refreshing that we're not alone. Glad that Business Insider sees things the way we do: http://bit.ly/cMpwnb 2010/03/23
- http://bit.ly/a2Envn Financial Engine = Hot IPO. Good! 2010/03/18
- http://online.wsj.com/article/SB10001424052748704784904575111503873150166.html Engineering evidence is steering away from Prius driver! 2010/03/17
- http://bit.ly/aThFJR Amazon pulls affiliate program in Colorado. Whoa, way to sock it to the government bureaucrats Amazon! 2010/03/14
- http://bit.ly/8YnNKx Backwards thinking to bestride employees drinking competitor's drink, using comp. phone. Joroto employees live free. 2010/03/14
- @tom_peters @wallybock Yes! Public companies are stuck with increasing stock value. We need the new entrepreneurs to dream and execute BWD. 2010/03/12
- RT @tom_peters: @wallybock Instead of "output" could we use something like Branson's more or less "business worth doing." (Value beyond ... 2010/03/12
- @dlwhitehurst Thanks DL, but actually that's Joroto sarcasm. My partners do the programming, and I, the "non-tech" do "lesser" things :) 2010/03/11
- http://bit.ly/cMkBby I have no idea what AppFuse is.I do know that Tom is engineering a new service with it and he posts solutions for you. 2010/03/07
Posts By Category
- Joroto Products (2)
- PRESS RELEASES (6)
- iPod and Apple Platform (15)
- Miscellaneous Apps and Services (18)
- Presidential Speak (21)
- Uncategorized (6)
Posts By Date

Is not Udev one of Sadam Hussein’s kids? I am not so sure he is my friend.
No, that was some other obscure name, but I give you props for being close.
-T-