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 2

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.

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.

Monday, June 22, 2015

Accessing password for D-Link provided by TM Unifi

As a note, if the admin password is lost or forgotten, there is a way to access the admin console for the D-Link routers (DIR-615) before 2015.

Some people say, better to just don't share it but, some may say that its public knowledge anyways.

Method 1: Brute force attack. Or in layman term, guess the admin password (Its either empty or admin).
Method 2: Use a feature within the router. Not sure if newer routers have the same feature. See below;

Step 1

Connect a PC to the router (LAN or wireless) and open a web browser URL at

This should show the admin page of the router.

Step 2

Change the URL to

It will display the login password for admin.

Kid: mean I can change the password as much as I like but anyone can view the password?
Tech support: Err... yeah.
Kid: Time to change the router?
Tech support: You could. We can arrange for the technician to come over.

TM unifi has updated their routers remotely. Please check, if you see your password displayed, contact them for a fix.

Saturday, June 20, 2015

Raspberry Pi: Getting Started with OSMC

After getting the Raspberry Pi 2 (RPI), NOOB SDcard from Element14 started up without a network cable. Only 3 option for the OS is shown as it boot from the NOOB SDcard (yes, it has to be plugged in)

Plugged in the networking cable and restarted RPI. This time, it loaded the remaider of the OS like OSMC and OpenElect.

OSMC (Open source Media Center), is a Debian based Linux operating system. Fomerly known as Raspbmc.  OSMC features an application store for TV use. Kodi is an application included for handling multimedia locally or online on OSMC.

Kodi or formerly known as XBMC, is an open source software (GPL) for handling of videos, music and pictures. Live TV can be viewed via Kodi and its add-ons expand its use. The support of UPnP allows streaming of Kodi to any other Kodi instances. Its like multi screen mirror display.

Here are steps to start off with the OSMC operating system.

Step 1: Boot to OSMC

Boot up the RPI. It goes into the RPI boot screen, press the "SHIFT" key to bring up the editing screen. Click on OSMC for PI2 and press "Enter" and an "x" will appear for the OSMC.

Press "Esc" and it should start downloading OSMC and install. Once done, it reboots to OSMC.

After OSMC splash screen appeared, the Samsung TV displayed
"Mode not supported".

What does this mean? OSMC got the wrong resolution or the TV did not support multiple modes automatically.

Troubleshooting Step 1: 

In the same network, open the SSH client (Putty) and connect to the RPI via IP address.
username: osmc
password: osmc

At the command line type:

Identify which mode is being used that is causing the problem.
tvservice -s

Identify which modes are available in OSMC monitor service
tvservice -m DMT

Output that I got:

osmc@osmc:~$ tvservice -s
state 0x12001a [HDMI DMT (39) RGB full 16:9], 1360x768 @ 60.00Hz, progressive
osmc@osmc:~$ tvservice -m DMT
Group DMT has 4 modes:
           mode 4: 640x480 @ 60Hz 4:3, clock:25MHz progressive
           mode 9: 800x600 @ 60Hz 4:3, clock:40MHz progressive
           mode 16: 1024x768 @ 60Hz 4:3, clock:65MHz progressive
  (prefer) mode 39: 1360x768 @ 60Hz 16:9, clock:85MHz progressive

Troubleshooting Step 2:  

Reboot RPI, and as it loads press "SHIFT" until the edit boot screen appears. Click on OSMC and choose "Edit config".

Changed the value to match below. E.g. to use alternative mode, change hdmi_mode from 16 to 4.

Click"OK", and press "Esc". Reboot as normal.

Keep changing the value of the mode until it works and display Kodi with default OSMC skin/template.