Saturday, December 20, 2014

Linux Mint: Install Xbian on Raspberry Pi

Objective


The following decription explains how to install a Xbian image on a SDCard to run on your Raspberry Pi. The installation is done on Linux.

Motivation


Recently, I bought a Raspberry Pi and wanted to connect to my TV to watch movies stored on my NAS via Wifi connection or Youtube videos.

Prerequisites


  • Linux Mint 17 Qiana
  • Raspberry Pi B model (both 512 MB and 256 MB version are supported)
  • 2 GB (or bigger) SD card
  • Power adapter for your Raspbery Pi
  • Something to play your media from (USB disk or network share)
  • Remote, for example your TV remote (if your TV supports CEC), smartphone (XBMC Remote app), infrared remote, keyboard/mouse
  • Computer with a SD card reader for installing XBian on your SD card
  • Ethernet cable or WiFi dongle for your Raspberry Pi

Solution


Preparation of the Xbian image file


Go to the XBian images download section and select the newest XBian image for your download. In my case this was the XBian 1.0 Release Candidate 3.

Open a command shell and go (via 'cd' command) to the folder where you downloaded the image file.

Uncompress the image by the command:

$> gunzip XBian_1.0_RC_3_Raspberry_Pi.img.gz

Preparation of the SDCard


Insert your SDCard into the SDCard slot of your computer. The card usually will be automatically mounted and integrated into the filesystem of your computer. If this is not the case, you can also mout ist via the shell command:

$> sudo mount -t vfat -o ro /dev/mmcblk0p1 /media/mmcblk0p1

The mmcblk0p1 here is the device identifier for your SDCard and may vary in your case. To determine the device identifier, you can use the command:

$> sudo fdisk -l

you will get a result similar to mine:

Disk /dev/sda: 640.1 GB, 640135028736 bytes

<skip the info of the harddisk>

Disk /dev/mmcblk0: 15.9 GB, 15931539456 bytes
4 Köpfe, 16 Sektoren/Spur, 486192 Zylinder, zusammen 31116288 Sektoren
Einheiten = Sektoren von 1 × 512 = 512 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Festplattenidentifikation: 0x0009be7b

Gerät boot. Anfang Ende Blöcke Id System
/dev/mmcblk0p1 2048 31116287 15557120 b W95 FAT32

Copy the downloaded image onto the SDCard:

$> sudo dd if=XBian_1.0_RC_3_Raspberry_Pi.img of=/dev/mmcblk0

The copying procedure takes some minutes, so be patient...

The final output after a successful copy will be something like:

1135488+0 Datensätze ein
1135488+0 Datensätze aus
581369856 Bytes (581 MB) kopiert, 366,661 s, 1,6 MB/s

Setup done!
Now you can remove the SDCard from your computer an put it into your Raspberry Pi and restart the Pi.

Upgrade your Qt-Installation to Qt 5.4 by a clean re-install

Objective


I wanted to upgrade my Qt 5.3.1 to new the newly released version Qt 5.4.0 by a clean re-install.
My last install was done by executing the installer script ./qt-opensource-linux-x64-5.3.1.run.
So I asked myself, how to clearly uninstall an old Qt-Version.

Motivation


I noticed that I'll run out of disk-space soon on my system disk, therefore I decided to uninstall the old version, before I wanted to install the new version. Additionally, I wanted to install QtCreator 3.3 which correlates to Qt 5.4.0.

Prerequisites


Linux Mint: 17 - Qiana
Qt-Installer Script: Qt-opensource-linux-x64-5.4.0.run

Solution


Download the installer script


1. Go to the Qt-Homepage: qt-project.org
2. Download the installer script ./qt-opensource-linux-x64-5.4.0.run
It is not necessary to download the Qt-Creator installer script, because Qt-Creator 3.3 is included by the Qt-Installer script.

Uninstall the old version (in my case: Qt 5.3.1)


1. Open a Terminal window.

2. Login as root:

$ su -

3. Navigate to the folder where you installed the older version of Qt (in my case "/opt/Qt5.3.1":

$ cd /opt/Qt5.3.1

4. Start the MaintenanceTool

$ ./MaintenanceTool

5. Choose Remove from the options od the shown dialog.

Install Qt 5.4.0


1. Within the same shell (root-shell), go to the folder where you downloaded the installer script qt-opensource-linux-x64-5.4.0.run and type:

$ chmod ugo+x qt-opensource-linux-x64-5.4.0.run
$ ./qt-opensource-linux-x64-5.4.0.run

2. Follow the instructions of the graphical installer.

Done.