Results 1 to 6 of 6

Thread: How to Monitor the Verious Actions in Ubuntu.

  1. #1
    Join Date
    Mar 2013
    Beans
    3

    How to Monitor the Verious Actions in Ubuntu.

    Hello Friends,

    I like to learn the new things with the approach - do something apart from your educational profile.

    Now, I need your expertise to educate me on some "How to's".

    Requirement :

    I want to create an application which will keep track of all copy/paste or cut/paste actions.

    I want to know what file user is trying to mirror and on what device.

    Could you please give me a hint, with which I write the program.

    - language neutral < means the solution could be anything c/c++/shell/perl >

    Regards,
    Anand

  2. #2
    Join Date
    Mar 2013
    Beans
    3

    Re: How to Monitor the Verious Actions in Ubuntu.

    Could anyone plz. help me?

    There are total 101 views but no one is able to respond. am I at wrong place with my question.
    I have asked it here because I felt that most of the Ubuntu masters are here....

    Someone plz. help.

    I am not expecting the program. but at least give me hint.

  3. #3
    Join Date
    May 2007
    Location
    Leeds, UK
    Beans
    1,664
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: How to Monitor the Verious Actions in Ubuntu.

    Quote Originally Posted by anandc8788 View Post
    I want to create an application which will keep track of all copy/paste or cut/paste actions.
    Clipboard actions and events are handled by the windowing system, which you can access with a windowing toolkit like GTK, wx or QT.

    Your choice of windowing toolkit depends on the systems you are trying to support, the language you prefer to use and whether you want the program to be cross-platform

    For example:

    http://python-gtk-3-tutorial.readthe...clipboard.html
    https://developer.gnome.org/gtk3/sta...lipboards.html
    https://developer.gnome.org/gtkmm-tu...pboard.html.en
    http://www.wxpython.org/docs/api/wx....ard-class.html
    https://qt-project.org/doc/qt-5.0/qtgui/qclipboard.html

    I want to know what file user is trying to mirror and on what device.
    Is this question still about the clipboard or are you talking about something else?

    language neutral < means the solution could be anything c/c++/shell/perl
    You will be restricted by the availability of language bindings for the windowing toolkit you select. You are most likely to find bindings for languages like C, C++ and Python but others may be supported.
    Please create new threads for new questions.
    Please wrap code in code tags using the '#' button or enter it in your post like this: [code]...[/code].

  4. #4
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: How to Monitor the Verious Actions in Ubuntu.

    For how to access the standard X selection from shell, see xsel and xclip.

  5. #5
    Join Date
    Mar 2013
    Beans
    3

    Re: How to Monitor the Verious Actions in Ubuntu.

    Hi r-senior, schragge,

    Thank you for your responses !

    Just by looking at the suggestions, it will allow me to understand what text user is attempting to copy from within the file.

    However, my area of interest is to monitor - what files/folders user is attempting to copy/paste ( i.e. Mirror on some other device like usb storage ).

    I will program the remaining part, just need Hint to understand how to recognize the system copy/paste events.

  6. #6
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,098
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: How to Monitor the Verious Actions in Ubuntu.

    I once wrote a program to maintain a "clipboard history" - for Linux and Windows. I don't remember whether it used Qt or wxWidgets. The method I used was simply to poll the clipboard(s) every 200ms or so and save if it had changed. I think KDE's klipper does something like this and there are other implementations.

    I'm not sure that your objective of finding out which "file" the copy comes from is achievable. Copying may not necessarily be from a "file", or a user might do for example "cat foo.txt" then copy from the terminal window. Similary, the user might paste into a new untitled document. You don't know at that point that it will later be saved to usb storage. A user might also copy from the original file to an untitled document, then copy from the untitled document to another document. I can't see how you can realistically audit these actions.

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
  •