XBMC on Ubuntu Server, minimal install with no GDM
#1
Since more than one person has asked about my setup, I'm going to try to write a guide covering what I did to install my system using 7.10 server and no GDM. This guide will assume you at least know basic linux commands and how to install an os to begin with. I also assume that your hardware is supported, as mine is with no special configuration needed.

My hardware consists of an Asus Pundit P1/AH2, 1GB RAM, Sempron 3000+, geForce 6150. Hardly anything spectacular, but works well, is easy to setup and can play up to 720p. I'm confident I could replace the Sempron with a newer dual-core Athlon and play 1080p content just fine.

First, install 7.10 Server and after the core install is done and the software selection box comes up, choose OpenSSH only and then continue with the install. At this point, install should be finished within a couple of minutes.

After the system reboots you will have a command-line install of 7.10 server. Login to a command line and start adding packages.

Code:
sudo apt-get install wget x-window-system lirc lirc-x liblircclient0 localepurge

During install of the above packages, you will be prompted for input for x setup(choose 1024x768 and 800x600 for now), lirc setup(choose your remote and receiver), and localepurge(choose the language you want to keep). After these install are finished, install envy.

Code:
wget http://albertomilone.com/ubuntu/nvidia/scripts/legacy/envy_0.9.10-0ubuntu9_all.deb

sudo dpkg -i envy_0.9.10-0ubuntu9_all.deb

The above install will probably fail, so run:

Code:
sudo apt-get install -f

After envy installs, run it to install your nvidia or ati drivers:

Code:
sudo envy -t

Choose the option to install the nvidia or ati driver and follow the default prompts.

Now, either get the deb package for xbmc or add the xbmc repositories and do an apt-get install:

Option 1:

Code:
wget http://web.ics.purdue.edu/~nelson11/xbmc_2.1a1_svn12195-0ubuntu1_i386.deb

sudo dpkg -i xbmc_2.1a1_svn12195-0ubuntu1_i386.deb

And when it fails:

Code:
sudo apt-get install -f

Option 2:

With your favorite editor, (vi hopefully) edit your /etc/apt/sources.list as sudo and add the following lines:

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

Then, update your repositories and apt-get install xbmc:

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

At this point, xbmc and all dependencies should be installed. You should probably test it by opening an x session and trying to run xbmc. I installed the deb package so my binary is at /opt/xbmc/XboxMediaCenter.

Code:
xinit

An x session should start, and at the command line in your new window type:

Code:
./opt/xbmc/XboxMediaCenter

If all is well, an x session should have started and after launching the binary, xbmc should have fired up. You can go ahead and fix your xbmc settings for resolution and everything else now, or after you're done.

Now lets make everything automated. With your favorite editor, create a new file called XboxMediaCenter.sh at /usr/local/bin

Code:
#/usr/local/bin/XboxMediaCenter.sh

#Script to start x server and XBMC

#!/bin/bash

/usr/bin/X11/xinit /opt/xbmc/XboxMediaCenter -q &
irexec -d /root/.lircrc &
fi

The above irexec command is for buttons I use on my remote for reboot and shutdown.

Make it executable with:

Code:
sudo chmod 755 XboxMediaCenter.sh

Now we need a script in /etc/init.d called XboxMediaCenter

Code:
#/etc/init.d/XboxMediaCenter

#Start XBMC

#!/bin/sh

export PATH=/usr/bin:/usr/local/bin:/opt/xbmc
export HOME=/root

case "$1" in
start) echo -n "Starting XboxMediaCenter"

setterm -blank 0

/usr/local/bin/XboxMediaCenter.sh

esac
exit 0

Make it executable with:

Code:
sudo chmod 755 XboxMediaCenter

Now we need to link the script to /etc/rc2.d

Code:
ln -s /etc/init.d/XboxMediaCenter /etc/rc2.d/S99XboxMediaCenter

Now let's create a reboot and shutdown script. At /usr/local/bin create Reboot.sh and Shutdown.sh

Code:
#/usr/local/bin/Reboot.sh

#Reboot System

#!/bin/bash

sudo reboot

Code:
#/usr/local/bin/Shutdown.sh

#Shutdown System

#!/bin/bash

sudo shutdown -h now

Now, let's create an lircrc file to allow you to shutdown or reboot with your remote. I use a Microsoft MCE remote so the DVD and RecTV buttons are not used at this time by xbmc so I will use them for reboot and shutdown.

We need the file at /root and it needs to be called .lircrc (note the preceding period)

Code:
# Reboot System
begin
prog = irexec
button = DVD
config = /usr/local/bin/Reboot.sh
end

# Shutdown System
begin
prog = irexec
button = RecTV
config = /usr/local/bin/Shutdown.sh
end

You probably won't need to do the following since xbmc is running as root, but just in case, run visudo and near the bottom of the file, add

Code:
ALL ALL = NOPASSWD:/sbin/reboot, /sbin/shutdown

Now, to clean everything up, run the following:

Code:
sudo apt-get clean
sudo apt-get autoclean
sudo localepurge
sudo reboot

If all goes well, you typed everything correctly, and I didn't leave anything out, the system should reboot and come up directly in xbmc. It takes about 20 seconds for xbmc to come up on my hardware.
Reply
#2
Thanks rrambo will be attempting this over next couple of hours. I am running Hardy Heron though but I don't think there will be much difference.
Reply
#3
The ultimate form of this would be a bootable CD image. This will require someone with very strong ubuntu-fu.
Reply
#4
Or any other distro since it's a bootable CD Wink
Reply
#5
bmfrosty Wrote:The ultimate form of this would be a bootable CD image. This will require someone with very strong ubuntu-fu.

You could always try the bootable usb image. I would imagine it might work to burn on CD aswell.. but I haven't tested it and might be dead wrong.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#6
I actually imagine that it would be a matter of adjusting the proper scripts, and adding the proper packages to the CD. I may take the time to play with this (and figure out how to build a bootable CD image) sometime in the future.
Reply
#7
rrambo - Couple quick questions. Do you know what the difference is between the server version and the command-line only install using the alternate cd? Following your earlier posts I was able to make a command-line only system but I used the command-line only install from the alternate cd.

Second question. What is the difference between installing x-windows-system and installing xorg? Is an x-windows-system install slimmer then xorg?

One last thing, I don't know if this was the case with Gutsy, but with Hardy you can install directly from the install CD to a USB thumbdrive. I did it last night. Now my XBMC boots right off the thumbdrive. No CDROM or hard drive installed. Nice and quiet.
Reply
#8
cornbell Wrote:Thanks rrambo will be attempting this over next couple of hours. I am running Hardy Heron though but I don't think there will be much difference.

I've installed 8.04 at work and I'm still playing around with it... Haven't messed around with xbmc on 8.04 yet, but with the deb package their may be dependency problems on 8.04 so you may have to do a little more work.
Reply
#9
blubyu Wrote:rrambo - Couple quick questions. Do you know what the difference is between the server version and the command-line only install using the alternate cd? Following your earlier posts I was able to make a command-line only system but I used the command-line only install from the alternate cd.

Second question. What is the difference between installing x-windows-system and installing xorg? Is an x-windows-system install slimmer then xorg?

One last thing, I don't know if this was the case with Gutsy, but with Hardy you can install directly from the install CD to a USB thumbdrive. I did it last night. Now my XBMC boots right off the thumbdrive. No CDROM or hard drive installed. Nice and quiet.

I know that server uses a different kernel, other than that I'm not sure how many differences there are in other installed packages..

x-windows-system gave me what I needed so I didn't try xorg only, it may be slimmer..

I still haven't played around much with 8.04 other than install it and a couple of vms on one of my machines.. Gutsy doesn't have an option to install to usb from the cd as far as I know so I'm anxious to give that a try in Hardy.
Reply
#10
rrambo Wrote:I've installed 8.04 at work and I'm still playing around with it... Haven't messed around with xbmc on 8.04 yet, but with the deb package their may be dependency problems on 8.04 so you may have to do a little more work.

I installed dependencies according to README.linux and did a fresh build from svn. pretty easy.
Reply
#11
Topfs2 Wrote:You could always try the bootable usb image. I would imagine it might work to burn on CD aswell.. but I haven't tested it and might be dead wrong.

LiveXBMC on a CD is doable, it's just a matter of adjusting the initrd script. Not easy if you don't have the complete build environment. The question is: why would you prefer running off a CD when you have a bootable, persistant USB setup?
Reply
#12
Giving this a crack now. Haven't installed ubuntu before, but it's pretty straight forward so far.

Just grabbing xbmc from the repository...

I'm doing it on a 2.4Ghz P4 with 512mb ram (got more at work i can throw in if needed) and an Intel AGP card i think (on board):

[ 23.258905] agpgart: Detected an Intel 865 Chipset.
[ 23.259016] agpgart: Detected 32636K stolen memory.
[ 23.270918] agpgart: AGP aperture is 128M @ 0xf0000000

I skipped the envy step since there is no nvidia card in there - any problems with that?
Reply
#13
ok XBMC is running, but i'm getting like 1FPS... I assume because of the video card, is there anything that can be done? Or do i need a nvidia card?
Reply
#14
00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
Reply
#15
ferni Wrote:00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)

See if there are any proprietary drivers for your card that you can install. I think your card needs to support open gl 2.0
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC on Ubuntu Server, minimal install with no GDM3