Sunday, December 20, 2009

Enable user directories in Apache2

Its been a while since Apache2 was introduced. The configurations are found in apache2.conf and user specific settings can be added to httpd.conf in the /etc/apache2 directory. One major difference from previous version is the method to enable the user directory modules.

The Linux users can have their individual websites but this needs to be enabled and the web server restarted. At the command line type

sudo a2enmod userdir
sudo /etc/init.d/apache2 restart

This enables the Userdir module in /etc/apache2/mods-enabled/userdir.conf and users can create pages in the directory /home/username/public_html
This is managed by the directive

<directory /home/*/public_html>


Other basic configurations can be
  1. Disable a user from serving webpages (e.g. root and user1)

    Userdir disabled root user1

  2. Access URL as http://servername/~username

    Userdir public_html

  3. Access URL as http://servername/web/username

    Userdir web

Thursday, October 29, 2009

MyGOSSCON 2009 on theStar

The latest promotion on the Malaysian Government Open Source Software Conference 2009 or MyGOSSCON is on the theStar newspaper today, see "A Vision Becomes Reality"

Tuesday, October 13, 2009

Upcoming MyGOSSCON 2009 Conference

The 3rd in the series of conference for the Malaysian Government on OSS will be coming this 5-6th October 2009 at PICC, Putrajaya.
To kick off the conference, following events have been scheduled:
  1. OpenOffice.org contest (for primary students to show off their skills on OSS presentation tools)
  2. OSS Case Study Award (Government and Institution of Higher Learnings share their OSS experiences through a write up of their implementations)
  3. 24-Hour WebDev Contest (Allow groups of programmers to compete heads on to grab a chance to show-off their skills)

-x-

Sunday, September 20, 2009

[Jaunty] Firefox Foxtab

Firefox provides a large number of extensions that enhances the user experience. The extension to increase its fancy tab switching is called FoxTab. Install this and on the superb KDE display, things get even better. I have version 1.2.1 on Firefox 3.0.14.

Once installed, use the F12 key to view multiple tabs.

I dont use a mouse that much but if you do, make full use of its mouse gestures. E.g. Hold the left mouse button, then hit the right mouse to launch the Interactive mode of Foxtab. The next time you need to do a presentation on web apps, try it with Foxtab. In terms of memory usage, when Firefox with 6 tabs (includes images) an average of 105,120k memory is used. Launching the Foxtab this increased to 108,492k on average. This is about 3,000k of extra memory is used.

[Kubuntu] Upgrade OOo 3.1.1

Just did an OpenOffice.org upgrade to 3.1.1 and it seems to be working fine on Jaunty. Additionally, I had to install the openoffice.org-kde and openoffice.org-style-oxygen.

The install provides OOo310m19 (build 9420).

For those who have been struggling with the slide transition preview, will now find it is much smoother. Same goes for the custom animations, great improvement. On the status bar of Impress, Calc and Writer it indicates when the document have been edited and needs to be saved.

The sliderbar to zoom is available for all 3 main components and you can also double click the zoom display to bring up the zoom dialog box.

Tried the overlining of text features, cool. Now, when will I ever need this?
There are a whole bunch of other features listed at OpenOffice.org

Monday, August 24, 2009

London Stock Exchange to consider Linux?

The concern for performance in time sensitive financial environments is very real when the London Stock Exchange (LSE) had a system fault in Sept 2008. The TradElect system in place was MS Windows based and may be considered to be replaced as interviewed by Computerweekly and finextra.com.

During the recent visit by Redhat to Malaysia, the New York Stock Exchange (NYSE) was mentioned as an example of financial systems using Linux. The trading speed of 0.4 milliseconds have been mentioned in the same article. This is almost double the speed of the TradElect but will the investment of billion of Pounds justify replacing it with another new system like Linux? Anyone knows what KLSE is using?

Financial systems world wide looking at the future of their architecture might learn a lesson or two with how the LSE takes charge of their investment and business needs.

Monday, August 17, 2009

[kubuntu] Rename FAT label

The Kubuntu Jaunty did not allow me to change the USB diskdrive label. This I found was because it is FAT32 formated. Why would I want to change the label and maintain it as FAT32 format?

  1. If someone finds my disk and would care to return it, they can mount it and find my phone num ber as the label.
  2. The FAT32 allows me to plug the USB diskdrive to MS Windows and Linux operating system interchangeably.
  3. I backup to this disk for both operating system.
Here are steps to change the label name.

Step 1: Install mtools if not already done.

$ sudo apt-get install mtools

Step 2: Identify the USB diskdrive (or partition) to be formatted.
Plug in the USB diskdrive. Then identify the USB device in a terminal, type:

$ tail /var/log.messages

I found mine as /dev/sdb1

Step 3: Rename the label with 11 characters maximum

$ sudo mlabel -i /dev/sdb1 ::0161234567

Test the results by unplugging the device, then plug back in to see the difference. Thank to the reference at Ubuntu.com website.

Tuesday, July 28, 2009

Yahoo Messenger upgrades its servers

Early this month I failed to connect the Kopete 0.70.2 to Yahoo Messenger. There were several suggestions to use alternate messenger server IP manually. Initially it worked, but soon all of the suggested servers failed.

This was due to Yahoo upgrading their servers. Matt Rogers, the maintainer for Kopete soon received info from Pidgin maintainers on the authentication changes. Yahoo have upgraded its authentication to version 15 from version 13 and this is now resolved. But the KDE 4.2 based distros may well have to wait for a package on this. In the mean time, revert to Pidgin or compile from Kopete SVN.

Howto on installing from SVN

Step 1: Install svn client from a terminal.
sudo apt-get install subversion subversion-tools

Step 2: Install the tools to compile (generate the executables) from a terminal
sudo apt-get install cmake
sudo apt-get install libqt4-dev kdelibs5-dev [36Mb +]
sudo apt-get install libqimageblitz-dev [33Mb+]


Step 3: Follow are instructions from kopete.kde.org in a terminal
svn co -N svn://anonsvn.kde.org/home/kde/trunk/KDE/kdenetwork
cd kdenetwork
svn up kopete cmake
mkdir ../kdenetwork-build
cd ../kdenetwork-build
cmake ../kdenetwork
make
sudo make install

If you get errors below on building, then it may require the other libraries to build the KDE source.

CMake Error at /usr/share/cmake-2.6/Modules/FindPackageHandleStandardArgs.cmake:57 (MESSAGE):
Could NOT find KdepimLibs (missing: KdepimLibs_CONFIG)
Call Stack (most recent call first):
/usr/share/kde4/apps/cmake/modules/FindKdepimLibs.cmake:73 (find_package_handle_standard_args)
CMakeLists.txt:33 (find_package)

Solution: Read the KDE4 build instructions and at a terminal type following before you resume where you left off in step 3. This will take a good 270Mb+ but you can install any future source from KDE easily.

sudo apt-get install kdepimlibs5-dev

Test Kopete with the Yahoo Messenger account. The package can be removed with the command

sudo make uninstall kopete

Sunday, June 14, 2009

[Jaunty] Configure program at system boot up

The tpb services can be started from the command line as follows

/etc/init.d/tpb start

This allowed the interaction with some of the Thinkpad laptop special function keys. Now, how can I get this activated automatically during bootup?

Previously, KDE provided KControl where I can choose the various programs available to start or not during system boot. In Jaunty and KDE 4.2, its gone! Here I list 3 alternative ways to manage this. First 2 require users to have a basic knowledge of the runlevels.

METHOD 1: Back to old debian school!
Step 1. Install the sysv-rc-conf from a terminal

sudo apt-get install sysv-rc-conf

Step 2. Run the program, choose what you want activated at each Runlevel.


To select the next page press Control+n or p. Other than that just use the cursor arrows to move to different services.

METHOD 2: Use Gnome Bum. Better to also understand scripts priority that begin with "K" means to shutdown, "S" to start up.
Step 1: Install the Bum with the terminal.

sudo apt-get install bum

Step 2: Start the Bum.
From the KMenu ->Application ->System ->Bootup Manager

Since its menu driven, should be easier to figure out.

METHOD 3: Start a script during login, with KDE Autostart
Step 1: In KDE systems, all scripts located in ~/.kde/Autostart will automatically run when a user logs in (Where the ~ means your home directory). Create a new file called mytpb.sh with the following contents to start thinkpad sound mixer;

#!/bin/sh
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
tpb -m on

Step 2: Save the file.

Step 3: Change the mode to executable

$ chmod u+x ~/.kde/Autostart/mytpb.sh

Step 4: Logout, then log back in.
You can then try the Thinkpad's volume control. This should produce the on screen display (OSD) of the volume bar. Other settings can be configured in the /etc/tpbrc or ~/.tpbrc

Friday, June 5, 2009

[Jaunty] Managing sound device

The recent Kubuntu 9.04 Linux uses the Pulseaudio to manage its sounds device selection. To enable all sound devices to use the Pulseaudio sound server, open a terminal and type

asoundconf set-pulseaudio

Any application that need to access the audio, including the ALSA will be sent to the Pulseaudio server. The settings can be configured at

/usr/share/alsa/pulse-alsa.conf

Open or play a movie or sound and test if it works. If this does not work, reset back to use the default ALSA system with the command;

asoundconf reset-default-card

I am still trying to figure out the significant benefit of using Pulseaudio.

Wednesday, June 3, 2009

[Jaunty] Firefox can use apt://

Some URLs accessed by Firefox is used to install packages for Linux. For example the URL to add the canonical cloud client.

apt://ubuntuone-client?refresh=yes

I get the following message.

Firefox doesn't know how to open this address, because the protocol (apt) isn't associated with any program.

Solution.

I started synaptic and added the package apturl, searched for Ubufox extension for Firefox. Restarted Firefox and now I can access the URL.

Monday, May 25, 2009

Reset MySQL 5 password

I am running a Joomla training this week. One of the main items is getting the password assignment for root and database user. As a reference here is to resetting root password and assigning user to have full access to a database.

Reset root password
Step 1: Restart the MySQL server without using the user restrictions and access to the network.

#/etc/init.d/mysql stop
#mysqld --skip-grant-tables --skip-networking&

Step 2: Open another terminal and reset your password

# mysql mysql -u root
mysql> UPDATE user SET password=PASSWORD('NewPassword') WHERE user="root";
mysql> FLUSH PRIVILEGES;
# /etc/init.d/mysql restart

Assigning user access to database
Step 1: Login a root to mysql


Step 2: Assign the user joe to use from localhost the database somedatabase.
mysql> GRANT ALL privileges ON somedatabse.* TO joe@localhost IDENTIFIED BY 'SomePassword';
mysql> FLUSH PRIVILEGES;

Friday, May 22, 2009

Backup Thunderbird2

Just after installing the Kubuntu Jaunty 9.04 Linux, its time to restore some of my stuff. Firstly, I need communications and this is via my Thunderbird.

Backup:
I found it necessary to disable some of the extensions to allow the new Thunderbird to run properly.
Copy the Thunderbird directory profile (usually it goes with some crazy name followed by your profile name to the backup device. Example

cp ~/.mozilla-thunderbird/izwvasdx.default /media/backupdisk

Restore:
Step 1:
Copy the directory profile back to the new system

Step 2:
In the terminal create an email profile that uses the old directory, type

thunderbird -profilemanager


Ref: Mozilla

Wednesday, May 20, 2009

Install Moodle on CentOS 5

Following are steps to install Moodle 1.9 on CentOS 5.

Step 1
Install mysql-server-5.0.45, mysql-5.0.45 and php-5.1.6

Install other PHP library php-mbstring-5.1.6, php-xmlrpc-5.1.6

Step 2
Add the user name "user1" and database "mymoodle" to MySQL with the correct privilege.

Step 3
Download the moodle and extract to /var/www/html/moodle
Create and assign the permission of the webserver to the data directory at /var/www/moodledata

Step 4
In a start the moodle installation via web browser, use the location
http://localhost/moodle

Copy the script into a file named config.php within the root directory of Moodle.

Follow the rest of the instruction to complete.

Step 5
Install lynx to activate the cron. Edit the crontab to run every 30 minutes.

$ crontab -e
*/30 * * * * wget -q -O /dev/null http://localhost/moodle/admin/cron.php



See http://docs.moodle.org/en/Installing_Moodle
http://docs.moodle.org/en/Administration_FAQ

Tuesday, May 19, 2009

I am a registered Linux user #490593

Register yourself as a registered Linux user at Home, Work or any other place.

Friday, May 8, 2009

[Jaunty] Adding mp3 into OpenOffice.org Impress presentations

One of the popular format for music is the MP3 where a form of lossy compression algorithm is used. A typical music CDROM would hold only a few songs but when saved as MP3, almost a hundred music and song can be saved on a single CDROM. MP3 allows a smaller sized file that still provided an acceptable quality in audio.

On Kubuntu 9.04 with OpenOffice.org (OOo) 3.0.1, adding of the MP3 to play audio during a presentation is simple. Default audio support is on MIDI, AIF, AU and WAV format. The Linux system needs to have gstreamer from fluendo installed for OOo to play MP3s. So this is to all my friends who is trying to get their presentation done with audio and still hanging on to OOo, here are the steps.

Step 1: This is a one time step.
Open a terminal and with an internet connection, type

$ sudo apt-get install gstreamer0.10-fluendo-mp3

Step 2:
Open the Impress presentation and choose the slide where you want to start the audio. Select the "Slide transition" tab.

Step 3:
In the Modify transition section, choose Sound and select "Other Sound..." then choose the file containing the desired music. In this case, it should be a working MP3. And check the option for "Loop until next sound".


Warning: Do not click the button "Apply to All Slides", as this will force the MP3 to restart after each slide. Volume is controlled by the PC speakers or you could remake the audio.

Sunday, May 3, 2009

[Jaunty]Installing scanning and photo editing tools on Kubuntu 9.04

In a fresh install of Kubuntu Jaunty 9.04, the next best thing to do is try out its scanning and photo editing capabilities.

$ sudo apt-get install gimp gimp2.0-quiteinsane gimp-gutenprint gimp-data-extras

This install GIMP the popular photo editor and the SANE tools for scanning.

[Jaunty]Adding the VLC video player

Kubuntu Linux 9.04 supports the VLC video player very well. In a fresh install, open the terminal and type

$ sudo apt-get install vlc videolan-doc mozilla-plugin-vlc vlc-plugin-sdl libvcdinfo0

[Jaunty]Installing Thunderbird 2 on Kubuntu Linux 9.04

Just after installing Kubuntu Linux 9.04 and all seems well, the email client is the next stop.

Install Thunderbird 2.0 from a terminal

$ sudo apt-get install thunderbird thunderbird-dispmua mozilla-thunderbird-bidiui lightning-extension enigmail

The installation included the following packages:
calendar-google-provider calendar-timezones

Saturday, May 2, 2009

First look at Kubuntu 9.04 Jaunty

I have just completed a number of fresh install of Kubuntu Jaunty 9.04 Linux on a
Lenovo R60 (9459BF8) 32 bits
CPU T5600 @ 1.83GHz
L1 64KiB
L2 Cache 1984KiB
RAM 1Gb


Here are some quick comments:


The KMenu
This is the KDE Start Menu. One of its main menu options is the Favourites. This contain the Konqueror, Kontact, System Settings, Dolphin, Kopete and Amarok menu. Users should add frequently used programs here.

Desktop
There is a desktop that takes only a small place on dashboard. There are Plasmoid widgets that can be added to the dashboard to increase user experience. to view only the Dashboard, press Ctrl+F12 (or press the Show Dashboard Applet in thebottom panel) to dim all applications and view only the widgets and Desktop.

Workspace
Default Kubuntu had only 2 workspace and no keyboard shortcut to switch betweenmany workspaces. I can only return to 1st workspace with Ctrl+F1.

1. Right click Pager applet (in the bottom panel) and choose "Configure Desktop", increase to 4 workspace.

Screen
The screen is sharp and nice, which is why I have always choosen KDE when Looks matter.

Quick look at accessing applications
Web browser: Konqueror 4.2.2
Office: OpenOffice.org 3.0.1
Print screen: Ksnapshot 0.8.1 (The PrtSc button problem have been fixed)
Terminal: Konsole 2.2.2
System process: (Ctrl + Esc)
Software installer: KPackageKit
Desktop: KDE 4.2.2 (Ctrl + F12) One cool and futuristic desktop for all.
Compression tool: Ark 2.12 (Integrated well with Dolphin)

Others:
  1. Initially I could not login to my home wireless network. Had to manually use the iwconfig, it could load automatically there onwards. So, if you have the same problem, open a terminal and type the following to detect your wireless network (e.g. mywireless)
    $ sudo iwlist wlan0 scanning essid looney
  2. I could resize the KPanel to a smaller size easily.
  3. First site I went with Konqueror was the blogspot.com and all looks good. Only problem is that the default menus during editing of post did not allow me to change the fonts. Only option allowed was spelling, Add image and Preview. A pop-up appeared with the need to install Shockwave Flash plugin but it keeps failing to install. See below for the resolution.
  4. Konqueror did not refresh properly when used as a web browser.
  5. The Amarok did not have any sound when playing an mp3. The midi file was not supported at all.
  6. The add/remove software manager did not seem to function. I cant get a list of software and it kept crashing. I needed to choose "Software Updates" ->Refresh. First thing I did is to install Kubuntu-restricted-extras package.

Post installation recommendations
At the terminal run
$ sudo apt-get install flashplugin-installer msttcorefonts
Open Konqueror, when it ask to install the Flash plugin this will now be successful.

$ sudo apt-get install kubuntu-restricted-extras
This will add JRE, mp3, mpeg, odbc, unrar and other useful support.

$ sudo apt-get install tpb
This will allow the Thinkpad special keys to be available. To install this package, the following package is removed:
hotkey-setup


$ sudo apt-get install gdecrypt password-gorilla
This allows the disk to be encrypted and manage passwords.

$ sudo apt-get install wine wine-gecko
This will allow installation of standard MS Windows based applications.

$ sudo apt-get install ssh sshfs ksshaskpass kdessh
Allow secure SSH connection to and from SSH servers.


Conclusion
Jaunty is a great Linux distro, but those who cannot accept the KDE4 changes should continue with Gnome on Ubuntu Linux.

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>
<directory>
AllowOverride All
</directory>
DocumentRoot /var/www/html
ServerName servername.com
</virtualhost>

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


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.




Link

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

lsusb

Step 3:
In the XSane Window leave all as default except the settings for;
Viewer
File location and name (I choose a PDF name)
Type by ext
Color/Lineart/Monocrome
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.

Note:
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.

2. MANAGEMENT MATTERS

Policies

  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.


3. STANDARD FORMATTING

Templates

  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.



Graphics

  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.



Tables

  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”.


4. PRESENTATION WITH IMPRESS

General

  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.


5. SPREADSHEET WITH CALC

General

  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.


6. OTHER ISSUES

Macros

  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++









Monday, March 30, 2009

Preserving electronic data with office suites

Anyone trying to open a document created by Microsoft (MS) Office will find that they need to upgrade to support the .docx, .pptx and .xlsx. This is understandable since they are newer formats. Same goes for those opening ODF1.2 would be better off with OpenOffice.org (OOo) 3.

But for those who have been archiving documents in MS Word for Windows 1.x and 2.x will now find that MS Word 2007 cannot open such files. Yup, you wont be able to open such files as mentioned in MS website. Yup reality, one of the mainstream and widely used software provider just showed that they can indeed drop support of their own document support. Below is what you can find at their website.


Fortunately, OOo3 can be used to open such files if needed.

Data arvhiving for the Future
How to preserve such data? Best practices (none found documented) from experience, two copies need to be saved. An editable and non-editable.

  1. Non editable files, save as PDF or PS (postscript).
  2. Editable word processor files (why the need to edit archives?), save as RTF (ruch text format) or ODF (open document format).
  3. Editable spreadsheet files, save as ODF (open document format). This preserves the formulas among other complexities.
  4. Editable presentation files, save as ODF (open document format).

Sunday, March 29, 2009

Improving OpenOffice.org3 performance (basic)

OpenOffice.org (OOo) can be improved based on how it is used by the user. This means there is no single solution. Recently, during a demo my OOo froze! So I needed to find the fault.

Here I take it that you are a normal user with 1GB RAM PC and having Internet access. In the beginning
soffice.bin -> 17,724K memory, 55,044K shared memory.


  1. Start OpenOffice.org Writer. In the menu choose Tools ->Options ->OpenOffice.org ->Memory.
  2. The Undo, Number of Steps should be reduce to your normal figure. Over the last 2 weeks, I have been compiling the number of undos and I have not used more that 15 undos at one time. Multiply this by 2 and I set it now to 30.
  3. Graphics cache, "Use for OpenOffice.org" ->128Mb. Cause I have 1GB RAM.
  4. Graphics cache, "Memory per Object" ->20MB. This is the charts and graphics I create in documents.
  5. Graphics cache, "Cache for inserted object" ->20 objects. I have only used most objects in the Impress documents.


After the above alterations, my memory usage was averaged as below.
soffice.bin -> 16,956K memory, 53,224K shared memory.

Not much but its a start. You will get the idea, work on the average number of documents that you will open at one time. In Kubuntu, only one process is created for however many OOo applications that are opened. Which I have tested for upto 30 documents opened at a time. I have not tested OOo3 behaviour on MS Windows at this moment. Will be looking for feedback on this.

Friday, March 20, 2009

Development on KDE4 with Solid

After using KDE 4.2 it really looks like there are lots of positive opportunities for Kubuntu. This use the QT 4.4.3 library. Below is how my desktop looks at the moment.


For developers, the first thing to do is to understand about Solid. This is a library introduced since 2006 to discover hardware independent of hardware architecture. There is an increase awareness on mobility features. Can you imagine how much effort is being taken? Just look at the seriousness of the Start menu development. A brief description of KDE Solid can be found at the URL http://solid.kde.org/

The C++ tutorial on Solid can be found at http://techbase.kde.org/Development/Tutorials/Solid_Tutorials/ for the eager developers.

The KDE Goals seems to indicate a radical approach. This will break lots of stuff. Many older application and library will need to be rewritten and lots of people will be kept waiting. However, this barrier needs to be taken, else revolutionary changes can't take place. Supporting Solid is the Phonon library, that is expected to provide an independant multimedia framework to be used in gstreamer, xine and DirectX/DirectSound. Even the user interface will undergo a systematic development with the introduction of the Human Interface Guideline (HIG).

Look forward to KDE4!

Using CentOS 5 testing repositories

CentOS does make a good Linux distro. Still users will want stuff that is still in the pipeline or testing.

One good example is that CentOS 5.2 comes with PHP 5.1. However many web developers have moved to PHP 5.2 and this is available in the testing repo. Below is one command to upgrade the existing PHP.

Step 1: Switch to root.

Step 2: Add the testing repo
# cd /etc/yum.repos.d
# wget http://dev.centos.org/centos/5/CentOS-Testing.repo

This will containg the following:
[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

Step 3: Update PHP.
yum --en=c5-testing update php*

CentOS graphics

Development of CentOS is partly using the custom graphics. Below is a link to the graphics used in CentOS.

http://dev.centos.org/centos/graphics/

Thursday, March 19, 2009

Playing movies on CentOS 5

One of the attractions in a presentation is having interesting movies being played. On CentOS 5.2, you can install VLC from the Dag repository.

Step 1: Add the Dag repository.
$ vi /etc/yum.repos.d/dag.repo

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
gpgkey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
enabled=1

Step 2: Install VideoLan
$ yum install vlc

Installing for dependencies:
SDL_image i386 1.2.5-1.el5.rf dag 84 k
a52dec i386 0.7.4-8.el5.rf dag 78 k
aalib i386 1.4.0-5.el5.rf dag 167 k
arts i386 8:1.5.4-1 base 1.1 M
cppunit i386 1.12.0-3.el5.rf dag 811 k
dirac i386 1.0.2-1.el5.rf dag 2.9 M
faac i386 1.26-1.el5.rf dag 151 k
faad2 i386 2.6.1-1.el5.rf dag 329 k
ffmpeg i386 0.4.9-0.9.20070530.el5.rf dag 5.3 M
ffmpeg-libpostproc i386 0.4.9-0.9.20070530.el5.rf dag 42 k
freeglut i386 2.4.0-7.1.el5 base 142 k
fribidi i386 0.10.7-5.1 base 52 k
giflib i386 4.1.3-7.1.el5.1 base 39 k
gsm i386 1.0.12-1.el5.rf dag 63 k
imlib2 i386 1.4.0-1.el5.rf dag 947 k
lame i386 3.98.2-1.el5.rf dag 569 k
libXvMC i386 1.0.2-2.1 base 18 k
libcaca i386 0.99-0.1.beta11.el5.rf dag 236 k
libcddb i386 1.3.0-1.el5.rf dag 112 k
libcdio i386 0.77-1.el5.rf dag 514 k
libdca i386 0.0.5-1.el5.rf dag 136 k
libdvbpsi i386 0.1.5-2.el5.rf dag 66 k
libdvdcss i386 1.2.10-1.el5.rf dag 64 k
libdvdnav i386 0.1.10-3.el5.rf dag 212 k
libdvdread i386 0.9.7-1.el5.rf dag 126 k
libebml i386 0.7.8-1.el5.rf dag 297 k
libid3tag i386 0.15.1b-3.el5.rf dag 75 k
libmad i386 0.15.1b-4.el5.rf dag 82 k
libmatroska i386 0.8.1-1.el5.rf dag 701 k
libmodplug i386 0.7-1.2.el5.rf dag 299 k
libmpcdec i386 1.2.6-1.el5.rf dag 52 k
libshout i386 2.2.2-1.el5.rf dag 115 k
libsndfile i386 1.0.17-1.el5.rf dag 476 k
libupnp i386 1.6.6-1.el5.rf dag 297 k
lirc i386 0.6.6-4.el5.rf dag 241 k
mpeg2dec i386 0.4.1-2.el5.rf dag 190 k
opencv i386 1.0.0-1.el5.rf dag 4.3 M
qt4 i386 4.2.1-1 base 7.2 M
svgalib i386 1.9.25-1.el5.rf dag 809 k
taglib i386 1.5-1.el5.rf dag 978 k
twolame i386 0.3.12-1.el5.rf dag 131 k
x264 i386 0.0.0-0.4.20070529.el5.rf dag 789 k
xosd i386 2.2.14-1.el5.rf dag 60 k
xvidcore i386 1.1.3-1.el5.rf dag 531 k
zvbi i386 0.2.33-1.el5.rf dag 925 k

Step 3: Start VLC
In the Desktop Panel, choose the menu Applications ->Sound and Video ->VLC Media Player



Wow ! a total of 46 packages needed to be installed on my fresh CentOS 5.2 installation. Only problem was the package zvbi that failed to be downloaded. So, I manually installed that and restarted the vlc installation.

If this don't work, then the VLC can be manually downloaded and installed from http://download.videolan.org/pub/videolan/vlc

Caveat, you need to install all dependencies manually.

Sunday, March 15, 2009

The programming IDE called Eclipse

Programming on Linux can be done by editing file at the text editors, then going to the prompt to compile and execute. There are Integrated Development Environment (IDE) that can help reduce the pain programming. Eclipse is one such example, supporting a diverse number of programming language.

Installation guide.
Step 1: From the desktop panel choose Kmenu ->Applications ->Add/Remove Software. Enter the root password. Choose the Sources, then ensure that the universe repository is selected.

Step 2: Install Eclipse and the plugins
sudo apt-get install eclipse

recomended packages:
ant-doc libbsf-java liboro-java libxalan2-java jython libjdepend-java
libgnumail-java libxml-commons-resolver1.1-java libcommons-net-java javacc
dh-make libgcj9-dbg gcj-4.2 junit-doc libbcel-java-doc classpath-doc
libgcj8-dbg libgcj-doc tomcat5.5 libmail-box-perl

The following NEW packages will be installed:
ant ant-gcj ant-optional ant-optional-gcj antlr debhelper ecj ecj-gcj
eclipse eclipse-gcj eclipse-jdt eclipse-jdt-gcj eclipse-pde eclipse-pde-gcj
eclipse-platform eclipse-platform-gcj eclipse-rcp eclipse-rcp-gcj
eclipse-source fastjar gappletviewer-4.3 gcj-4.2-base gcj-4.3 gij-4.2
gij-4.3 gjdoc html2text intltool-debian java-gcj-compat java-gcj-compat-dev
java-gcj-compat-headless junit junit4 libantlr-java libantlr-java-gcj
libbcel-java libcommons-collections-java libcommons-dbcp-java
libcommons-el-java libcommons-launcher-java libcommons-modeler-java
libcommons-pool-java libecj-java libecj-java-gcj libgcj8-1 libgcj8-1-awt
libgcj8-jar libgcj9-0-awt libgcj9-dev libgcj9-src libjsch-java
liblucene-java liblucene-java-doc libmail-sendmail-perl libmozjs0d
libmx4j-java libswt3.2-gtk-gcj libswt3.2-gtk-java libswt3.2-gtk-jni
libsys-hostname-long-perl libtomcat5.5-java libxul-common libxul0d
po-debconf

Step 3: Getting started
Choose the Menu Help to choose
  • Eclipse Help
  • Tips and tricks
  • Cheat Sheets

Step 4: Updating software capabilities of Eclpise.
In the Menubar choose Help ->Software Updates ->Find and Install.
Choose "Search for new features to install".

To start using Eclipse for Java, there is a guide at

https://eclipse-tutorial.dev.java.net/eclipse-tutorial/part1.html

Happy programming!

Gwenview plugins and KDE 4.2

Since KDE 4.2 adopts many new features, Gwenview (the graphics viewer) may not have all the correct versions of library and applications to use.

Gwenview uses KDE4 but the kipi-plugins on 8.10 needs a newer libexiv and kipi-plugins. This results in the default Gwenview not having any plugins. Only KDE 4.2 systems (default 8.10 doesnt have this) will be effected.

To install the plugins, add to the repository the followng PPA site. Choose from the panel, Kmenu ->Applications ->Add/Remove Software. Edit the sources ->Third party with the following:

deb http://ppa.launchpad.net/digikam-experimental/ppa/ubuntu intrepid main

This should update itself. If it does not do any updates, then at the command line, run command apt-get update, and install the new kipi-plugins.

sudo apt-get install digikam kipi-plugins kdeprint

The following are installed:
digikam kipi-plugins libkdcraw7 libkexiv2-7 liblensfun-data liblensfun0 libmarble4 libqt4-sql-sqlite marble-data

Suggested packages:
digikam-doc gallery vorbis-tools

Recommended packages:
kdeprint

See
http://www.digikam.org/drupal/node/421

Thursday, March 12, 2009

UK declares Government Action Plan for OSS

UK Cabinet office website have declared the intent to adopt OSS. This is more towards leveling the playing field for OSS.

In its "Background" it mentions that 50% of its webserver use Apache. Looking up the cabinet office site, it uses Minstrel-httpd as its web server. The website uses MS ASP.NET. Well, the cabinet will need to lead the way by example by adopting more visible OSS solutions.

OSCC MAMPU have already under taken a rather unique approach for the Malaysian government since the year 2004. Among the OSS initiatives include making the government agencies aware, programmes to increase the human capital development and changing the management mind set. There were agency management who continue to seem unaware of the Malaysian Public Sector OSS Master Plan. However, the winds are changing and local government body have started their own campaigns on OSS.

But is UK they ready to accept OSS is not just the software, but whole change in the way the human capital will use systems? Are they ready to have users participating and contributing to the OSS community? The OSS business model will be different and will involve the international community along side the small businesses (including individuals). Unless the UK government adapt speedily, all the grand plans will be a long long struggle for many years to come.

I look forward to more OSS successes from UK.

Friday, March 6, 2009

No resume image, doing normal boot

During boot up of the Kubuntu 8.10, the progress bar froze at about 1/4 way. Changing to the CLI, it was hanging at the line:

No resume image, doing normal boot

One possibility is that the update of the kernel may have damaged the initramfs on the swap. At boot time, the kernel unpacks that archive into RAM disk, mounts and uses it as initial root file system.

Solution, delete then recreate the swap before updating the initramfs. I identified the SWAP file as /dev/sda5 on the system.

Step 1: Enter into rescue mode
Reboot into rescue mode. In the main menu, choose the option to boot into root user.

Step 2: Delete then recreate the swap file
# swapoff /dev/sda5
# mkswap /dev/sda5

Step 3: Update the initramfs
# update-initramfs -u

Step 4: Restart machine
# reboot

It is booting without the frozen progress bar. But another problem causing the slow boot up. Its during the network configuration. Well, its faster now.

Thursday, March 5, 2009

France Adoption of OpenOffice.org, Firefox, Thunderbird and OSS

In Europe, movements towards open source software (OSS) have long been a silent battle. France is one of those that started to look into the benefits of OSS in the early 2000.

The French Gendarmerie Nationale (national police) is composed of the police forces and the military police with over 100,000 employees distributed across the country. In 2001, the decision to explore OSS implementation started and by 2005 OpenOffice.org (OOo) was implemented. Other OSS implementation like Firefox (web browser) and Thunderbird (email & calendaring client) soon followed. Since they have managed to developed their employees with OSS skills, their next plan is for the migration to Linux desktops.

See:
French Gendarmerie goes for Ubuntu

The French Ministry of Agriculture have migrated over 500 servers to Mandriva Linux since 2005. This is mainly to replace its MS Windows NT servers. A total of 15,000 employees is under this Ministry. Plans are underway to have an additional 400 servers on Linux.

See:
French Ministry of Agriculture

The French Parliment moves towards OpenOffice.org in 2007. Following that Ubuntu Linux will be used as the desktop operating system. This will be over 1,000 PCs running Ubuntu Linux. Which translate to even more opportunities to use the hundreds of OSS available to through the Ubuntu software repository.

See:
French Parliment

Monday, March 2, 2009

Ubuntu list of games

Linux is mainly used for servers and office work. For those who seek entertainment in the form of games, here are some linux programs available for the KDE desktop:


knetwalk - wire puzzle game for KDE 4
kpat - solitaire card games for KDE 4
kolf - miniature golf game for KDE 4
kmahjongg - Mahjongg solitaire game for KDE 4
kjumpingcube - simple tactical game for KDE 4
kgoldrunner - Lode Runner arcade game for KDE 4
katomic - atomix puzzle game for KDE 4
kblackbox - Black Box puzzle game for KDE 4
kiriki - Yahtzee dice game for KDE 4
ksame - SameGame puzzle game for KDE 4
kdiamond - three-in-a-row game for KDE 4
kdiamond - three-in-a-row game for KDE 4
ksquares - Dots and Boxes game for KDE 4
kbreakout - Breakout arcade game for KDE 4
kbounce - Jezzball arcade game for KDE 4
kfourinline - Connect Four game for KDE
kreversi - reversi board game for KDE 4
klines - color lines game for KDE 4
ksudoku - Sudoku puzzle game and solver for KDE 4
kapman - pac-man clone for KDE 4
kblocks - a falling blocks game for KDE
konquest - simple turn-based strategy game for KDE 4
kmines - minesweeper game for KDE 4
kbattleship - battleship board game for KDE 4

Happy trying out the games.

Sunday, March 1, 2009

MYSQL GUI Tools for Linux

I was looking for tools to administer MySQL 5 server and noticed today the http://www.sun.com is not available. Cant figure out why so I didnt get a chance to test the MySQL Workbench.

I am trying this on a Kubuntu 7.10 with kernel 2.6.27-11 and the database as MySQL 5.0.67.

KMySQLAdmin
This is a pretty simple tool to use. It connects well.

Installation:
Install from synaptics or at the command line type
sudo apt-get install kmysqladmin

At the command line type kmysqladmin

mysql-admin
This comes with the MySQL database and is simple to use.

Installation:
Install from synaptics or at the command line type
sudo apt-get install mysql-admin

This will provide two applications.
  1. MySQL Administrator
  2. MySQL Query
To run, choose the KMenu ->Application ->Development ->MySQL Administrator


This really is really useful to manage MySQL servers.

Saturday, February 28, 2009

Drawing Entity Relationship Diagram (ERD)

Linux provides a number of resources to draw ERD for database designing. One such application is known as GNU Ferret that also generates the SQL syntax in the form of SQL92, MySQL, Postgresql and GerwinML. GNU Ferret is written in Tcl/Tk language and is formerly known as GerWin.

Installation:
Use synaptic to install ferret or at the Ubuntu Linux command line type

sudo apt-get install ferret

Ferret
Start the program from KMenu ->Application ->Development ->Ferret.

The first tab provides the project name and location to save the project.

The ER Diagram tab allows the design of the ERD itself in very simple form.

The Table Diagram tab shows the tables that will represent the ERD.

The Output tab generates the SQL statements for databases such as MySQL, Prostgresql and any SQL92 form.


Conclusion:
A simple application that works! You can join at http://www.gnuferret.org/

Thursday, February 26, 2009

Backup first step - mounting remote disk

This will be a series on back up of files to remote data.

Firstly, the disk needs to be mounted and here we will use the sshfs utilities. This allows us to use backup tools to use remote directory as a normal directory.

Install the tools
$ sudo apt-get install sshfs

Create the disk and mount
$ mkdir /mnt/nicholas
$ sshfs nicholas@servername.com:/home/nicholas /mnt/nicholas

$ mount
nicholas@servername.com:/home/nicholas on /mnt/nicholas type fuse.sshfs (rw,nosuid,nodev,max_read=65536,user=oscc)


Remove the mount
$ fusermount -u /mnt/nicholas

Tuesday, February 24, 2009

Thunderbird mail storage.

Thunderbird under the hood I can find some interesting files. I could identify a few of them;

On a Kubuntu 8.10 system the Thunderbird profile and email box is stored in $HOME/.mozilla-thunderbird/someprofile.default

For example:
$HOME/.mozilla-thunderbird/izvwsxcs.default/

The default profile can be set in the file $HOME/.mozilla-thunderbird/profiles.ini

Here is an example:
[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=1
Path=6wpi8gaz.default

[Profile1]
Name=Nicholas
IsRelative=1
Path=izvwsxcs.default
Default=1

In example above, my profile is izvwsxcs.default. In that folder, you can find that the emails are stored in the email box oscc.org.my
$HOME/.mozilla-thunderbird/izvwsxcs.default/ImapMail/mail.oscc.org.my

Emails are stored into two files (in above folder).
The email contents: A file with no extension
The email header: A mail summary file (.msf) extension

Friday, February 20, 2009

Recording desktop session

In preparation for a presentation for an OSS Seminar at CIAST this 25 Feb, a demo of the desktop is required. KUbuntu comes with several desktop recording packages.
  • istanbul
  • ffmpeg
  • KRecordmyDesktop
KRecordmyDesktop
KRecordmyDesktop is a KDE application to record desktop session. Command to install is

sudo apt-get install krecordmydesktop recordmydesktop

Then run the program from a terminal (CLI).

$ krecordmydesktop

At the panel, right click the KrecordmyDesktop and start recording. This will save the session as an .ogg file. Most Linux movie players can use the .ogg file.

I found that the KRecordmyDesktop did not have any delay to start/end recording. This resulted in having to use the recordmydesktop program directly.

The recordmydesktop
This is a program that can record a desktop and save it on the fly OR when the recording ends. Frontends to this is the KRecordmyDesktop and grecorgmydesktop.

Recording can be done at the command line which saves to the file out.ogv by default;

recordmydesktop --no-sound -delay 3 -o filename

The default control keys during a record session:

1. Pause / Resume recording - Ctrl+Alt+p
2. Stop recording - Ctrl+alt+s

More details can be found at recordmydesktop.

Viewing in AVI
To convert the .ogg to .avi install ffmpeg or mencoder. The tools are run at a terminal to convert the .ogg file.

The ffmpeg

Step 1: Install the program. Include the dependency files of libavdevice52 libimlib2.

sudo apt-get install ffmpeg

Step 2: Start the converter. The -target, -r and -s is optional.

ffmpeg -i kdesession.ogg -target vcd -s vga -r 52 kdesession3.avi

The mencoder
Alternative encoder is mencoder (used with mplayer).

Step 1: Install mencoder.

sudo apt-get install mencoder

Step 2: Convert the .ogg file to .avi with no sound effects.

mencoder kdesession.ogg -ovc lavc -nosound -o kdesession3.avi

There are lots of configuration options in ffmpeg and mencoder from the help files.

Photos not working in OOOP-Accessories 2.3

The OpenOffice.org (OOo) 2.4 and 3 comes with a limited number of graphics for the gallery. Users can collect their own graphics (photos, cliparts and etc.) or install the add-ons such as OOOP-Accessories for OOo. Since OOo 2.4 I have kept the OOOP-Accessories 2.3.1.2.oxt file and it works with OOo 3.0.1 very well.

However, on the Kubuntu Linux all the options to use the Photos have been wrongly linked. After installation, the user need to open a prompt (command line terminal) and create a link to the correct location of the graphics. I have recorded this online sometime ago, but have not gone to find it back.

The instruction here is for installation for the local user.

Step 1: Enter into the OOo gallery directory.

cd ~/.openoffice.org/3/user/gallery

Step 2: Find the installed OOOP-Accessories directory.

find . -name "Photos" -type d
Output
../uno_packages/cache/uno_packages/TzY7IS_/OOOP-accessories-2.3.1.2.oxt/gallery/Photos

Step 3: Use the directory in previous step, to create a link to the Photos directory.

ln -s ../uno_packages/cache/uno_packages/TzY7IS_/OOOP-accessories-2.3.1.2.oxt/gallery/Photos


The gallery photos can be accessed via any of the OpenOffice.org Writer, Calc or Impress.

Monday, February 9, 2009

Killing programmes in KDE

I just came across my first program freezing in KDE 4.2 and realised that that there are many KDE users who will encounter such cases familiar to MS Window users.

The common command line method to KILL the programme or process is the same as any other Linux/Unix system. How about for those who are more keen to use the GUI to control such programmes or processes? In Linux they can be Killed (terminated), reduced its priority or paused to allow other processes to gain back CPU and memory resources.

There are two main programmes involved here;
  1. xkill
  2. ksysguard

To terminate a programme (Window Client)
Step 1: Start Xkill.
Any where on the Desktop press Ctrl+Alt+Esc

Step 2: Select the programme to terminate.
An 'X' appears as the mouse cursor. Use this to select the programme to terminate.

List processes and terminate a programme/process
Step 1: Start the process view in ksysguard
Any where on the Desktop press Ctrl+Esc

Step 2: Select the programme to terminate.
Scroll down the list of processes and right click its name. Choose Kill Process.

So, those MS Window's user will have to get used to something other than Ctrl+Alt+Del to terminate a programme.

Thursday, January 29, 2009

KDE 4.2 with Dual Monitor

I just upgraded to KDE4.2 today on Kubuntu Interpid. One of the first items I am testing is the ability to use the display on my laptop and the monitor/projector at the same time. This is known as multihead and previously the Xinerama was used to have two different screens with one X server (the engine behind the graphics display on Linux).


The KDE 4.2 Plasma control (top right corner of the screen) Zoom Out function allowed the laptop screen to have a different background and widget from the monitor/projector. This really made an impressive environment for customisation.

This is great for presentation as the OpenOffice.org 3 have full capability to show the slides on one screen while previewing on another screen. The KDE4.2 provided the variable KDE_MULTIHEAD=false that allowed the same display for both the displays. Initially I changed this environment variable to true, but nothing happened.

The Intel site http://intellinuxgraphics.org/dualhead.html gave some good tips to get what I was looking for. The steps below allowed the multihead function to work when the VGA cable is plugged at the Login screen. To revert back to the dual head (where both laptop and monitor/projector displayed the same output), return to the Login screen and unplug the VGA cable. The X server should be restarted.

Step 1: Backup the /etc/X11/xorg.conf

Step 2: Replace the xorg.conf with the following

Section "Device"
Identifier "Configured Video Device"
Driver "intel"
Option "FramebufferCompression" "off"
Option "monitor-LVDS" "internal"
Option "monitor-VGA" "external"
EndSection

Section "Monitor"
Identifier "internal"
EndSection

Section "Monitor"
Identifier "external"
Option "RightOf" "internal"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "internal"
Device "Configured Video Device"
SubSection "Display"
Virtual 2560 1024
EndSubSection
EndSection

Section "ServerFlags"
Option "AIGLX" "false"
EndSection

Step 3: Reset the X server
Logout and restart the X by pressing Alt+e
Login again and you should have the new setting applied.

Wednesday, January 21, 2009

Install Java6 on Kubuntu Linux

After having a stable KDE 4.1.9, I decided to test the Java compiler installation from Sun.

How to select the default Java
More than one Java can be installed at a time on Linux. The default Java can be set by user. If you have Java installed, then choose the correct version:

  • Check the current Java or JRE
    java -version
  • Check the installed Java JDK
    update-java-alternatives --list
  • Select default Sun's Java or JRE
    sudo update-java-alternatives -s java-6-sun
  • Example output of installed Java
    java-6-openjdk 1061 /usr/lib/jvm/java-6-openjdk
    java-6-sun 63 /usr/lib/jvm/java-6-sun

Installing java
Step 1. Be connected to the Internet. Check the Java version and details prior to installation then install Sun Java Development Kit.

apt-cache show sun-java6-jdk
sudo apt-get install sun-java6-jdk sun-java6-doc sun-java6-demo

Step 2. The JDK documentation installation requires the file from Sun Website. Download the Java Doc files from http://java.sun.com/javase/downloads/
Select Java SE 6 Documentation and download to /tmp.

Step 3. Select default Sun's Java or JRE
sudo update-java-alternatives -s java-6-sun

Step 4. Apply the Java compiler path in ~/.bash_profile
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PATH:$JAVA_HOME/bin

Step 5. Install Eclipse 3.2 IDE
sudo apt-get install eclipse eclipse-jdt

Compiling Java
Create the first Java program, compile then execute.

Step 1: Below is the traditional Hello World example for the Java program called Hello.java

class Hello {
public static void main( String args[]){
System.out.println( "Hello World");
}
}

Step 2. Compile.

javac Hello.java

Step 3. Execute.

Java Hello

Wednesday, January 14, 2009

KDE 4.2 beta is great, wireless not

After the KDE 4.2 upgrade things seem very promising. Here is my Desktop with the Desktop applet, clock, sticky note, crystal monitor 8, Dolphin file browser and the panel (bottom of screen).



The KMenu with widget style "cleanlooks" and windows decoration as "Oxygen" looked strange with the black borders. Commonly accessed applications works very well, including the OOo3.0.1.




After upgrade the networking broke (most annoying was the wireless). Following are replacements apps;

1. KWlan
The KWlan which comes from standard ubuntu repositories provided a nice applet to replace the the default network manager. But the installation removed the initial KNetwork Manager which stopped the Network Manager. Wireless was still not working properly as I did not see the WPA option, only WEP connection was available. Checked the iwl3945 but it gave a blank output;

sudo modinfo iwl3945

You need to restart networking with the following command;

sudo /etc/init.d/networking start

2. wcid
Wicd is an alternative tool which is not dependant on KDE. With installation instructions from wicd, it brought back networking to normal state. Future Kubuntu may include wicd.

Step 1: Add the wicd repository.
Open Adept (add/remove software) and add the third party repository

deb http://apt.wicd.net intrepid extras

Step 2: Add the wicd key.

wget -q http://apt.wicd.net/wicd.gpg -O- | sudo apt-key add -

Step 3: Install wicd.

sudo apt-get update
sudo apt-get install wicd

Step 4: Configure the wired/wireless. Type

wicd

Select wired/wireless name and choose the small triangle to expand the menu. Enter the requied fields and choose "Connect". This shows a blinking colour for data tx/rx. Simple and nice!

Saturday, January 10, 2009

Improved KDE 4.2

Following the KDE progress to KDE 4.2 indicates that lots of the problems/bugs I am facing in Intrepid's KDE 4.1 can be resolved. Primary reason to use the KDE 4.2 beta 2 is to resolve an issue of OOo3 from PPA that works on GNOME but crashes in KDE 4.1.

Common error line running OOo3.0.1 was

QPainter::begin: A paint device can only be painted by one painter at a time.
QPainter::setWorldTransform: Painter not active


Installation is is based on Kubuntu News (http://www.kubuntu.org/news/kde-4.2-beta-2)
I do not have koffice-data-kde4, installed so skipped that step.

Step 1: Start Adept Installer.
In the Sources, enable the Recomended Updates
deb http://ppa.launchpad.net/kubuntu-experimental/ubuntu intrepid main

Step 2: Install the KDE

Step 3: Apply the KDE 4.2
Now log out and press Alt + E to restart X. When you log in you will have KDE 4.2 Beta 2
Reference:

Sunday, January 4, 2009

Remove OpenOffice.org from Kubuntu

The initial OpenOffice.org 3.0 gives a continuous error as shown below.

QPainter::begin: A paint device can only be painted by one painter at a time.
QPainter::setWorldTransform: Painter not active

Here, I explain how to remove the OpenOffice.org installed via the Kubuntu mainstream.

Step 1: Completely remove any instance of OOo.
sudo apt-get remove openoffice.org* ooobasis*

Saturday, January 3, 2009

Surviving an OSS migration in 2009

Over the past couple of years, numerous efforts have be undertaken to seek benefits of adopting open source software (OSS) from individuals, corporate to governments. There have been successful adoption and others who have had to rake out more cash to revert back to proprietary software. Based on such events, here are my predictions to survive an OSS migration in 2009.

  1. Lay out an OSS migration plan for all to see. This does not have to be in great detail but sufficient enough to know who will be affected.
  2. Keep information flowing on the progress of the implementation to management and those below. Don't you just want people to get involved? what is better than awareness!
  3. Recognise the OSS participation of individuals and groups. This means the management understands that their business secrets are protected as they know who is contributing what. Morale will increase as people strive to improve systems out of their own interest. Remind everyone of their targets, some may get too preoccupied in OSS and forget their business objectives.
  4. Be prepared to change how the business is carried out. This means knowing a different way of doing things to achieve equal or greater results.
  5. Maintain budget on ICT. Yes, OSS will reduce cost if proper expense on the migration is provided. You will see the savings! Get quotes for similiar systems and file them for comparison of the actual implementation. How elese would you know the exact savings?

OSS will be around for a long time. Proprietary systems will seek ways to leverage on OSS instead of fighting them. You will survive.

3COM officeconnect

The 3com ADSL router, 3CRWDR100A-72 although have been discontinued, is very reliable. The 4 ethernet ports and support up to 34 wireless devices is more than sufficient. I tried to upgrade the firmware to version 2007. Only Wine was needed as the download was a ZIP in exe format. Found that I cant connect/dial into the ADSL provider after the upgrade.

I am down grading firmware to version 2.06 (Sep 21 2005) and now it works. Downloaded the firmware from http://www.3com.com website. The administration page is slightly changed. Here is the nmap finger print.

PORT STATE SERVICE VERSION
80/tcp open tcpwrapped
MAC Address: 00:12:A9:06:58:72 (3com Europe)
Device type: WAP
Running: 3Com embedded, Philips embedded, Sinus embedded, SMC embedded
OS details: Wireless broadband router (3Com OfficeConnect, Philips SNB6500, Sinus 154, SMC SMCWEBT-G, or SMC SMCWBR14-G2)

The wireless anthena is not detachable but it have separate grounding. For security, the remote web access is disabled by default (port 8080). Instructions for the router can be found at portforward.

Blog Archive