53

I am not holding a camera, I do not need to hear a shutter sound to know I pressed the Print Screen key.

Other suggestions on the site encourage people to disable event sounds, but I use these. So it something I can hack out of the sound theme?

johndrinkwater
  • 735
  • 1
  • 5
  • 9

5 Answers5

61

Either disable system sound effects or, I am assuming you want to disable only the screen shot sound, move or rename /usr/share/sounds/freedesktop/stereo/camera-shutter.oga

sudo mv /usr/share/sounds/freedesktop/stereo/camera-shutter.oga /usr/share/sounds/freedesktop/stereo/camera-shutter-disabled.oga
Panther
  • 104,528
11

Another proposed solution is by doing the following:

  1. Run the command: sudo mv /usr/share/sounds/freedesktop/stereo/camera-shutter.oga /usr/share/sounds/freedesktop/stereo/camera-shutter-backup.oga
  2. Run the command after: sudo ffmpeg -f lavfi -i anullsrc -t 0.5 -c:a libvorbis /usr/share/sounds/freedesktop/stereo/camera-shutter.oga

ffmpeg comes with Ubuntu on a fresh installation, and the plugin anullsrc generates silence, outputting it as an Ogg Vorbis file format using the libvorbis library. It needs to be named as an OGA file, due to symbolic links associated with it. It needs to be 0.5 seconds long, otherwise, it may take a while for the screenshot feature to finish its job.

Tested on a clean installation of Ubuntu 16.04.6 LTS.

Source: https://stackoverflow.com/questions/32017827/how-to-create-silent-ogg-audio-file

7

Although I've not tested it, but it seems that /usr/share/sounds/freedesktop/stereo/screen-capture.oga is the sound you're talking about.

Try renaming or moving it.

Also, in the properties of screen-capture.oga it is said it has as target the file camera-shutter.oga. so, it is a link to the later. i guess touching any of these would eliminate the sound

green
  • 14,406
5
  1. Click on the sound icon at the upper right corner of the screen.
  2. Now click on the sound setting.
  3. Now click on sound effect mute screenshot sound in ubuntu

    Now mute sound from here.

  4. You have done. No Screenshot sound from now onwards.
Chai T. Rex
  • 5,323
imsaiful
  • 159
  • 1
  • 2
3

You temporarily rename the shutter sound file:

sudo mv -i /usr/share/sounds/freedesktop/stereo/screen-capture.oga /usr/share/sounds/freedesktop/stereo/screen-capture-disabled.oga

The use of -i helps to avoid accidentially overriding an old backup you have.

Important: You may need to logout and login again, in case the sound is cached in memory. For me login/logout was sufficient, but if that is not sufficient try rebooting.

To reactivate it move the sound file back:

sudo mv -i /usr/share/sounds/freedesktop/stereo/screen-capture-disabled.oga /usr/share/sounds/freedesktop/stereo/screen-capture.oga

You may need to logout/login again.

Note: In my system (Ubuntu 20.04) screen-capture.oga is a link to camera-shutter.oga, that's why the solutions moving instead camera-shutter.oga work as well.