Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am working with an old CentOs version (5.0) that is not really my machine.

Recently, for some dark reasons, I have problems in printing.

The jobs rest in queue, and I cannot cancel them from the bar icon.

I have tried with some terminal commands (cancel -a ask for a password, which I don't have, lpq -a, and other things of what I don't really know the meaning), but the job is still stuck at the printer icon.

Do you have any suggestions?


The image explains my situation and how the first answer can not fix this.

crony is the name of another printer, while the one I use is crust.

enter image description here

share|improve this question
1  
If you have CUPS web-interface running I'd try to cancel a print job from there. Usually it works for me localhost:631 –  UVV Jul 10 at 6:14

1 Answer 1

up vote 5 down vote accepted

To cancel a print job :

  1. List all jobs:

    lpq 
    Rank   Owner/ID              Class  Job Files       Size Time 
    active bob                   A      11  zarma.txt   8000 10:12:10
    
  2. Delete the job by it's id, which is 11 here:

    lprm 11
    

You must be root to delete jobs that you don't have initiated.

If the printer is not the default printer, add the -P option, e.g.

    lpq -P crust
    lprm -P crust …

Supposing that :

If lpq didn't show any printing jobs, it is because they are no more in the queue.

If as shown by the screen copy the printer status is unknown, perhaps the line remains because the tool is missing the printing status.

Perhaps the job has already been submitted and the job will be cancelled, when the communication with the printer is established.

Is it a link problem or is the printer down?

share|improve this answer
    
Thanks for your post, but it does not work. I have edited my post to explain it better. –  Py-ser Jul 10 at 6:21
    
@Py-ser To select which printer to act on, use the -P option (see my edit) –  Gilles Jul 10 at 22:57
    
@Gilles, it is not a matter of selection, it is a matter that the lpq command does not see any job in queue, but the printer window does! –  Py-ser Jul 11 at 0:43
    
@Py-ser By running lpq with no argument, you ask it to list the jobs on the default printer, which for you is crony. So it doesn't show any job. There is no contradiction with the printer window which shows a job on a different printer (crust). –  Gilles Jul 11 at 0:46
    
@Gilles, I see. So how can I print on terminal the jobs of another printer? I tried lpq -P crust, but the output is the same (with just a different printer name). –  Py-ser Jul 11 at 0:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.