-2

In my application I have to disable print key during the application process and later need to enable it. I have tried with xmodmap -e 'keycode 107 = ' but it doesn't resolve. The purpose of the disabling is user should not take the screen-shot while the application is running.

0
1

Disabling the PrintScr key only prevents clueless users from taking screenshots. It's almost trivial to change the session-wide short-cut key(s) to a different key combination via gnome-control-center keyboard shortcuts or its Unity/Xfce/KDE counterpart and on top of that one can also run a screenshot application like gnome-screenshot. In fact, any application connected to the same display server can request a copy of the frame buffer content.

If your application and its security model rely on not having screenshots taken of it, you need to seriously question its use case since that's just not going to happen. At the very least a user could simply take a photo of the screen.

2
  • I have removed executable permission from gnome-screenshot using command of sudo chmod -x /usr/bin/gnome-screenshot it's working fine but problem is asking password because we are using root privileges so how to execute same command without using root privilege. – Dinesh Jan 29 '18 at 7:12
  • @Dinesh: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. You’re welcome to send me a comment with a notification to draw my attention to it. Thanks. – David Foerster Jan 29 '18 at 11:59

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.