2016年5月31日 星期二

[Gentoo] Control volume after booting

Install alsa-utils package.

Craet a file was called "volume.sh" under "/home/freeman/.config/autostart/".

#!/bin/sh -e

exec 2> /tmp/rc.local.log  # send stderr from rc.local to a log file
exec 1>&2                      # send stdout to the same log file
set -x                         # tell sh to display commands before execution

/usr/bin/ibus-daemon -d -x
/usr/bin/amixer  -D pulse sset Master 0%

 
exit 0


Craet a file was called "volume.desktop" under "/home/freeman/.config/autostart/".

[Desktop Entry]
Type=Application
Exec=/home/freeman/.config/autostart/volume.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[C]=volume.sh
Name=volume.sh
Comment[C]=volume.sh start
Comment=volume.sh start
X-GNOME-Autostart-Delay=0

chmod a+x /home/freeman/.config/autostart/volume.sh
chmod a+x /home/freeman/.config/autostart/volume.desktop

Reference:

0 意見:

張貼留言