<div dir="ltr"><div>This could be workaround for the LDM_PRINTER_DEFAULT<br><br>lpoptions -d Default-Printer-Name-You-Want<br><br></div>This script could be modified to run the command. <a href="https://github.com/gdi2k/mac2xrandr">https://github.com/gdi2k/mac2xrandr</a><br>

<div><br>---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Michael Blinn</b> <span dir="ltr"><<a href="mailto:mblinn@peopleplaces.org" target="_blank">mblinn@peopleplaces.org</a>></span><br>



Date: Fri, Dec 7, 2007 at 5:47 AM<br>Subject: Re: [Ltsp-discuss] Set printer dwfault & permission<br>To: <a href="mailto:ltsp-discuss@lists.sourceforge.net" target="_blank">ltsp-discuss@lists.sourceforge.net</a><br><br>

<br>


  
  


Abu.Zahra:<br>
<br>
  I use the following script, originally written by Peter Scheie, to
set the default printer. Unfortunately, evince doesn't respect it [UPDATE: it does now]  -
most everything else does. I'm not sure how to allow an unprivileged
user restart a queue, sorry.<br>
<br>
Cheers,<br>
 Michael<br>
<br>
<br>
#!/bin/sh<br>
# Set default printer based on which workstation is being used<br>
# Propers to Peter Scheie (<a href="mailto:peter@scheie.homedns.org" target="_blank">peter@scheie.homedns.org</a>)<br>
ws=$(echo $LTSP_CLIENT|cut -d. -f1)<br>
case $ws in<br>
   ws0-007 ) lpoptions -d CupsPrinterName ;;<br>
   ws0-017 ) lpoptions -d Shared_Color_Printer ;;<br>
   ws1-007 ) lpoptions -d OtherCupsPrinter ;;<br>
   # and so on for the library workstations<br>
<br>
   # now assign printers for the lab workstations<br>
   # ws013 ) lpoptions -d lab_printer ;;<br>
   # ws014 ) lpoptions -d lab_printer ;;<br>
   # and so on<br>
esac<br>
<br>
### End of script<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 14, 2014 at 1:32 PM, Nick Fenger <span dir="ltr"><<a href="mailto:nick.fenger@gmail.com" target="_blank">nick.fenger@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Veli-Matti et al,<br><br>Have you/anyone figured out how to read the LDM_PRINTER_LIST setting from lts.conf with fat clients?<br>

<br></div>In a thin client setup, I notice PRINTER_LIST is passed when XSession is started, which is not the case with fat clients.<br>

<br>ltsp005   1000  0.0  0.0  12312   272 ?        Ss   May13   0:00 bash -c  XDG_DATA_DIRS=/tmp/ltsp-localapps-ltsp005-BFCbvt/:/usr/local/share/:/usr/share/ LTSP_CLIENT=10.0.40.103 LTSP_CLIENT_HOSTNAME=ltsp005 <b>PRINTER_LIST=LEP-Room-205,The-Printer-In-This-Room</b> LIBGL_ALWAYS_INDIRECT=true LC_ALL=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 DISPLAY=<a href="http://10.0.40.103:7" target="_blank">10.0.40.103:7</a>  PULSE_SERVER=tcp:<a href="http://10.0.40.103:4713" target="_blank">10.0.40.103:4713</a> ESPEAKER=<a href="http://10.0.40.103:16001" target="_blank">10.0.40.103:16001</a> LTSP_ALSA_DEFAULT=pulse <b>/etc/X11/Xsession</b> "default" < /dev/null > /dev/null ; /usr/sbin/ltspfsmounter all cleanup<br>



<br></div><div><div class="h5"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 5, 2011 at 6:48 AM, Veli-Matti Lintu <span dir="ltr"><<a href="mailto:veli-matti.lintu@opinsys.fi" target="_blank">veli-matti.lintu@opinsys.fi</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello everyone,<br>
<br>
I'd have a quick question about the CUPS printer filtering patch that is in the Ubuntu CUPS version (the patch can be found at least here: <a href="http://patches.ubuntu.com/by-release/extracted/ubuntu/c/cups/1.4.1-5ubuntu2/printer-filtering.dpatch" target="_blank">http://patches.ubuntu.com/by-release/extracted/ubuntu/c/cups/1.4.1-5ubuntu2/printer-filtering.dpatch</a>)<br>




<br>
If I understand correctly, it is used on LTSP systems by adding LDM_PRINTER_LIST setting in lts.conf which is then turned to PRINTER_LIST environment variable when the user logs in. The patch above then filters not listed printers out from the user's printer list.<br>




<br>
As here we are running quite a few fat clients that have their own local USB printers, we changed from configuring fat clients to use LTSP server's cups via /etc/cups/client.conf and instead run a local CUPS server on the fat clients. The CUPS server on the LTSP server broadcasts printer information to the LTSP network and the local CUPS processes on the fat clients then pick up the printers from the broadcasts. CUPS adds local USB printers automatically and they don't need to be configured through server lts.conf. Of course they are not usable by other users in the network, but it's not a problem.<br>




<br>
This works nicely as long as we want to show all printers to the user. In bigger environments where a cluster of servers serves many schools, this doesn't work so nicely and that's where the LDM_PRINTER_LIST setting helps. The problems come when we want to show also the local USB printers that CUPS configures automatically when they are attached. As the LDM_PRINTER_LIST doesn't include the local printers, they are always filtered out from the printer list.<br>




<br>
We've been now doing some test patches to filter out only printers that are not local, but I'd be interested to know if anyone else has tried using a setup like this? The same filtering could be also applied to laptops if the PRINTER_LIST env variable is set somewhere when the user logs in.<br>




<br>
Ideas? Comments?<br>
<span><font color="#888888"><br>
Veli-Matti<br>
<br>
--<br>
edubuntu-users mailing list<br>
<a href="mailto:edubuntu-users@lists.ubuntu.com" target="_blank">edubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/edubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/edubuntu-users</a><br>
</font></span></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>