# Interact with end users with pknotify and pykoticon

Last modified on $Date: 2006-04-06 22:17:58 +0200 (Do, 06. Apr 2006) $

Printing under GNU/Linux and UNIX-Like systems usually lack features to dialog with end users. They usually submit their print jobs, and then wait for them to complete, most of the time silently.

Some add-ons to printing systems, like print accounting software, could however benefit a lot from being able to interact with users who submitted print jobs. That's exactly what allow the `pknotify` and `pykoticon` commands, and they do so in a completely generic way.

PyKotIcon is a cross-platform, generic, networked, dialog box manager which sits on client hosts and listen for incoming connections coming from the print servers. This application is in fact a small server which publishes some of its functions over XML-RPC. These functions offer the following possibilities :

- Display an informational message to the end user ;

- Display a message to the end user and asks for confirmation or cancellation. The result is sent back to the calling program, usually on the print server ;

- Asks the end user to fill a simple form containing a number of labelled fields. The values the user typed in are sent back to the calling program, usually on the print server ;

- Automatically shutdown the PyKotIcon application when asked to do so by an authorized host, usually the print server.

It is important to know that PyKotIcon is completely independant from PyKota and can be used outside of PyKota. In reality PyKotIcon knows NOTHING about print accounting, and doesn't need to. That's why it's distributed separately.

pknotify is a client program for PyKotIcon, which is usually launched from directives in `~pykota/pykota.conf`, but which can be used directly from the command line as well, if needed.

pknotify, through command line options, can use any of the functions published by PyKotIcon. In addition, if it is configured to tell PyKotIcon to ask the end user for an username and password, it can try to authenticate this user with this password on the print server side. This possibility is extremely useful when you allow anonymous logins on printing clients, but still want print accounting to be done on a per user basis : each time an anonymous user prints, we can ask him remotely to enter his authentication credentials. These credentials are then sent back to the print server (NB : in the clear for now), which uses them to decide if printing is to be denied, or allowed to continue until the next phase of print accounting and optional quota enforcement.

For more details, see `pknotify`'s manual page.

## Warning

While PyKotIcon sits on the printing clients, it is in fact a server application. While pknotify is run on the print server, it is in fact a client application to PyKotIcon.