shakur
(usa Linux Mint)
Enviado em 17/07/2011 - 00:42h
o xbmc.bin esta na /usr/lib/xbmc.bin
encontrei o xbmc-standalone (/usr/bin/xbmc-santalone)
#!/bin/sh
# Copyright (C) 2009-2010 Team XBMC
#
http://www.xbmc.org
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with XBMC; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
http://www.gnu.org/copyleft/gpl.html
XBMC="xbmc --standalone \"$@\""
PULSE_START="$(which start-pulseaudio-x11)"
if [ -n "$PULSE_START" ]; then
$PULSE_START
else
PULSE_SESSION="$(which pulse-session)"
if [ -n "$PULSE_SESSION" ]; then
XBMC="$PULSE_SESSION $XBMC"
fi
fi
LOOP=1
CRASHCOUNT=0
LASTSUCCESSFULSTART=$(date +%s)
while [ $(( $LOOP )) = "1" ]
do
$XBMC
RET=$?
NOW=$(date +%s)
if [ $(( ($RET >= 64 && $RET <=66) || $RET == 0 )) = "1" ]; then # clean exit
LOOP=0
else # crash
DIFF=$((NOW-LASTSUCCESSFULSTART))
if [ $(($DIFF > 60 )) = "1" ]; then # Not on startup, ignore
LASTSUCESSFULSTART=$NOW
CRASHCOUNT=0
else # at startup, look sharp
CRASHCOUNT=$((CRASHCOUNT+1))
if [ $(($CRASHCOUNT >= 3)) = "1" ]; then # Too many, bail out
LOOP=0
echo "XBMC has exited uncleanly 3 times in the ${DIFF}s. Something is probably wrong"
fi
fi
fi
done
eo /usr/bin/xbmc
#!/bin/sh
# Copyright (C) 2008-2010 Team XBMC
#
http://www.xbmc.org
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with XBMC; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
http://www.gnu.org/copyleft/gpl.html
SAVED_ARGS="$@"
prefix="/usr"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"
LIBDIR="${exec_prefix}/lib"
# Check for some options used by this script
while [ "$#" -gt "0" ]
do
case "$1" in
--setlibdir)
LIBDIR="$2"
shift; shift
;;
*)
shift
;;
esac
done
single_stacktrace()
{
# core filename is either "core.$PID" or "core"
find "$1" -maxdepth $2 -name 'core*' | while read core; do
LC_ALL=C gdb --core="$core" --batch 2> /dev/null | grep -q "^Core was generated by \`$LIBDIR/xbmc/xbmc.bin" || continue
echo "=====> Core file: "$core" ($(stat -c%y "$core"))" >> $FILE
echo " =========================================" >> $FILE
gdb "$LIBDIR/xbmc/xbmc.bin" --core="$core" --batch -ex "thread apply all bt" 2> /dev/null >> $FILE
rm -f "$core"
done
}
print_crash_report()
{
FILE="$HOME/xbmc_crashlog-`date +%Y%m%d_%H%M%S`.log"
echo "############## XBMC CRASH LOG ###############" >> $FILE
echo >> $FILE
echo "################ SYSTEM INFO ################" >> $FILE
echo -n " Date: " >> $FILE
date >> $FILE
echo " XBMC Options: $*" >> $FILE
echo -n " Arch: " >> $FILE
uname -m >> $FILE
echo -n " Kernel: " >> $FILE
uname -rvs >> $FILE
echo -n " Release: " >> $FILE
if which lsb_release > /dev/null; then
echo >> $FILE
cat /etc/arch-release >> $FILE
else
echo "lsb_release not available" >> $FILE
fi
echo "############## END SYSTEM INFO ##############" >> $FILE
echo >> $FILE
echo "############### STACK TRACE #################" >> $FILE
single_stacktrace "$PWD" 1
# Find in plugins directories
if [ $XBMC_HOME ]; then
BASEDIR=$XBMC_HOME
else
BASEDIR="$LIBDIR/xbmc/"
fi
single_stacktrace "$BASEDIR" 5
# find in user xbmc dir
single_stacktrace $HOME/.xbmc/ 5
echo "############# END STACK TRACE ###############" >> $FILE
echo >> $FILE
echo "################# LOG FILE ##################" >> $FILE
echo >> $FILE
if [ -f ~/.xbmc/temp/xbmc.log ]
then
cat ~/.xbmc/temp/xbmc.log >> $FILE
echo >> $FILE
else
echo "Logfile not found in the usual place." >> $FILE
echo "Please attach it seperately." >> $FILE
echo "Use pastebin.com or similar for forums or IRC." >> $FILE
fi
echo >> $FILE
echo "############### END LOG FILE ################" >> $FILE
echo >> $FILE
echo "############ END XBMC CRASH LOG #############" >> $FILE
echo "Crash report available at $FILE"
}
${datarootdir}/xbmc/FEH.sh $SAVED_ARGS
RET=$?
if [ $RET -ne 0 ]; then
exit $RET
fi
if which gdb >/dev/null 2>&1; then
# Output warning in case ulimit is unsupported by shell
eval ulimit -c unlimited
if [ ! $? = "0" ]; then
echo "xbmc: ulimit is unsupported by this shell" 1>&2
fi
fi
LOOP=1
while [ $(( $LOOP )) = "1" ]
do
LOOP=0
"$LIBDIR/xbmc/xbmc.bin" $SAVED_ARGS
RET=$?
if [ $(( $RET == 65 )) = "1" ]
then # User requested to restart app
LOOP=1
elif [ $(( ($RET >= 131 && $RET <= 136) || $RET == 139 )) = "1" ]
then # Crashed with core dump
print_crash_report
fi
done
exit $RET