So here is the way to do this, I forgot that there is documentation on this somewhere on the Ubuntu forums. I figured I'd post it here for anyone looking to do this :) (this is for the sound theme "smooth", but it is easily adapted for almost any sound theme you want to install). I have also made a few relative changes, to make this more readable:
Install some required packages:
sudo apt-get install gnome-session-canberra sox
Download the sound theme
Extract the file:
tar xzvf foo.tar.gz
Copy the extracted content ("foo" folder) to your sounds directory:
/.local/share/sounds
(create the "sounds" directory if it does not exist yet)
Enable sound events and feedback sounds.
In example in Mate go to Control Center --> Sounds and enable them there; in Xfce it is done by entering in the terminal:
xfconf-query -c xsettings -p /Net/EnableEventSounds -s true
xfconf-query -c xsettings -p /Net/EnableInputFeedbackSounds -s true
- Set "foo" as the default sound theme
In example in Mate go to Control Center --> Sounds
and set it there; in Xfce it is done by entering in the terminal:
xfconf-query -c xsettings -p /Net/SoundThemeName -s "foo"
- Setup the necessary environment variable. Add to the end of
~/.profile:
Code:
GTK_MODULES="$GTK_MODULES:canberra-gtk-module"
export GTK_MODULES
That should be it. Perhaps a logout is needed before it starts working.
--//--
For a startup sound, create a new autostart application (Settings Manager
or Control Center
>> Session and startup >> Application autostart) with the following parameters:
- Name = Login Sound
- Command = canberra-gtk-play -f ~/.local/share/sounds/foo/stereo/desktop-login.oga
For logout sound, you need override xfce4-session
. To do so, with root privliges, create the file /usr/local/bin/xfce4-session
with the following content..
Content:
#!/bin/bash
# run the real xfce4-session executable
/usr/bin/xfce4-session
# on exit, run my stuff
canberra-gtk-play -f ~/.local/share/sounds/foo/stereo/desktop-logout.oga
And make this file executable:
sudo chmod +x /usr/local/bin/xfce4-session
usr/share/sounds
), but theres a way to actually enable all of the different sounds themselves, like for right clicks, clicking the app drawer button, opening and closing windows, and maximizing and minimizing them etc