How to enable my keyboard's volume keys in XFCE?
- Right click a panel -> Panel submenu -> Add New Items...
- Add an instance of PulseAudio Plugin
- Right click the icon that just appeared in your panel and click "Properties". Make sure "Enable keyboard shortcuts for volume control" is enabled.
You may have to install the PulseAudio Plugin first. In Debian and Debian-based distributions, the package is called xfce4-pulseaudio-plugin
.
1.-Configuration
2.-Keyboard
3.-Application shortcuts
4.-Add
amixer -D pulse set Master 5%+ --> (Volume Up)
amixer -D pulse set Master 5%- --> (Volume Down)
amixer -D pulse set Master toggle --> (Mute/Unmute)
Update:
The parameter -D pulse
was added to the command so it would work with current versions of xfce4 using pulseaudio for sound.
Please notice, that both answers are correct, but each depend on different packages for the sound management. Erik here uses pulseaudio
while Samuel Loza's answer implies, that alsamixer
is used.
xfce4-pulseaudio-plugin
- Right click a panel -> Panel submenu -> Add New Items...
- Add an instance of PulseAudio Plugin
- Right click the icon that just appeared in your panel and click "Properties". Make sure "Enable keyboard shortcuts for volume control" is enabled. -> See: Sound settings -> Audio mixer will tell you what package you use. If
pulseadio
is used the field should tellpavucontrol
. - Open the configuration for your keyboard shortcuts and add the following commands:
pactl -- set-sink-volume 0 +10%
# raise volume by each 10% (more than 100% possible, might distort the sound)
pactl -- set-sink-volume 0 -10%
# reduce volume by each 10%
pactl -- set-sink-mute 0 toggle
# mute/unmutes audio
alsamixer
(compare Samuel's answer)
- Check if alsamixer is working as your sound management.
- Go see the configuration for keyboard shortcuts and edit:
amixer set Master 10%+ #
raise volume by each 10 %
amixer set Master 10%- #
reduce volume by each 10 %
amixer set Master toggle #
mute/unmute audio
The first solution works for me on Debian stretch, I had problems with the sound after the upgrade from jessie. The settings work while using headphones as well. One can adapt the amount of increase/decrease in % freely.
Duplicated questions:
How to increase or decrease volume in Xfce with keyboard shortcuts? (English, NA)
Muting and unmuting sound with mutebutton (English, Debian jessie)
Further links:
https://wiki.debian.org/Sound (English, Debian)
https://bugs.launchpad.net/xfce4-volumed/+bug/883485 (English, Debian+Ubuntu)
https://askubuntu.com/questions/652890/shortcuts-volume-specific-output (English, Ubuntu 15.04)
Lower or increase pulseaudio volume on all outputs (English, Debian sid)
https://mysudo.wordpress.com/2015/03/27/unmute-pulseaudio-sound-in-xfce-debian-jessie/ (German, Debian jessie)
https://ubuntuforums.org/showthread.php?t=2342661 (English, Ubuntu)