On Fri, 30 Mar 2001, Shaun Cloherty wrote:
> I have been working on an smbprint like script, written in tcl/tk which,
> rather than reading a password from a .config file, pops up a window and
> asks the user to enter their password. I plan to install this script as
> the input filter in the printcap entry.
>
> The script works like a charm when invoked directly, i.e.
>
> $ cat somefile.ps | /var/spool/lpd/hp4/smbprint.tk
>
> smbprint.tk pops up a window, I enter a password and it then calls
> smbclient to place the file (somefile.ps) in the NT print queue.
This won't work with lpd. lpd runs as a seperate user and shouldn't have
permission to pop up any window on a users display.
Perhaps you could write a two-stage system.
Something like:
1. A tcl/tk program is run when the user starts their X session
(i.e run it in xinitrc or somehere)
This program creates a pipe /tmp/.smbprint.<user> and listens to it.
2. When a user prints to the NT print share, the input filter opens the
appropriate pipe and asks for a password.
3. The tcl/tk program prompts the user for a password and passes it back
along the pipe.
4. The input filter uses the password to print to the NT print share.
How does that sound?
bye
--
8<--------8<--------8<--------8<--------8<--------8<--------8<--------
Ian Tester *8)# \7\ LINUX: because geeks will find a way
[EMAIL PROTECTED] \7\ http://www.zipworld.com.au/~imroy
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug