How to enable root on Raspbmc

The root user is disabled by default on Raspbmc. To enable it, just try:

$ sudo passwd root

Tried with: Raspbmc 1.0

How to add USB wireless adapter to Raspbmc

I hate wires. So, I was happy to remove the ethernet cable from my Raspbmc setup and replace it with a USB wireless adapter. The steps are pretty easy:

  1. Get a USB wireless adapter. These are very cheap. I bought a DX Original USB wireless adapter, since I had read that it works out of the box with Raspbmc. Plug in the wifi adapter to your Raspbmc.

  2. Connect a wired or wireless mouse or remote to the Raspbmc. Use it for the configuration steps.

  3. Reboot the Raspbmc. This is needed sometimes for the mouse to be detected.

  4. Go to Programs > Raspbmc settings. In the Network Configuration tab change the Network Mode to Wireless.

  5. Configure the rest of the settings. The default is DHCP. If you want to use a static IP address, provide the necessary details.

  6. The scan for wireless networks did not work, it showed up empty. So, I manually entered the Wifi SSID (name of your wireless network), Wifi Security mode and the Wifi Key (wireless password). Click Update Now and OK.

  7. Your wireless adapter should be able to connect to your home network now. If not, reboot the Raspbmc.

  8. Unplug the Ethernet cable and enjoy your Raspbmc πŸ™‚

How to install Raspbmc using Ubuntu

Note: If you are using Windows, please use this guide to installing Raspbmc.

To install Raspbmc, you need a Raspberry Pi board, a 5V micro-USB power connector, a LAN cable, a HDMI cable and an internet connection. You also need a SD card with storage capacity of 4GB or more. Ensure that it is a class 10 or better SD card.

  • Plug in the SD card into the computer running Ubuntu.

  • At the terminal:

$ wget
$ chmod +x
$ sudo python

The installer prompts you for the location to install and other settings. Most of that is straightforward.

  • Remove the SD card from the computer and plug it into the Pi. Connect the ethernet cable from your home wireless router to your Pi. Connect HDMI cable to Pi and your TV. Turn on the TV and switch to HDMI input. Connect the power cable to the Pi and check if some lights turn on the board.

  • Raspbmc will do the rest of the installation by itself from the internet. After about 20 minutes, you will have Raspbmc showing XBMC on your TV! πŸ™‚

Tried with: Raspbmc 1.0

How to torrent on Raspbmc using Transmission

Raspberry Pi can be converted into a capable HTPC by installing Raspbmc on it. It can be further used to download torrents by using Transmission. I mostly used the steps from this guide, though I had make some extra customizations to get it working. I have described the steps that worked for me below.

Setup the hardware

Raspbmc is typically installed on a SD card. Storage left on this card may not be enough to download and store big files. To extend the storage I used a portable harddisk. The Raspberry Pi is not powerful enough to provide power to the harddisk through its USB port.

So, I bought a USB hub that is powered from electricity using a power adapter. I connected this hub with its USB cable to the Raspberry Pi. I connected the harddisk to this hub using another USB cable.

I powered on the Raspberry Pi. After login into the Pi using SSH, I could see that Pi had detected and mounted the harddisk by using the command df. I noted down the mounted path of the harddisk, in my case this was /media/foo-disk.

Note: The USB hub may have many ports, but do this setup connecting only the harddisk. If that works fine, try connecting other additional devices, for say charging, to the hub. If you notice that your harddisk gets unmounted by the Pi after a while, then this might mean that the USB hub can only power one device, i.e., your harddisk. This is what I noticed with my hub and so I only use it to connect the harddisk.

Setup Transmission

  • First, I installed the Transmission daemon on the Pi:
$ sudo apt-get install transmission-daemon
  • After installation, the daemon is automatically started. Since I need to setup the daemon correctly, I stopped it:
$ sudo service transmission-daemon stop
  • I created two directories on the harddisk: one to hold the files whose download is in progress and another to hold the completed downloads. Transmission can be setup to use the former while downloading and move them to the latter when finished.
$ cd /media/foo-disk
$ mkdir downloading
$ mkdir finished
  • I opened the settings file of Transmission to make the changes:
$ sudo vi /etc/transmission-daemon/settings.json

The description of the various configuration parameters in this file can be found here.

  • I edited the following parameters in the file:
"download-dir": "/media/foo-disk/finished",
"incomplete-dir": "/media/foo-disk/downloading",
"incomplete-dir-enabled": true,
"rpc-password": "raspberry",
"rpc-username": "pi",
"rpc-whitelist-enabled": false,

Note that Transmission will replace the text password you typed here with its hash after the daemon is started.

  • As one last step, I setup the daemon to be started whenever Pi boots up:
$ sudo update-rc.d transmission-daemon defaults
  • I now started the daemon with the new settings:
$ sudo service transmission-daemon start
  • The web interface of Transmission can be accessed from any computer in the network using the IP address and port 9091. You might want to configure your Pi with a static IP address to make this easier. For example, my Pi is at address and so I access Transmission by typing in the browser:

  • Note that the web interface is fully configurable. Other than the buttons on top and the bottom, you can also right-click to get context menus. In the settings, you can even configure Transmission to download only at certain times of the day. This is perfect if you do not want your TV viewing in the evening interrupted by torrent downloading in the background.


Permission denied

The daemon needs permission to write to the harddisk. If not, you may see a Permission denied error in the web interface when the daemon tries to write to the harddisk.

  • The daemon writes to disk as the user debian-transmission. One solution is to give this user write permissions to the directories on the hard disk:
$ sudo chown -R debian-transmission /media/foo-disk/downloading
$ sudo chown -R debian-transmission /media/foo-disk/finished
$ sudo vi /etc/init.d/transmission-daemon

and edit the line in it to:


Hard disk getting dismounted

The harddisk mounted by Raspbmc might get automatically dismounted if there is no activity for a few minutes. When this happens, Transmission fails with an Input/Output Error. To prevent this, I added a cronjob that creates a file after 4 minutes and deletes it after 5 minutes. To do this run:

$ sudo crontab -e

This opens a cronfile in the nano editor. Go down to the end of the file and add these two lines and save the file:

*/4     *       *       *       *       rm /media/foo-disk/keepMeUp.txt
*/5     *       *       *       *       touch /media/foo-disk/keepMeUp.txt

That is it, this worked fine on my Pi. I hope it does for you too πŸ™‚

How to remove sources in Raspbmc

Sources of videos, music and pictures can be added easily using the GUI in XBMC on Raspbmc. However, if you want to remove some of the sources there is no way to do that in the GUI.

To do this:

  1. SSH into the Raspbmc.

  2. Open the file /home/pi/.xbmc/userdata/sources.xml and you will see the source entries in it. Remove or edit the entries you want and save the file. You can also add entries here if you want.

  3. Restart XBMC in Raspbmc. The sources you removed will be gone.

Tried with: Raspbmc 1.0-hardfp-b20130208-u20140401

How to download subtitles in VLC using VLSub

One of the most convenient features of XBMC is that you can automatically download subtitles for any video right from inside it. It would be really nice to have this feature with VLC. And it can be done using the VLSub extension:

  1. Download the vlsub.lua file from its Github repository or VLC addon page.
  2. Create the directory ~/.local/share/vlc/lua/extensions/ and place the Lua file there. This is where VLC looks for its extensions.
  3. Play any video using VLC. Choose View > VLSub, this shows the VLSub dialog.
  4. Choose either Search by hash or Search by name. The extension searches in OpenSubtitles and displays the list of all matching subtitles. Select the subtitle you want and click Download. Once the download is done, click Close.
  5. The extension downloads the subtitle file, places it in the same directory as the video file, renames it to have the same name as the video file and applies it to the currently playing VLC. Enjoy πŸ™‚

Tried with: VLSub 0.9, VLC 2.0.5 and Ubuntu 12.04 LTS

How to access a NFS shared directory from Raspbmc

Raspberry Pi running Raspbmc functions as an excellent HTPC.Β If you have videos, music or photos on one of your home Ubuntu or Linux computers, then it might be convenient to access or view the media right from your Raspbmc over the home network. The easiest way to do this is to share the media files in a NFS shared directory and access that from Raspbmc as NFS client. I am assuming that the Ubuntu computer and Raspbmc are connected to the same wireless router or the same home network.

First setup the Ubuntu computer:

  1. Your Raspbmc will access your Ubuntu computer using its IP address. So, it might be convenient to configure a static IP address for the Ubuntu computer. In any case, note down the IP address of the Ubuntu computer.
  2. Create a directory and make sure the directory name has no spaces in it. Drop all the media files you want to share into this directory. Share this directory using NFS.

Next setup the Raspbmc to access the shared directory:

  1. Make sure you can ping the Ubuntu computer from the Raspbmc. You can do this by SSH to Raspbmc (here is how) and pinging the IP address of the Ubuntu computer.
  2. Assuming you want to access the video files in the shared directory. (The steps for Audio is similar, just use the Audio menu in these steps). In XBMC, go to Videos β†’ Files β†’ Add videos β†’ Browse
  3. In the Browse dialog, choose Network Filesystem (NFS). The IP address of your Ubuntu computer must be listed here. Enter it and pick the shared directory and choose OK.
  4. The Ubuntu computer shared directory now appears in the listing, choose OK. Press OK in the next dialog. Now the shared directory is visible in the Files listing and you should be able to browse through the media files inside it and play them whenever needed.

Have fun playing the content from your Ubuntu computer on your Raspbmc πŸ™‚

Tried with: Ubuntu 12.04 LTS and Raspbmc Release 1.0

How to download and play subtitles in Raspbmc

XBMC, and hence Raspbmc, can automatically show subtitles when the subtitles file has the same name as the video filename and is placed in the same directory. What is awesome is that you can download and play subtitles for any video file right from the comfort of your XBMC!

XBMC 13 (Gotham) and later

XBMC 13 added native support for subtitle downloading. Go to Settings > Video > Subtitles. Scroll down to Default TV service and Default Movie service. When you enter, you are given a list of subtitle websites and you can pick which you want for TV and movies. More details can be found here.

XBMC 12.x and older

First, you need to install the XBMC Subtitles add-on. To do this, go toΒ System > Settings > Add-ons > Get Add-ons > Add-ons > Subtitles, choose XBMC Subtitles Add-on and install it.

Downloading subtitles

Next, play any video file. While it is playing choose the Download Subtitles option. This is available in XBMC remote apps like Yatse. Else, choose whatever option makes the video playback scroller appear. There on the set of icons below it on the right side, pick the first one.

Either way, this takes you to the Downloading Subtitles widget. XBMC will query subtitles databases online and show you a list of the best matching subtitles for your video file. Pick the one you want and press OK. XBMC will download the subtitle file and restore playback of the video file with the subtitles enabled. It is as easy as that! πŸ™‚

Yatse on Android as remote for Raspbmc

Yatse Widget on Nook Color running CM10
Yatse Widget on Nook Color running CM10

Raspbmc can be controlled from a Android phone or tablet by using the XBMC remote app. However, there is a much better alternative: Yatse Widget. This app looks gorgeous and is far better designed. The UI is almost perfect and using it is a real joy. If you are running Raspbmc and have an Android phone or tablet, give Yatse a try from the Google Play Store.

Tried with: Yatse Widget 2.9.6, CyanogenMod 10-20121228-NIGHTLY-encore and Nook Color 8GB

Reboot loop after XBMC nightly install on Raspbmc

After installing a XBMC nightly on Raspbmc and choosing to restart the system, it went into a loop. XBMC would repeat “Relax XBMC is restarting” endlessly.

Of the many solutions offered online, this worked for me.

  1. SSH into Raspbmc as user pi. Only XBMC is stuck in a loop, so this means that the underlying Raspbmc Linux OS is still running and accessible. This is the reason you can SSH to it.
  2. rm ~/.xbmc-current
  3. Reboot the system.

Tried with:Β Raspbmc RC5 and XBMC rbp-20121231