4

I would start with a simple scenario so what I'm asking is easily understood.

I usually have a text editor like leafpad, notepad++ or some text-editor as a scratchpad. I jot down things, ideas, scribblings and when it makes sense, just copy and paste like I am doing for this question here.

Sometimes, I copy (Ctrl+c) or cut (Ctrl+x) and forgot to paste (Ctrl+v). I know that the contents are in the clipboard/copy buffer and is there if I come back before the system's screensaver and locker comes into the picture. I have seen when I unlock that the clipboard/copy buffer is empty.

I have been wondering if there was a way to to tell the system that if there is something in clipboard/copy buffer keep it for say 30-60 minutes or if needed just 5 minutes (if you are in insecure environment). Is there a way to do it?

I am using mate-screensaver as the default screensaver.

  • There are too many variables to know when the memory would be allocated to another process. It could stay indefinitely or be rewritten as soon as it's freed. You could only manipulate it if you have kernel-level access. – melds Jan 12 '17 at 23:48
  • It stays in memory until the system's garbage collector destroys it. – answerSeeker Jan 13 '17 at 2:54
  • @melds - I do have kernel-level access, please share how it can be manipulated/set ? – shirish Jan 13 '17 at 8:12
  • 1
    So, the traditional way an X11 "clipboard" (technically, "selection") works is that an app claims the clipboard when you copy something. Then when you paste, that app asks the X server who currently owns the clipboard, and then asks that app for the contents. If you happen to close the app you copied in, your clipboard goes away. Various desktop environments have added clipboard widgets, though, that will perform that request as soon as you copy something, then persist it (by claiming the clipboard themselves). So you probably need to find that widget/applet/etc. Then edit this to be clearer – derobert Jan 13 '17 at 17:02
  • 5
    This question is not too broad. It can easily be answered: the clipboard content remains accessible until it is replaced, or until the owner application relinquishes it (the second condition works differently for the mouse-selection/middle-click-to-paste and the Ctrl+C/Ctrl+V clipboard). Unless, that is, there is a clipboard manager. – Gilles Jan 13 '17 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.