Hello John, hello Frank,
thank you for this great ideas. I will try it next time (friday).

I understood the first facility, but maybe you can explain the second one a 
little bit more.

1. If I set the printer variable, it accesses the given queue on a local cups 
server?
2. If this is so, can the users access the other queues, or only this one?
3. This was a good cause for thought. If you can set the default printer like 
this, won't it be possible to install a printer with a script. So that you 
don't had any printers before, but in the script are the commands to install 
a printer temporary for only one user depending on the terminal name?

Bye
Alex

Am Samstag 18 November 2006 18:56 schrieb John Lucas:
> First things first. There has to be print queues defined for every printer
> you intend to use. If those print queues match the terminal name *or* you
> have a terminal to print queue mapping in mind, you could use pretty much
> the same logic as Frank used but generalize it for pretty much any
> Linux/Unix setup by using the "PRINTER" environment variable (not dependant
> on CUPS):
>
> =========================================================================
> # This script is meant to be invoked within ~/.bash_profile
> #
> # Assign pre-built printer queues to local terminal as default
> #
> # First let us save the currently assigned printer
> #
> OLDPRN=$PRINTER
> #
> # Next we find out which terminal we are currently using
> #
> TERMNAME=`echo $DISPLAY | cut -d: -f1`
> #
> #
>
> case $TERMNAME in
>         # Only put matches for pre-built print queues matching termname
>         term1)
>               export PRINTER=$TERMNAME
>       ;;
>       term2)
>               export PRINTER=$TERMNAME
>       ;;
>       *)
>               export PRINTER=$OLDPRN
>       ;;
> esac
> ==========================================================================
>
> This assumes is called from within the user's ".bash_profile" file
> (or /etc/bash_profile):
>
>       . /usr/local/share/set-prn.sh
>
> It also assumes that the PRINTER variable is set to some sensible default
> to begin with. I create symbolic links in users home directory that point
> to shared .bash_profile (and .bashrc and .icewm), so I can guarantee such
> things. The default case ("*)") could be set to any valid printer instead
> or no default at all.
>
> This won't work without setting up the queues properly and enabling print
> service on the terminal (making them look like HP JetDirect print servers)
> to allow them to be targets in the queue definition.
>
> Not all terminals will be running as print service targets, so there should
> be a sensible default set somewhere.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net

Reply via email to