我以某种方式在 Ubuntu 18.04 中激活了“电池满电”警报音,现在我想禁用它,因为我的电池出现故障,它经常响并且声音很大。
我怎样才能消除该音调,或者怎样才能禁用监控电池状态并发送电池已满警报的服务?
答案1
在 Ubuntu 18.04 中默认
gsettings
对于模式org.gnome.desktop.sound
和关键event-sounds
是true
pratap@i7:~$ gsettings get org.gnome.desktop.sound event-sounds
true
pratap@i7:~$
将键值设为 false 将停止所有事件声音。
仅停止电池充满事件声音..
检查声音主题名称
pratap@i7:~$ gsettings get org.gnome.desktop.sound theme-name
'ubuntu'
pratap@i7:~$
列出并查找它是否有battery-full
声音文件..
pratap@i7:~$ ls /usr/share/sounds/ubuntu/stereo/
bell.ogg dialog-information.ogg phone-outgoing-calling.ogg
button-pressed.ogg dialog-question.ogg service-login.ogg
button-toggle-off.ogg dialog-warning.ogg service-logout.ogg
button-toggle-on.ogg message-new-instant.ogg system-ready.ogg
desktop-login.ogg message.ogg window-slide.ogg
desktop-logout.ogg phone-incoming-call.ogg
dialog-error.ogg phone-outgoing-busy.ogg
pratap@i7:~$
具有battery-full
声音文件的示例声音主题..
pratap@i7:~$ gsettings set org.gnome.desktop.sound theme-name Smooth
pratap@i7:~$ ls /usr/share/sounds/Smooth/
documentation index.theme stereo
pratap@i7:~$ ls /usr/share/sounds/Smooth/stereo
audio-channel-front-center.oga menu-popdown.oga
audio-channel-front-left.oga menu-popup.oga
audio-channel-front-right.oga menu-replace.oga
audio-channel-rear-center.oga _message-new-email.oga
audio-channel-rear-left.oga message-new-email.oga
audio-channel-rear-right.oga message-new-instant.oga
audio-channel-side-left.oga message-sent-email.oga
audio-channel-side-right.oga message-sent-instant.oga
audio-volume-change.oga network-connectivity-error.oga
battery-caution.oga network-connectivity-established.oga
battery-full.oga network-connectivity-lost.oga
battery-low.oga notebook-tab-changed.oga
button-pressed.oga phone-incoming-call.oga
button-released.oga phone-outgoing-busy.oga
button-toggle-off.oga phone-outgoing-calling.oga
button-toggle-on.oga power-plug.oga
count-down.oga power-unplug-battery-low.oga
__desktop-login.oga power-unplug.oga
_desktop-login.oga system-ready.ogg
desktop-login.oga trash-empty.oga
desktop-logout.oga window-attention-active.oga
desktop-switch-left.oga window-attention-inactive.oga
desktop-switch-right.oga window-close.oga
device-added.oga window-maximized.oga
device-removed.oga window-minimized.oga
dialog-error.oga window-new.oga
dialog-information.oga window-slide.oga
dialog-question.oga window-switch.oga
dialog-warning.oga window-unmaximized.oga
link-pressed.oga _window-unminimized.oga
pratap@i7:~$
battery-full.oga
使用以下命令重命名文件..
sudo mv /usr/share/sounds/Smooth/stereo/battery-full.oga /usr/share/sounds/Smooth/stereo/battery-full.oga.bak
就是这样.. 发出事件声音.. 它无法找到,battery-full.oga
因为它已被重命名为battery-full.oga.bak