-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday, 2008-10-23 at 14:03 -0700, Kai Ponte wrote:
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.
I think there _may_ be a provision for custom scripts when the network goes up. There is such a thing for modem connections, in /etc/ppp/ip-up.local... It could be interesting to find out if there is an equivalent for eth. let me see... look: /etc/sysconfig/network/if-up.d/ /etc/sysconfig/network/if-down.d/ Those dir contains scripts, actually symlinks to scripts in /etc/sysconfig/network/scripts. You could add a script. It seems the script gets certain parameters as arguments in the call, looking at "50-ntp", and perhaps functions prepared for doing things.
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.
Add it to a new script like those above. Keep us posted on what you come up with finally, I'd lke to learn about this. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkkA97IACgkQtTMYHG2NR9XafQCgl9F7A4yf+9m+9VT3WwT0W7dD KcQAn3ABU36JhvRzuCJ+GhURkImGuiLT =2szV -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org