Ubuntu and XBMC installation guide for CIIBAT HTPC

This is an installation guide with all the information you will need to install your own copy of Ubuntu and XBMC, along with the required nvidia display driver to enable 1080p hardware video decoding, hardware graphics/gpu acceleration as well as to enable the iMON VFD display panel.

1) Ubuntu Installation

  1. Download the latest Ubuntu from Official Ubuntu download page
  2. Select the version of Ubuntu you want to download, at the time of writing, the latest version is 11.10. You need to download the 64bit version of Ubuntu. Only 64bit version of Ubuntu 11.10 works on the HTPC, for some unknown reason, the 32bit version of Ubuntu 11.10 can't boot on the CIIBAT motherboard. You can try though if you want.
  3. Follow the instructions on the download page to burn a disc or create a bootable USB drive.
  4. Insert the disc or the bootable USB drive you have created, turn on the HTPC and then follow the instructions on the download page to install Ubuntu or read look at the walkthrough here. When asked for user name and password, you can type in htpc as user name and password, or anything else you like but make sure you remember what is the password you used because you will need it later. (If your computer do not boot from the disc or bootable USB drive, do this. As soon as you turn on the computer and see the screen showing the boot screen that says "American Megatrends" at the top, press DELETE button to enter BIOS setup, navigate to Boot -> Boot Settings priority -> following the instruction there and make sure your bootable optical or USB drive is listed before the SATA hard disk. Alternatively, as soon as you turn on the computer, press F11 for the Boot device selection (BBS) screen and select the bootable optical or USB drive you have inserted.)

2) Nvidia driver installation

After you have installed Ubuntu, it will work just fine but if you try to run XBMC, play 1080p video or perform other graph intensive applications. You may notice that your HTPC will run very slowly, this is because you have not installed the graphics driver for the computer to allow it to take advantage of the GPU's hardware acceleration to decode video, 3D graphics, etc...

To install the Nvidia driver, make sure you are connected to the internet, assuming you are using the Unity desktop, Press the Power button at the top right hand corner of the screen -> System settings -> (Hardware) Additional drivers. If you are using the GNOME desktop, go to Menu -> System -> Administration -> Hardware Drivers

Look for the current drivers to activate there.

This will download and install the nvidia driver from the internet.

(this instruction is provided in Ubuntuguide)

3) iMON VFD driver installation

To enable the iMON VFD display in front of your CIIBAT HTPC, you need to do the following.

1) Make sure you are connected to the internet, open terminal (press Ctrl+Alt+T) and type (or copy/paste this using right mouse click) this command

sudo apt-get install lcdproc

This will download and install the lcdproc application from the internet.

2) Then, you will need to edit a file manually but you will require root permission. Open terminal (press Ctrl+Alt+T) and type (or copy/paste this using right mouse click) this command

gksudo nautilus

You will then see a prompt asking for your password, type in the password you have specified during installation (the default password we used is htpc) and then you will see the file manager, Nautilus opens.

3) You will need to edit the conf file located at /etc/LCDd.conf manually.

Using the file manager, Nautilus, on the left hand column, select File System, then open the folder named "etc".

Find the file LCDd.conf, right click and select "Open with Text Editor".

On line 44 you will see the following (To make it easier, you can just press CONTROL+F on the keyboard or select Search, paste the line below and click search to find this line)

Driver=curses

This is the default. You should change it as follows and save the file.

Driver=imon

Or you can download this LCDd.conf file and overwrite with yours. This file is already configured with this setting.

Note: If don't use the command above to launch the file manager, Nautilus and you try to edit the file located at /etc/LCDd.conf, you will noticed that you do not have the required permission to make the changes.

4) If you would like to see and check if your VFD working, open terminal (press Ctrl+Alt+T) and type (or copy/paste this using right mouse click) this command.

sudo /etc/init.d/LCDd restart

(this instruction is written in reference to Ubuntu documentation)

4) Customize the VFD exit message

When you shut down your Ubuntu HTPC, you will see that it will show a message that says "Thanks for using LCDproc & Linux!"

To change this message or remove it altogether, find the two line that says

#GoodBye="Thanks for using"

#GoodBye="   LCDproc!"

Remove the # in front and set the 2 lines to Goodbye="" (this removes the goodbye message when power off or change it to any message you want it to show).

Or you can download this LCDd.conf file and overwrite with yours. This file is configured to turn off the VFD display when the unit is turned off.

(this instruction is written in reference to LCDproc User's Guide and MyTV IMON Guide)

5) Customize the VFD welcome message

When you turn on your Ubuntu HTPC, you will see that it will show a message that says "Welcome to LCDproc!"

To change this message or remove it altogether, find the two line that says

#Hello="  Welcome to"

#Hello="   LCDproc!"

Remove the # in front and set the 2 lines to any message you want it to show.

Or you can download this LCDd.conf file and overwrite with yours. This file is configured to show the message: "Welcome to CIIBATT HTPC" when the unit is turned on.

(this instruction is written in reference to LCDproc User's Guide and MyTV IMON Guide)

6) Infra-red remote driver/receiver

In the CIIBAT HTPC casing, there is an Infra-red remote receiver. To activate it under Openelec, so that you can use MCE remote on it, added these lines inside autostart.sh script

#!/bin/sh
sleep 1
ir-keytable -p rc6 -w /etc/rc_keymaps/imon_mce & 

Note: This information is provided by James, a customer who is happily using this CIIBAT HTPC system with Openelec. We don't know how to do this under Ubuntu but we would be interested to know about it if you figure it out.

7) XBMC Installation

If you try to follow the instruction on XBMC install guide, you will notice that the installation process will stop halfway because there is no stable XBMC ppa for Natty, Ubuntu 11.04 (yet, as of 18th October 2011). There is an unstable ppa but that doesn’t seem to work well either. What you can do for now is install XBMC using the ppa for Ubuntu 10.10 and change the distribution from Natty to Maverick.

To install XBMC on Ubuntu 11.04, open terminal (press Ctrl+Alt+T) and type (or copy/paste this using right mouse click) this command

sudo add-apt-repository ppa:team-xbmc

Then, you need to open update-manager, you can do this by opening terminal (press Ctrl+Alt+T) and type (or copy/paste this using right mouse click) this command

update-manager

Under the Other Software tab highlight the xbmc ppa and click edit. Look for the distribution and change oneiric into maverick. Click on the OK button, reload the sources list and close your Update Manager (this step is not required for XBMC 11.0 Eden).

Open terminal (press Ctrl+Alt+T) and type (or copy/paste this using right mouse click) this command

sudo apt-get update
sudo apt-get install xbmc

This will install XBMC into your Ubuntu.

Alternatively, you can install XBMC on Ubuntu 11.04 by simply download this script, unzip it, make the file executable and run it. To make it executable, right click on the file and select Properties -> Click on the Permissions tab -> TICK Allow executing file as program. To run the script, double click on it, select Run in Terminal and you will be prompted to enter your password you have configure during Ubuntu installation, the default password we used is htpc.

If you are installing XBMC on Ubuntu 11.10, download this script, unzip it, make the file executable and run it.

If you are still not sure how to do, you can watch this video for Ubuntu 11.04 or this video for Ubuntu 11.10.

To start XBMC, open terminal (press Ctrl+Alt+T) and type: xbmc, or click on the Ubuntu logo -> find and click on XBMC under Media Apps.

There is a XBMCbuntu  (previously XBMC Live) edition that you can install or use without installation. Previously XBMC Live don't have a user interface to allow you to configure your WIFI network or use Bluetooth connection, therefore, unless you use ethernet connection for your HTPC, we don't recommend you to use the XBMC Live edition. However, the latest XBMCbuntu now comes with complete GUI interface and linux OS. To enter the OS GUI interface from XBMC, press the Exit button to logout and then select XBMCbuntu when you login. Alternatively, you can also try OpenELEC distribution which is a small linux distribution with XMBC bundled, in such a way that it allows your system to boot in seconds into XBMC. You can find more information on OpenELEC here. If you are going to try OpenELEC distribution on your CIIBAT HTPC, please take note that you should download and install the ION BUILD.

(this instruction is written in reference to XBMC install guide, Install XBMC on Ubuntu 11.04 by tinuz, Install XBMC on Ubuntu 11.10 by tinuz and Install XBMC on Ubuntu 11.10 by UmairXBMC Media Center 11.0 (Eden) Released–Install it in Ubuntu 11.10 (Oneiric Ocelot))

8) Enable iMON VFD to display XBMC information

Open the file manager, Nautilus and show hidden files by pressing Ctrl+H or go to Menu -> Edit -> Preferences -> TICK Show hidden and backup files.

The screenshots here may help to explain how to do this.

Then, go to "Username"/.xbmc/userdata

Find the file guisettings.xml, right click and select "Open with Text Editor". Find the line or search that says

<haslcd>false</haslcd>

Change it to

<haslcd>true</haslcd>

Alternatively, you can download this guisettings.xml and overwrite yours.

Note: you may want to reverse the setting change and hide the hidden files.

(this instruction is written in reference to XBMC user data, and XBMC forum thread)

9) Boot into XBMC

If you would like your HTPC to boot right into HTPC, do this.

For Ubuntu 11.04 using Unity desktop, Press the Power button at the top right hand corner of the screen -> System Settings -> Login Screen -> Unlock -> type in your password -> Press and select XBMC in the drop down menu, so it becomes "Select XMBC as default session".

When you restart your HTPC, you will now boot right into XBMC.

For Ubuntu 11.10 using Unity desktop, you need to create a XBMC login session session first.

To create the account and to make it show in your login screen you need to add two files. To make the files open a terminal window (press Ctrl+Alt+T) and copy+paste the following line:

sudo gedit /usr/share/xsessions/xbmc.desktop

When the text file is opened copy+paste the following lines:

[Desktop Entry]
Encoding=UTF-8
Name=XBMC
Comment=
Exec=/usr/bin/xbmc-session
Icon=
Type=Application

When the text is added save and close the xbmc.desktop file and now you need to create the file for the XBMC session. In your terminal window copy+paste the following line:

sudo gedit /usr/bin/xbmc-session

Now copy+paste the following lines:

#!/bin/bash
# add some initialization stuff here (if necessary)
xbmc --standalone

Finally make the session script executable, copy+paste the following line in your terminal window:

sudo chmod +x /usr/bin/xbmc-session

Then, to change the default login session to XBMC, copy+paste the following line in your terminal window:

sudo nano /etc/lightdm/lightdm.conf

change the line

user-session=ubuntu

to

user-session=xbmc

From now on, when you restart your HTPC, you will now boot right into XBMC.

If your system is now booting into XBMC but you would like to go back to the Ubuntu interface, press the power button on XBMC screen -> Exit -> at the login screen, after selecting your user name, e.g. HTPC, -> on Ubuntu 11.04, you will see a menu at the buttom middle of your screen that you can click, open it and select Ubuntu; on Ubuntu 11.10, you will see the list by clicking the gear like icon -> enter your password -> you will enter the Ubuntu interface

Note: if you don't log out and change the selection menu at the login screen back to XBMC, you may see that your HTPC will boot into the Ubuntu interface instead of XBMC.

(this instruction is written in reference to this article by tinuz, debianhelp and askubuntu)

10) Install Macromedia flash plugin

In order to support Macromedia flash content when you use the browser, you need to install Macromedia flash plugin. The easiest way to do it is to launch the Ubuntu software center, search for flash and install the plugin there.

Note: Hardware (GPU) acceleration for Macromedia flash plugin is not available for Linux from Flash 11 onwards, see this for more information. This means that when running Ubuntu, it is possible that all flash based contents will only run on CPU only and since the atom330 cpu is not very fast, video playback may lag. For the best browser experience watching online video using macromedia flash, we have tested both Firefox and Google Chrome (Chromium), we noticed Chrome (Chromium) allows smoother playback on Ubuntu. This is still true under Windows 7 even though Firefox can utilize hardware acceleration to decode the video.

As a result, we recommend that you use Google Chrome (or Chromium) for web browing and video watching when you use this motherboard regardless whether you are using Windows or Linux (Ubuntu). In addition, running this board using dual channel memory will also help to improve performance.

However, when tested, Firefox shows better javascript performance than Google Chrome (Chromium) under Ubuntu. Even though user experience seems better with Chrome, i.e. seems to run faster and smoother.

Test results using http://demos.hacks.mozilla.org/openweb/HWACCEL/

ConfigurationsSingle Channel Configuration (1x2GB DDR2-400)Dual Channel Configuration (2x2GB DDR2-400)
Operating SystemUbuntu 11.10Windows 7 64bit SP1 Ultimate
Nvidia Ion graphics driver: 285.62
Ubuntu 11.10
Firefox (Firefox 7.01 for Ubuntu, Firefox 10.0 for Windows)
about:support -> Graphics -> Driver version 3.3.0 Nvidia 280.13 -> GPU accelerated windows 0/1
32 fps60+ fps 41 fps
Google Chrome 16.0.912.77
Default settings: GPU compositing on all pages disabled, GPU Accelerated 2D disabled
6 fps5 fps 7 fps
Google Chrome 16.0.912.77
Settings: GPU compositing on all pages enabled, GPU Accelerated 2D enabled
6 fps60+ fps 6 fps

11) Installing PPstream (for chinese users only, this application only available with chinese UI)

1) Due to the use of 64bit Ubuntu, there is a 32bit library you need to install. Make sure you are connected to the internet, open terminal (press Ctrl+Alt+T) and type (or copy/paste this using right mouse click) this command.

sudo apt-get install ia32-libs

2) Make sure you are connected to the internet, open terminal (press Ctrl+Alt+T) and type (or copy/paste this using right mouse click) this command

sudo apt-get install libqt4-core libqt4-dbus libqt4-gui libqt4-network libqt4-webkit libqt4-xml libfuse2 mplayer

This will install all the prerequisite software you need.

3) Download this file: ppstream_1.0.0-3lucid2_amd64.deb and place the file under your HOME folder

4) Install PPStream by copy/paste this using right mouse click this command into terminal

sudo dpkg -i ppstream_1.0.0-3lucid2_amd64.deb

Now, if you want your Ubuntu to boot into PPstream, go to Startup Applications Preferences -> Add -> Name: PPstream, Command: ppstream

(this instruction is written in reference to the dotblogs's blog and SoleSky's blog)

12) Creating desktop/launcher shortcut

1) Make sure you are connected to the internet, open terminal (press Ctrl+Alt+T) and type (or copy/paste this using right mouse click) this command

sudo apt-get install --no-install-recommends gnome-panel

2) Copy/paste this using right mouse click this command into terminal to create the shortcut

gnome-desktop-item-edit --create-new ~/Desktop

3) Fill in the application details into the field

4) If you want to add to launcher just Drag it on to launcher

(this instruction is written in reference to this guide)

13) Change default OS for booting

Option 1)

Install Start-up manager from Ubuntu software centre  and use it to change the boot order.

Option 2)

Using terminal, use this command to open the boot order file

sudo gedit /etc/default/grub 

Change this line to, (this should work if you have only Ubuntu and Windows installed.)

GRUB_DEFAULT=4

And then update the boot order using this command

sudo update-grub

Option 3)

Move the Windows OS (or non-linux OS) option to the top of the list

Using terminal,  use these command

cd /etc/grub.d

ls -l

sudo mv 30_os-prober 06_os-prober

(this instruction is written in reference to this guide at askubuntu and ubuntu help)

Tips

Q: How do I stop/prevent Ubuntu 11.04 Keyring from loading on BootUp, StartUp?

A: If you are not on a wireless Internet Connection!

Go to:
Menu/System/Preferences/Startup Applications/

Uncheck:
Certificate and Key Storage
Secret Storage Device
SSH Key Agent

Close Startup Applications

Re-boot

If you use a Master Login then Enter the Password

When prompted for 'Master Keyring' password leave blank, (do not enter anything), save or enter.
You will be prompted if I wanted to save the keyring.
Click OK
When asked are you are sure you want to accept the "unsafe storage": 'Yes or OK'

If you are on a wireless Internet Connection!

Check 'All Users' in the wireless connection setup, it wont ask again for a password.

You can remove the existing keyring in Passwords and Encryption keys (delete everything)
The next ReBoot asks to set up the keyring password just set a blank password and the keyring request will not repeat on the next Re-boot.

The keyring is a good tool if you are running command interface with servers etc.
For applications it can be a nuisance and sometimes appear to be a nonsense.
Most users will not need this if they are running well configured applications.
Ubuntu probably install this by default on the basis that 'an idiot cannot sue me'!

This tip comes from this thread.

Q: How do I login automatically on Ubuntu 11.10 without entering password when the HTPC BootUp?

A: Press the Power button at the top right hand corner of the screen -> System Settings -> User accounts ->Press Unlock -> Automatic Login = ON

Q: What is the default username/password for my CIIBAT HTPC

A: If your CIIBAT HTPC you have are pre-installed by us, we would have use the username: HTPC, the password is also the same, i.e. htpc.

Q: My HTPC boots automatically into XBMC, how do I configure my WIFI network or login to the Ubuntu interface?

A: You will need to login to Ubuntu interface to configure wireless WIFI network, use bluetooth and use other applications. After the system boot into XBMC -> press the power button on XBMC screen -> Exit -> at the login screen, after selecting your user name, e.g. HTPC -> you will see a menu at the buttom middle of your screen that you can click, open it and select Ubuntu -> enter your password -> you will enter the Ubuntu interface

If you run into problems, please try to search the internet for answers. If you can't anything useful, feel free to ask at our feedback forum.