kprinter und CUPS

Kurt Pfeifle kde-print@mail.kde.org
Tue, 01 Apr 2003 21:34:50 +0200


Arnulf Quadt wrote:
>>Arnulf Quadt wrote:
>>
>>>I have a problem with printing under CUPS and KDE (3):
>>> From the command line every user and root can print with
>>>lp -d printername file.ps
>>>
>>>
>>>If I want to print using kprinter only root can do this.
>>
>>Please start kprinter. Don't print, instead select "System
>>Options..." (button at bottom). Choose "CUPS server" (icon
>>on the left). Check which "Host" and "Port" is there configured
>>for root.
>>
>>Then do the same as a mortal user. See if it is different for
>>both.
>>
> 
> It is the same for both, root and mortal users.
> 
> 
>>Then, start "kprinter" and click "Properties". Select the
>>"Filters" tab. Check if there are any filters enabled. If so,
>>de-select all. "Save" & "OK".
> 
> No filters are present for root. For mortal users kprinter freezes
> and uses 99% CPU when clicking on "Properties".
> 
> 
>>Next, set "LogLevel debug" in "/etc/cups/cupsd.conf". Restart
>>cupsd. Do a
>>
>>  "tail -f /var/log/cups/error_log" and a
>>  "tail -f /var/log/cups/page_log"
>>
>>in 2 different xterms while kprinter is hanging.
> 
> 
> page_log does not exist and nothing special appears in error_log while
> kprinter starts hanging. It only show the long list of printers added
> from the CUPS server, one by one ...
> 
> 
> 
> 
>>>regular users do get the kprinter window, but clicking on the
>>>`print' button results in frizing this window and a CPU
>>>absorption of 99% by kprinter.
>>
>>Is it really the "kprinter" process consuming the CPU?
> 
> Yes, it is kprinter.
> The temporary postscript files are written to /tmp/kde-$USER/...
> For example trying to print a text file

*How* are you trying to print the text file?

* From "kate" or "kwrite"?
   --> I seem to remember about a bug back in 3.0.x which caused an
       endless loop when generating the PostScript..... (not a "kprinter",
       but a "kate" bug....)
   --> Are there any kate-specific features enabled? Try to disable
       them.

* Starting "kprinter" from the commandline, then selecting the
   text file?
  --> this will offer two choices:
      a) let kdeprint do the text-->postscript conversion and send
         PostScript to CUPS
      b) don't convert and send ASCII and trust CUPS to do the text-->
         -->postscript conversion.

* Can you print other file types from kprinter?

* Is it the same for *all* mortal users or just a specific one?
   Is it the same for all printers? (If you have only one, can you
   create another one and try with this? Just start "kaddprinterwizard"...)
   Have you created a new user and tried with this one too?

> kprinter does the conversion
> to the ps file and writes that one to /tmp/kde-$USER/...
> but it does not send it to CUPS and hangs instead !

Does it finish writing this file? Or is the file ever-increasing?

How many printers are visible to kprinter? Are these local ones
or remote ones (defined on another CUPS server)?

> The `funny' thing is that this happens on a Linux cluster, namely 
> on the server, while printing from any client via kprinter works
> just fine.

Try to delete the user's "$HOME/.kde(3)/share/apps/kdeprint/" and
re-start kprinter. If it is related to "kate", delete
"$HOME/.kde(3)/share/apps/kate/". Also, try to delete the
"$HOME/.lpoptions" file plus the "/etc/cups/lpoptions" one
(should they exist).

* Do you see incompleted jobs (from the commandline issue
   "lpstat -o")?

Since it is OK for root and for the other clients (which are
running the same KDE version), it may be caused by some faulty
user-specific setting (I guess you double-checked all the user
permissions on tmp dirs etc.?)

>>>My suspicion is that kprinter works in two steps, first 
>>>preparing/spooling the print job and then secondly sending the
>>>resulting tmp file to the printer via lp and CUPS. Could it be
>>>that a temporary spool directory does not have the correct
>>>permissions set or that some config file is corrupted ?
>>>
>>>What does kprinter do before sending something to CUPS ?
>>>In which directory does it write its tmp files ?
>>>
>>>Thanks a lot for your help !
>>>
>>>  Arnulf
>>>
>>>The version are (SUSE 8.1):
>>
>>Have you checked the SuSE 8.1 Support Database for any entries?
> 
> No solution found there either...
> 
> 
>>>Qt: 3.0.5
>>>KDE: 3.0.5
>>>kprinter: 0.0.1
>>>cups: 1.1.15-46
> 
> _______________________________________________
> kde-print mailing list
> kde-print@mail.kde.org
> http://mail.kde.org/mailman/listinfo/kde-print
>