12.08
In Technology | Tags: SSH, TV, Ubuntu Server, XBMC
When you come home you sometimes just wanna crash on the couch, turn on your TV and watch some series, a movie. Other times you come home and you still have loads to do, but you would like some nice music in the background. Either way you would like some multimedia solution in which you can easily access your movies, TV series and music. A real hype in the last few years have been mediacenters, it has become a whole new market in which Popcorn(not the snack), AC Ryan, Boxee, Med8er and even Apple TV have become popular. Many TV’s you can buy nowadays have simple mediacenter solutions included.
Now I don’t wanna say those solutions aren’t good, but a geek like me likes to make such a solution himself from some old computer hardware which would just be collecting dust otherwise. So already years ago I built my first mediacenter, based on Windows MCE(Mediacenter Edition) complete with matching remote control and remote keyboard. Tho times have changed and nowadays I am way more Open Source minded then I was before. So I wanted to built a mediacenter based on Linux, which has several mediacenter distributions even. But stubborn as I might be I wanted to make an XBMC mediacenter, basically since it looks slick, works nicely, works with my windows MCE remote and has a nice webinterface + android app to control it in various ways. Now I installed my mediacenter last year already with XBMC with Xubuntu as underlying linux distribution. But we are one year further, so I thought I could do it again this time.
So this time I set another challenge for me, I wanted to make my mediacenter installation itself as small and light as possible with minimal effort. I know, just figuring out that balance is already quite an effort, but I think I found quite a good solution which I wanna share with you that gave me an XBMC Pre-11.0 installation on Ubuntu 11.10 with easy setup and is working as intended so far.
Again, this post wont give you all the detailed descriptions as I think it’s all pretty straight forward for any person that is willing to give this a try.
To give you a brief overview on which I built my mediacenter, quickly my specs: AMD 3500+, 1024MB memory, ATI X1950 VGA card, SoundBlaster Live 5.1 soundcard & 500GB Disk. Yeah, its not the best hardware, but therefor more excellent that XBMC works perfectly on it. I did put the hardware in some nice looking Nox case with blue lights last year, so it wouldn’t be really bad to look at it as it stands under my TV.
First of all I downloaded the Ubuntu Server 11.10 CD, you might think why for (put in some deities name) I used Ubuntu Server, well for the plain simple reason that I tried the minimal installation CD at first, but it have me headaches. I also saw once before that you could do a minimal install with the Ubuntu Server CD, so thought this was easier and would therefor match my needs.
So after I downloaded the CD, I used “usb-creator-gtk” to put it to an USB disk so I could boot it on my box, so I did do that next(you didnt see that coming, did you?)
Then at first you have to choose a language and then you get this menu where you can choose to install Ubuntu Server, Install some cloud solution from Ubuntu, check the disk for errors, check your memory and… well you know that screen if you ever installed Ubuntu Server. If not, then you will recognnize it with this description.
In that screen is one of the keys to my, so I would like to think, wonderful solution. Press F4 at that screen and somewhere at the bottom in the center you will see a small popup menu where you can choose for “Minimal Install”(or something like it, just dont choose the Virtual option). After I did that, I choose “Install Ubuntu Server” and went thru all the settings like telling it to use my entire disk(yeah, i made backups of my data), giving the timezone and creating a useraccount(I didnt make the xbmc specific account, just a account to connect with SSH later) and that kinda stuff.
One of the things which was important to me here was that I choose “SSH Server” in one of the components which you can choose at a certain stage, so I could get my lazy ass on the couch and sit way more comfortable and configure the rest from my laptop.
After it was done it would boot nicely into some text login screen, which was great since I wouldnt have the overhead of any gui, desktop manager and window manager on my box.
So next I moved my ass to my couch, put on some music on my laptop since there was the backup of my old xbmc, and started an SSH session to the freshly installed machine. There is where I logged on with the account created during the installation proces and started the installation of XBMC. I first started with the normal team-xbmc/ppa, but that didnt have repositories for the 11.10 ubuntu, so I then used the team-xbmc/unstable ppa instead with the following commands:
sudo apt-get install python-software-properties pkg-config sudo apt-add-repository ppa:team-xbmc/unstable sudo apt-get update
After that I could install the XBMC core with:
sudo apt-get install xbmc xorg
Now I didnt have to worry about special drivers since my crappy videocard isnt supported by the good drivers, so I could start with the useraccount. Now I will type the order a bit differently then I did them, but only to have it in the proper order in this post:
sudo apt-get install uxlaunch sudo apt-get install policykit-1 sudo adduser xbmc --gecos XBMC< sudo usermod --group adm,sudo,cdrom,floppy,audio,video,plugdev,fuse,polkituser xbmc sudo apt-get install xbmc-live
After that I could login once as xbmc and type:
xinit xbmc-standalone
to see if it would launch properly, which thank (put in deity name) it did.
Next I just ran some commands to make sure my sound would work in a later stage(especially nice when you like to listen to some music):
sudo apt-get install alsa-utils pulseaudio
and then I ran:
sudo alsamixer
now later that night I figured that “MM” would mean Mute, which you can toggle with the “M” key on your keyboard, but since F1 would give me the Gnome terminal help instead of the alsamixer help, I wouldnt figure that out till late that night.
i saved my sound settings with:
sudo alsactl store 0
Then I rebooted my machine and see if things would start automatically, which it did, but I couldnt control it with my fancy MCE remote, so there was still some work left to do.
First the remote control, which is as easy as:
sudo apt-get install lirc
and then choose the Windows MCE remote and one of the matching digital receivers.
Then I wanted to be able to add some functionality like shutting down, rebooting, automounting disks, so used the following commands:
sudo apt-get install upower acpi-support sudo apt-get install udisks usbmount sudo apt-get install ntfs-3g
(which was already installed, but better safe then sorry)
some editing via:
sudo nano /etc/usbmount/usbmount.conf
changing
FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus"
to
FILESYSTEMS="ntfs vfat ext2 ext3 ext4 hfsplus"
(notice the extra ‘ntfs ‘ in front, that’s the only 5 chars you had to type)
Then making sure some policies where alright by:
sudo nano /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla
and adding the following text into that file:
[Actions for xbmc user] Identity=unix-user:xbmc Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.* ResultAny=yes ResultInactive=no ResultActive=yes
Now I had only one problem, when I would try to play MP3’s my XBMC would crash and start back up. Now at least I didnt have to go thru the inconvenience of starting it manually every time, but it would be nice if I could play mp3’s, since still most of my music collection are encoded with that codec. Soon I found that all I had to do was:
sudo aptitude install libmad0
To get it working, in the meantime I had run:
sudo aptitude install gstreamer0.10-fluendo-mp3
Not sure if that latter had any impact, but wanna be sure that anyone using this post as guidance wont get stuck on that.
Now I have been able to write this post, while listening to some music that was on an external disk attached to the XBMC box without any hassles, so that’s already a great confirmation it works. I played some movie samples last night to make sure video works properly as well and that also worked great. I installed addons like subtitle downloaders, weather info by just using my remote, so also that part works.
Now I will be enjoying my XBMC mediacenter, if you are crazy enough to use this chaotic post as an advisory to try so as well, please also keep the following link open, since it has been a great source of info to me(you will see where I found all those fancy commands):
http://wiki.xbmc.org/?title=XBMCbuntu
0 Responses.