Tuesday, April 28, 2009

Laptop connecting to Internet via K810i phone

Almost all mobile phones have internet connection today. In cases where the laptop need to access the internet and the only network device available is the mobile phone, I can run a script and have the mobile service provider charge me pay as you use style.

Here I describe how Kubuntu Intrepid with Kde 4.3 is used to access a Sony Ericsson K810i mobile phone via USB cable. The service provider is DIGI and I have verified that the phone can be used to access the internet.

Step 1:
Ensure that the USB cable connects the K810i to the laptop. On the phone choose "Use mobile phone"

Step 2:
Install wvdial package then use wvdial to setup the basic connection file and detect the mobile phone.

$ sudo apt-get install wvdial
$ wvdialconf

Found an USB modem on /dev/ttyACM0.
Modem configuration written to /etc/wvdial.conf.
ttyACM0: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

Step 3:
Try to dial using the default script. This verifies that the call can be made but setting to the service provider is not working.

$ sudo wvdial

Step 4: Set the K810i to allow usage of the internet.
In K810i choose the menu ->Settings ->Connectivity ->USB ->USB Internet ->Turn on

Step 5:
Edit the script found in /etc/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
ISDN = 0
Phone = /dev/ttyACM0
Username = digi
New PPPD = yes
Password = digi
Modem = /dev/ttyACM0
Baud = 460800

OR configure the script to be able to access bluetooth and USB with different settings

[Dialer Defaults]
Phone =
Username =
Password =
New PPPD = yes

[Dialer Digiusb]
Modem = /dev/ttyACM0
Baud = 460800
Init = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","diginet"
Phone = *99#
Dial Command = ATDT
Username = digi
Password = digi
Ask Password = off
Auto DNS = on
Check Def Route = off
Carrier Check = off
Stupid Mode = on
Auto Reconnect = off
Idle Seconds = 0
Abort on Busy = off
Abort on No Dialtone = off
Dial Attempts = 1

[Dialer DigiBluetooth]
Modem = /dev/rfcomm0
Baud = 460800
Init = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","diginet"
Phone = *99#
Dial Command = ATDT
Username = digi
Password = digi
Ask Password = off
Auto DNS = on
Check Def Route = off
Carrier Check = off
Stupid Mode = on
Auto Reconnect = off
Idle Seconds = 0
Abort on Busy = off
Abort on No Dialtone = off
Dial Attempts = 1

Final step:
Log off then log back in (optional). At the prompt, start the Digiusb configuration

$ sudo wvdial Digiusb

Friday, April 17, 2009

Encrypting passwords for web applications

Just heard about security concerns and username/passwords being scanned over the network. This is the weakness of the HTTP protocol. One solution is to use the HTTPS with OpenSSL.

With reference to http://www.centos.org/docs/5/html

Step 1: Install the SSL components
yum install mod_ssl openssl

Step 2: Create the certificates
openssl req -new -key ca.key -out ca.csr
openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt
mv ca.crt /etc/pki/tls/certs
mv ca.key /etc/pki/tls/private/ca.key
mv ca.csr /etc/pki/tls/private/ca.csr

Step 3: Configure Apache to use the certificates
vi /etc/httpd/conf.d/ssl.conf

Search for the SSLCertificateFile and SSLCertificateKeyFile lines and point it to the correct TLS directory.

# Server Certificate:
# Point SSLCertificateFile at a PEM encoded certificate. If
# the certificate is encrypted, then you will be prompted for a
# pass phrase. Note that a kill -HUP will prompt again. A new
# certificate can be generated using the genkey(1) command.
SSLCertificateFile /etc/pki/tls/certs/ca.crt
# nicholas

# Server Private Key:
# If the key is not combined with the certificate, use this
# directive to point at the key file. Keep in mind that if
# you've both a RSA and a DSA private key you can configure
# both in parallel (to also allow the use of DSA ciphers, etc.)
SSLCertificateKeyFile /etc/pki/tls/private/ca.key

Restart apache server

service httpd restart

Step 4: Assign Apache to use a secure folder for the HTTPS while redirecting the port 80 of the HTTP to another folder.
vi /etc/httpd/conf/httpd.conf

NameVirtualHost *:80

</virtualhost *:80>
AllowOverride All
DocumentRoot /var/www/html
ServerName servername.com

NameVirtualHost *:443
<virtualhost *:443>
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
AllowOverride All
DocumentRoot /var/www/vhosts/servername/httdocs
ServerName tservername.com

Restart Apache server. The virtual host can be verified with the command

httpd -S

Step 5: Test the HTTPS and HTTP
Use a web browser to access with HTTP and HTTPS, both should point to different directory.

Certain web browsers do not know about cacert as a validation server. This can be done easily with following steps.

Step 1. Download from www.cacert.org the Root Certificates for class 1 and 3 PKI keys.
Step 2. Use firefox to add these root keys.
Choose edit ->Preferences ->Advanced ->Encryptions ->View Certificates
Choose Authorities ->Import
Choose both of the root keys that was downloaded
Step 3. Restart the web browser.

Changes are hard to accept

Reading the drama from The Apple Cart by George Bernard Shaw gave light to how changes just cant be accepted. Pity the glass blower's earnings would be affected by improvement in technology that would reduce breakages of bulbs during transport. Can you imagine some businesses that strive on expected breakdowns and expect paying users to be their released software testers being in the same light?

King Magnus (like my little boy's name) in the play seems to entertain the request of power to be transfered to the ministers. Followup is the thought of a lady that she could replace the queen as she have much more to offer. The finese of Magnus manages so many different issues while maintaining a certain royalty charm.

In dealing with introducing the OpenOffice.org to agencies, some just cannot accept the positive side and to pave way for the future. Concern is just to get past living each day and each report or presentation to be submitted. Worst case is that some software company even comes over to tell the agencies off that their business will be effected. Maybe a little bit of King Magnus is needed.

If anyone have the time, the play is really something decent and naughty that can be enjoyed easily.

Thursday, April 16, 2009

Akonadi Basics

The KDE 4 introduced a common framework for applications to store and access mail, calendars, addressbooks, and other PIM data. The reduced the development time of applications that shared data such as the addressbook and calendars.

On Kubuntu the package is called akonadi-server and akonadi-kde. The current version is 1.1.1. Akonadi server supports a number of KDE applications like Akregator · Amarok · digiKam · Dolphin · Dragon Player · Gwenview · JuK · K3b · Kaffeine · Kate · Kdenlive · KDevelop · KGet · KMess · KOffice · Konqueror · Konsole · Kontact · Kopete · KTorrent · Okular
On Wikipedia this is described as reducing the need for space and also collaboration of information between applications.

To demonstrate the use of Akonadi, I started by opening the KDE System Settings and choose the Advanced tab. Choosing the Akonadi Server icon, it says Akonadi server not running. Waited a while, then the server started and I have 2 tabs. In the resources tab I have a std.ics (Calendar), std.vcf (Address book) and Birthdays (self explained). The next tab indicated that the server was running with MySQL database.

Next I proceeded to launch the PIM known as Kontact. I tried adding a New Contact in the Address Book and it works fine. How can I populate this? I dont use KMail to manage my emails address, instead I use Thunderbird. This wont support Akonadi and I cant moved the data across other applications.

Lets try using Kopete (The instant messenger) where I already have a well built list of contacts. I start Kopete and login to my account. From the Kopete menu, choose File ->Export Contacts. Select the Address book called resource (this is the name I set in the Kontact address book). It copies all the messenger contacts along with the photos into Kontact.

I now have a backup of the messenger names on my address book and I can use this to manage my mailing when I decide to use KMail for emails.


Scanning with Kubuntu Intrepid and KDE 4.3

Scanning with Kubuntu Intrepid is easy with Xsane and EPSON Perfection 1250 scanner. XSane is GPL and is currently at version 0.995

Step 1:
sudo apt-get install xsane xsane-doc

Step 2:
Plug in the USB connection to the computer and from the KMenu choose Application ->Graphics ->XSane

You can see that the scanner is detected by typing the command


Step 3:
In the XSane Window leave all as default except the settings for;
File location and name (I choose a PDF name)
Type by ext
Resolution to minimum 150

Step 4:
In the XSane Preview Window, choose Full Size then "Acquire Preview". When this is done the first time, it takes a while.

In the XSane Window, press "Scan". Make sure it is the image that you want and continue by choosing File ->Save Image.

To scan multiple pages into one PDF, change the Viewer to multipages.

Wednesday, April 15, 2009

Ubuntu Manual in Bahasa Malaysia

There are lots of documentation on Ubuntu Linux. For those looking for a Bahasa Malaysia version, an 8 Mb documentation that can be easily understood by most level of users that is compiled by Zulkifli b Abdullah. See Malay Ubuntu

Good job!

Friday, April 10, 2009

Setting up printer for Kubuntu

The KDE system on Kubuntu uses network discovery to find the available printers. This means, users do not need to manually add printers. This is done in 2 steps.

Step 1:
At the KMenu choose Applications ->System ->Printer Configuration.

Step 2:
Choose Server settings and check the "Show printers shared by other systems". Press "Apply".

Users need to wait for about a min for the first time discovery of the printers. Press Ok and test the printings.

Wednesday, April 1, 2009

OpenOffice.org Best Practice

1. Introduction

This document describes best practices to improve operational efficiencies in creating and exchange of office electronic documents. This list is not meant to be lengthy and too technical. Only the Writer, Calc and Impress is covered in this document.

Comments are invited to improve this list.



  1. Provide a standard version of OpenOffice.org installed on all stations.

    1. There are many distributions of OpenOffice.org such as Sun OpenOffice.org, StarOffice and Go-OO that provide the latest stable versions.

  2. Provide a list of standard extensions and its version that should be installed in all OpenOffice.org installed.

  3. Ensure that the version of OpenOffice.org is kept updated.

Default Documents

  1. The standard file formats for saving must be determined.

    1. Currently Open Document Format (ODF) 1.2 is recommended.

    2. For archiving purpose, the Portable Document Format (PDF) is to be used.

  2. In the OpenOffice.org User Data option, all fields must be filled correctly.

    1. This allows tracking of changes in documents correctly.



  1. The following is to be made available to all users

    1. A template of default styles. Users can load the template or just the styles from the Styles and Formatting dialog box.

    2. Relevant templates of commonly used documents should be made available to users.

  2. The templates are to provide the default values for formatting. This includes;

    1. Page size

    2. Font Type and Size

    3. Amount of line spacings

Creating documents

  1. All new documents should be created from an existing template.

  2. If no suitable template is available, the user may use the default template.

  3. Intial stage of document creation should emphasize on its contents and flow. Once the basic structure of the document is ready, use the Styles and Formatting dialog box to apply the required styles.

Using MS Office documents

  1. Use the Document Converter tool to identify possible errors.

Format layout

  1. Paragraphs should be format using pre-defined styles. Where possible, avoid formatting characters and paragraphs directly.

  2. Use Heading styles for grouping of topics into logical structures. The order should be Heading 1, Heading 2, and so on.

  3. Change or create heading styles to suite the document.

    1. Do not skip heading levels.

  4. All hyperlinks must be descriptive.

  5. Use bullets or numbered list. Manual characters used as bullets or numbering should not be used.

  6. When copying bullets or list from another document, paste as plain text to avoid loss of current formatting.


  1. Graphic elements such as images, diagrams or charts in a document must have information about those graphics in the text of the document.

  2. When copying graphics into documents that are to be sent out, ensure that the links are broken.

    1. In Writer menu choose, Edit ->Links.

  3. Avoid flashing, blinking and similar animated text.


  1. Rows in a table that is the heading must be format as Table Heading style.

  2. Normal rows in a table must be format as Table Contents style.

Printing documents with Writer

  1. In the print option, uncheck the “Print automatically inserted blank pages”.



  1. Each slide should use the predefined slide layout.

    1. Tables should be added with the tables layout.

    2. Charts should be added with the chart layout.

    3. Column arrangement should be done with the predefined layout where possible.

  2. News slides should be built with the Outline View. This will focus on content before beautification is taken place.

Audio and Movies

  1. All audio and movie embedded must use the standard format that is supported by OpenOffice.org

    1. Audio: MPEG, OGG, 3GPP

    2. Video: Quick time, AVI, MPEG, OGG, Divx, FLV

  2. Audio and Movies should be only one for each slide.

    1. This will reduce the need for extremely high memory usage.



  1. Use row and column headers extensively and avoid ambiguity within these headers. Make them clear and self-explanatory.

    1. Use the Heading and Heading 1 styles

  2. All sheets must be given descriptive names.

  3. Use region names for individual or group of cells.

    1. This allows functions to refer to specific cells.

    2. Users can use the Go-To tool, to quickly moved around the spreadsheet.



  1. Usage of macros should be minimized.

  2. Use the extensions to add functionality to OpenOffice.org

    1. Extension support the programming language in Java, Python and C++

Blog Archive