If you can’t find an epson scanner when using scanimage -L you may want to run
this short applescript that kills the Epson scanner process. Turns out it opens
the scanner in exclusive access and doesn’t let it go.
A variant of this may work with other brand scanners also.
-- Kill any Epson monitor that is running in exclusive mode
try
set results to (do shell script "ps -xww | grep 'MacOS/EPSON Scanner'")
set AppleScript's text item delimiters to {return & linefeed, return,
linefeed, character id 8233, character id 8232}
set results to text items of results
set AppleScript's text item delimiters to {""}
log (count of results)
set firstLine to item 1 of results
if ((count of results) > 2 and firstLine contains "MacOS/EPSON Scanner")
then
set pid to word 1 of firstLine
set results1 to (do shell script "logger 'Forcing Epson Scanner to
quit, PID: '" & pid)
set results2 to (do shell script ("kill " & pid))
else
set results3 to (do shell script ("logger 'Epson Scanner not running'"))
end if
end try
--
sane-devel mailing list: [email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to [email protected]