2. cd $HOME
git clone git://github.com/xbmc/xbmc.git kodi
编译:
Compile (perform one step after the other)
cd $HOME/kodi
apt-get remove libtag1-dev
make -C lib/taglib
make -C lib/taglib install
./bootstrap
./configure
make
make install
运行:
xinit kodi
自动开机运行kodi
1 Upstart init script
Create a /etc/init/kodi.conf with following contents.
# kodi-upstart
# starts Kodi on startup by using xinit.
# by default runs as kodi, to change edit below.
env USER=kodi
start on (filesystem and stopped udevtrigger)
stop on runlevel [016]
# tell upstart to respawn the process if abnormal exit
respawn
script
exec su -c "xinit /usr/bin/kodi-standalone -- -nocursor :0" $USER
end script
Note: -- -nocursor option kills all X cursor on Kodi startup and does not interfere with mouse use/operation
You may have to edit /etc/X11/Xwrapper.config and replace the last line that says:
allowed_users=console
to
allowed_users=anybody
3 Add a new init script
This method works well under Debian. The current configuration is a HTPC running Debian Squeeze, with no window manager installed. The main goal here is to start an Xserver only for Kodi. It allows also to specify which user will start / own the Kodi process. This method will not work if you have a window manager installed (however, it should not be hard to modify the script to suit your needs)
Create a new script under /etc/init.d/. Call it kodi
Change the rights, in order to allow it to be executable.
# chmod a+x /etc/init.d/kodi
copy the code under in the file. Modify the variables to suit your configuration:
#! /bin/sh
### BEGIN INIT INFO
# Provides: kodi
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts instance of Kodi
# Description: starts instance of Kodi using start-stop-daemon and xinit
### END INIT INFO