Saturday, September 18, 2010

Setting a static IP in XBMC Live

For those of you who are not familiar with XBMC I highly recommend checking it out. It started out as a mod for the original XBox and has since developed into a really nice, cross-platform(Linux, OSX, Windows) HTPC interface. XBMC has since spawned several successful variants such as Boxee and Plex.

Also on offer is XBMC Live which is a stripped down version of Ubuntu designed to just run XBMC and give your HTPC a nice set top box kind of feel, without having to deal with the underlying operating system. You can boot XBMC Live from CD, USB or do a HDD install for a permanent installation.

Up till now i have been running Ubuntu 10.04 UNR with XBMC installed but I figured I'd try out XBMC live because I liked the neatness of having an entire OS devoted to the single task I want to use the computer for. Also just for the hell of it, i love XBMC and trying out new operating systems.

There's a great guide to setting up your own XBMC box over at LifeHacker:

My conclusion: Pretty Damn Good!
I've only been using the new setup for a week so I'm going to hold back my verdict of "Totally Awesome" until I have done some more testing but so far - perfect!

If you're after a weekend project you'll be disappointed because the entire install took 20 minutes and everything worked flawlessly( at least on my acer Revo R1600). That includes all codecs and my cheap generic MCE remote with all the buttons working and mapped as they should be.

However one of the first things I wanted to do was set up a static IP for the box. In the current release you cannot do this via the XBMC interface(I believe this feature will be added soon) so it's time to get our hands dirty editing some files.

Step 1. Open a terminal
to do this click on the power icon in the bottom left hand corner of the XBMC interface then select "Close XBMC".

Step 2. Login and start X
you will be prompted for your username and password, you need to enter them to continue. After entering your login information succesfully run the command "startx". This will log you into a basic GUI running on Fluxbox.

Step 3. Edit your interfaces file
Right click anywhere on the Fluxbox desktop to bring up the main menu the select:
Applications->Terminal Emulators->XTerm

sudo xedit /etc/network/interfaces

the file will look something like this:

auto eth0
iface eth0 inet dhcp

you need to change it to look like this:

auto eth0
iface eth0 inet static

Obviously substituting the example values with the values for you own network.

These settings relate to your network, if you're not sure what these are use the values listed below:

network 192.168.[whatever ip range you are using].0
broadcast 192.168.[whatever ip range you are using].255

After editing you can save and close the file, the static ip address is now set but there is one more step to go, you now need to set your DNS server so you can access sites etc by url.

Step 4. Set your DNS
run this command at the terminal:
sudo xedit /etc/resolv.conf

set the DNS server like so:


Now save and close the file.

NOTE: I have used the google DNS address ( you can put your own value here or just use

Now restart your machine and you should be good to go.


  1. Thank you for this guide. It's nicely written and saved me some time on my XBMC Live setup I'm working on this rainy weekend. :)

  2. how about to change it back to auto ip?i cant get it work with broadband,connected with ethernet.thanks/

  3. I followed these instructions and worked perfectly! Very nice, this was a large problem. Thanks! ^^

  4. Can't you just set a static ip inside of XBMC? Settings->Network

  5. I use XBMCbuntu. Exited out of XBMC so I could logged into the XBMCbuntu. I'm not keen on scripts or typing so I opened the network manager. If you don't see it, open the xterm terminal window and install it. sudo apt-get install network-manager. I opened that and edited my wired connection (IPv4) to take my static ip. Logged out of XBMCbuntu and back into XBMC. Might be the long way, but it works for me. :)