46

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?

1
  • This really depends on what DE environment you are using, GNOME Shell, GNOME 2, KDE, and so on.
    – Flimm
    Jul 17, 2023 at 15:44

5 Answers 5

58

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
7
  • 9
    Ta, that worked after a restart. May 26, 2012 at 7:43
  • In my case the file was named differently, but still on the same folder sudo mv /usr/share/sounds/freedesktop/stereo/screen-capture.oga /usr/share/sounds/freedesktop/stereo/screen-capture-disabled.oga I also had to reboot, thanks for the knowledge.
    – Falk
    Dec 10, 2015 at 21:28
  • Neither works in 17.10 for me Feb 4, 2018 at 15:24
  • 2
    Worked on Ubuntu 18.04 like a charm. Apr 18, 2020 at 10:22
  • 4
    works on ubuntu 20.04
    – jim smith
    Oct 28, 2020 at 23:55
8

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

2
  • 1
    "ffmpeg comes with Ubuntu on a fresh installation" Can confirm this is not the case on 20.04. Default installation.
    – jim smith
    Oct 28, 2020 at 23:57
  • 1
    Yeah, I think it was starting around Bionic, ffmpeg needs to be separately installed. You will have to do sudo apt-get install ffmpeg. Oct 29, 2020 at 13:49
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

4
  • 1
    Sorry, just saw your answer. Please edit to add the the file I reference in my answer and I can then delete mine. (both sound the same!)
    – ish
    Aug 27, 2012 at 15:11
  • after renaming it and log out/in it is solved. this answer came first and i will check it as definitive
    – user47206
    Aug 27, 2012 at 15:11
  • @izx. add the file I reference in my answer. does this mean that both sound files should be renamed/removed or just one?
    – user47206
    Aug 27, 2012 at 15:16
  • @cipricus: if this worked for you, great, no need to change the other -- that used to be the "old" screenshot sound file. Good job green 7, upvoted!
    – ish
    Aug 27, 2012 at 15:22
4
  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.
2
  • 8
    This disables all sound effects. I guess the question is about disabling only this particular sound.
    – guettli
    Apr 18, 2018 at 13:41
  • 1
    In my Ubuntu 16.04 it only disables screenshot sound effects.
    – imsaiful
    May 4, 2018 at 18:27
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .