LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-13-2017, 06:40 AM   #1
Haines Brown
LQ Newbie
 
Registered: Nov 2010
Location: Hartford, CT
Distribution: Devuan Jessie
Posts: 27

Rep: Reputation: 0
Change default CUPS-PDF save directory


CUPS-PDF normally creates a directory ~/PDF in which to save the PDFs created. I want to change
the default save directory instead to ~/Downloads/PDF. I'm running Devuan Jessie.

The first problem is that my spool directory is /var/spool/cups-pdf has two subdirectories,
ANONYMOUS and SPOOL rather than a username subdirectory. Which of these is really the cups-pdf
spool directory?

To redirect PDF spool files, I stole a script:

#!/bin/sh
SPOOL_DIR=/var/spool/cups-pdf/
USERS_DIR=/home/haines/Downloads/PDF/

inotifywait -mq --timefmt '%Y%m%d %H%M%S' --format '%T %f' \
-e close_write $SPOOL_DIR \
| while read date time file; do
mv $SPOOL_DIR${file} $USERS_DIR${date}${time}_${file}
done

When run it produces the error:

11: /home/haines/scripts/cups-pdf: inotifywait: not found
 
Old 08-13-2017, 07:08 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,498

Rep: Reputation: 4110Reputation: 4110Reputation: 4110Reputation: 4110Reputation: 4110Reputation: 4110Reputation: 4110Reputation: 4110Reputation: 4110Reputation: 4110Reputation: 4110
The default output directory is /var/spool/cups-pdf/user. You can change the output directory in the cups-pdf.conf file to ${HOME}/Downloads/PDF without needing to use inotify.

Normally you would need to install the inotify tools package to use inotifywait. Not sure if Devuan is the same.
 
  


Reply

Tags
cups, save


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
[SOLVED] Change default directory for 'open' and 'save' in KWrite? qajaq Linux - Software 9 03-04-2014 08:15 PM
[SOLVED] lp doesn't print file to pdf directory after installing cups-pdf using synaptic mrcj Debian 1 10-09-2013 07:18 PM
How to wget a webpage, and save as PDF (like cups-pdf) ? frenchn00b Programming 3 11-18-2008 03:48 PM
Change default Save page directory on FF 2 suguru Linux - Software 4 06-28-2007 06:45 AM
change default save directory canyon289 Linux - Software 1 10-24-2004 12:16 AM

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

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