LinuxQuestions.org
Review your favorite Linux distribution.
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 03-07-2012, 12:31 PM   #1
23juanito
LQ Newbie
 
Registered: Mar 2012
Posts: 2

Rep: Reputation: Disabled
How to reset Print Job ID back to 0?


Hi!

Is there a way in linux or CUps to reset back the print jobID to 0 without reinstalling linux(Opensuse 11.0 in particular)?
 
Old 03-09-2012, 09:47 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 16,763
Blog Entries: 27

Rep: Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086Reputation: 5086
This LQ thread might help.
 
Old 03-14-2012, 11:45 AM   #3
23juanito
LQ Newbie
 
Registered: Mar 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thumbs up Got the solution!

Thanks for suggesting the link but I already saw it before I create this thread. Their solution only deletes the previous and hanging jobs, and maybe perhaps the entire history of the printer but none of those resets the assignment of Print Job ID back to 1. However, I found the solution myself, I am just not sure if there is a backfire in it.

Solution:
Every time CUPS stop (/etc/init.d/cups stop), the Scheduler is writing all the print jobs and the next job ID in "/etc/cups/yes/job.cache". Then, when CUPS starts again (/etc/init.d/cups start), the Scheduler will access "/etc/cups/yes/job.cache" (Job.cache maybe located in other directories) and copy all the print jobs and the next job ID to return to its previous state. To reset the assignment of print job ID back to 1, we could delete all the print jobs and change the "NextJobID" to 1. If it is necessary to clean up the entire print history, we can also delete all the Control job files in /var/spool/cups/ and the log files in /var/log/cups/ before starting the CUPS again.
Steps to reset print job ID back to 1:
Step 1: Stop CUPS
Step 2: Alter "/etc/cups/yes/job.cache". Delete all the previous jobs executed and change the value of "NextJobId" to 1
Step 3 (Optional): Go to /var/spool/cups/ and delete all the file that starts with 'c'. Go to /var/log/cups/ and delete everything inside
Step 4: Start CUPS

Thanks!

Last edited by 23juanito; 03-14-2012 at 11:49 AM.
 
  


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
Firefox, Okular don't put print job on the print queue (silently) pwabrahams Linux - Software 1 02-18-2011 08:39 AM
I need back support , to my new job, this is my first job ... help me plz? praveencheruku AIX 3 03-30-2010 08:37 AM
[SOLVED] Cups and Samba to print one print job to 2 printers - tutorial added bourne Linux - General 7 09-18-2009 11:10 AM
Can you start a job without getting the job number spit back out? BrianK Linux - General 5 12-13-2007 09:09 PM

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

All times are GMT -5. The time now is 12:33 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