Results 1 to 3 of 3

Thread: How can I use the shell script to real-time detect the print job form word processors

  1. #1
    Join Date
    Feb 2019
    Beans
    2

    Question How can I use the shell script to real-time detect the print job form word processors

    I want to detect the print job that sends by the word processors (like LibreOffice, Openoffice), I know that use shell script to run the endless loop is a bad solution, so I want to know if there was any method to deal with this detection?

    I was stuck in this problem for weeks but still doesn't get any solution...


    OS: virtual box Ubuntu 16.04, use CUPS


    My English is not very well, but I will try my best to explain my question, hope somebody can reply to this question

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How can I use the shell script to real-time detect the print job form word proces

    I have no idea how to make it work, but inotify would be where I started. From the manpage:
    Code:
    NAME
           inotify - monitoring filesystem events
    
    DESCRIPTION
           The  inotify API provides a mechanism for monitoring filesystem events.
           Inotify can be used to monitor individual files, or to monitor directo-
           ries.   When  a  directory is monitored, inotify will return events for
           the directory itself, and for files inside the directory.

  3. #3
    Join Date
    Feb 2019
    Beans
    2

    Re: How can I use the shell script to real-time detect the print job form word proces

    Thank for your reply! I will search for more information about this solution to try its feasibility.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •