[K12OSN] Setting Default Printer based on Location

Henry Burroughs hburroughs at HHPREP.ORG
Thu Oct 7 19:33:58 UTC 2004


Hi everyone!  I don't know if this is already been done, but I have
created a script that will set the default printer based on which client
you are logged in as (ie: if you have multiple labs off one server and
printers in each of those labs).

You just drop setprinter.sh into your /etc/profile.d/ directory, and
create a /etc/sysconfig/ltsp_printers with information like this:

printer-que:ws100,ws101,ws102,ws103
printer-que2:ws200,ws201,ws202

You don't have to list all your clients; it will keep whatever the last
que was for a user when they log into that client.

This is a good question for everyone... should it reset the que back to
the server default if that client isn't listed above?

You can overide the default printer during your session (it will not be
reset if you open a terminal due to a SETPRINTER=true env variable which
keeps the script from running more than once during a user's session).

Also, you don't have to create a ltsp_printers file, which means the
script doesn't do anything (and it shouldn't puke up errors either
::knock on wood::).

Hope this is helpfull!

Henry Burroughs
Technology Director
Hilton Head Preparatory School
www.hhprep.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setprinter.sh
Type: application/x-shellscript
Size: 859 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/k12osn/attachments/20041007/905c2287/attachment.bin>


More information about the K12OSN mailing list