As admin i want to block the clipboard access in Linux GUI. No user can copy data from terminal or other thing. In simple terms it means just block the copy option.


I don't expect you'd be be able to easily disable the X selection mechanism, but you could start a process that connects to every X server that steals the selections (and empty the CUT_BUFFER0) every time a process tries to own them. Here using xclip and xprop utilities, though you'd probably want to write a program that does the equivalent to make it more lightweight (especially if using a clipboard manager that would try and constantly steal back the CLIPBOARD selection off you).


for sel in clipboard primary secondary; do
  while xclip -i -sel "$sel" -q; do
    xprop -root -format CUT_BUFFER0 8s -set CUT_BUFFER0 ''
  done &
done <> /dev/null >&0 2>&0
  • for steals the selection for Admin it's not a big deal . there are lots of tools available to check it out. – Sanjay Nigam Oct 12 '16 at 10:13
  • i want genuine method to stop the copy & paste method – Sanjay Nigam Oct 12 '16 at 10:14

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.