RT,电脑的电源键坏了,老是自动按,跳出关机菜单。求一个让电源键按了无效的设置方法,谢谢!
使用管理员权限,修改:
/etc/acpi/events/powerbtn
源文件为:
/etc/acpi/events/powerbtn
This is called when the user presses the power button and calls
/etc/acpi/powerbtn.sh for further processing.
Optionally you can specify the placeholder %e. It will pass
through the whole kernel event message to the program you’ve
specified.
We need to react on “button power." and "button/power.” because
of kernel changes.
event=button[ /]power
action=/etc/acpi/powerbtn.sh
使用sudo gedit powerbtn修改最后一行里面执行的动作,或者直接删除掉。但是绝对不能修改powerbtn.sh,不然没法啊关机。
说明,不用的linux系统,关机键的文件不一定相同,我是使用UK作为示范。
我把action=/etc/acpi/powerbtn.sh这行删掉了,可按电源键时那该死的关机窗口还是出来了……
最后我装了个gnome-tweak-tool设置了一下就删了。现在电源键终于作废了~