免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1913 | 回复: 0
打印 上一主题 下一主题

IBM X60下按Fn+F5支持开、关蓝牙 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-12 22:59 |只看该作者 |倒序浏览
默认F8下X60上的Fn+F5键不能像Win下起到切换开关蓝牙的作用,但通过修改acpi相关设置也可以做到:)

步骤如下:

1) 在 /etc/acpi/events 目录下建立文件 bt.conf,内容如下:
event=(button[ /]sleep|ibm/hotkey HKEY 00000080 00001005)
action=/etc/acpi/actions/bt.sh

2) 在 /etc/acpi/actions 目录下建立文件 bt.sh,并设置此文件为可执行文档,内容如下:
#!/bin/bash

# simple script to turn the bluetooth on or off      #
# By GH                                                                       #
# Dec 11 2007                                                                 #
#-----------------------------------------------------------------------------#

# find out if BLUETOOTH is on
STATUS=`cat /proc/acpi/ibm/bluetooth | grep 'status'`

if [[ $STATUS == *enabled ]]
then
        echo "Turning BLUETOOTH OFF"
        echo "disable" > /proc/acpi/ibm/bluetooth
else
        echo "Turning BLUETOOTH ON"
        echo "enable" > /proc/acpi/ibm/bluetooth
fi

#clean up
unset STATUS

exit 0

3)重新启动acpi服务
/etc/init.d/acpid restart

好了,现在按Fn+F5键试试~~

注意:你的bluetooth服务一定要是开启的。

[ 本帖最后由 blae 于 2007-12-12 23:02 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP