[K12OSN] Re: LTSP: is it possible to specify networked printers per thin client?

Jim McQuillan jam at McQuil.com
Mon Jan 29 01:47:24 GMT 2007

john wrote:
> Thanks Jim. I feel honored when I get a response from you in person, 
> pretty darn cool.

careful... my head is already rather large :)
> I am using Ubuntu, but I am using LTSP 4.2 not MUkow. I am also using 
> cups (via the (gnome-cups-manager) to manage printers. The printer is 
> shared via smb://  Using your example below would I just do something 
> similar to:
> case `echo $DISPLAY | sed s/:.*$//` in
>   ws004)   lpoptions -d smb://pathtoprinter;;
>   ws005)   lpoptions -d smb://pathtootherprinter;
> esac

Well, doesn't cups assign a simple name to your printers, that you can 
use from the command line? 


     lpstat -l -a

to get a list of printers that cups knows about.  The name that shows as 
the first word of each line is the name you want to use in the lpoptions 


> Thanks again for your help.
> John
> On 1/28/07, *Jim McQuillan* <jam at mcquil.com <mailto:jam at mcquil.com>> 
> wrote:
>     John,
>     what you are trying to do, really isn't LTSP related at all.
>     It just so happens that your users are connection with LTSP terminals,
>     and the printers are attached to LTSP terminals.  Other than that,
>     it's
>     really a printer management issue on the server.
>     You want one users default printer to be printerA, and another users
>     default printer to be printerB.
>     Assuming that you've got your printers all configured in CUPS on the
>     server, you can use the 'lpoptions' command to set a default for
>     each user.
>     Because a user may log into ws004 in the morning, and then log into
>     ws005 in the afternoon, you'll need to call lpoptions each time
>     the user
>     logs in.  the /etc/profile script might be a good place to put this.
>     The magic scripting you'll need to add is something like this:
>     case `echo $DISPLAY | sed s/:.*$//` in
>       ws004)   lpoptions -d printerA;;
>       ws005)   lpoptions -d printerB;;
>     esac
>     That way, each time a user logs in, it checks the current terminal
>     that
>     they are logging in with, and it sets their default printer
>     accordingly.
>     If you are using Ubuntu's LTSP, you can't use the $DISPLAY, you'll
>     have
>     to use another env variable, like $SSH_CLIENT, which has a different
>     format.  do:  echo $SSH_CLIENT to see what the value looks like.
>     Hope that helps,
>     Jim McQuillan
>     jam at Ltsp.org <mailto:jam at Ltsp.org>
>     john wrote:
>     > Hi all,
>     >
>     > I want to use networked printing on my thin clients and specify
>     it per
>     > station ( e.g tell ws004 to print to networked printer A and
>     ws005 to
>     > print to networked printer B).
>     >
>     > My reading of lts.conf it appears to say that one can only do this
>     > with local printers. Can anyone help me figure out if what I want to
>     > do is possible?
>     >
>     > TIA!
>     >
>     > John
> ------------------------------------------------------------------------
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>

More information about the edubuntu-users mailing list