Start XBMC on Raspbian on WOL | 让树莓派的XBMC/Kodi可以通过WOL(Wake-On-Lan)启动

English version

https://github.com/houtianze/wold

P.S.

Want your Pi to play network share without stuttering?
Create your share as NFS server, and mount it similar to this line in /etc/fstab:
192.168.1.77:/multimedia /thor nfs udp,noatime,rsize=32768,wsize=32768,nolock,nfsvers=3 0 0

Original post:
http://lucatnt.com/2013/09/avoid-stuttering-streaming-from-nfs-shares-with-xbmc-on-the-raspberry-pi/

中文说明

适用情形

如果你的树莓派装的是Raspbian,然后安装了XBMC / Kodi (教程:http://michael.gorven.za.net/raspberrypi/xbmc ),然后用Yatse (https://play.google.com/store/apps/details?id=org.leetzone.android.yatsewidgetfree )控制。你会发现如果你退出了XBMC,那个电源启动按钮是无法启动XBMC的。

技术细节

按下Yatse上的电源按钮,Yatse发送的是一个WOL(Wake-on-Lan)信号,Raspbian需要有个接收这个信号的后台进程调用XBMC来实现启动。放狗搜了一下,找到了这个:https://github.com/pauliuszaleckas/wold 但是发现按照说明来启动XBMC会失败,放狗再搜,原因是启动进程时的gid要是video这个组。就改了下程序,最终可用的程序在下一节。毋庸赘述,程序主要贡献是pauliuszaleckas的。

使用方法

GitHub

https://github.com/houtianze/wold

  1. git clone这个repo,然后输入
    make
    sudo make install

    (前提是你有安装gcc,build-essential)
  2. 编辑/etc/rc.local,在最末加入这一行:
    DISPLAY=:0.0 /usr/local/bin/wold -u pi -g video -a /usr/bin/xbmc
  3. 重启树莓派。
    好吧,你现在就可以用Yatse完全控制Raspbian上的XBMC了,点击电源按钮,10几秒钟后就可以看到XBMC了。

番外

想播放网络共享文件无卡顿?
建立一个NFS的服务器,然后编辑/etc/fstab,加入类似下面的一行:
192.168.1.77:/multimedia /thor nfs udp,noatime,rsize=32768,wsize=32768,nolock,nfsvers=3 0 0

原文链接:
http://lucatnt.com/2013/09/avoid-stuttering-streaming-from-nfs-shares-with-xbmc-on-the-raspberry-pi/

Leave a comment