Monday, July 31, 2017

Setting a static IP in XBMC Live

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 Id 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.

Theres a great guide to setting up your own XBMC box over at LifeHacker:
http://lifehacker.com/5391308/build-a-silent-standalone-xbmc-media-center-on-the-cheap

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

If youre after a weekend project youll 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 its 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
address 192.168.0.4
gateway 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255

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

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

netmask 255.255.255.0
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:

nameserver 8.8.8.8

Now save and close the file.

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

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

download file now

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.