Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2129298
  • 博文数量: 229
  • 博客积分: 7217
  • 博客等级: 上校
  • 技术积分: 3224
  • 用 户 组: 普通用户
  • 注册时间: 2009-02-19 17:23
个人简介

个人主页https://xugaoxiang.com,微信公众号: Dev_Club 或者搜索 程序员Club

文章分类

全部博文(229)

文章存档

2017年(1)

2016年(20)

2015年(23)

2013年(1)

2012年(23)

2011年(68)

2010年(62)

2009年(31)

分类: LINUX

2010-03-05 16:07:01

1、Get the lirc-0.8.6 source code from

2、Unpack tar ball and setup
   tar xvf lirc-0.8.6.tar.bz2
   cd lirc-0.8.6
   sudo ./setup






3、Save configuration and configure


4、Install and Run
  
   sudo make install
   (Note:lirc use the device /dev/lirc,if NOT,you can change the udev rules,or add an soft link) x

   sudo lircd

5、Use mode2 tool to test the lirc driver


6、Use irrecord to generate the lirc.conf

   sudo irrecord lirc_orig.conf
   sudo cp lirc_orig.conf /etc/lirc/lircd.conf
   sudo chmod 666 /var/run/lirc/lircd  

7、Lircrc for vlc
   compile vlc with --enable-lirc

.lircrc

begin
 prog = vlc
 button = Play
 config = key-play-pause
end
begin
 prog = vlc
 button = Pause
 config = key-play-pause
end
begin
 prog = vlc
 button = Stop
 config = key-stop
end
begin
 prog = vlc
 button = Skip
 config = key-jump+medium
end
begin
 prog = vlc
 button = Replay
 config = key-jump-short
end
begin
 prog = vlc
 button = Forward
 config = key-next
end
begin
 prog = vlc
 button = Rewind
 config = key-prev
end
begin
 prog = vlc
 button = Up
 config = key-nav-up
end
begin
 prog = vlc
 button = Down
 config = key-nav-down
end
begin
 prog = vlc
 button = Left
 config = key-lav-left
end
begin
 prog = vlc
 button = Right
 config = key-right
end
begin
 prog = vlc
 button = VolUp
 config = key-vol-up
 repeat = 1
end
begin
 prog = vlc
 button = VolDown
 config = key-vol-down
 repeat = 1
end
begin
 prog = vlc
 button = Mute
 config = key-vol-mute
end
begin
 prog = vlc
 button = Pictures
 config = key-audiodelay-up
end
begin
 prog = vlc
 button = Music
 config = key-audiodelay-down
end
begin
 prog = vlc
 button = More
 config = key-crop
end


if you need more,check vlc --longhelp | grep key

8、Add lirc config file for vlc

   vi .config/vlc/vlcrc
      add:
          lirc-file=~/.lircrc

9、Control the VLC

   vlc --control lirc filename

Try it.
djstava

References:







阅读(1506) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~