I want to make it so that when I press the print screen key on my keyboard, it actually includes the cursor. I know that it is calling gnome-screenshot, but I can't find any way to change the arguments it is using with it. If anyone knows about this, it would be greatly appreciated.


You can do this with dconf-editor but with command line as well. Here are the gsettings effecting gnome-screenshot:

gnome-screenshot gsettings.png

Use this command to check current settings:

gsettings get org.gnome.gnome-screenshot include-pointer

Use this command to turn on the option:

gsettings set org.gnome.gnome-screenshot include-pointer true

Use the same technique for the other gnome-screenshot settings.

Note you can get a list of all settings with gsettings list-recursively. For the screenshot above I used the technique in this answer:

And the one-liner code (works with yad only) is:

gsettings list-recursively | sed 's/  */\n/;s/  */\n/;s/\&/\&/g' | yad --list --title "gsettings" --item-seperator='\n' --width=1800 --height=800 --wrap-width=600 --column=Group --column=Key --column=Setting --no-markup

man gnome-screenshot tells us that

  -p, --include-pointer
          Include the pointer with the screenshot.

So you'll need to set up a new keyboard shortcut that incorporates -p:

enter image description here

Note that gnome-screenshot has a variety of options described in man gnome-screenshot to

  • capture the active window
  • capture the whole screen
  • capture a selected area
  • take a delayed screenshot

You can make your own shortcuts for each of these activities.

  • 4
    But how would the OP make it so that the PrintScreen key behaviour is modified to include this argument? – Byte Commander May 25 at 14:44
  • Yes, I'm adding that now. – DK Bose May 25 at 14:49
  • Thanks for the help, the way I am going to do it is adding new shortcuts from the + button at the bottom of the keyboard menu in settings. – redstoneguy12 May 25 at 15:01
  • @redstoneguy12 actually askubuntu.com/a/1146146/248158 is really elegant! – DK Bose May 25 at 15: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.