Thursday, August 27, 2015

Raspberry Pi: Starting Kodi

Kodi is an application that provides the interface to manage video, music, pictures and liveTV. Its the default media centre on OSMC.

If you have not installed OSMC, see previous post on getting started.

Step 1: Adding source for video add-ons from
Start Kodi, choose System ->Setting ->File Manager
Click Add Source and enter location as

Enter a name: Fusion

Click "OK"

Step 2: Install plugins for streaming movies and TV shows

Choose 1Channel and Genesis

Remainder of installation reference is from here.

Tuesday, August 25, 2015

Access VirtualBox VM via SSH

A virtual machine provides lots of space for development, troubleshooting and learning. Sometimes its required to remotely access the virtual machine guest using SSH from the host. Virtualbox allow users to setup so many different type of virtual machines known as the guest.

The machine installed with VirtualBox is known as the host. In this example, the host is a MS Windows 7 computer with virtual machine guest OS being Centos Linux 6. SSH client such as Putty is run on the host computer and will attempt to connect to the virtual machine. This will also allow multiple guest OS to SSH between one another.

Step 1: Configure VirtualBox networking

Shutdown all guest virtual machines. Open VirtualBox Manager, click on the virtual machine to be configured and choose Settings ->Network. There should already be an existing network for access to the Internet. Nothing needs to be changed if you can already access the Internet from the guest OS.

Guest virtual machine default networking with access to Internet

Choose one of the unused Adapter (example Adapter 2) and configure the settings:
Attached to: Host-only Adapter
Name: VirtualBox Host-Only Ethernet Adapter

On the MS Windows, VirtualBox has already setup its own network as can be seen below. The other IP is the dynamic IP used by host computer to access the Internet.

Step 2: Configure a static IP on guest OS.

Start the guest OS and login. Open a terminal as root and the new network device has been identified but we need to configure the IP to match that of the VirtualBox network 192.168.56.x.

In the case above, VirtualBox has already configured network device eth0 to access Internet. Check eth1 with

# ethtool eth1

The default eth1 if we started that network, it would use DHCP but we want a static IP so that we know the IP for SSH. We now need to create/edit eth1

vi /etc/sysconfig/network-scripts/ifcfg-eth1

Add/modify following lines;

NAME="System eth1"

Start the networking for eth1 and check that eth1 is using the new IP. 

Step 3: Restart the guest virtual machine.

Reboot the guest OS and test access to Internet and ability to SSH into the guest OSS from the host computer as can be seen below.

Guest VM network for Internet and SSH

The network routing is shown below.
Guest virtual machine network routing

Tuesday, August 18, 2015

Getting started with LibreOffice 5

There are quite a number of options for word processors, spreadsheets and slide presentation these days and many of it with the option for being online. LibreOffice 5 is available to users on popular platforms like Mac, Linux and MS Windows. This makes it easier for implementation across any type of systems for any organisation.

LibreOffice can help save lots within an organisation while having access to a top class application that is continuously being kept updated. The document formats will ensure it can be preserved for a long time. The installer file can be downloaded from site and the offline help can also be downloaded separately.

LibreOffice 5 Installer

The minimum installation system pre-requisites recommended is a Pentium III,  512MB RAM which should be fine for almost all computers. However, is does require a considerable 1.5GB disk space and display of 1024x768 resolution with 256 colours.

Java Runtime Environment (JRE) is needed if using some features in Base.

LibreOffice 5 provides the following;

  • Writer document
  • Calc spreadsheet
  • Impress presentation
  • Draw drawing
  • Math formula
  • Base database
LibreOffice 5 Main Screen
The 3 notable features (see release notes for more);

Default unicode 6 support which is included in its AutoCorrect. E.g. if you type :camera: it displays the camera. Here are a few more;

Compatibility with MS Office
Improved import and export of MS Word, Excel and Powerpoint documents. This means, users can work with these docs without much hassle. More controls for compatibility is found in the Tools ->Option ->Load/Save

Improvements in import of annotated text ranges from Word documents. Better support for RTF document formats.

Entire row/column references
Ever wanted to specify an entire row/column? Now this can be done with "A:A" and "1:1".

Monday, August 17, 2015

Howto Install PHP and Postgresql on Fedora Core

Fedore Core 22 came out in May 2015 with quite a number of changes that even the usual Linux guy had trouble getting around.

This included
  • The dfn package manager to replace Yum
  • Gnome 3.16 to provide a new desktop look
  • The firewall-cmd to replace iptables firewall
  • Retreive systemd notices with journalctl

For basic PHP web application development with Postgresql database it was pretty straight forward after learning these new commands. This will also server as an introduction to the new commands mentioned above. Apache was already installed.

Step 1. Install PHP

Open a command terminal and type
$ sudo dnf install php php-xmlrpc php-xml php-mbstring

It installed the following;

Restart web server

$ sudo systemctl restart httpd.service

If there are errors, open the log and inspect.

$sudo journalctl -xe

== Check that Apache is permitted through the Firewall==
firewall-cmd --permanent --zone=FedoraWorkstation --add-service=http
firewall-cmd --permanent --zone=FedoraWorstation --add-service=https
firewall-cmd --reload

In this case, my default-zone was "FedoraWorkstation" and not "public".

Step 2: Install Postgresql database

$ sudo dnf install postgresql-server postgresql

It installed the following;

$ postgresql-setup --initdb

Edit /var/lib/pgsql/data/pg_hba_conf

local   all             all                         trust
host    all             all               trust

$ sudo -u postgres psql
postgres=> alter user postgres password 'password';
postgres=> create user tboxmy createdb createuser password
postgres=> create database tboxmy owner tboxmy;
postgres=> \q

$ psql
tboxmy=# \dn
tboxmy=# \q

Then run some test with the PHP and database.

Other useful tools.

Export database from existing Postgresql

$ pg_dump -U username -h localhost -W databasename > output.text.sql

Restore the sql dump file to a database

$ psql --set ON_ERROR_STOP=on -U username -h localhost -W databasename < output.text.sql

Friday, August 7, 2015

What is OpenStack? Some Figures and statistics.

Cloud computing is still gaining some interest in public and private organisations. Many large organisations have shown interest and support for OpenStack as a software to deliver cloud platforms. With the source code to OpenStack freely accessible and welcomes community participation via the Foundation, it has also grown into an operating system of its own.

Recognition of the companies contributing to some parts of OpenStack include;
Those who are keen, should look up these developers to see how they contribute to the project.

There are some statistics that may be of interest at Openstack Activity Dashboard. Number are just numbers, but it makes lots of nice charts and puts some perspective of the project.

Some figures as of 6th Aug 2015;
  • Code developers; 3,971
  • Code submitters; 4,171
  • Launchpad participation; 8,881
  • IRC participants; 20,302
  • Ask participants; 4,035

Contribution by companies like HP, IBM and Red Hat;

There is a Malaysian OpenStack meetup on 13th Aug 2015 (Event), and its free.

Blog Archive