Geek Freely: xbmc

    Featured Post

    The whole point in this post is to run your own VPN service, and allow you to connect remote devices to your home network.

    To start off yo…

    Showing posts with label xbmc.

    Showing posts with label xbmc.

    The Hardware

    After approximately 10 years of using XBMC, the old name for Kodi, I have tried a variety of hardware end-points.

    Always searching for the best bang for my buck. My conclusion is the Chromebox, I have a single

    and I am considering replacing my Pi’s with two more Chromeboxes. Raspberry Pi’s are nice and all, but they just don’t have the grunt, you are constantly modifying settings and over-clocking. The Asus Chromebox is a no hassle Kodi player.

    It’s silent, powerful, and it comes at the great price ~$160.

    Now I know a lot of people will be saying the Pi is cheaper, but let’s be honest – you need to spend at least $95. For that you get, the




    (~$15) – and that doesn’t even include cables or a power supply, because you may have it lying around.

    The only question about the Chromebox is to consider which version. Some will , and some will give you , and of course some will give you both.  I have a basic , but am tempted by the

    for the AC network adapter.  provided some insightful comments on the Chromebox support of 4k and Wireless AC. AC network support can be gained in the cheaper Asus box with the , and there appears to be no difference in 4k support between models, however I had previously read the i5 would be required for 4k.

    Update: Some other readers noticed hardware omissions, I’d love to hear feedback on other hardware users have had success with, but a comparison always helps.  Here are a few I would love some more performance comparisons on:

    The Software

    There are a bunch of approaches, with the only real restriction being the hardware your running it on. I have tried the following:

    If you have ever read any of my , it will be no surprise that OpenELEC is the clear winner for me.

    The Remote

    For me this was a simple decision, nothing fancy here – I have tried a variety of solutions.

    At this time I am using the USB receiver from a

    and USB IR receiver I purchased for my initial XBMC HTPC, I have programmed my to send MCE commands – and that’s it. You could also use and have IR commands converted to keyboard commands – which gives you a lot of flexibility (I used to have a remote button programmed to send “w”, to update watched status quickly.)

    Update: One attentive reader, , noted the omission of . Utilizing the CEC adapter leverages your current TV remote to take care of the basic HTPC functionality. I personally find I want a few more buttons, but if you need the basics this is certainly worth investigating.

    The Installation and Configuration

    So you have your hardware and software, all you need to do now is install the software and you are ready to enjoy your music and home movies!

    I created a

    some time ago based on several different sources, but  has an

    that is a much better resource than my dated post.

    provides a simple installation script for running, after you have prepared the hardware, and the guide also recommends settings and covers some known issues.

    The Extras

    Personally, since I run three of these boxes in my house I like to have a synchronized library, providing watched/un-watched/resume status throughout the house. . Kodi is certainly moving towards a shared library implementation using UPNP – but I’m not sure it is quite there yet.

    I’ve used XBMC on several systems in the past 10 years:

    As well as several custom built home theater systems.

    Finally after 10 years XBMC is shedding it’s ties to the original Xbox and renaming itself Kodi – and I embrace this change fully.

    While XBMC brings back old memories of hacking away at an Xbox to get more out of it, it no longer needs the association for exposure.

    Kodi is a strong application in its own right, with a multitude of 3rd party support – and several 3rd parties basing their own branch of software on the core, such as the  and the highly successful  appliaction which even runs on the .

    Read more about this on the official site, which I am sure will be renamed also…

    Congratulations and good luck to the team!

    So I finally went back to trying to get emulators setup in XBMC (OpenELEC specifically).  It took me a while to get everything setup, but in the end everything is working perfectly.  This all stems from the fact that I got my kid into SNES games to distract him on a long-haul flight.

    Now there are several post out there with pieces of information, but solbero posted a great and complete guide on the openelec forum:

    This venture into emulators is not a big leap from XBMC’s future, rumours have been around for a while regarding .  There is even a branch of OpenELEC which contains these modification – I am slightly tempted to try this,  Retroplayer + XBMC:

    When it comes to emulation they key component for realism is the joypad, in my humble opinion.  Amazon sells a USB compatible SNES replica controller, and it seems to get some ok feedback:

    I myself have gone down the route of Logitech Rumblepasd 2 (Wireless), simply because it has more buttons for arcade based games – and I’m a fan of Logitech products.

    The main complaint I hear about the Logitech Rumblepad 2 is the analog sticks are in a square boundary – so you can’t recreate free flowing circles with the sticks.  Beware the price of these things, Amazon was selling for $99.  I picked up a couple on eBay for $55 shipped – I know have 3 and will no doubt sell one to recoup.

    My implementation uses ROM Collection Browser to fire up the initial games, but after that I use the back-end emulator (RetroArch) to switch games.  I configured my left analog stick to save/load states using up/down, and I configured my right analog button to bring up the retorarch menu, left analog button is configured to exit the emulator and go back to XBMC.

    If anyone tries out Retorplayer + XBMC, let me know your thoughts please.

    I do have a spare Pi lying around, so I am also considering RetorPie

    For XBMC here is the version of RetroArch I used:

    Containing the following list of cores/emulators:

    First off I want to say, this was the best use of $179 in a while..just buy it:

    This box blows away my old Zotac ION – and it’s fanless.  It kills on performance compared to the Raspberry Pi and Zotac ION, and it’s small and portable, it’s fanless, it boots very quick! I love it.

    Disclaimer: All the information in this guide is completely taken from the following link:

    But I have formatted it in the appropriate manner for myself to reference in future.

    Follow this guide if you want to replace Chrome OS with OpenELEC and have it boot in automatically, I do not do the backup like the wiki, I create a backup USB after the fact on a Windows box, but you can do it from any OS it appears.  I have tested this backup and it works, so this is my preferred and quicker method.

    has updated the wiki to provide an  You must still complete steps 1.1 and 1.2.

    1 Device Preparation

    Putting the ChromeBox in developer mode will allow you to access the underlying Linux operating system features necessary for installing XBMC.

    WARNING: This will erase all user data on the device.

    With the device powered off:

    Disabling the firmware write protect will allow us to set the firmware boot flags to shorten the developer boot screen timeout (from 30s to ~1s), and optionally boot directly to the legacy BIOS (and into Ubuntu or OpenELEC). This is not absolutely necessary, but highly convenient and carries little to no risk.

    With the device powered off and unplugged:

    It is necessary to update the legacy BIOS to enable booting from USB/SD media, or if replacing ChromeOS with Ubuntu/OpenELEC, as the stock legacy BIOS is completely broken. If you dual booting and using either the ChrUbuntu or ChrOpenELEC scripts to install, then this step is included as part of those scripts and does not need to be done manually.

    To update the legacy BIOS:

    This updated legacy BIOS has a ~1.5s wait on the ‘Press ECS to show boot menu’ screen.

    Setting the following boot flags will allow you to boot either to a backup copy of ChromeOS on USB/SD (using CTRL-U) or to the legacy BIOS (using CTRL-L) and into Ubuntu or OpenELEC.

    Important: These boot flags must be set before installing either Ubuntu or OpenELEC.

    To set the boot flags, perform the following steps:

    With the firmware write-protect disabled, we can shorten the default developer-mode boot wait time (from 30s to ~1s) and set the ChromeBox to default to booting the legacy BIOS (and into Ubuntu or OpenELEC) instead of requiring CTRL-D or CTRL-L to be pressed each time.

    Follow this guide:

    I corrupted my backup from the wiki, so this was my only option – but it is tested and works.

    2 Installing OpenELEC

    In order to install OpenELEC, you’ll need to download a custom build tailored to the ChromeBox. This build differs from the regular OpenELEC Generic x86_64 build in that it uses a slightly older version of the syslinux bootloader (5.10, vs 6.02), as the version included with OpenELEC does not work properly on the ChromeBox at this time. This custom build also includes a fix for some MCE IR remotes, which fail to work when connected to USB 3.0 ports (fix has been submitted as a patch and hopefully will be included in future Linux and OpenELEC releases).

    Download the custom build of OpenELEC from

    Once downloaded, unzip/extract the files.

    If you have set the firmware boot flags as above, OpenELEC should boot right up in about 15 seconds. Otherwise, you will need to hit CTRL-L to boot the legacy BIOS.

    That’s it, you can update to the latest official OpenELEC build. Afterwards, updates should be automatic.

    Update:  Please check the following location for a list of known issues an their available workarounds:

    I have updated these guides for NAS4Free version 10.2.x, check them out here:

    So I have just set this up, and I have not tested it thoroughly yet, but I wanted to get it down on paper so I don’t forget.  As with some of my other posts this is the merging of other peoples work and findings.


    For MySQL setup on NAS4Free I followed this guide:

    And for XBMC setup I followed this guide:

    Here is all that information put into a single guide:

    Installing and Setting Up MySQL

    Create a directory to store MySQL data files, in my case I create a sub-directory in /mnt/data/db/mysql to store database files.

    # mkdir -p /mnt/data/db/mysql

    where /data –

    is Mount point name.  Provide full rights to this location:

    # chmod 777 /mnt/data/db/mysql

    By default the MySQL server on NAS4Free stores database files in /var/db/mysql which does not exist at this point, so let’s make a symbolic link in that directory:

    # ln -s /mnt/data/db/mysql /var/db/mysql

    Create the group and user ‘mysql’ using the NAS4Free WebGUI, it is important because NAS4Free will forget about the users created on command line after reboot.


    Name: mysql

    ID: 88


    Name: mysql

    Fullname: mysql

    UserID: 88

    Primary Group: mysql


    Now install MySQL 5.5:

    # pkg_add -r mysql55-server

    # rehash

    Execute the following command to create default databases and tables, and upgrade:

    # cd /usr/local/bin

    # mysql_install_db

    # mysql_upgrade

    Give all permissions to the user and group mysql for /mnt/data/db

    # chown -R mysql:mysql /mnt/data/db/mysql/


    # mysqld_safe &

    Now, this created  .err





    folder.  Check errors written into .errAdd mysql_enable=”Yes”

    into /etc/rc.conf.  GUI is preferable to make this change (select System | Advanced | rc.conf), but the following command works just as well:

    # echo ‘mysql_enable=”YES”‘ >> /etc/rc.conf

    I found that after a NAS4Free upgrade the command line option no longer existed.  I recommend doing it via GUI.

    Reboot your box and type the following command to make sure MySQL is running:

    # top

    If it is not running, type the following command to start MySQL:

    # /usr/local/etc/rc.d/mysql-server start

    Secure MySQL using the following wizard:

    # mysql_secure_installation

    Log into MySQL:

    # mysql -u root -p

    You are now in mysql administration, conduct the following commands in MySQL to allow XBMC access.

    # CREATE USER ‘xbmc’ IDENTIFIED BY ‘xbmc’;

    # GRANT ALL ON *.* TO ‘xbmc’;

    # quit;

    Configuring XBMC to use NAS4Free MySQL DB

    Export your music and your video directories, you can to this as separate or single file, I tried to do separate which is the suggested, but I have no idea where the files where put – so I just started afresh.  If you want to try and retain your current “master” DBs, follow the steps here:

    Otherwise you can just continue on with this guide.

    Create (or add to, if you already have one) an advancedsettings.xml file in your XBMC userdata folder.

    Using nano copy and paste the following information into the advancedsettings.xml file, if there is already content, merge the sections appropriately:

    advancedsettings.xml configuration found in the following location:

    and should look like this:












    Replace the two instances of ***.***.***.*** with local network IP address of your NAS4Free server. It is recommended not to use its NetBIOS name, as not all devices may be able to resolve them.

    Save the file as advancedsettings.xml.  Copy this advancedsettings.xml file you just created to the userdata folder of every XBMC install you want to sync with.

    If you exported your existing DBs, go ahead and import them.  If you created a fresh DB, scan all your content again, make sure to use the NAS4Free server IP rather than NetBIOS for your shares, as mentioned – not all devices may resolve the NetBIOS.

    One of the first changes you’ll want to make, on your XBMC systems, is to alter what XBMC does in

    response to you pressing play on a file. By default XBMC simply plays

    the file from the beginning. Since we now have an XBMC system that

    remembers our place across multiple machines, we want XBMC to prompt us.

    Navigate to Settings | File Lists and set the Default select action to Choose. We want XBMC to ask us what to do when we’re opening a file instead of automatically playing it from the start.

    As a final note, specifically with Openelec and Raspberry Pi, although Openelec suggest this for WiFi boxes, set Wait for network before starting XBMC under Openelec addon settings, network.

    That is it…you should be good to go.  Let me know how it goes for you, or if you have any issues.

    Updates from lindsay added:

    Additional updates from lindsay:

    Optimizing the DB using a cron, I used the following command to test before making the cron:

    # mysqlcheck -os -u xbmc -pxbmc –all-databases

    So I have about 3 machines in my house that function as HTPCs.  One of those systems I use with full blown blown Ubuntu and XBMC install from repo.  The other systems I use , I have this installed on an old NVIDIA ION system and a Rasberry Pi.

    I have also advised two systems, which I setup, to use Openelec.  which has a great price on it, I can only assume due to the fact that they are coming out with a new version…which !

    Some of the main benefits about openelec.

    The main reason I am not using this on my main media center is due to the lack of support installing .  This main system is used to serve my streaming music to web and mobile apps, therefore, until I have played about with installing Subsonic on NAS4Free or Openelec, I will stick with an Ubuntu system in my household.

    Some other options:

    I always forget how to upgrade my Nvidia graphics driver, so here it is :

    To stop gdm from virtual console (after going to virtual console by giving Ctrl + Alt + F1

    sudo service gdm stop

    To start after installing nvidia drivers:

    sudo sh ./NVIDIA-Linux-*

    To start it is as simple as stopping

    sudo service gdm start

    And I used these commands for this little beast:

    The Rii mini.  I just bought this tiny little keyboard to control my bedroom XBMC HTPC, I am thinking about buying another for the living room – it’s perfect.  It’s back-lit, wireless, rechargeable (lithium-ion).  What more could you ask?  Seriously, what else do you need?

    Comment please!

    So I have been thinking a lot about VPN, I want to securely access my home network and VPN is the best way to do that.

    As I have mentioned in previous post I use

    on my router.  This free software allows me to adapt my .  One of the variants out there for Tomato firmware allows me to run an

    server from the router.

    Using this

    I would have the ability to connect securely and become part of my network from anywhere in the world.  This got me thinking a little more…

    I have a small portable

    solution, running on Ubuntu, if I had a VPN server up and running on my router I could configure the VPN client on Ubuntu to securely connect and be part of my network – allowing me to stream my content securely/encrypted anywhere in the world!

    Well I upgraded to XBMC 9.11 alpha 2.

    So far I haven’t seen any significant reasons to push this update, in fact I see issues to stay where you are.

    1. Lirc is a nightmare to get configured for remotes – and I lost all my settings!

    2. There seems to be some visual defects in the video playback – which I haven’t had the chance to look into.

    Anyway, I like to try the latest in case there is something I don’t want to miss. I decided to ge rid of XBMC Live on my ION HD HTPC, since it had changed to read only, so no settings were saved.

    I read somewhere that someone else had this issue – it was caused from changing from VGA to HDMI – physical outputs, not settings – weird huh?!

    I did an overall clean house on both my HTPCs, installed the latest Ubuntu and reinstalled XBMC.

    Apart from the remote and video issues I am really happy – nice spring clean – or should I say fall.

    I urge you to check out XBMC if you are looking for a home media playback device.

    It’s cheap and will play anything you throw at it.

    Plus with the scraping tools it is a good way to keep all media organized… And I stream mine from FreeNAS – more on that later though.

    Subscribe to:


    Blog Archive


    Leave a Reply

    Your email address will not be published.