禁用 gnome-screenshot 的“相机闪光灯”动画

1''*_*1'' 12 gnome screenshot dconf gnome-screenshot

如何禁用 gnome-screenshot 'camera flash' 动画(从黑色淡入淡出)?我已经用 禁用了相机快门声音sudo mv /usr/share/sounds/freedesktop/stereo/camera-shutter.oga /usr/share/sounds/freedesktop/stereo/camera-shutter-disabled.oga。在 Dconf 编辑器中(在 下/org/gnome/gnome-screenshot)似乎没有设置。

小智 8

不幸的是,没有选项可以禁用此功能...我一直在寻找工作工具来抓取 Ubuntu Focal 的屏幕(以前我使用过,scrot但它停止工作,现在仍然gnome-screenshot将屏幕内容转储到文件,但带有烦人的闪烁) 。所以我从https://github.com/GNOME/gnome-screenshot重新编译了源代码

  1. git clone https://github.com/GNOME/gnome-screenshot.git && cd gnome-screenshot
  2. 在文件中src/screenshot-backend-shell.c替换所有出现的TRUE, /* flash */with FALSE, /* flash */ (您可以使用 sed 命令来做到这一点sed -i 's#TRUE, /\* flash \*/#FALSE, /\* flash \*/#' src/screenshot-backend-shell.c:)
  3. 安装依赖项(在我的例子中是mesonninja-build和)libgtk-3-devlibhandy-1-dev
  4. 编译项目:
    • meson setup build
    • meson test -C build
  5. 享受没有闪光灯的新gnome-screenshot工具:./build/src/gnome-screenshot --file out.jpg