Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 17
[LINUX] XBMC Setup Script - Automatic installation of XBMC for Linux
#1
Thumbs Up 
Updated post. (so I could write some more beneath)

Image


Background:
The script is intended for people who have ported from another XBMC platform to XBMC Linux, and might not have the knowledge (or patience) to learn how to do every step. The script is based upon a custom system installation, where you can make different paritions, install another Linux OS and other applications and so on, but still gives you the option to boot straight into XBMC with a minimal OS installation.

I would still advice "beginners" who just want a Medie Center out-of-the- box without advanced modifications, to install XBMC Live. But if you want more control over your system and maybe install another Linux OS on another partition, keep on reading...


What the script does:
  • Installs XBMC
  • Installs XBMC Skins
  • Installs XBMC Bootscreens
  • Installs SVN Repo Installer (used for downloading of new plugins & scripts)
  • Installs Generic NVIDIA drivers for all kernels
  • Installs Alsa sound and configures sound levels (manual)
  • Installs Tweaks for video
  • Makes XBMC bootable as default

Hardware Compatibility

TO-DO list:
  • Menu to choose from Stable Release or Bleeding Edge Release
  • Automatic adjustments of all volume channels in Alsamixer
  • Additional tweaks

UPDATES:
  • Enabled 1080p @ 24Hz (24.07.2009)
  • Added H264 acceleration fix (Disabled Composite in xorg.conf) (22.07.2009)
  • Added HWCursor fix (20.07.2009)

NOTES:
  • Do NOT uncomment the SVN Repositories during first time installation, or it will fail.


Installation:

  1. Install Minimal Ubuntu


  2. Log in with XBMC user account


  3. Download the script (or get the code below):
    Code:
    wget http://www.virtualdanny.net/downloads/setupXBMC.sh


  4. Make the script executable:
    Code:
    sudo chmod +x setupXBMC.sh

  5. Run the script with root:
    Code:
    sudo ./setupXBMC.sh




setupXBMC.sh code:
Code:
#!/bin/bash
#------------------------------------------------------------------------------------------------------------
# setupXBMC Version 0.6b - 23/07/2009
# XBMC Installation script - by VirtualDanny.net
# This script will provide an automatic installation of Xbox Media Center
#
# REQUIREMENTS:
# * Clean Ubuntu Jaunty Server Installation (https://help.ubuntu.com/community/Installation/MinimalCD)
# * XBMC Compatible Hardware (http://wiki.xbmc.org/?title=XBMC_for_Linux_specific_FAQ)
# * 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
#
# KNOWN BUGS:
# * Installation will fail if you uncomment SVN Repositories during first time installation.
#
# Remember to run this script with: sudo ./setupXBMC.sh
#------------------------------------------------------------------------------------------------------------
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 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/ jaunty main >> /etc/apt/sources.list.d/xbmc.org.list
echo deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/ jaunty main >> /etc/apt/sources.list.d/xbmc.org.list
echo deb http://ppa.launchpad.net/xbmc-addons/ppa/ubuntu jaunty main >> /etc/apt/sources.list.d/xbmc.org.list

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



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

echo   >> etc/apt/sources.list
echo '#' NVIDIA Repositories >> etc/apt/sources.list
echo deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu jaunty 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 http://xbmc-addons.googlecode.com/svn/packages/plugins/programs/SVN_Repo_Installer.zip
unzip SVN_Repo_Installer.zip
rm SVN_Repo_Installer.zip
chown -R xbmc:xbmc "SVN Repo Installer"



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

apt-get install fluxbox 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


#SYSTEM Reboot
pkill X
reboot


Final notes:

I made this script primarily for personal use and to my friends. I still hope this can be to use for someone else who don't have Linux knowledge and want to install XBMC Media Center in 1-2-3. I learned the Linux language 8 days ago, so feel free to post comments on how to optimize/change the script to get better.

Tested 100% working on ASRock ION 330. I hope it will work on other hardware aswell, but there is always a chance that you need to modify the script to suit your specific hardware (etc Multicard readers, Wireless, Remote Controls, Bluetooth). Please give a feedback on how it went on your system, and I will see what I can do to adapt the script to suit your hardware.

Credit and thanks goes to
joggs, vikjon0, rickx and Haggy who all have given me input or knowledge to make this script better.


Thank you, and good luck with the script!
Reply
#2
XBMC Setup script
Quick-Start:

You should always update yourself with the XBMC Media Center manual. There's a lot of good information and "How-To's" which will come in handy.
Also, the forum and Google is your two best friends in finding answers.


HOW-TO: install new plugins, scripts and themes:

1) Go to: Settings > Skin Settings > Home Window, and choose "Show Programs in Main Menu"

2) Now, choose 'Programs' from the Main Menu

3) Run SVN Repo Installer

4) Install Plugins, Scripts or Themes.


HOW-TO: change default bootscreen:

1) Press CTRL+ALT+F2 for Linux Terminal

2) In the terminal, write:
Code:
sudo update-alternatives --config usplash-artwork.so

3) Save your config:
Code:
sudo update-initramfs -u

4) Reboot your system to test the new bootscreen:
Code:
sudo reboot



HOW-TO: install an IR Remote Control:

1) Press CTRL+ALT+F2 for Linux Terminal

2) In the terminal, write:
Code:
sudo apt-get install lirc -y

3) Choose your Remote Control and do the necessary configuration.

3) Press ALT+F7 to return to XBMC



HOW-TO: upgrade XBMC to new SVN version:

1) Press CTRL+ALT+F2 for Linux Terminal

2) In the terminal, write:
Code:
sudo nano /etc/apt/sources.list.d/xbmc.org.list

3) Uncomment the lines (remove # in front of the line):

Code:
#deb http://ppa.launchpad.net/[b][color=Red]team-xbmc-svn[/color][/b]/ppa/ubuntu jaunty main
#deb-src http://ppa.launchpad.net/[b][color=#ff0000]team-xbmc-svn[/color][/b]/ppa/ubuntu jaunty main

4) Comment the lines (put a # in front of the lines):

Code:
deb http://ppa.launchpad.net/[color=#ff0000][b]team-xbmc[/b][/color]/ppa/ubuntu/jaunty main
deb-src http://ppa.launchpad.net/[b][color=#ff0000]team-xbmc[/color][/b]/ppa/ubuntu/ jaunty main


5) Press CTRL+X to exit and save changes

6) Do the upgrade:

Code:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xbmc

7) You have now activated the XBMC SVN repositories. Next time you want to upgrade, simply do step 1 and 6.


HOW-TO enable HDMI:

1) Go to: Settings > System > Audio hardware

2) Settings you should try:

Audio output: Digital
[INDENT]Alternative 1: (write it with your keyboard)
Default audio device: hdmi

Alternative 2: (write it with your keyboard)
Default audio device: plug:hdmi

Alternative 3: (write it with your keyboard)
Default audio device: plughw:0,3

Passthrough audio device: hdmi
Downmix to stereo: Yes/No

Remember:

1. You need to disable Dolby Digital and/or DTS unless the device on the other end can decode the signal. Most Surround Speakers have one, or both options.
2. If you have not unmuted HDMI under AlsaMixer, you will not get HDMI to work.
[/INDENT]
Reply
#3
XBMC Setup script
F.A.Q:


Q: Is Aeon installed with the skins?
No, you need to install Aeon yourself.


Q: Can I upgrade XBMC from within XBMC?
You can try the Aptitude script which comes with the XBMC Live
Code:
$ cd ~/.xbmc/scripts
$ wget -r -l1 --no-parent --convert-links -nH -nd -P\Aptitude  http://xbmc-addons.googlecode.com/svn/trunk/scripts/Aptitude/

Q: What if I want to reinstall XBMC?
Take a backup of your 'UserData' folder - and simply transfer it back when you have re-installed XBMC.
On Linux, your 'UserData' is stored under /home/xbmc/.xbmc (where .xbmc is hidden)

Personally I take backup of the "UserData", "Skin" and "Plugin" folder with WinSCP.

Q: Will XBMC be able to play 1080p /24hz?
Yes, depending on your TV's resolution. The scripts adds this option during installation.
Just remember to add "Automatic Refresh" under your Video Player options before you try to change resolution.

Q: Will XBMC get me popular with the girls?
Depends, install an easy-to-use skin, remove your porn collection and don't brag about how big your amplifier is.
And remember: always test your system before you're going to "Show-off" your new Media Center solution.

Q: Where do I go from here?
The XBMC Community Forum is your number #1 source of knowledge to tweak, adjust and manipulate your XBMC Media Center.
From here the your possibilities are (almost) endless, either it's modifying the way XBMC Media Center looks, or to change how it behaves.
You can even take on the challenge to make your own scripts and plugins or your own kickass skin.
Reply
#4
Amazin work to all us Linux noobs who got an Asrock Ion 330 and dont know how to set it up....

Keep up the amazin work m8...Cool
Reply
#5
QUESTIONS
a) HOW-TO: install new plugins, scripts and themes:
1) Go to: Settings > Skin Settings > Home Window, and choose "Show Programs in Main Menu"
2) Now, choose 'Programs' from the Main Menu
3) Run SVN Repo Installer (howHuh??)
4) Install Plugins, Scripts or Themes.

b) pressing Alt+f2 doesnt show me any terminal screen (in xmbc)

c) is it possible to add a script with ubuntu desktop (i mean minimal install ubuntu, but with base, SSh, and ubuntu desktop for us that want to serf in internet)
i say this cause script produces error message if ubuntu desktop is installed
Reply
#6
and if u have any ideas how to install torrentflux or any other torrent client on this minimal ubuntu i would be grateful... (or do i need full ubuntu setup?)

than u for ur time.... Nod
Reply
#7
solamnic Wrote:QUESTIONS

b) pressing Alt+f2 doesnt show me any terminal screen (in XBMC)

its Control+Alt+F2 for terminal
and Control+Alt+F1 to return to XBMC....

and another question in terminal typing
cd ~/.xbmc/skin
cant find it....

wont ask any more questions.... for now... waiting patiently for ur answers
Reply
#8
solamnic Wrote:3) Run SVN Repo Installer (howHuh??)

Try to run this in terminal again, to ensure you get the SVN Repro Installer:

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

The plugin should then be located under Programs > Programs Plugins > SVN Repo Installer

Quote: pressing Alt+f2 doesnt show me any terminal screen (in XBMC)

Sorry, have updated the text with the correct values : "CTRL+ALT+F2"


Quote:c) is it possible to add a script with ubuntu desktop (i mean minimal install ubuntu, but with base, SSh, and ubuntu desktop for us that want to serf in internet)
i say this cause script produces error message if ubuntu desktop is installed

Yes,
Scripts should be located in ~/.xbmc/skin
Plugins should be located in ~/.xbmc/skin
ASRock ION 330 | Onkyo TX-SR707 | KEF 2005.5 | Samsung LE-40F86 | Harmony 1000 Remote Control | XBMC Media Center Linux Ubuntu Jaunty 9.04
My XBMC Custom Installation script for Linux
Reply
#9
solamnic Wrote:and another question in terminal typing
cd ~/.xbmc/skin
cant find it....

Strange, it should be your home directory.
In Linux, ~ refers to your users profile directory, like %UserProfile% in Windows.

You should have a skin folder under your .xbmc directory.
What do you have under your ~/.xbmc/ then?

(Remember, the .xbmc directory is hidden. So if you use a Window Manager you have to show hidden files first)
ASRock ION 330 | Onkyo TX-SR707 | KEF 2005.5 | Samsung LE-40F86 | Harmony 1000 Remote Control | XBMC Media Center Linux Ubuntu Jaunty 9.04
My XBMC Custom Installation script for Linux
Reply
#10
In second post .. add info to enable VDPAU in Render Method...
Reply
#11
cyberpark Wrote:Try to run this in terminal again, to ensure you get the SVN Repro Installer:

[CODE]apt-get install unzip -y

error occurs...
could not open lock file /var/lib/dpkg/lock -open (13 permission denied)

it was sudo apt-get install unzip -y

but still problem
Revo is downloaded
but after wget
cannot write SVN_Repo_installer.zip premission denied

and
b) changing in SMB client workgroup name to HOME after xbmc restart workgroup name is back to WORKGROUP...
Reply
#12
cyberpark Wrote:Strange, it should be your home directory.
In Linux, ~ refers to your users profile directory, like %UserProfile% in Windows.

You should have a skin folder under your .xbmc directory.
What do you have under your ~/.xbmc/ then?

(Remember, the .xbmc directory is hidden. So if you use a Window Manager you have to show hidden files first)

typed cd /home/xbmc/.xbmc/skin

and ok now
Reply
#13
Oh dear...where to start. I'm sure your intentions were pure and all, but I simply can't condone the use of a tool such as this. The concept is sound, assuming everything goes as planned, but what if an error occurs? There's no useful output, no error checking at all, it's all extremely naive. How are we supposed to offer support to users who have no idea what they've done? Linux isn't Windows, the type of person who will find this script useful doesn't know that. How can they help us help them? If they had installed manually, not only would they know at what stage an error occurred, but they would have learned from all of the steps leading up to it. Users who aren't willing to learn a little bit to get what they want, aren't ready for Linux either.

So if you're ready to handle every support questions from every user who installs with this script, regardless of whether it applies directly to the script or not, great, we'll move the posts here. Otherwise, I'm going to have to discourage all users from installing with this method.

I'm sorry I have to be so discouraging on the matter. Hopefully you can find some other way to contribute you skills to the community.
Reply
#14
althekiller Wrote:Oh dear...where to start. I'm sure your intentions were pure and all, but I simply can't condone the use of a tool such as this. The concept is sound, assuming everything goes as planned, but what if an error occurs? There's no useful output, no error checking at all, it's all extremely naive. How are we supposed to offer support to users who have no idea what they've done? Linux isn't Windows, the type of person who will find this script useful doesn't know that. How can they help us help them? If they had installed manually, not only would they know at what stage an error occurred, but they would have learned from all of the steps leading up to it. Users who aren't willing to learn a little bit to get what they want, aren't ready for Linux either.

So if you're ready to handle every support questions from every user who installs with this script, regardless of whether it applies directly to the script or not, great, we'll move the posts here. Otherwise, I'm going to have to discourage all users from installing with this method.

I'm sorry I have to be so discouraging on the matter. Hopefully you can find some other way to contribute you skills to the community.


Hm.. this is not the reaction i would expected from an XBMC developer...

btw this fellow was trying to do was to simplify things for everyone insterested....

Nevermind ....
Reply
#15
althekiller Wrote:Oh dear...where to start. I'm sure your intentions were pure and all, but I simply can't condone the use of a tool such as this. The concept is sound, assuming everything goes as planned, but what if an error occurs? There's no useful output, no error checking at all, it's all extremely naive. How are we supposed to offer support to users who have no idea what they've done? Linux isn't Windows, the type of person who will find this script useful doesn't know that. How can they help us help them? If they had installed manually, not only would they know at what stage an error occurred, but they would have learned from all of the steps leading up to it. Users who aren't willing to learn a little bit to get what they want, aren't ready for Linux either.

So if you're ready to handle every support questions from every user who installs with this script, regardless of whether it applies directly to the script or not, great, we'll move the posts here. Otherwise, I'm going to have to discourage all users from installing with this method.

I'm sorry I have to be so discouraging on the matter. Hopefully you can find some other way to contribute you skills to the community.


Like I already wrote in my post:
"I made this script primarily for personal use and to my friends. I still hope this can be to use for someone else who don't have Linux knowledge and want to install XBMC Media Center in 1-2-3. I learned the Linux language 8 days ago, so feel free to post comments on how to optimize/change the script to get better"

The script barely does the EXACT same thing as all these different "HOW-TO" guides. It's just basic commands put togheter in automation. If it doesn't work for you, try another method. Even the step-by-step guides / Newbies have x-amount of posts from users having problems, so I don't see the big difference.

Yes, the code SHOULD be better with etc error checking, log output.. but like I'we already stated: I'm no expert in Linux. I did this from a Linux-Dummies-But-Want-To-Learn stand of view. I was of course hoping that someone with Linux coding knowledge could come with some nice feedback before I learned some better coding. Every idea has to start somewhere before it grows into a 100% working solution.

Ofcourse, I didn't place this thread under "Supplemental Tools for XBMC" myself. I would also expect to have another feedback based on more answers and feedback to this post itself. Not one person having some questions.
ASRock ION 330 | Onkyo TX-SR707 | KEF 2005.5 | Samsung LE-40F86 | Harmony 1000 Remote Control | XBMC Media Center Linux Ubuntu Jaunty 9.04
My XBMC Custom Installation script for Linux
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 17

Logout Mark Read Team Forum Stats Members Help
[LINUX] XBMC Setup Script - Automatic installation of XBMC for Linux4
This forum uses Lukasz Tkacz MyBB addons.