[K12OSN] print based on location
Tim Scholten
tscholten8 at hotmail.com
Mon Aug 30 20:07:39 UTC 2004
thanks for the help, lpoptions works to set the printer at the command line
but not in the script. This is probably a scripting issue. I am a newbie, so
any help is appreciated
this is the script i am trying to use:
workstation='who -m|cut -d\( -f2|cut -d\) -f1'
case $workstation in
ws240.ltsp)
'lpoptions -d ws240';;
ws238.ltsp)
'lpoptions -d ws240';;
ws237.ltsp)
'lpoptions -d ws240';;
ws236.ltsp)
'lpoptions -d ws240';;
esac
i know that the 'who -m|cut -d\( -f2|cut -d\) -f1' will give
"ws240.ltsp:0.0"
thanks,
Tim
>Tim Scholten wrote:
>> hi
>> I am trying to make it so that when a user prints, it will print to
>>the printer in the same room. >>I looked in the archives an found this
>>thread http://www.redhat.com/archives/k12osn/2003-October/msg00139.html ,
>>exactly what i am trying to accomplish here.
>>
>> I tried using his script in /etc/profile.d/ with the changes for this
>>location, but the default printer is still the original default.
>>
>>Is there else who has had a similar situation? If so what was your
>>solution?
>>
>>thanks for any help,
>>Tim
>>
>Ok, the answer is - use 'lpoption -dprintername' from within the script.
>It updates ~/.lpoptions with the new default, overriding the cups default
>printer for that user.
>Wouldn't hurt to do that in addition to setting PRINTER env variable.
>
>See 'man lpoptions'
_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
More information about the K12OSN
mailing list