Kai Ponte wrote:
I have googled this and found many answers for how to script this in Wintendo, but not so much that's clear on how do do this in Linux (or openSUSE).
I am writing this on my laptop - openSUSE 10.3/32-bit KDE 3.5 - system. I use it for work both at work in my office and at my home office.
At work, I print usually to an HP LaserJet 1310 I have in my office. I also occasionaly print to a workgroup printer such as one of our color laserjets or a high speed b&w printer.
At home, I print to my wife's OfficeJet, connected via Samba to her Win2K computer.
I want to have the system auto-switch my default printer in KDE/CUPS based on teh IP Address of where the compuer is. Though I use DHCP at work, my first two octets are always the same - 1.2.x.x - and I have a fixed IP at home - 192.168.0.102.
In googling, I see that there is a commandline to set the default printer - lpadmin -d printername - which I suppose could be added to an initrc bash file.
Kai, I don't know how it does it, but 11.0 on my laptop does this by itself. At home, I have a HPLJ4 connected to a 10.3 server set up in cups. At work I have a HPLJ4200 connected to (of all things) the secretary's WinXP box and a HPLJ4100N hanging off the network, both configured with cups. When I'm at the office with my laptop, the 4200 comes up as the default printer. When I'm at home, the laserjet 4 comes up as the default. The laptop I'm using just has a stock 11.0 install on it. Sorry I can't give you hints, but for some reason teh standard 11.0 install is doing this. -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org