# The KLpq Handbook

Christoph
Neerfeld

    chris@kde.org

16/08/1998
0.03.01

This Handbook describes KLpq Version 0.3.1

printer
queue
kde
qt
X11

## Introduction

Klpq is a frontend to the print spooler. Its primary purpose is displaying the print queue and removing jobs from the queue. But you can even disable/ enable printing or move jobs to the top of the queue, if you have the necessary access permissions.

Klpq does not modify the printqueue by itself, but uses the underlying commands: lpq, lprm and lpc. For this reason klpq should be safe as long as lpq, lprm and lpc are safe.

- supports BSD, PPR and LPRng spooling systems

- network transparency

- supports DRAG&DROP

## Install

    ./configure
    make
    make install

Klpq expects that you have a properly configured printcap file in /etc/printcap. If klpq is not able to parse your printcap, please send a copy of your printcap to me.

## Usage

klpq &lsqb; &lsqb;-n ] &lsqb;-P printer ] file1 file2 URL1 URL2]

On first startup klpq asks you which print spooler you use. Klpq supports BSD, PPR and LPRng. If you don't know which spooler is installed on your system you will most probably have BSD. If klpq does not display your printqueue try one of the other settings (You may change the spooling system from config->spooler).

Without any arguments klpq searches for the environment variable PRINTER and tries to display the contents of the corresponding queue. If PRINTER is not set, it displays the contents of the queue named 'lp'. If no queue with this name exists it displays the first printer queue in your printcap file.

With the file argument you may use klpq as a replacement for lpr. You don't have to type lpr file&lowbar;to&lowbar;print; klpq but may type directly klpq file&lowbar;to&lowbar;print. Klpq executes lpr for you. The -P option specifies the spool area to use. Currently no other options to lpr are supported.

The -n option tells klpq not to display the queue if a filename was given on the command line. E.g. klpq -n file&lowbar;to&lowbar;print lets klpq send the file to the printer and exit immediatly. klpq -n without file argument will start klpq as normal.

Klpq now supports URLs as arguments on the command line. Klpq will use KFM to copy the file to a temporary file on the local system and sends it to the printer. Please note that klpq must be running during the download. If you quit klpq earlier the files will not be printed.

DRAG&DROP: You may drag any URL out of KFM and drop it on the klpq-window. Klpq will copy the URL to a temporary file and send it to the printer.

Klpq is quite easy to use, so I just want to say some words about things that are not obvious:

If the Auto button is pressed down, klpq rereads the current printqueue every 'no' seconds, so you don't have to hit the Update button every time. You may change the 'no' of seconds by selecting config->Auto update from the menu. If you set 'no' to 0, then the Auto button will be completely disabled.

If you get the message This is a privileged command, than you have to be root or any other privileged user to execute this command and if you try to remove a printjob of another user, this is silently ignored.

There are several key accelerators defined:

- Key&lowbar;U: like pressing the 'Update' button.

- Key&lowbar;R: like pressing the 'Remove' button.

- Key&lowbar;T: like pressing the 'Make Top' button.

- Key&lowbar;A: like pressing the 'Auto' button.

- Key&lowbar;Left: displays the previous queue.

- Key&lowbar;Right: displays the next queue.

## Todo

- more KDE keyboard commands with kkeyconfig

- display all printqueues at once

- dock a mini status window into kpanel

- support more commands from lprng

- do a complete rewrite of klpq ;-)

Anything else?

## Author

My name is Christoph Neerfeld. I am a student of applied computer sciences at the University of Applied Sciences Sankt Augustin, Germany. Feel free to contact me and send me your reports, wishes or a postcard from your home town. I like to get postcards.

## Thanks

My thanks go to

- Victor Kolossov <kolosov\@iris1.itep.ru> for basic support for LPRng

- Remco Treffkorn <remco\@rvt.com> for basic support for ppr

and many other people for bug reports and suggestions.

## Copyright

    KLpq is Copyright 1997/98 Christoph Neerfeld chris@kde.org

    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., 675 Mass Ave, Cambridge, MA 02139, USA.