2015-06-25, 13:13
Hi there,
I compiled kodi like
Then I start it with
Pastebin
Next problem, I want to run it as user kodi from start. So I put a script in /etc/init.d/ named kodi
User kodi is ther as system user
When I do
all looks fine, but if I do
connect to server:8080 (no connection establish)
So kodi crashed.
Can someone explain and bring me to the right path? My expirience is not much more then copying scripts from the internet and do something I don't realy understand to bring them to work.
What I want is running kodi headless on my server and have some Raspis or other machines with normal kodi. mysql on the nas.
My System is
running as kvm guest under proxmox 3.4-6 on an HP Gen8 Microserver. An other Guest is the NAS under Jessie with NFS, Samba, ftp, tftp, mysql (for central kodi db).
Thanks for the work, wish I could do 1% from that :-)
Matthias
I compiled kodi like
Quote:git clone https://github.com/topfs2/xbmc.git kodi-helix-headless
cd kodi-helix-headless/
git checkout helix_headless
git clean -xfd
git reset --hard
git pull --rebase
./bootstrap
./configure
make
sudo checkinstall
Then I start it with
Quote:kodi --headlessThe .kodi was created under /home/matthias/ . Then I connect via vpn/tun to server:8080 and I see "Music" and so on. No button to change something. When I click on "Profiles" and then Master user, Kodi crash with:
Quote:matthias@server:~$ kodi --headless
kodi.bin: /usr/include/boost/smart_ptr/shared_ptr.hpp:653: typename boost::detail:p_member_access<T>::type boost:hared_ptr<T>::operator->() const [with T = ADDON::CSkinInfo; typename boost::detail:p_member_access<T>::type = ADDON::CSkinInfo*]: Assertion `px != 0' failed.
Aborted (core dumped)
Crash report available at /home/matthias/kodi_crashlog-20150625_123457.log
Pastebin
Next problem, I want to run it as user kodi from start. So I put a script in /etc/init.d/ named kodi
Code:
#! /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
############### EDIT ME ##################
# path to xinit exec
DAEMON=/usr/bin/xinit
# startup args
#DAEMON_OPTS=" /usr/local/bin/kodi-standalone -- :0"
DAEMON_OPTS=" /usr/local/bin/kodi --headless"
# script name
NAME=kodi
# app name
DESC=Kodi
# user
RUN_AS=kodi
# Path of the PID file
PID_FILE=/var/run/kodi.pid
############### END EDIT ME ##################
test -x $DAEMON || exit 0
set -e
case "$1" in
start)
echo "Starting $DESC"
start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
;;
stop)
echo "Stopping $DESC"
start-stop-daemon --stop --pidfile $PID_FILE
;;
restart|force-reload)
echo "Restarting $DESC"
start-stop-daemon --stop --pidfile $PID_FILE
sleep 5
start-stop-daemon --start -c $RUN_AS --background --pidfile $PID_FILE --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
User kodi is ther as system user
Quote:kodi:x:118:65534::/home/.kodi:/bin/false
When I do
Quote:sudo /etc/init.d/kodi start
Starting Kodi
sudo /etc/init.d/kodi stop
Stopping Kodi
all looks fine, but if I do
Quote:sudo /etc/init.d/kodi start
connect to server:8080 (no connection establish)
Quote:sudo /etc/init.d/kodi stop
Stopping Kodi
start-stop-daemon: warning: failed to kill 4967: No such process
1 pids were not killed
No process in pidfile '/var/run/kodi.pid' found running; none killed.
So kodi crashed.
Can someone explain and bring me to the right path? My expirience is not much more then copying scripts from the internet and do something I don't realy understand to bring them to work.
What I want is running kodi headless on my server and have some Raspis or other machines with normal kodi. mysql on the nas.
My System is
Quote:sudo uname -a
Linux server 3.13.0-55-generic #94-Ubuntu SMP Thu Jun 18 00:27:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
running as kvm guest under proxmox 3.4-6 on an HP Gen8 Microserver. An other Guest is the NAS under Jessie with NFS, Samba, ftp, tftp, mysql (for central kodi db).
Thanks for the work, wish I could do 1% from that :-)
Matthias