[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] How do you setup clients so they print to different default printers?





wilson wilsonch gotdns com wrote:
You'll have to assign specific addresses to the clients in
/etc/dhcpd-k12ltsp.conf.
Then you can control the default printer based on the workstation name or
address.  For
example, you could create the following script, call it set_printer.sh,
and put it in
/etc/profile.d.

#!/bin/sh
# Set default printer based on which workstation is being used
ws=$(echo $LTSP_CLIENT|cut -d. -f1)
case $ws in
   ws001 ) lpoptions -d library_printer ;;
   ws002 ) lpoptions -d library_printer ;;
   # and so on for the library workstations
...
   # now assign printers for the lab workstations
   ws013 ) lpoptions -d lab_printer ;;
   ws014 ) lpoptions -d lab_printer ;;
   # and so on
esac

### End of script

HTH

Petre

The script above looks good but is it okay to just create a .lpoptions in
each user's home directory for the library computers
(/home/library#/.lpoptions) and add this in? Will it work?

/home/library#/.lpoptions
Default LTSPLibrary-Dell1710n scp-fc5=true


/etc/cups/lpoptions (LTSP SERVER)
Default LTSPLab-Dell1710n scp-fc5=true
Dest LTSPLibrary-Dell1710n scp-fc5=true


-Wilson

Well, as I see it, you want the _user's_ default printer to change depending on _which client_ that user is logging in, which are two different variables. So, unless you put some mechanism in the user's `/.lpoptions that detects which client machine is being used, the .lpoptions route won't do you any good; it will only work for one location. The script above looks at what client machine is being used, and then sets lpoptions based on that. I'm not very familiar with lpoptions, I just use it to set a default printer; perhaps one can include such logic in the ~/.lpoptions file. OTOH, is the set_printer.sh script not working for you?

Petre


wilson wilsonch gotdns com wrote:
Our school currently has one beefy LTSP server that we use for the
computer lab (15 Clients) and library (12 Clients). We have setup (2)
Dell
1710N network printers in the Lab & Library but how do you set the user
profiles so each location prints to the correct printer by default?
Thanks!

Thin Client network range (192.168.0.100-200 /24)
Lab Printer 192.168.0.10 /24
Library Printer 192.168.0.11 /24

Generic User accounts are created for each lab.
==Lab==
Station 1 - 15

==Library==
Library 1 - 12



Wilson Chan

_______________________________________________
K12OSN mailing list
K12OSN redhat com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>

_______________________________________________
K12OSN mailing list
K12OSN redhat com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>


_______________________________________________
K12OSN mailing list
K12OSN redhat com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]