I like to have startup/shutdown sounds to know if my speakers are on. Here’s how you do it in Gnome 3.
Add and rename sound files (.ogg or .oga) as needed:
1. /usr/share/sounds/freedesktop/stereo/desktop-login.oga
2. /usr/share/sounds/freedesktop/stereo/system-shutdown.oga
Startup sound
Make sure you have libcanberra installed
If not present already, create .desktop file in /usr/share/gnome/autostart with the command, /usr/bin/canberra-gtk-play --id="desktop-login" --description="GNOME Login"
Shutdown sound
Type this in Terminal.. sudo systemctl enable canberra-system-shutdown.service
The sudo prefix to a command requires an authentication to run the command. You simply enter the password in the terminal. However, when you run a program outside the terminal that requires an authentication from the user, an authentication GUI pops up. There are different authentication GUIs available – gksu or gksudo. There is another that looks much better (at least in Gnome) than the previous two – pkexec.
Here’s an example on how to open ‘gedit’ program as root with the pkexec (#3) authentication GUI.
Copy the following code into a newly created file;
/usr/share/polkit-1/actions/org.freedesktop.policykit.gedit.policy
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD polkit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/software/polkit/policyconfig-1.dtd">
<policyconfig>
<action id="org.freedesktop.policykit.pkexec.gedit">
<description>Run gedit program</description>
<message>Authentication is required to run gedit</message>
<icon_name>audio-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/gedit</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
Save and close. That’s it!
Next time when you type in the terminal (or a command elsewhere) >> pkexec gedit << the pkexec authentication GUI will pop for you to enter your password.
Follow the above steps for any other program you wish to have enable the pkexec authentication GUI, changing only the highlighted text (in red) appropriately.
If you want to increase the offset of a homerun kicker submenu like this,
then do the following:
Open in text editor with root permission, /usr/share/apps/plasma/plasmoids/org.kde.homerun-kicker/contents/ui/ItemListDialog.qml
Where it says, var xPos = pos.x + parent.width + margins.left;
change it to, var xPos = pos.x+5 + parent.width + margins.left;
Increase the number for greater offset.
Enable event sounds and input feedback sounds in Settings > Appearance > Settings tab
Go back to All Settings and scroll down to select Settings Editor
Click on xsettings in the left column, and change the SoundThemeName value (by double clicking it) to the sound theme folder name in /usr/share/sounds/.. e.g. freedesktop
Make sure your System Sounds volume is high enough