On 06/15/2016 11:14 PM, Glenn McIntosh via luv-main wrote:
On 15/06/16 22:43, Andrew Greig via luv-main wrote:
lpr: Error - unable to access
"/home/andrewg/Pictures/Webcam/2016-06-15-223028.jpg.8QE9IY" - No such
file or directory
I don't know where the suffix after the .jpg is coming from, is that
what is stopping the progress?
Possibly whatever is creating the files is first creating a temporary,
and then moving it to the actual name.
If you simply run:
inotifywait -e ~/Pictures/Webcam
you will be able to observe what the sequence of events is.
If the file is being moved after creation, you would wait on the
'moved_to' instead of the 'close_write' in the script.
Glenn
Hi Glenn,
The script:
#! /bin/bash
inotifywait -m -e close_write ~/Pictures/Webcam --format "%w%f" | \
while read filename; do lpr -P HP "$filename"; mv "$filename"
~/Pictures/Webcam/printed; done
I appreciate your help with this. I was not able to get:
inotifywait -e ~/Pictures/Webcam
to return any data to me.
In the meantime I deleted my printer in CUPS and added it again with the
name "HP" and I tested the
lpr -P HP "$filename" bit to make sure it would work. I set the paper
size i the printer to 6"x4" photo, yet it printed out 4 tiled images for
the picure (1/4 each tile) is that what the format part of the script
was meant to correct?
4 years ago this script worked "out of the box" Apart from an OS
upgrade to OpenSuse 13.2 nothing else has changed
Many thanks
Andrew Greig
_______________________________________________
luv-main mailing list
[email protected]
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main