Tuesday, August 26, 2014

Quick start to Mozilla Firefox OS 1.x

For those of you who were looking for a new smart phone, it might be good to also look at Firefox OS. This is being developed by Mozilla and will be a game changer.

Quick notes:

  1. Initially known as B2G (Boot to Gecko) in the Mozilla Project and initially demonstrated in 2012
  2. Has a Linux based operating system
  3. Target for smart phones, tablets and smart TV.
  4. Among the first adopter was ZTE Open phone
  5. Its has 4 software layers. I.e. Gonk (Linux kernel), Gecko (application services), XUL Runner (Application run-time) and Gaia (User interface system)
  6. Supports HTML5
  7. Website at https://developer.mozilla.org/en-US/Firefox_OS
  8. Apps can be found at the Firefox marketplace.
Current development is at Firefox OS 1.3 (Stable) and Firefox OS 2.1 (Unstable)  and you can try it out via a simulator.

Following are steps to install and run a simulator:
Requirements: Firefox version 30+

Step 1. Install the simulator.

Open Mozilla Firefox web browser and access "App Manager add-ons" by typing in the URL

Click "Install Firefox OS 1.3 Simulator (Stable)" or which ever version pleases you.

When the Pop-up appears, Click "Allow" then wait till the download starts (There isn't any indicator onscreen) and when the Software Installation box appears, click "Install Now".

Click "Firefox OS 1.3 Simulator has been installed successfully."

Step 2:  Check installation

To determine if its installed, open Mozilla Firefox web browser and enter URL as

You should see "Firefox OS 1.3 Simulator ...."

Step 3: Start up the App Manager

In Mozilla Firefox web browser enter URL as

At bottom of the  App Manager click "Start Simulator"
The Firefox OS Simulator will appear as a new Firefox Window.

Congratulations...you now have access to the latest Smartphone OS.

Tuesday, July 8, 2014

Howto Turn On Menu and Back Button Lights on Samsung S3

The Samsung S3 is a clever device to conserve energy, but to some users who keep forgetting where is the frequently invisible "Menu" and "Back" buttons, they should have it lit all the time (and off when screen is off).

These buttons are on the left (Menu) and right (Back) of the Home button. By default, each time either keys are pressed, the lights will stay lit for about 1.5 seconds only.

Here are step to have "Menu" and "Back" buttons lit all the time (and off when screen is off).

Step 1. At the Home screen, go to settings.
Simple? For the unacquainted, just touch the Apps button (usually the centre circle at bottom of the screen) and choose settings.

Step 2. Choose "My device", scroll down and touch "Display". 

Step 3. Scroll down to touch "Touch key light duration".

 Step 4. Choose "Always on".

Press "Home" and you will notice the lights are lit next to the "Home" key. If the screen if off, these lights will also go off.

Howto Turn Off Samsung S3 keyboard sound

For some reason, the keyboard on Samsung S3 (GT-I9300) started to beep with each press and this gets annoying after having to type lots. Instructions can be applied for most Android 4, but here the screenshot are for Android 4.3 kernel version 3.0.31-2429075 dpi@HP20 #1.

To turn off/on the sound in 3 simple steps;

Step 1. At the Home screen, go to settings.
Simple? For the unacquainted, just touch the Apps button (usually the centre circle at bottom of the screen) and choose settings.

Step 2. Choose "My device", scroll down and touch "Language and input"

Step 3. Scroll down and find Key-tap feedback "Sound". To turn keyboard sounds off, uncheck the "Sound" box.

Press the "Home" key and you can test out keyboard sound, off or on as you have  selected.

Thursday, May 15, 2014

Writing Equations in Moodle - Part 2

This is a follow up post on enabling users to write equations in Moodle. In the previous post, the required tools were installed on Linux (Centos Linux) and we resume from there.

Step 1:

Login as administrator in Moodle. In the Administration menu, click on Plugins-> Filters-> Manage filters
Choose Filter for Tex notation and change Active? to On. If you click Settings it will bring you to the same screen as in the next step below.

In the Administration menu, click on Plugins-> Filters-> Tex notation
Verify that Path of Latex, dvips and convert binary all contain the linux tools that was created in Part 1 of this tutorial.

Latex = /usr/bin/latex
dvips = /usr/bin/dvips
convert = /usr/bin/convert

Change the convert output format to PNG.

Step 2:

Within a course, create a content and notice that the Insert equation button is visible in TinyMCE editor.

Tuesday, May 6, 2014

OSS Meetup in Kuala Lumpur

Those who are keen to meet fellow OSS in Kuala Lumpur should register for the Malaysia Open Source Community Meetup Q2 2014.

Date: 31 May 2014
Time: 9Am to 2PM
Registration: Required

Please go to the above link for further details.

Writing Equations in Moodle - Part 1

Moodle leverages on MathML for users to enter Math equations. Moodle 2 comes with DragMath and this reduces the need for complicated installation of libraries. On Linux, equations can be displayed with Latex through the use of MimeTex (http://www.ctan.org/tex-archive/support/mimetex) and the newer MathTex.

Examples on the use of MathText can be found at http://www.forkosh.com/mimetex.html#examples

Inserting math equation on a Moodle require certain filters to be enabled but before doing this, the related linux tools need to be installed. End users will need to ensure Java's JRE is installed and enabled in their web browser.

The required Linux (Referring to Centos Linux) tools to be installed include packages mimetex, texlive, texlive-dvips, texlive-latex, ImageMagick and their dependencies. The important tools that should be working and that is needed by Moodle later includes;

A good tip on enabling Java in web browsers can be found at the Java site. (https://www.java.com/en/download/help/java_blocked.xml)

Tuesday, February 25, 2014

Managing PostgreSQL with pgsql and pgAdmin3

The command line interface (CLI) tool that comes with Postgres server is known as pgsql. Alternatively, pgAdmin3 and phpPgAdmin can be installed.

The pgsql

Among some of the commands for pgsql can be shown as below;


Try out SQL statements within these tools. I found one nice reference at http://www.itl.nist.gov/div897/ctg/dm/sql_examples.htm

Installing PostgreSQL on Centos 6

PostgreSQL being an OSS licensed database is very different compared to MySQL. PostgreSQL (or Postges) maintains a repository for Linux systems like Centos to install the database. This repository is known as pgdg and is maintained at yum.postgresql.org or yum.pgrpms.org

Installation of the Postgres comes with psql, this is a CLI to manage Postgres.

Installation of PostgreSQL 9.3 on Centos 6.4 is as follows;

Step 1:
Open a CLI as root user and retrieve the pgdg repo RPM, then install it. This will allow the Centos to find for software from the pgdg.

wget http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
rpm -ivh pgdg-centos93-9.3-1.noarch.rpm

wget http://yum.pgrpms.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
rpm -ivh pgdg-centos93-9.3-1.noarch.rpm

Step 2:
Install the client and server.

yum groupinstall "PostgreSQL Database Server 9.3 PGDG"

yum install postgresql93 postgresql93-server


Step 3:
Initialise database and tables, and start. This creates the default user postgres.

service postgresql-9.3 initdb
service postgresql-9.3 start

You can now login with the default user to the Postgres terminal as follows;

[root]# su postgres
bash$ cd
bash$ psql -d postgres

If you get the error "psql: could not connect to server: No such file or directory...." Ensure the postgresql server service is running.
Step 4:
As the postgres user, create an administrative user, then log out from the psql (use \q), then the shell (Control-d).


As reference, here is summary of the syntax:
CREATE ROLE name [ [WITH] option [ . . . ] ]

 where option includes:

Step 5:
Edit Postgres configuration file;

vi /var/lib/pgsql/9.3/data/postgresql.conf

Uncomment the line and save.
#listen_addresses = ‘localhost’ and change it to listen_addresses = ‘*’

vi /var/lib/pgsql/9.3/data/pg_hba.conf

Add a line at bottom of the file to allow non-local connections, e.g.
host    all             dbmsuser            md5

Post installation
chkconfig postgresql-9.3 on


Thursday, February 20, 2014

Italian God Fathers May Run Open Source

In the current economic challenges, many countries are looking at saving cost via ICT and Italy is not an exception. Umbria, a region in the centre of Italy that produces cheese, lentils, truffles and have a relatively large number of small industries. This 900,000 strong population region is home to an active GNU/Linux User Group Perugia.

In 2012, Umbria saw the start of a revolution to switch to LibreOffice, which is LGPL or open source software (OSS) licensed. LibreOffice provides office productivity tools that include a word processor (like MS Word), presentation (like MS Powerpoint), spreadsheet (like MS Excel) and more. Advantages of this software is that it is free to download and install for almost all computers as it supports MS Windows, Linux and Mac platforms. Most popular editable document formats can be open and edited and its interface is rather intuitive and easy to use. It comes with a portable version where users can install it on a USB drive and carry it around to run LibreOffice any where. A built in PDF converter allows any edited file to be frozen and to be distributed with read only access and consistent format.

MS Office have been introducing its OOXML format through the docx formats which will eventually required every organisation to purchase an upgrade license for MS Office and this will incur la high upgrade cost. LibreOffice by default save files in Open Document Format or ODF (International document standards ISO/IEC 26300:2006) and it also supports past versions of MS Word, Excel and Powerpoint.

Through LibreUmbria, schools were introduced to use LibreOffice as their primary document editing applications before it was expanded further further to other organisations. This also received the government's top innovation award for Italian Government Projects in 2012/2013. Will the rest of the Italian Government and private organisations follow suit?

Read up news on the region of Umbria to switch over from MS Office to LibreOffice.

Jan 16, 2014 from ZDNet
Sep 26, 2013 from LibreOffice
Jun 5, 2013 from Document Foundation Blog

List of open standards can be found at ISO Public site

Wednesday, February 5, 2014

Passwordless root SSH Public Key Authentication on CentOS 6

Need to remote login to linux servers?

Create a public key and store it in the remote server. By default it is recognised as authorized_keys but this is fully configurable. The ssh-keygen generated the public key with RSA that is by default called id_rsa.pub

A well written article to do this can be found at Passwordless root SSH Public Key Authentication on CentOS 6

An alternative sshpass command as mentioned in January 31, 2014 Linuxpromagazine seems to force users to make the password visible. Good that this is no available in a default Centos 6, as this will help to maintain good password practices. I.e. do not have password kept where anyone can read it.