Disable gnome-screenshot's 'camera flash' animation

How can I disable the gnome-screenshot 'camera flash' animation (fade from black)? I've already disabled the camera shutter sound with sudo mv /usr/share/sounds/freedesktop/stereo/camera-shutter.oga /usr/share/sounds/freedesktop/stereo/camera-shutter-disabled.oga. There doesn't seem to be a setting for this in the Dconf editor (under /org/gnome/gnome-screenshot).


Unfortunately there is no option to disable this... I was looking for working tool to grab screen for Ubuntu Focal (previously I've used scrot but it stopped to work, right now only gnome-screenshot is still dumping screen content to file but with annoying flash). So I've recompiled sources from https://github.com/GNOME/gnome-screenshot

  1. git clone https://github.com/GNOME/gnome-screenshot.git && cd gnome-screenshot
  2. In file src/screenshot-backend-shell.c replace all occurrences of TRUE, /* flash */ with FALSE, /* flash */ (you can do that with sed command: sed -i 's#TRUE, /\* flash \*/#FALSE, /\* flash \*/#' src/screenshot-backend-shell.c)
  3. Install dependencies (in my case it was meson, ninja-build, libgtk-3-dev and libhandy-1-dev)
  4. Compile project:
    • meson setup build
    • meson test -C build
  5. Enjoy your new gnome-screenshot tool without flash: ./build/src/gnome-screenshot --file out.jpg