在图书馆,会议室或半夜开机,开机'bong'很吓人的,mac bigsur之前的版不支持手动关闭,可以用命令关闭声音.
  1. 关机前把电脑声音设置成静音

关机脚本:

sudo vi /Library/Scripts/logout.sh

内容

#!/bin/bash
osascript -e 'set volume output muted 1'
sudo chmod u+x /Library/Scripts/logout.sh

在命令行添加到关机HOOK:

sudo defaults write com.apple.loginwindow LogoutHook /Library/Scripts/logout.sh

验证是否成功:

sudo defaults read com.apple.loginwindow LogoutHook

删除:

sudo defaults delete com.apple.loginwindow LogoutHook
  1. 设置系统声音为0
sudo nvram StartupMute=%01

root声音

sudo nvram SystemAudioVolume=%80
sudo nvram BootAudio=%00

原作者:阿金
本文地址:https://hi-arkin.com/archives/macos-voice.html

标签: none

(本篇完)

评论