我正在尝试在Ubuntu 9.04中编写一个bash启动脚本,它将从我的电脑中删除恼人的系统嘟嘟声:
#/bin/bash rmmod pcspkr #remove system beep; also doesnt work without root access
当我重新启动计算机时,它不断回来,我想运行一个启动脚本来消除这个烦恼。 但我不知道如何在bash脚本中以root身份运行,有没有人知道如何在bash脚本中以root身份login?
将此添加到/etc/modprobe.d/blacklist的末尾:
黑名单pcspkr
这可以防止启动计算机时加载pc扬声器模块。
System ==> Preferences ==> Startup Applications ; 你也许可以把你的命令放在那里
现在没有一个Ubuntu方便的尝试这个。