![在装有 Ubuntu 12.10 的 iMac 上设置苹果远程控制](https://linux22.com/image/830964/%E5%9C%A8%E8%A3%85%E6%9C%89%20Ubuntu%2012.10%20%E7%9A%84%20iMac%20%E4%B8%8A%E8%AE%BE%E7%BD%AE%E8%8B%B9%E6%9E%9C%E8%BF%9C%E7%A8%8B%E6%8E%A7%E5%88%B6.png)
在设置我的 iMac(运行 Ubuntu 12.10)的远程控制过程中,我遇到了困难。
我按照我在https://help.ubuntu.com/community/LIRC我在 irw 部分之后卡住了:按照操作指南中的建议,我运行
irw
并且我正确地看到了遥控器发送的信号(播放、暂停、前进等)。到目前为止一切都很完美。
然后我从网上获得了一个包含以下内容的 .lircrc:
##################################################
#### Save as ~/.lircrc ###########################
#### After modifying: ############################
#### sudo /etc/init.d/lirc restart ###############
##################################################
#############
#### VLC ####
#############
begin
prog = vlc
button = KEY_PLAYPAUSE
config = key-play-pause
repeat = 0
end
begin
prog = vlc
button = KEY_MENU
config = key-stop
repeat = 0
end
begin
prog = vlc
button = KEY_REWIND
config = key-jump-short
repeat = 1
end
begin
prog = vlc
button = KEY_FORWARD
config = key-jump+short
repeat = 1
end
begin
prog = vlc
button = KEY_VOLUMEUP
config = key-vol-up
repeat = 1
end
begin
prog = vlc
button = KEY_VOLUMEDOWN
config = key-vol-down
repeat = 1
end
#################
#### MPlayer ####
#################
#begin mplayer
begin
prog = mplayer
button = KEY_PLAYPAUSE
config = pause
repeat = 15
end
begin
prog = mplayer
button = KEY_MENU
config = stop
repeat = 15
end
begin
prog = mplayer
button = KEY_REWIND
config = seek -10
repeat = 10
end
begin
prog = mplayer
button = KEY_FORWARD
config = seek +10
repeat = 10
end
begin
prog = mplayer
button = KEY_VOLUMEUP
config = volume 1
repeat = 1
end
begin
prog = mplayer
button = KEY_VOLUMEDOWN
config = volume -1
repeat = 1
end
#end mplayer
###############
#### Totem ####
###############
begin
prog = Totem
button = KEY_PLAYPAUSE
config = play_pause
end
begin
prog = Totem
button = KEY_MENU
config = fullscreen
end
begin
prog = Totem
button = KEY_FORWARD
config = seek_forward
end
begin
prog = Totem
button = KEY_REWIND
config = seek_backward
end
begin
prog = Totem
button = KEY_VOLUMEUP
config = volume_up
repeat = 1
end
begin
prog = Totem
button = KEY_VOLUMEDOWN
config = volume_down
repeat = 1
end
###################
#### Audacious ####
###################
begin
prog = audacious
button = KEY_PLAYPAUSE
config = PAUSE
repeat = 16
end
begin
prog = audacious
button = KEY_MENU
config = STOP
repeat = 0
end
begin
prog = audacious
button = KEY_FORWARD
config = NEXT
repeat = 16
end
begin
prog = audacious
button = KEY_REWIND
config = PREV
repeat = 16
end
################################################## ##############################
#### Turn up and down the volume (Working by default on Feisty) ####
################################################## ##############################
begin
prog = irexec
button = KEY_VOLUMEUP
config = amixer set PCM 9+ & #amixer set PCM 3%+ &
repeat = 2
end
begin
prog = irexec
button = KEY_VOLUMEDOWN
config = amixer set PCM 9- & #amixer set PCM 3%- &
repeat = 2
end
##############################################
#### Evince y OpenOffice (Presentations) ####
#### start with line command:
#### $ irxevent -d
#### and kill with:
#### $ killall irxevent
##############################################
begin
prog = irxevent
button = KEY_PLAYPAUSE
config = Key F11 CurrentWindow
config = Key F5 CurrentWindow
repeat = 0
end
begin
prog = irxevent
button = KEY_MENU
config = Key Escape CurrentWindow
repeat = 0
end
begin
prog = irxevent
button = KEY_REWIND
config = Key Prior CurrentWindow
repeat = 1
end
begin
prog = irxevent
button = KEY_FORWARD
config = Key Next CurrentWindow
repeat = 1
end
begin
prog = irxevent
button = KEY_VOLUMEUP
config = Key ctrl-plus CurrentWindow
repeat = 0
end
begin
prog = irxevent
button = KEY_VOLUMEDOWN
config = Key ctrl-minus CurrentWindow
repeat = 0
end
我之所以选择它,是因为根据 lirc 页面,它看起来应该如此(http://www.lirc.org/html/configure.html#lircrc_format)
然后我想就这样了,所以我跑了
irexec -d
我以为我可以使用遥控器在 VLC 上播放/暂停/转发我最喜欢的视频,但启动 VLC 后它却不工作了。
我重新启动,重试,还通过运行守护进程(以 root 身份或非 root 身份,实际上尝试了每种组合)尝试了其他时间:
sudo /etc/init.d/lirc start
但没有成功。我搜索了,但找不到任何可行的方法。我可能错过了什么。显然我做错了什么(或忘记了什么),因此我想向你们寻求帮助/建议。
答案1
您必须启用 vlc 播放器的 lirc 接口才能使其正常工作。