is there a way to adjust the system volume via commandline so that the default volume popup (the one that pops up when pressing the media keys on notebooks) is still shown.
I need this for my remote control. It'll be run using a lircrc file and irexec.
Install the xdotool package, and try issuing
and
You could bind a shortcut to this script I've found in the Arch forums (needs the package
libnotify-bin
):Seems to work fine in Ubuntu 10.10.
Control Sound Volume
You can use
amixer
to control the sound volume, e.g.You may need to set the soundcard using e.g.
-c 1
for the second soundcard, seeman amixer
.Play Sound
Sounds can be played using a player like
aplay
orpaplay
, e.g.You might want to have a look at this question: Where do I find system sounds?
Display On-Screen Notification
You can reproduce the on-screen notification using the X On-Screen Display library XOSD. The package is called
xosd-bin
and the commandosd_cat
is used to display text, status bars etc. on the screen.displays
See this German wiki page for options and examples and
man osd_cat
for more.This is an improved version of the script htorque posted.
It works for me on 14.04. Let me know if it works on 16.04 or newer.
It requires
libnotify-bin
installed.I installed xmacro and added following lines to .lircrc: