Screenshots stopped working [SOLVED]
Problem encountered in Ubuntu 20.04 LTS using GNOME.
When I first installed Ubuntu the Screenshot function worked fine. I hit PrtSc, the GUI flashed and clicked, and a screenshot appeared in my /home/[user]/pictures folder. At some point this stopped working. It is a particularly vexing problem, as it prevents me from sharing visual representations of other problems I'm having.
Because I do not know when it stopped working, I do not know what might have caused it. Some possibilities that come to mind are:
I removed the Pictures folder from the left-side quick launch bar. The folder itself has not moved.
I disabled GNOME animations. I don't see how this would be related, but there was a pretty notable animation involved in taking a screenshot, so it is at least vaguely related.
While playing World of Warcraft Classic through Lutris, I was not able to take screenshots. I eventually resolved this by setting the in-game screenshot function to - on the numkey pad. I have had other issues with WoW + Lutris causing keyboard shortcuts to behave strangely, though nothing that effected the environment outside of the game itself.
So far, in attempting to solve the problem, I have:
Confirmed that Ubuntu still has the PrtSc key set to save a screenshot in Settings>Keyboard Shortcuts.
Confirmed the PrtSc key on my keyboard still works by re-setting the shortcut (which requires Ubuntu to recognize a print screen key press).
Confirmed that screenshots still don't work when another shortcut is set to that function.
Interestingly, keyboardchecker.com does not register PrtSc keystrokes on my primary keyboard, or with a test keyboard. I do not know if this is normal behavior.
Questions & Clues:
When I hit the PrtSc key, I do see very minor visual effects. Scrollbars slightly changing color while it is pressed down.
How can I check what $PICTURES is set to? (The folder screenshots are supposed to be saved in?)
SOLUTION:
Taken from Colan Schwartz' comment on Ubuntu bug report #1742443. This does not exactly solve the problem, but it is clean and simple enough that I am entirely satisfied with the result. I also used A comprehensive guide to taking screenshots in Linux using gnome-screenshot to refine my solution to suit my own needs.
In Settings > Keyboard Shortcuts under the “Screenshots” subheading, disable everything so that there are no keyboard shortcuts associated with taking screenshots.
Hit the “ + ” button at the very bottom of the Keyboard Shortcut list to add a new shortcut.
First new shortcut: Name “Print Screen” / Command “gnome-screenshot” / Shortcut [Print Key]
Second new shortcut: Name “Interactive Print Screen” / Command “gnome-screenshot –interactive” / Shortcut [Ctrl + Print Key]
Third new shortcut: Name “Single Window Print Screen” / Command “gnome-screenshot -w” / Shortcut [Alt + Print Key]
Unfortunately there is still an annoying flash when the function is used. Rado84 on the Linux.org forums seems to have written a solution to this problem, but I've opted not to use it myself.