Setting up XBMC standalone
Now that our operating system is running, it’s time to install XBMC and have it start automatically on boot, as well as set it up to correctly see our files and build a collection.
Installing XBMC Live
The guide we need to follow is this. There’s no point in repeating all the steps that are written there as this is of a n excellent quality and obviously better than what I would write myself (and it will be kept updated). Start from this section and take care to follow the guide’s steps until at least the “Install ALSA” section. Initially I had forgotten this and was wondering why I had absolutely no sound. I didn’t have to update my ALSA however so see how it works as is before you bloat your system.
Once XBMC is running and all the steps are complete, restart your system to make sure it starts on boot. Since that will take you directly to the graphical interface, remember that you can switch to the console by pressing ctrl+alt+f2. Alternatively, you can now move the system to its final location, connect it to the LAN and ssh to it from your own PC.
Using ssh
I won’t go into a lot of details as you can find numerous guides on connecting to a GNU/Linux system via ssh if you google for it. Simply put, if your PC is a windows box, download putty and in the hostname field, type the IP address of the xbmc server or the hostname you gave it during installation. If you’re using a POSIX system (Unix, GNU/Linux, BSD etc) you should be able to simple open a console and type ssh hostname and you’ll be in. If you don’t remember the name of your server, simply go to it and type “hostname” in its console.
For credentials, use the username you created during the installation of the operating system, not XBMC as this will not allow you to switch to root.
Setting up sources
Now that the system is up and running, the most basic thing is to get XBMC to see our files. This is fairly easy if you have external hard drives and you’ve automounted them as shown in the previous guide. XBMC will pick them up and display them automatically when browsing for videos (i.e. make sure you’re not in library mode).
Note that xbmc will display the partition’s label and not the mount point, so if those are different, you might be confused. If you for some reason don’t know what their labels are, simply type the command “blkid” on your server’s console and that should clear things up. Example:
$ blkid
/dev/sda1: UUID="2050C96150C93DF2" TYPE="ntfs"
/dev/sda5: UUID="22d3ff6d-39c6-4599-8f46-2dfc8fde918c" TYPE="ext4"
/dev/sda6: UUID="5326ee5d-cf6a-4517-bef3-c62edf593fdf" TYPE="swap"
/dev/sdb1: UUID="76E0A71CE0A6E19B" LABEL="Expansion Drive" TYPE="ntfs"
/dev/sdc1: LABEL="VOID-1" UUID="b1043f04-49a7-4d66-a2e3-5e9e755520a9" TYPE="ext3"
/dev/sdf1: LABEL="Vacuum" UUID="932141a3-d08a-4dd1-8261-5f0abd4df1d1" TYPE="ext4"
But other than knowing what the labels are, you don’t need to take any more steps to have XBMC see your external drives.
Things get slightly more tricky if you’re trying to use internal storage to store files. For example, since I’ve had a lot of free space on my internal HDD after installing xbmc, I created a folder called /mnt/localshare which I wished to use for storage as well. To have XBMC see that, go to the XBMC proper and then use the “Add a source” option while in the source selection screen and manually type the full path of your local area (or browse for it).
Once you’ve got all your sources and you can easily browse them, simply go to each of the directories within them and either use a mouse’s right click or the keyboard’s context button to open the context menu and change the content type to the appropriate one. Now these folders will be scanned every time you ask XBMC to update the library of the appropriate type. Personally I also explicitly set to ignore all the folders which include stuff I don’t want in my libraries (i.e. everything except Movies, TV Series, Music Vids, Music, and Pictures).
At this point it should be useful to try and scan a folder or two to see if the content is added to your library. Remember that you need internet connection for this to work out-of-the-box (i.e. without manually creating .nfo XML files for everything in your storage) so if you don’t see your library populated after scanning a folder, check that internet connectivity is available. You have proxy settings in the settings of XBMC. If that doesn’t work, you probably need to troubleshoot your LAN connectivity.
Once your files have started appearing in your library, the basic XBMC experience is ready. You can leave this guide to enjoy it, continue to setting it up as a file server or check out some of the optional extras I’ve included below.
Activate Wiimote support (Optional)
More likely than not, you don’t have an XBMC/Linux remote control available so you’ll need to control it via keyboard and mouse. However if you have a Wii, you should be able to use your Wiimote as a second-best solution. If your server does not come with a built-in bluetooth receiver however, you’ll need to buy a USB bluetooth dongle however before you proceed. These things are pretty cheap so that’s not an issue. What might be an issue however is that power consumption of the Wiimote. Unfortunately the way it’s been handled, a connected Wiimote, even when not used is consuming a lot of power and thus will suck your batteries dry within a few hours. Keep this in mind and either shut down the Wiimote between uses or use it accordingly.
Before we can even use the Wiimote, we first need to install a few packages.The following is what I had to install after a minimal ubuntu server + xbmc-live installation:
$ sudo apt-get install xbmc-evenclients-wiiremote bluetooth
Once the packages are installed, we can test if it’s working by running (best as the xbmc user1 ) xbmc-wiiremote on the console and then pressing 1+2 simultaneously on the wiimote. After a few blinks, the 1st and 4th lights should light up signifying connection and a notice will pop-up in your XBMC informing you of the same. You can now use the Wiimote’s buttons to control XBMC (see here on how to reconfigure the buttons).
Remember that in order to use the Wiimote as a mouse, you also need an infra-red source. Your Wii’s sensor will only work if your Wii is actually powered on (unless you’re got a cordless one) and that creates a problem; mainly that if your Wii is turned on, then it will always take control of any Wiimotes you power on. We can avoid this issue by first connecting the Wiimote to xbmc and then powering on the Wii. However if you wish to turn off the Wiimote to save power, you’ll have to repeat this. Another solution, in case you don’t have a a Wii (and thus a sensor) is to simply light two candles and put them within a dozen cm of each other or so. Then simply point your Wiimote at them for pointing and presto! Instant infra-red source
. Personally I don’t use my Wiimote as a mouse as it’s not really very effective as a control mechanism.
Now that we know that our Wiimote is working, all we need to do is to start its connection to xbmc on boot, to avoid having to run “xbmc-wiimote” manually every time we need to use it. To do this, simply add the line “xbmc-wiiremote” to your /etc/rc.local. Here’s a simple command to do this
$ echo xbmc-wiiremote >> /etc/rc.local
And now every time your XBMC box reboots, a pop-up will appear informing you that XBMC is waiting for a Wiimote connection
Install a Plugin Management plugin (Optional)
One of the main strengths of XBMC is its extendibility via plugins. This allows people to have some awesome features without bloating the media system of those who don’t need them. To this end, the first thing you should do is install a Plugin Management plugin which will allow you to install/delete plugins from within your XBMC controls rather than manually.
There’s three main such plugins: SVN Repo Installer, XBMC SVN Installer and the XBMC Zone Installer
Personally I prefer the XBMC Zone Installer which seems more polished but at the start if gave me quite a lot of hiccups so I ended using the SVN Repo Installer. However when the situation stabilized a bit, I found the Zone installer quite superior in organization and usability.
To install the plugin, you basically need to copy its directory into your /home/xbmc/.xbmc/plugins/programs. You can do this by either downloading and extracting the files to your PC, then and copying them to one of your external drives2 and from there copying them to the folder via an ssh console. Or you can download and extract them directly to that directory via commands. I’m going to show how to install the XBMC Zone installer using the last method here:
First change to root if you’re not already to make our life easier
$ sudo -i
Then go to the directory we’ll put the plugin in
$ cd /home/xbmc/.xbmc/plugins/programs
Then download the plugin archive.
$ wget http://www.xbmczone.com/data/addons/XBMC Zone Installer v2.3.zip
We may have to install the unzip package before we can extract it.
$ apt-get install unzip
And then extract it
$ unzip XBMC Zone Installer v2.3.zip
Finally change permissions of the extracted files to be readable and writable by the xbmc user.
$ chown -R xbmc:xbmc XBMC Zone Installer
And you’re done. If you go to the XBMC proper, under Programs > Plugins you will now find the XBMC Zone Installer from which you can now proceed to install more plugins. I wholeheartedly suggest you install the TED and the Opensubtitles plugins.
Now that our media centre is running, we can proceed to set it up as a windows friendly (Samba) or UNIX friendly (NFS) file server. Or both