LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-09-2004, 05:39 AM   #1
mikejd
LQ Newbie
 
Registered: Mar 2004
Location: Rhynie, Aberdeenshire
Distribution: Opensuse
Posts: 10

Rep: Reputation: 0
cups - deleting print jobs


I have a problem with aborting print jobs when running cups.

My distro is Mandrake 10.0 and the current printer is an Epson Stylus Photo, but I also have Epson Stylus C62 and Canon BJ20 installed. I sometimes have to abort a print job, most often because I have not set the correct printer and the print-out is garbage. (The Stylus Photo is set to default but this doesn't always seem to work)

I have tried deleting the print job using 'localhost:631' and in Webmin. Turning the printer off then back on does nothing, it just starts to print again as soon as it's switched back on. Presumably the job is still being spooled. I have tried (as 'root') deleting files in /var/spool/cups/ to no avail. The only thing which works is to reboot.

Is there any simple way, short of rebooting, which will enable me to remove the files from the print queue? I would like, if possible, to set up a script which I can run from a Desktop icon to automate this.
 
Old 11-09-2004, 06:52 AM   #2
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Århus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Rep: Reputation: 45
I am not quite sure about cups, but try command 'lprm'.

Perhaps it helps.

Ott
 
Old 11-09-2004, 07:57 AM   #3
mikejd
LQ Newbie
 
Registered: Mar 2004
Location: Rhynie, Aberdeenshire
Distribution: Opensuse
Posts: 10

Original Poster
Rep: Reputation: 0
I get a message 'Unable to cancel jobs'

I tried to print a file with the printer switched off. Tried to cancel with 'lprm' - didn't work. Opened Webmin and Cups Printer Management (localhost:631), deleted job in Webmin, Cups showed no jobs. Switched on printer and it printed the file. It must be using /var/spool/cups as files have been added here, but I'm not sure what needs to be deleted. Any suggestions welcome.
 
Old 11-09-2004, 08:14 AM   #4
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
You can use the gtklp program. It comes with two binaries:
- gtklp: the GUI properties (like xpp).
- gtklpq: print queue administration.

All in gtk, and working good for me.

Of course, you can also try the HTTP interface. I don't like it, but it should work.

Yves.
 
Old 11-09-2004, 11:22 AM   #5
mikejd
LQ Newbie
 
Registered: Mar 2004
Location: Rhynie, Aberdeenshire
Distribution: Opensuse
Posts: 10

Original Poster
Rep: Reputation: 0
I've now tried this package with the same result. The print jobs are obviously being sent to a spool and deleting them from the print queue does not stop them being printed.
 
Old 11-10-2004, 05:06 AM   #6
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Maybe the problem you have is not with the computer's spool, but with the printer's. The printer also has memory. On my Epson, when I delete the currently printing job, I also have to clear the current job from the printer's memory. There's a key-combination for that, which I always forget, or I simply power-off, then on the printer.

Yves.

[edit:]For the record, I found the key-combination again for the clearing the Epson Stylus Color 900 memory spool: you have to double-click the power-on button, which on this model does not halt&restart the printer, but clear the spool instead [/edit]

Last edited by theYinYeti; 04-24-2007 at 08:17 AM.
 
Old 11-10-2004, 09:54 AM   #7
mikejd
LQ Newbie
 
Registered: Mar 2004
Location: Rhynie, Aberdeenshire
Distribution: Opensuse
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for the suggestion. I don't however think this is the answer as I have tried this to no effect before.

To test it, I have just sent a print job to the printer with it switched off. I then deleted the job in both CUPS Admin (localhost:631) and in Webmin. So no jobs were then queued. Switched the printer on and it printed the file. I assume the file could not have been in the printer memory as it was not switched on when the job was sent. I'm guessing here but it seems to me it must be spooled somewhere..

I've had this problem for so long now, and tried posting to various forums without success, that I guess I'll just have to live with it.
 
Old 11-10-2004, 10:09 AM   #8
mikejd
LQ Newbie
 
Registered: Mar 2004
Location: Rhynie, Aberdeenshire
Distribution: Opensuse
Posts: 10

Original Poster
Rep: Reputation: 0
More information which may or may not help :

Checked /var/spool/cups, last file was c00029
I tried printing a file with the printer OFF.
Webmin showed a queued job ID 30, CUPS admin showed queued job ID 30.
Checked /var/spool/cups/ files c00030 and d00030-001 had been added.
Deleted job in Webmin, CUPS admin showed no jobs queued.
Checked /var/spool/cups/ and file d00030-001 had been deleted.
Deleted file c00030 to be sure.
Switched on printer and it printed the file.

Question : where is the file being sent in addition to /var/spool/cups/ ??
 
Old 11-15-2004, 05:47 AM   #9
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
If this is really bug'ing you, then maybe you could try and make a diff (and have a walk while it is done)...
This is a VERY LONG process:
1) boot at the lowest runlevel you can (maybe 1 then start network & cups) with as little mounts as possible.
2) mount a partition with much spare space at an odd location:
mkdir /MyDumps
mount /dev/hdxx /MyDumps
mkdir /MyDumps/OLDSYS
mkdir /MyDumps/NEWSYS
3) take a snapshot of the system before printing.
(cd / && tar cf - --exclude=/MyDumps .) | (cd /MyDumps/OLDSYS && tar xpf -)
you'll have to check --exclude usage; I've never used this option.
4) print a single page of simple text, while the printer is off.
5) take a snapshot of the system after printing.
(cd / && tar cf - --exclude=/MyDumps .) | (cd /MyDumps/NEWSYS && tar xpf -)
you'll have to check --exclude usage; I've never used this option.
6) compare.
cd /MyDumps
diff -r OLDSYS NEWSYS >SYS.diff

Reboot into your usual environment and study the resulting SYS.diff file. (Of course, you can remove the empty /MyDumps dir when nothing is mounted on it anymore.)

Yves.
 
Old 11-15-2004, 06:09 AM   #10
naps
Member
 
Registered: Aug 2003
Distribution: 10.3
Posts: 55

Rep: Reputation: 16
I had a similar problem once which was sorted by deleting a lockfile, but I cannot remember the details.
naps
 
Old 01-31-2007, 12:03 PM   #11
se7ensnakes
LQ Newbie
 
Registered: Jan 2007
Posts: 1

Rep: Reputation: 0
where are the spooled files?

I have had the same problem.
I have an Epson dot matrix printer for printing three part forms and sometimes i accidently send a 200 page document to it.
I tried using lprm but lpq is not showing any pending jobs.
So where does it go?
I have had this problems for years......
during that time i had found a solution......unfortunately once i solved the problem at that time, i did not bother to note the file and when the problem occurs again a year later...... i cannot remember what i did a year ago.
Usually by restarting the computer it eliminates the problem but at the moment i have tried this and the 1000 page print job which i am trying to delete continues printing. The problem is clearly in Linux spooling........although this only happens to certain printers. It does not happen with my Hewlett Packard laser printers.
 
Old 05-15-2007, 09:48 AM   #12
amitzsekali
LQ Newbie
 
Registered: May 2007
Posts: 1

Rep: Reputation: 0
solution to inability to kill job queue in linux

I hope the original poster see this, it's been years..

fuser -k /dev/lp0

do the above as root.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HP LaserJet Series CUPS v.1.1 - Jobs never print Sloppyunderfoot Red Hat 1 04-29-2005 02:46 AM
cups aborts print jobs sneak Linux - Software 0 11-09-2004 05:45 PM
Keep a record of print jobs with cups exodist Linux - Software 3 11-02-2004 05:48 PM
Print Jobs Get Lost in CUPS Spool jmoutdoors Linux - Networking 1 12-17-2003 10:12 AM
deleting remote print jobs wingedlizard Linux - General 0 09-10-2003 05:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration