Kodi Community Forum
[LINUX] XBMC Setup Script - Automatic installation of XBMC for Linux - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: [LINUX] XBMC Setup Script - Automatic installation of XBMC for Linux (/showthread.php?tid=55282)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


- Pietrux - 2009-10-21

Hello, i am quite the noob in terms of Linux, so i used this script to be able to install XBMC in a partition of my HDD. I used the experte install feature so i could manage the partition process, because i have my movies and windows 7 in a NTFS partion and would be sad to lose it all.

All was well, while running this script, but in the end while installing the XBMC Helpers i got the error that it was missing dependencies and the files were corrupt.

Used the Linux-Generic kernel durint instalation, choosing the Basic Ubuntu server when prompted.

I tried just running

sudo apt-get install xbmc-live python-apt -y

and got the same error.

Then tried

sudo apt-get install xbmc

sudo apt-get install xbmc-skin-*
sudo apt-get install xbmc-eventclients-*
sudo apt-get install xbmc-scripts-*

Any ideas about what could be going wrong?


- Methanoid - 2009-10-27

Suggestion for OP for additional feature - Implement auto hibernate after lack of activity - or auto standby?


- Shadowsoul - 2009-10-29

Awesome work on he script, however i have run into an issue:

I keep getting timeouts on the keyserver calls...which means i can't actually download the programs. It's been consistent like this for a few days now and i can't see the key by visiting the keyserver in the browser as well. Some keys work fine but the ones used for XBMC are really dead it seems.

Am i doing something wrong?

Running Ubuntu 9.04 (not minimal, does that matter?) on a Zotac ION.

Thanks for any solutions/hints!


- TORGULL - 2009-11-05

i cant install the new xbmc 9.11 alpha1 version with the install script. tried option 2 but nothing happens

?


- phrehdd - 2009-11-07

flxfxp Wrote:Why? you can use the dmg's that are prebuilt. Plus Mac OS X is ready for use...

Bit late ..but was referring to putting linux based xbmc on a mac mini. - just another hardware platform.

- Phrehdd

(not sure why, but for OSX I have more freeze ups with xbmc than Plex - however, linux is the ultimate goal here)


- dazex - 2009-11-10

Seems like the latest XBMC release, 9.11 alpha1 broke this script.

The code:

Code:
sudo apt-get install xbmc-live python-apt -y

yields an error:
Code:
The following packages have unmet dependencies:
  xbmc-live: Depends: xbmc-standalone (= 9.11~alpha1-jaunty1) but it is not going to be installed
E: Broken packages

Any help to get past this point would be appreciated.

Thanks,
-Dazex


- Txori82 - 2009-11-11

me too, any idea?


- thor.magnus - 2009-11-12

Hi !

I might be mistaken, but I think the problem is solved by using the PPA's in

"https://launchpad.net/~team-xbmc/+archive/jaunty-ppa" (for ubuntu 9.04)

instead of PPA's in
"https://launchpad.net/~team-xbmc/+archive/ppa"

Just edit the script to reflect this, and you'll be fine


- Txori82 - 2009-11-12

in the script was this:

echo '#'deb http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu jaunty main >> /etc/apt/sources.list.d/xbmc.org.list
echo '#'deb-src http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu jaunty main >> /etc/apt/sources.list.d/xbmc.org.list

what whe need to put exactly to use the script with 9.11?

Thanks


- thor.magnus - 2009-11-12

For ubuntu 9.04 Jaunty release, use this in the script:

deb http://ppa.launchpad.net/team-xbmc/jaunty-ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/team-xbmc/jaunty-ppa/ubuntu jaunty main

For ubuntu 9.10 Karmic release, use this in the script:
deb http://ppa.launchpad.net/team-xbmc/karmic-ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/team-xbmc/karmic-ppa/ubuntu karmic main


- Txori82 - 2009-11-12

and makind this changes on script, it's works fine?

Thanks! I'm going to install karmik and trust it.

And we can use this deb in the first installation? or only when we need to install SVN after the normal installation?


- chunkhead - 2009-11-17

For Jaunty, you need to install Libass3, as it's supposed to run Karmic...

Code:
wget https://launchpad.net/~team-xbmc/+archive/jaunty-ppa/+files/libass3_0.9.6-1xbmc1_i386.deb
sudo dpkg -i libass3_0.9.6-1xbmc1_i386.deb



UPDATED Version - biptn - 2009-11-21

Code:
#!/bin/bash -v
#------------------------------------------------------------------------------------------------------------
# setupXBMC Version 0.7a - 18/11/2009
# XBMC Installation script - by VirtualDanny.net
# This script will provide an automatic installation of Xbox Media Center
#
# REQUIREMENTS:
# * Clean Ubuntu Jaunty Server Installation ([url]https://help.ubuntu.com/community/Installation/MinimalCD[/url])
# * XBMC Compatible Hardware ([url]http://wiki.xbmc.org/?title=XBMC_for_Linux_specific_FAQ[/url])
# * Internet access
# * Username must be set to 'XBMC' under Ubuntu installation
#
# TO-DO LIST:
# * Menu to choose from Stable Release or Bleeding Edge Release
# * Automatic adjustments of all volume channels in Alsamixer
# * Additional tweaks
# * Setup common folders and setup simple smbd
# *  Give option for ATI/Nvidia Driver setup
#
# KNOWN BUGS:
# * Installation will fail if you uncomment SVN Repositories during first time installation.
#
# Remember to run this script with: sudo ./setupXBMC.sh
#------------------------------------------------------------------------------------------------------------

## --[ Miscellaneous variables ]------------------------------------------------

RELEASE=`cat /etc/lsb-release | grep CODENAME | cut -d = -f2`

cd /


##--[ ADDING REPOSITORIES TO SOURCE LIST ]-------------------------------------------------------------------
##    Repositories make it easier to download and stay up-to-date with current releases of Linux applications

echo '#' XBMC Repositories >> /etc/apt/sources.list.d/xbmc.org.list
echo '#' SVN builds are commented out. Remove comment '#' to enable.  >> /etc/apt/sources.list.d/xbmc.org.list
echo '#' Please DO NOT use the SVN builds during first time installation  >> /etc/apt/sources.list.d/xbmc.org.list
echo deb [url]http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/[/url] $RELEASE main >> /etc/apt/sources.list.d/xbmc.org.list
echo deb-src [url]http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/[/url] $RELEASE main >> /etc/apt/sources.list.d/xbmc.org.list
#echo '#'deb [url]http://ppa.launchpad.net/xbmc-addons/ppa/ubuntu[/url] $RELEASE main >> /etc/apt/sources.list.d/xbmc.org.list ### Test for Karmic, if so then comment out ###

echo '#'deb [url]http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu[/url] $RELEASE main >> /etc/apt/sources.list.d/xbmc.org.list
echo '#'deb-src [url]http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu[/url] $RELEASE main >> /etc/apt/sources.list.d/xbmc.org.list



##--[ ADDING NVIDIA REPOISOTIRES TO SOURCE LIST ]------------------------------------------------------------

echo   >> etc/apt/sources.list
echo '#' NVIDIA Repositories >> etc/apt/sources.list
echo deb [url]http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu[/url] $RELEASE main >> etc/apt/sources.list



##--[ ADDING PGP KEYS TO VERFIY VALID SOURCES ]--------------------------------------------------------------

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 318C7509 64234534 CEC06767 0x6D975C4791E7EE5E



##--[ RUNNING A SYSTEM UPDATE ]------------------------------------------------------------------------------

apt-get update



##--[ INSTALL GENERIC NVIDIA GRAPHIC DRIVERS ]---------------------------------------------------------------

apt-get install linux-headers-generic nvidia-glx-185 -y



##--[ INSTALLS XBMC Media Center ]---------------------------------------------------------------------------

apt-get install xbmc -y
apt-get install xbmc-skin-* -y
apt-get install xbmc-eventclients-* -y
apt-get install xbmc-scripts-* -y



##--[ INSTALL XBMC SVN Repo Installer ]----------------------------------------------------------------------

apt-get install unzip -y
cd /
cd /home/xbmc/.xbmc/plugins/programs
wget [url]http://xbmc-addons.googlecode.com/svn/packages/plugins/programs/SVN_Repo_Installer.zip[/url]
unzip -o SVN_Repo_Installer.zip
rm SVN_Repo_Installer.zip
chown -R xbmc:xbmc "SVN Repo Installer"



##--[ INSTALL Additional software ]--------------------------------------------------------------------------

apt-get install openbox xterm xinit x11-xserver-utils -y




## --[ INSTALL AND CONFIGURE ALSA SOUND ]--------------------------------------------------------------------

apt-get install linux-sound-base alsa-base alsa-utils -y
usermod -a -G audio xbmc

echo
echo AlsaMixer will now start so that you can configre your volum levels.
echo
echo Press 'M' to activate/deactive, Arrows to adjust volume, and ESC to save/quit.
echo Press any Key to contiue, or wait 20 seconds to continue
read -n1 -t20 any_key

alsamixer
alsactl store 0



## --[ INSTALL XBMC Bootscreen ]-----------------------------------------------------------------------------

apt-get install usplash-theme-xbmc-* -y
update-alternatives --set usplash-artwork.so /usr/lib/usplash/xbmc-splash-spinner-black.so
echo xres=1024 >> /etc/usplash.conf
echo yres=768 >> /etc/usplash.conf

update-initramfs -u



## --[ INSTALL Linux IR Remote Control Support]--------------------------------------------------------------

#apt-get install lirc -y



## --[ FINAL SYSTEM UPGRADE ]--------------------------------------------------------------------------------

apt-get update
apt-get upgrade -y



## --[ GENERATE XORG.CONF ]----------------------------------------------------------------------------------

nvidia-xconfig -s --no-logo --force-generate



## --[ ADDING HWcursor fix ]---------------------------------------------------------------------------------

sed -i '40i\    Option         "HWCursor" "False"' /etc/X11/xorg.conf



## --[ ENABLE 1080p 24Hz]------------------------------------------------------------------------------------

sed -i '50i\    Option         "DynamicTwinView" "False"' /etc/X11/xorg.conf



## --[ Disable Composite for better H264 acceleration ]------------------------------------------------------
sed -i '30i\Section "Extensions"' /etc/X11/xorg.conf
sed -i '31i\    Option         "Composite" "Disable"' /etc/X11/xorg.conf
sed -i '32i\EndSection' /etc/X11/xorg.conf



## --[ INSTALLING XBMC HELPERS ]-----------------------------------------------------------------------------
apt-get install xbmc-live python-apt -y

## --[ Setup autologin for user "xbmc" ]-----------------------------------------------------------------------------------

if [[ "$RELEASE" == "hardy" || "$RELEASE" == "intrepid" || "$RELEASE" == "jaunty" ]]
    then
        echo '# tty1 - getty' > /etc/event.d/tty1
        echo '#' >> /etc/event.d/tty1
        echo '# This service maintains a getty on tty1 from the point the system is' >> /etc/event.d/tty1
        echo '# started until it is shut down again.' >> /etc/event.d/tty1
        echo >> /etc/event.d/tty1
        echo 'start on stopped rc2' >> /etc/event.d/tty1
        echo 'start on stopped rc3' >> /etc/event.d/tty1
        echo 'start on stopped rc4' >> /etc/event.d/tty1
        echo 'start on stopped rc5' >> /etc/event.d/tty1
        echo >> /etc/event.d/tty1
        echo 'stop on runlevel 0' >> /etc/event.d/tty1
        echo 'stop on runlevel 1' >> /etc/event.d/tty1
        echo 'stop on runlevel 6' >> /etc/event.d/tty1
        echo >> /etc/event.d/tty1
        echo 'respawn' >> /etc/event.d/tty1
        echo 'exec /bin/login -f xbmc </dev/tty1 > /dev/tty1 2>&1' >> /etc/event.d/tty1
elif [ "$RELEASE" == "karmic" ]
    then
        echo '# tty1 - getty' > /etc/init/tty1.conf
        echo '#' >> /etc/init/tty1.conf
        echo '# This service maintains a getty on tty1 from the point the system is' >> /etc/init/tty1.conf
        echo '# started until it is shut down again.' >> /etc/init/tty1.conf
        echo >> /etc/init/tty1.conf
        echo 'start on stopped rc RUNLEVEL=[2345]' >> /etc/init/tty1.conf
        echo 'stop on runlevel [!2345]' >> /etc/init/tty1.conf
        echo >> /etc/init/tty1.conf
        echo 'respawn' >> /etc/init/tty1.conf
        echo 'exec /bin/login -f xbmc </dev/tty1 > /dev/tty1 2>&1' >> /etc/init/tty1.conf
fi

echo 'case "`tty`" in' > /home/xbmc/.bash_profile
echo '/dev/tty1) clear && startx &>/dev/null;;' >> /home/xbmc/.bash_profile
echo 'esac' >> /home/xbmc/.bash_profile

echo exec openbox-session > /home/xbmc/.xinitrc

mkdir -p /home/xbmc/.config/openbox

echo '#!/bin/bash' > /usr/local/bin/xbmc-session
echo >> /usr/local/bin/xbmc-session
echo 'trap "xbmc" SIGINT SIGHUP EXIT SIGTERM QUIT SIGSEGV' >> /usr/local/bin/xbmc-session
echo    'while true' >> /usr/local/bin/xbmc-session
echo     'do' >> /usr/local/bin/xbmc-session
echo     'xbmc' >> /usr/local/bin/xbmc-session
echo     'sleep 3' >> /usr/local/bin/xbmc-session
echo 'done' >> /usr/local/bin/xbmc-session

chmod +x /usr/local/bin/xbmc-session

echo xbmc-session > /home/xbmc/.config/openbox/autostart.sh

chown -R xbmc:xbmc /home/xbmc
        
    
    
#SYSTEM Reboot
sync
/sbin/reboot

NOTES
I have tested this with Karmic minimal on an Acer Revo R1600. It needs to be tested with other versions, there are still some nice little options for ATI or NVIDIA, stable or bleeding edge also to do. I (or someone elase) has to add the extras repo back in for the supported versions.

ADDITIONS
I've added autologin features, so once it reboots you'll be dropped right into XBMC, I would like to fix that part so if for some reason xbmc segfaults it will automatically be re-launched. The script now determines the version of ubuntu running and adds the correct repos.


- reticent - 2009-11-22

I'm running through it now using a karmic minimal install on a zotac ION board. Seems OK so far, however I note some errors in regards to setting up the SVN repo.

Code:
apt-get install unzip -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  zip
The following NEW packages will be installed:
  unzip
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 181kB of archives.
After this operation, 406kB of additional disk space will be used.
Get:1 http://nz.archive.ubuntu.com karmic/main unzip 6.0-1 [181kB]
Fetched 181kB in 3s (48.8kB/s)
Selecting previously deselected package unzip.
(Reading database ... 50932 files and directories currently installed.)
Unpacking unzip (from .../archives/unzip_6.0-1_i386.deb) ...
Processing triggers for man-db ...
Setting up unzip (6.0-1) ...
cd /
cd /home/xbmc/.xbmc/plugins/programs
./setup.sh: line 87: cd: /home/xbmc/.xbmc/plugins/programs: No such file or directory
wget http://xbmc-addons.googlecode.com/sv..._Installer.zip
--2009-11-22 18:52:26--  http://xbmc-addons.googlecode.com/sv..._Installer.zip
Resolving xbmc-addons.googlecode.com... 74.125.127.82
Connecting to xbmc-addons.googlecode.com|74.125.127.82|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2009-11-22 18:52:26 ERROR 404: Not Found.

unzip -o SVN_Repo_Installer.zip
unzip:  cannot find or open SVN_Repo_Installer.zip, SVN_Repo_Installer.zip.zip or SVN_Repo_Installer.zip.ZIP.
rm SVN_Repo_Installer.zip
rm: cannot remove `SVN_Repo_Installer.zip': No such file or directory
chown -R xbmc:xbmc "SVN Repo Installer"
chown: cannot access `SVN Repo Installer': No such file or directory

Is this important?


- XBMCBert - 2009-11-22

It'd be great, if the script would be modified, so that after all Linux noobs like me can have a clean installation without getting to know things about script debugging...

Nice work though! Thanks a lot for sharing your ideas!!! Nod