How to change which sound is reproduced for terminal bell?

Solution 1:

seems due to upgrade from Ubuntu18.04 to Ubuntu18.10, left some folders remained. but if its a fresh install of Ubuntu18.10 does not have the folder /usr/share/sounds/ubuntu/

$ ls /usr/share/sounds/
alsa  freedesktop  gnome  sound-icons  speech-dispatcher  Yaru
$

enter image description here

so, take backup of /usr/share/sounds/ubuntu folder and then delete it from the folder /usr/share/sounds

enter image description here

enter image description here

enter image description here

how to produce your own sound theme?:

in fresh install of Ubuntu when you open gnome-tweaks-> Appearence-> Sound -- you will see "Yaru & Default" as sound themes selectable.

to create your own theme.

copy paste the folder /usr/share/sounds/Yaru in the folder /usr/share/sounds and rename it as myBell or any other name as you wish.

change directory to /usr/share/sounds/myBell rename the folder Yaru to myBell open the file index.theme folder and change the content like below

[Sound Theme]
Name=myBell
Directories=myBell

enter image description here

enter image description here

enter image description here

now you can select your own sound theme "myBell" from the gnome-tweaks

enter image description here