Symlink for Currently Selected Alert Sound?
Solution 1:
Workaround
Seems there are no schemas for setting the alert sound options those are available via GUI
Observations:
Sound theme can be set with gsettings
gsettings set org.gnome.desktop.sound theme-name 'mySoundTheme'
to see the current theme.. run gsettings get org.gnome.desktop.sound theme-name
Example:
$ gsettings get org.gnome.desktop.sound theme-name
'ubuntu'
$
when Bark is selected from the GUI, It uses same ubuntu
theme but instead of the file /usr/share/sounds/ubuntu/stereo/bell.oga
it uses /usr/share/sounds/gnome/default/alerts/bark.ogg
when Drip is selected it uses drip.ogg, in the same way for Glass and Sonar also.
In all the above 4 Selections, the system sound theme is constant which is ubuntu
which is used by the Thunderbird.
When the option "Default system sound for new mail" is selected in Thunderbird it uses message.ogg
file for new mails and bell.ogg
file for alerts from the custom theme
Note that the names in some custom downloaded themes may vary for message.ogg and bell.ogg etc..
So the idea is to create 4 Custom Sound Themes with name bark, drip, glass & sonar..
to do so, just copy ubuntu
directory and rename it with above names..
replace the files message.ogg
and bell.ogg
with the sounds you wish in all the four directories bark, drip, glass & sonar..
now you can choose the custom theme you want with gsettings
command or via dconf-editor
tool which can be installed with sudo apt install dconf-editor
gsettings set org.gnome.desktop.sound theme-name 'bark'
gsettings set org.gnome.desktop.sound theme-name 'drip'
gsettings set org.gnome.desktop.sound theme-name 'glass'
gsettings set org.gnome.desktop.sound theme-name 'sonar'
If you want to reset, run below command
gsettings reset org.gnome.desktop.sound theme-name
to remove the options from GUI for any accidental selection of "Choose an alert sound"
rename the file /usr/share/gnome-control-center/sounds/gnome-sounds-default.xml
to anything you wish..
Tested in Ubuntu 18.04.2, Worked as intended.