PKNOTIFY(1)

NOM
pknotify - page de manuel de pknotify 1.26_unofficial

DESCRIPTION
pknotify v1.26_unofficial (c) 2003, 2004, 2005, 2006, 2007 Jerome Alet - alet@librelogiciel.com

Notifies or ask questions to end users who launched the PyKotIcon application.

command line usage :

pknotify
    [options] [arguments]

options :

-v | --version
    Prints pknotify's version number then exits.

-h | --help
    Prints this message then exits.

-d | --destination h[:p]
    Sets the destination hostname and optional port onto which contact the remote PyKotIcon application. This option is mandatory. When not specified, the port defaults to 7654.

-a | --ask
    Tells pknotify to ask something to the end user. Then pknotify will output the result.

-C | --checkauth
    When --ask is used and both an 'username' and a 'password' are asked to the end user, then pknotify will try to authenticate the user through PAM. If authentified, this program will print "AUTH=YES", else "AUTH=NO". If a field is missing, "AUTH=IMPOSSIBLE" will be printed. If the user is authenticated, then "USERNAME=xxxx" will be printed as well.

-c | --confirm
    Tells pknotify to ask for either a confirmation or abortion.

-D | --denyafter N
    With --checkauth above, makes pknotify loop up to N times if the password is incorrect. After having reached the limit, "DENY" will be printed, which effectively rejects the job. The default value of N is 1, meaning the job is denied after the first unsuccessful try.

-N | --noremote action
    If it's impossible to connect to the remote PyKotIcon machine, do this action instead. Allowed actions are 'CONTINUE' and 'CANCEL', which will respectively allow the processing of the print job to continue, or the job to be cancelled. The default value is CANCEL.

-n | --notify
    Tells pknotify to send an informational message to the end user.

-q | --quit
    Tells pknotify to send a message asking the PyKotIcon application to exit. This option can be combined with the other ones to make PyKotIcon exit after having sent the answer from the dialog.

-t | --timeout T
    Tells pknotify to ignore the end user's answer if it comes past T seconds after the dialog box being opened. The default value is 0 seconds, which tells pknotify to wait indefinitely. Use this option to avoid having an user who leaved his computer stall a whole print queue.

    You MUST specify either --ask, --confirm, --notify or --quit.

    arguments :

-a | --ask : Several arguments are accepted, of the form

    "label:varname:defaultvalue". The result will be printed to stdout in the following format : VAR1NAME=VAR1VALUE VAR2NAME=VAR2VALUE ... If the dialog was cancelled, nothing will be printed. If one of the varname is 'password' then this field is asked as a password (you won't see what you type in), and is NOT printed. Although it is not printed, it will be used to check if authentication is valid if you specify --checkauth.

-c | --confirm : A single argument is expected, representing the
    message to display. If the dialog is confirmed then pknotify will print OK, else CANCEL.

-n | --notify : A single argument is expected, representing the
    message to display. In this case pknotify will always print OK.

examples :

    pknotify -d client:7654 --noremote CONTINUE --confirm "This job costs 10 credits"

    Would display the cost of the print job and asks for confirmation. If the end user doesn't have PyKotIcon running and accepting connections from the print server, PyKota will consider that the end user accepted to print this job.

    pknotify --destination $PYKOTAJOBORIGINATINGHOSTNAME:7654 \

    --checkauth --ask "Your name:username:" "Your password:password:"

    Asks an username and password, and checks if they are valid. NB : The PYKOTAJOBORIGINATINGHOSTNAME environment variable is only set if you launch pknotify from cupspykota through a directive in ~pykota/pykota.conf

    The TCP port you'll use must be reachable on the client from the print server.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Please report bugs to : Jerome Alet - alet@librelogiciel.com