Monday, August 18, 2008

A CMS called Joomla

Joomla! is a widely used content management system using PHP and its frameworks. However due to its large user base, hackers have been attracted like bees to honey.

Example of pre Joomla! 1.5.6 security issue is the
Joomla "token" Password Change Vulnerability where the admin password could be reset easily. Users can then install the Joomla explorer component, and upload malicious scripts.

Following are some precautions on installation of Joomla!

  1. Patch the OS and its other software
    1. Open only needed ports (HTTP, HTTPS)
    2. Patch the software
    3. Configure the software in a secure manner
  2. Verify that Joomla! is from the official site http://www.joomla.org
  3. During installation - Do not use the default MySQL tables prefix as jos_
  4. Change the default administrator name (default is admin)
  5. Remove all files as instructed by Joomla! And other unneeded files or directories
  6. Ensure files and directories have the proper permissions. Below are for Linux based systems.
    1. PHP files: 644
    2. Config files: 666
    3. Other folders: 755
  7. Password protect sensitive directories with .htaccess
  8. Move the configuration.php file to outside of the web directory if possible. Make it non-writable.
  9. Use a search engine friendly (SEF) URLs
    1. The Google inurl: command can be used to search for a vulnerable exploit. Use Artio, SH404SEF or another SEF component to re-write your URLs. This will prevent hackers from finding the exploits.

  10. Establish a security plan and ensure the relevant parties know about it.
  11. Remove unused extensions and themes. Existing extensions and themes should have their version removed from the end user view.
  12. Subscribe to Joomla! and the extensions/themes sites for continuous updates. Additional sites that can help with updates:
    1. http://joomla-wiki.de/doku.php?id=howto_s:security:checklist
    2. http://docs.joomla.org/Joomla_Administrators_Security_Checklist
  13. Subscribe to security sites such as http://www.ictsecurity.gov.my/
  14. Carryout routine backup of Joomla! Site and its database.
Using Apache Benchmarking tools
One good reason to use Apache web server is the availability of a benchmarking tool. There are some constrains that you should know in using this data. Read the documentations. Install Apache and execute as below:
ab -n7500 -c100 http://server.com

Where
-n option is the number of request for benchmark
-c is the number of concurrent page request

===========
Document Path: /
Document Length: 36649 bytes

Concurrency Level: 100
Time taken for tests: 183.819035 seconds
Complete requests: 500
Failed requests: 383
(Connect: 0, Length: 383, Exceptions: 0)
Write errors: 0
Total transferred: 6472586 bytes
HTML transferred: 6260026 bytes
Requests per second: 2.72 [#/sec] (mean)
Time per request: 36763.806 [ms] (mean)
Time per request: 367.638 [ms] (mean, across all concurrent requests)
Transfer rate: 34.38 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1446 4324.4 0 21000
Processing: 47 23707 49002.2 1897 175812
Waiting: 47 21936 45081.7 1897 173650
Total: 47 25153 49793.2 2214 183816

Percentage of the requests served within a certain time (ms)
50% 2214
66% 6756
75% 10461
80% 27527
90% 132227
95% 151803
98% 175812
99% 181539
100% 183816 (longest request)
=== END ====

Other references:
For discussion on application security see https://nvd.nist.gov/cwe.cfm#NVD-CWE-DesignError.

My advice to those considering other CMS is this;
All CMS will have their weak points. However Joomla! have thus far been prompt with security notices and updates. Hackers tend to crawl the webs on Friday to Sundays, when systems are unattended. As the care taker of the Joomla! you need to be proactive, it goes the same for any other CMS. Finally, Joomla! is easy to use for end-users and provides lots of features for beautifications.

Wednesday, July 16, 2008

Portable OpenOffice.org

OpenOffice.org flexibility is in the hands of creative users. One example is the installation of OpenOffice.org on a portable device such as a USB thumbdrive.

The OOo 2.4.1 and OOo 3 (beta) can be downloaded from portableapps.com

Thursday, July 10, 2008

Lightning can now edit Task

Just updated Lightning for Thunderbird to version 0.9pre build 2008070918 on Ubuntu 7.10.

Before this, the task can't be edited even if I choose the modify button. Now just double click and i can edit the task. That is what OSS is about, building stuff.

In the calendar, when I double click on a date to create a new event,
the date was always set to today. Now, it sets to the date I double clicked.

Things are looking good!

--

Sunday, June 29, 2008

My list of Linux commands

Listing of Linux commands.

Hardware related
dmidecode = display computer hardware information. E.g. dmidecode -s bios-version
ifconfig = display and configure the network interface. E.g. ifconfig -s eth1
lshw = display hardware
lspci = display the PCI buses in the computer. E.g. lspci -tv
xrandr = display and configure the available displays (output) connected to the computer.

File system
find = search in specified directory for files.
locate= search for files in the system as index by the locatedb database.

-

Thursday, June 26, 2008

R60 and wireless

The default Centos 5.1 does not detect the wireless on the Thinkpad R60. It seems to detect perfectly well using Ubuntu 7.10.

Go to CentOS page and install the RPMForge plugin.
yum install dkms-ipw3945
lsmod |grep ipw

Done..the wireless card is detected but still cant seem to get the wireless network. After some more digging, found that the ipw3945 project has been deprecated and superseded by Iwlwifi at http://intellinuxwireless.org

Below are notes to try, but I have yet to find the apps that is talk to the wifi daemon that connects to the wireless network.

The ATRpms repository contains Iwlwifi. Plugin to the wired network. Edit the repo file with
[atrpms]
name=EL $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled=1
exclude=*kmdl*i586*
includepkgs=*iwlwifi* *mac80211*

Since gpgcheck is enabled, run the command
rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms

Install the drivers
yum install iwlwifi iwlwifi-kmdl-`uname -r`

Friday, June 20, 2008

Cases on why we need to be open sourced

Listed here will be cases that can bring back reasons to why we need to be open sourced in many cases.

  • Klien from AT&T - 2007 case on findings of the NSA, USA using the telco line to tap into calls. See "Spying on the home front".
  • Online Voting - such software must require that no funny stuff happens in the background and exploits can be exposed soonest for a resolution.

Viewing the network

The Nessus tool provides information on your network. This means installing a Nessusd server, then data can be continuously collected. Using a Nessus client, the information can then be made into more manageable form.

After installing Nessus

Get the updates of plugins from nessus (http://www.nessus.org/register)
Check your email for the registration code (Example XXXX-11A0-B9A4-A2DD-xxxx)

On the Linux:
sudo /usr/bin/nessus-fetch --register

Wednesday, June 18, 2008

Problems with FTP

Traditionally, electronic files such as scripts, graphics, documents and spreadsheet was transfered between computers with FTP (File Transfer Protocol). The files could be placed in public places for anyone to access with a login name or as anonymous.

However, the alternative to FTP is sFTP (secure File Transfer Protocol). What is the problem with FTP? Why stop using FTP?
  1. FTP sends the login username and password across the network as clear text.
  2. Typical network firewall needs to be altered to open up min 2 ports for FTP.
  3. FTP communication talks too much. A typical connection goes like this, you contact the server, do handshake, you the get a banner, you then send your name to the server and wait for the server to acknowledge. Then you send your password (in plain clear view for everyone to see) and wait for the server to acknowledge, then you send the type of inquiry (how you want the server to respond). This isnt even anywhere near the actual transfer of the file.
  4. FTP does synchronous communications.
  5. Complex firewall configuration for FTP servers and FTP clients. FTP servers prefer active transfer while opening inbound port 21, outbound port 22. FTP client firewalls prefer passive transfer while opening outbound from any port to port 21, inbound any port to any permitted (ephemeral) port.

sFTP is a completly different protocol (method) of network file transfer.

Monday, June 16, 2008

Multiple X servers - Xephyr and Xnest

To run several X servers that are different, I can switch to other virtual screens (F7-F12) or use an X server tool like Xephyr and Xnest. Xephyr is considerably newer than the well known Xnest.

Using Xnest
(On CentOS 5.1)
yum install xorg-x11-server-Xnest
Xnest -audit 0 -name Xnest :1 & export DISPLAY=:1


Using Xephyr
(on Ubuntu 7.10)
sudo apt-get install xserver-xephyr
Xephyr -ac -screen 1024x768 -reset :1 & export DISPLAY=:1

Running X on the X server
Test X applications like xterm and xeyes.

xterm
xeyes

If there is a need to send an application via the chroot/server use SSH. Example below is to start and xterm on the X server

ssh -XfC -c blowfish nicholas@nicholas-server.lan xterm


If you dont understand stuff here, dont worry. It means you need to move on to other stuffs.

Installing KDE on Ubuntu (Kubuntu)

Ubuntu 7.10 (Gutsy) by default installs the GNOME desktop (2.20.0). To install the KDE desktop (reasons are many) many more applications can then be accessed by the Linux system. This at the same time make the Ubuntu transform into Kubuntu!

Simple installation
  1. Connect to the Internet
  2. Run the command
    • sudo aptitude update && sudo aptitude install kubuntu-desktop
  3. Reboot the system. At the bottom left of the login swcreen change the login option to KDE.
  4. Configuration of the default desktop can be done by editing the file /etc/X11/default-display-manager to either KDE or GNOME
    1. /usr/bin/kdm
    2. /usr/bin/gdm
  5. To remove KDE, if you found that it was a big mistake be glad that you used aptitude. Run command
    • sudo aptitude remove kubuntu-desktop
Advanced is to install KDE4
  1. Edit sources.list to include the KDE4 resources
    • deb http://ppa.launchpad.net/kubuntu-members-kde4/ubuntu gutsy main
  2. Update aptitude
    • sudo aptitude update
  3. Install KDE4
    • sudo aptitude remove kdelibs5 kde4base-data kde4libs-data
    • sudo aptitude install kde4-core
  4. Reboot, at the login screen select the option for KDE 4.

Friday, June 13, 2008

CentOS kernel

The Linux kernel can be reconfigured directly or through the use of modules.

I found the following link useful for CentOS;

1. http://wiki.centos.org/HowTos/BuildingKernelModules

2. I need to build a custom kernel

Thursday, June 12, 2008

OSS Seminar 08 - Miri

The OSS Seminar on 9th Jun 08 really was an opener for most of the participants from Sabah, Sarawak and Labuan Public Sector.

See OSCC MAMPU website for the details.
Apart from presenting a paper on Building OSS Competency, I am mainly taking care of the AV. I'd like to point out an instance where the overhead projector could only flicker the Linux screen intermittent. The video projector model was Sanyo XtraX and was mounted on the ceiling as shown below.

After changing over 2 different VGA cables and checking the connections, nothing improved. Some put it to the Linux being the problem, as other functions were said to have ran smoothly. The AV man finally came and brought a VGA switch with built-in booster, this managed to put the display on the large screen. When another two more projectors were used with a splitter, there were lines scrolling vertically. This was for the projector screens at the sides. This showed that there is not enough power supplied to the projectors.

Wednesday, June 11, 2008

Mobile phone tools

Listing
  1. Wammu
  2. Mobile Media Converter

Wammu
Wammu is a tool to connect with mobile phones and uses Gammu and Phyton. Phones that support open standards like OBEX and IrMC can be easily accessed by OSS tools like Gammu. For a list of phones supported by Gammu see Chihar.com.

Lets install Wammu!
Installation of Wammu takes about about 15.1Mb disk space. Current version for Ubuntu 7.10 is 0.22-1. Those who are using IMAP server access with the phone need to update to Wammu 0.27 or newer.

sudo apt-get install wammu
sudo apt-get install gammu python-gammu-doc wx2.6-doc wx2.6-examples

Plugin the USB cable to the PC/Laptop and phone.

Choose Applications ->Accessories ->Wammu

Note: btctl is needed for Bluetooth






Choose Phone ->Connect

To get the contents of the phone choose Retrieve then selected any of the sub items below;
  • Contact
  • Calls
  • Messages
  • Todos
  • Calendars
To save the files or backup, choose Backups and save/export.

Mobile Media Converter - Converting AMR and 3GP to MP3 and MPEG
The SE K810i and most other mobile phone that supports audio recording, stores the sound in AMR format. The Mobile Media Converter can be used to convert following files:

Audio: AMR files to MP3, WAV, WMA format
Movie: 3GP files to MPEG

(Tested on Ubuntu 7.10)
Step 1: Download Mobile Media Converter from http://miksoft.net/mobileMediaConverter.htm

Step 2: Extract the file mmc-lin.tar.gz and you get the directory mmc-lin

Step 3: Change into the directory mmc-lin and run the programme
Mobile Media Converter

Note: There is a FFMPEG that have been compiled to support AMR and 3GP

OpenOffice.org Document Recovery screen

After using OOo 2.4 for sometime some of the following can happen:
  1. No electric - you loose a document
  2. Laptops run out of juice - you loose a document
  3. The OOo document is moved/renamed - OOo didnt detect the changes since it was done within OOo (Save as).
When you open OOo again, the following screens can appear.




And they keep appearing even after you reboot the PC/laptop.

The solution:
Delete the file XML file named Recovery.xcu found in the locations shown below. Take note that Recovery.xcu contains the settings for Recovery in the Tools ->Options ->Load/Save ->General dialog.

In MS Windows
"Documents and settings"/<user>/"Application data"/Openoffice.org2/user/registry/data/org/openoffice/Office/Recovery.xcu

For OOo3 in MS Windows
"Documents and settings"/<user>/"Application data"/Openoffice.org/3/user/registry/data/org/openoffice/Office/Recovery.xcu


In Linux (I am using Ubuntu 8.10)
~/.openoffice.org2/user/registry/data/org/openoffice/Office/Recovery.xcu

-

Tuesday, June 10, 2008

Transfer phonebook from Motorola V360 to SE K810i

I just purchased a Sony Ericsson K810i to replace the Motorola V360. I've had the V360 for over two years but not its falling apart. Here I will list out the steps to transfer the phonebook from the V360 to the K810i using Ubuntu Linux 7.10 (Gutsy) via USB cable.

1. Create a folder to store the phonebook
mkdir ~/phone.v360

2. In V360,
Settings ->Connectivity ->Sync ->USB Settings ->Data/Fax Connection

3. in Linux
Applications ->Accessories ->KMobile Tools
Choose Phonebook ->All contacts from phone ->Refresh
(If there are many phone numbers, then have to wait longer)

cp ~/.kde/share/apps/kmobiletools/kmobiletools.vcf ~/phone.v360

4. In SE K810i
Plug in the USB cable
Select Phone mode
Choose Settings ->Contacts ->Options ->Advanced ->Backup to M.S.

5. in Linux copy the phonebook from the phone to the Linux
cd ~/phone.v360
cp "/media/PHONE CARD/System/PIM/PB_Backup.vcf" .

6. if there are same names in PB_Backup.vcf and kmobiletoos.vcf then remove them. Otherwise merge the two files. Of course if PB_Backup.vcf is blank the overwrite it with the kmobiletools.vcf file. I take it that the phonebook in the phone is to be backed up and then renamed to PB_Backup.vcf.original

mv PB_Backup.vcf PB_Backup.vcf.original
mv kmobiletools.vcf PB_Backup.vcf
mv PB_Backup.vcf "/media/PHONE CARD/System/PIM"

7. In SE K810i
Unmount PHONE CARD media
Unplug the USB cable.
Select Phone mode
Choose Settings ->Contacts ->New Contact ->Options ->Advanced ->Restore from M.S.

When prompted:
Delete old contacts before new contacts are added?

Choose No

The K810i now have all the phone numbers. Check it out.

Tuesday, June 3, 2008

What AWK can do for Linux.

In Linux, there are many tools to process text and other forms of data. One tool that comes to mind is the AWK. The AWK scripting processes a file line by line and can produce a summary of its finding as header or footer.

TLDP provides a guide on AWK at http://tldp.org/LDP/abs/html/awk.html

EXAMPLE 1
Here is a demonstration of the AWK to extract the directories mounted.
STEP 1. Create an AWK script file called "myscript1.awk". This should contain two lines.

BEGIN{ printf("Display the third field\n"); }
{ print $3 }

STEP 2. Run the following command to use the AWK script.

mount -t ext2,ext3 | awk -f myscript1.awk

EXAMPLE 2
Without using an AWK script file, extract data from the file /etc/passwd and display the results to screen.

STEP 1. Run the following command

awk -F: '{ print $1 ":" $3 ":" $7 }' /etc/passwd

AWK have been used for more complex reporting but the above should give an idea of how this is done.

Friday, May 23, 2008

Thunderbird on CentOS 5.1

Everyone is using Thunderbird on MS Windows, Ubuntu Linux and Fedora Core Linux. So, why shouldnt Centos 5.1 be able to install?

1. Download Thunderbird 2 from Mozilla (http://www.mozilla.com/en-US/thunderbird/) or other mirros like (http://mirror.oscc.org.my/mozilla/thunderbird/). I downloaded thunderbird-2.0.0.14.tar.gz to the directory /tmp.

2. Extract the files

3. Open a terminal and login as root to thee directory /opt
su -
cd /opt

4. Copy the extracted forlders to /opt
cp -rf /tmp/thunderbird /opt

5. Install the older library of libstdc++.so.5 (5.1 comes with version libstdc++.so.6)
yum install compat-libstdc++-33.i386

6. Test the Thunderbird as a normal user
/opt/thunderbird/thunderbird

7. Copy the icons to the user wide pixmap
cp thunderbird/icons/mozicon*.xpm /usr/share/pixmaps/

8. When Thunderbird starts, it complains about the mode for /var/spool/mail, as it cannot write to this folder. As root do the following
chmod 01777 /var/spool/mail

Add the application launcher in the panel/menu using the mozicon icon. Only things left is to install other plugins. My first plugins are always the Calendar (lightning) and birthday.

-

Wednesday, May 21, 2008

Using linux to view network traffic on a port

When we are interested to investigate who/what is connecting to our server, Linux provides some nice tools. Here are some examples with the output.

Tested with CentOS 5.1.

Using tcpdump
# tcpdump -i eth0 tcp port 80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
10:16:41.172405 IP 10.20.20.164.36273 > 10.20.20.232.http: S 1619435837:1619435837(0) win 5840
10:16:41.172433 IP 10.20.20.232.http > 10.20.20.164.36273: S 553643372:553643372(0) ack 1619435838 win 5792
10:16:41.172683 IP 10.20.20.164.36273 > 10.20.20.232.http: . ack 1 win 92
10:16:41.172932 IP 10.20.20.164.36273 > 10.20.20.232.http: P 1:445(444) ack 1 win 92
10:16:41.172951 IP 10.20.20.232.http > 10.20.20.164.36273: . ack 445 win 54
10:16:41.174744 IP 10.20.20.232.http > 10.20.20.164.36273: P 1:208(207) ack 445 win 54
10:16:41.174832 IP 10.20.20.232.http > 10.20.20.164.36273: F 208:208(0) ack 445 win 54
10:16:41.174996 IP 10.20.20.164.36273 > 10.20.20.232.http: . ack 208 win 108
10:16:41.177857 IP 10.20.20.164.36273 > 10.20.20.232.http: F 445:445(0) ack 209 win 108
10:16:41.177866 IP 10.20.20.232.http > 10.20.20.164.36273: . ack 446 win 54

Using Tcptrack (GUI)
# tcptrack -i eth0 port 80

Using Wireshark
# tshark tcp port 80
Running as user "root" and group "root". This could be dangerous.
Capturing on eth0
0.000000 10.20.20.164 -> 10.20.20.232 TCP 46538 > http [SYN] Seq=0 Win=5840 Len=0 MSS=1460 TSV=1461217 TSER=0 WS=6
0.000027 10.20.20.232 -> 10.20.20.164 TCP http > 46538 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=609213593 TSER=1461217 WS=7
0.000279 10.20.20.164 -> 10.20.20.232 TCP 46538 > http [ACK] Seq=1 Ack=1 Win=5888 Len=0 TSV=1461217 TSER=609213593
0.000285 10.20.20.164 -> 10.20.20.232 HTTP GET / HTTP/1.1
0.000305 10.20.20.232 -> 10.20.20.164 TCP http > 46538 [ACK] Seq=1 Ack=445 Win=6912 Len=0 TSV=609213594 TSER=1461217
0.001955 10.20.20.232 -> 10.20.20.164 HTTP HTTP/1.1 200 OK (text/html)
0.002056 10.20.20.232 -> 10.20.20.164 TCP http > 46538 [FIN, ACK] Seq=208 Ack=445 Win=6912 Len=0 TSV=609213595 TSER=1461217
0.002212 10.20.20.164 -> 10.20.20.232 TCP 46538 > http [ACK] Seq=445 Ack=208 Win=6912 Len=0 TSV=1461218 TSER=609213595
0.002593 10.20.20.164 -> 10.20.20.232 TCP 46538 > http [FIN, ACK] Seq=445 Ack=209 Win=6912 Len=0 TSV=1461218 TSER=609213595
0.002601 10.20.20.232 -> 10.20.20.164 TCP http > 46538 [ACK] Seq=209 Ack=446 Win=6912 Len=0 TSV=609213596 TSER=1461218

Using nc
For ports that are being used but is receiving data, the data can be displayed using nc.
#nc -l 80

GET / HTTP/1.1
Host: 10.20.20.232
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cache-Control: max-age=0

Using ngrep (from dag repo)
# ngrep -q -t -d any port 80
interface: any
filter: (ip) and ( port 80 )

T 2008/05/21 18:26:53.772736 10.20.20.164:49392 -> 10.20.20.232:80 [AP]
GET / HTTP/1.1..Host: 10.20.20.232..User-Agent: Mozilla/5.0 (X11; U; Linux
i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.
14..Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,
text/plain;q=0.8,image/png,*/*;q=0.5..Accept-Language: en-us,en;q=0.5..Acce
pt-Encoding: gzip,deflate..Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7..
Keep-Alive: 300..Connection: keep-alive..Cookie: Cacti=s5kjjkt79vg5kq17kf86
qfjda1....

T 2008/05/21 18:26:53.774644 10.20.20.232:80 -> 10.20.20.164:49392 [AP]
HTTP/1.1 200 OK..Date: Wed, 21 May 2008 10:26:53 GMT..Server: Apache/2.2.3
(CentOS)..X-Powered-By: PHP/5.1.6..Content-Length: 16..Connection: close..C
ontent-Type: text/html; charset=UTF-8....
Nicholas presents Networking Tools

And the netstat

  • List all open ports
    $ sudo netstat -lpAinet
  • List users of a specific port. Example port 443
    $ sudo fuser -v 443/tcp

Monday, May 19, 2008

How many Linux do I need?

When a person wants to use Linux as a desktop or server, the most common questions will be
  • Which Linux should I use?
  • Why isnt there a policy for a single Linux distro?
These age old questions are asked when there are consistent differences and dependencies in applications, drivers and protocols used between Linux. Have you felt that you needed to learn Linux all over again when encountering another Linux distro. Well, you wont be alone in this. Even application vendors will worry if they need to write different Linux versions for each of their application.

An article from Linux.com mentioned about the comings of Linux Standard Base (LSB) Desktop Project. What does this mean? Anyone can choose their own Linux desktop and still work with others in the same environment.

In 2008, we have LSB 3.2 that allows portable applications among the Linux distributions.
As a guide to which Linux distribution, refer to only those found at https://www.linux-foundation.org/lsb-cert/productdir.php?by_lsb

Following is a list of those already LSB certified. Try to look out for the LSB Certified trademark.
  • LSB 3.1
    • RHEL 5
    • SUSE Linux Enterprise 5
    • Ubuntu 6.06
One last example of what this standard means:
Desktop
  1. Bitmap images - uses PNG
  2. Compressed photo - uses JPEG
  3. Fonts - uses Freetype2 (2.1.10)
  4. Cryptographic - OpenSSL
  5. X graphics renderer - uses X version 11 release 6.4
  6. Desktop menu directory - uses Desktop Menu specification 1.0

Core
  1. Executable and Linking Format and part of ISO/IEC 23360
  2. Required user and group names include root, bin and daemon
  3. Software installation is in RPM or LSB conforming installer

Will OSS such as MySQL still be free?

MySQL AB provides one of the largest open source software (OSS) in the form of a database manager. Those who are interested in OSS licensing and business model would have found an interesting case study, since MySQL comes in an OSS and closed source version. MySQL business is estimated to be USD$15 Billion and is based in USA and Sweden. Among servers using MySQL are Faceboox, Google, Nokia, YouTube, Booking.com and China Mobile.

On 26th Feb 08, Sun Microsystems acquired MySQL AB for USD$1 Billion. Sun Microsystems gave the world OpenOffice.org and kept for itself Star Office. Will this model be the same for MySQL? Going to Sun's website, MySQL can now be seen as one of its enterprise solution product. At MySQL, the logo of Sun can be seen in its banner (merged with MySQL logo).

Some question come to mind after reading all this news and Monty Widenius presentation.

  1. Will the developers of MySQL around the world continue with the main stream development?
  2. Will Sun create closed source extensions, like it does for the other Sun products?
  3. Will there be more value for the community in the acquisition?
  4. Can MySQL start accepting more outside contribution instead of relying on MySQL AB developers? Currently it is very limited on how users can contribute to the code base.
I guess we have to start looking at Postgres database server in case things turn for the worst in MySQL / Sun deal. However, it should reflect what can happen in the Yahoo! / Microsoft deal where this time it is NOT an OSS based business taking over.

Tuesday, May 13, 2008

Installing Calendar Server on CentOS - part 2

Previous issue was that I could not get through the firewall to access http://svn.twistedmatrix.com. With the firewall settled, I can now continue this series of notes.

In the ~/dcs directory issue the command and download Twisted
svn co svn://svn.twistedmatrix.com/svn/Twisted/trunk Twisted

What is Twisted?
Examples of programs which were written using the Twisted framework are twisted.web (a web server), twisted.mail (a mail server, supporting both SMTP and POP3, as well as relaying), twisted.words (a chat application supporting integration between a variety of IM protocols, like IRC, AOL Instant Messenger's TOC and Perspective Broker, a remote-object protocol native to Twisted), im (an instant messenger which connects to twisted.words) and faucet (a GUI client for the twisted.reality interactive-fiction framework). Twisted can be useful for any network or GUI application written in Python.



Continue with the Calendar Server scripts

cd CalendarServer/
./run

Test this with a web browser pointing to the server with port 8008.
Example URL location http://10.20.20.205:8008/calendars/

See
http://docs.sun.com/app/docs/doc/819-2433/6n4nlfjk2?a=view
http://fedoranews.org/mediawiki/index.php/Building_a_Simple_Calendar_Server_with_Fedora_and_WebDAV


Installing Calendar Server on CentOS - part I

I am interested to have a server to host my calendar using caldav over http on CentOS 5.1 Linux. The advantage is that this calendar can be shared, if I reformat my PC, the calendar will continue to survive. Copying an ics does not allow me to edit it from the server.

Based on the link http://www.mail-archive.com/calendarserver-users@lists.macosforge.org/msg00195/LinuxBuildAndRun-DarwinCalendarServer
Here are my steps:

1. Connect to the CentOS server as user nicholas
ssh nicholas@10.20.20.205

2. create the working folder ~/dcs
mkdir dcs
cd dcs

3. Ensure subversion is installed. Get the svn for Calendar Server
svn checkout http://svn.macosforge.org/repository/calendarserver/CalendarServer/trunk CalendarServer

4. Install python-kerberos and python-devel
su -c "yum install python-kerberos python-devel"

5. Setup the disk to use extended filesystem
su -c "vi /etc/fstab"

Edit the options to include user_xattr in the filesystem that will hold the calendar.
/dev/hdb1 /mnt/data ext3 user,rw,user_xattr 0 2

6. Add a directory to put dcs data :
su -c "mkdir /mnt/data/dcs-data"
su -c "chown nicholas:nicholas /mnt/data/dcs-data/"


In DCS source directory, copy and edit the developement config file:
cd ~/dcs
cp ./conf/caldavd-test.plist ./conf/caldavd-dev.plist
vi ./conf/caldavd-dev.plist

Look for the string element specifying where to put data :
twistedcaldav/test/data/
And change it to point to a directory of your XATTR mounting point :

/mnt/data/dcs-data/


7. Run the CalendarServer scripts. This will download and place the required scripts at same level as dcs directory.
cd CalendarServer
./run -s


8. Trouble was encountered to download several subversion packages. Therefore I have to download and extract them manually.
cd ../xattr
wget http://svn.eby-sarna.com/ez_setup.tar.gz
tar xzvf ez_setup.tar.gz

I am stuck at the following...so will wait till i can find out why I cant download the Twisted.
svn co svn://svn.twistedmatrix.com/svn/Twisted/trunk Twisted

Monday, May 12, 2008

Thunderbird Troubleshooting

IMAP maximum cached connection error
The Thunderbird 2.0.0.14 email client on Ubuntu 7.10 took some getting use to. Today something had to happen. The IMAP server returned an error on my Thunderbird (email client) with the following Alert popup.


Something must have changed at the mail server over the weekend. Using the Web client, things were all fine, so this may be a Thunderbird and IMAP setting problem. At the client side, do the following to clear it. Originally I had the value 5 for the number of cached connections.

Step 1: Open Thunderbird. Choose Edit ->Account Settings
Step 2: Identify which account having the IMAP Alert problem and choose Server Settings and click on Advanced.
Step 3: In Maximum number of connections to cache from 5 to four. If this value does not work, keep reducing by one.
Step 4: Click OK. A second time OK to accept the changes.
Step 5: Restart Thunderbird to ensure things are reset. However, it still did work without restarting.

The "This body part will be downloaded on demand." message.
When the body of an email says "This body part will be downloaded on demand." and the attachments seem corrupted you cant access the Email.

Possibility 1: You are in offline mode and the downloads have been restricted.
Ensure the View -> Display Attachments Inline is checked.

Possibility 2: The message headers go messed up.
Rebuild the specific folder index table. Rebuilding the .msf file for that folder. Right click on the folder, select properties, general information and then press the "Rebuild Index" button. If that doesn't recover all of the messages its probably due to your folder being corrupted.

See Mozillazine
--

OpenOffice.org Annual Conference (OOoCon 2008)

The proposal papers for OpenOffice.org Annual Conference (OOoCon 2008) is open. This conference is being done on the 5th-7th November 08 in Beijing, China and is used by government and non-government to learn about trends and technology of OpenOffice.org (OOo).

For details of the OOoCon 2008 programmes, you will have to wait till Aug 08. However, papers can be submitted now at cfp2008. This is a first for Asia and I am looking forward to seeing the OOo future in Asia apart from the OOo technical development.

Malaysian government agencies have been moving towards OOo actively the last one year. It will be good if a government representative can be there to share on their experiences. This should raise awareness and adoption of OOo in Malaysia and the surrounding region.

--

Friday, May 9, 2008

First glimpse of OOo 2.4

What does OOo 2.4 have to offer?

For those who have been migrating from MS Office to OpenOffice.org (OOo), here is an upgrade that will reduce formatting problems in older MS Office documents.

OpenOffice.org 2.4 adds support for Access 2007 (.accdb) and improves the "find and replace" feature in OOo Writer. The 2.4 may be the last of the 2.x series and next is the 3.x version by end of 2008. I wont go into the debate of weather one should wait for 3.x or not.

Introducing new keyboard shortcuts and the ability to print hidden and place-holder text is going to allow more areas for power users to explore. Keyboard shortcut improvement includes the Ctrl+0 for Text body, Ctrl+1 to Ctrl+5 for the Heading 1 to 5. Ctrl+Shift+0 changes to default.

PDF handling benefits from new export options. This includes ability to use slide names as bookmarks.

OOo promises Impress to allow 3D transition effects in its extensions. Ok, I cant find any extensions for this but I am looking forward to it. Initially this 3D feature will be only available on Linux.

Printing of hidden text in Writer is useful to find all those things that we have been controlling the layout. To do this in OOo 2.4 choose Tools ->Options ->Writer ->Print. Then select Hidden Text.

OOo 2.4 seems promising.

Displaying OOo version
To display the installed version of the OpenOffice.org along with its build and patches, look at the file versionrc.
OpenOffice.org from the main stream is installed in /opt directory. The file can be found in /opt/openoffice.org2.4/program/versionrc

Here is the content of versionrc
[Version]
AllLanguages=en-US
buildid=680m17(Build:9310)
ExtensionUpdateURL=http://updateext.services.openoffice.org/ProductUpdateService/check.Update
ODFNotifyURL=http://odfnotify.services.openoffice.org/OOo2.4.1/notification.jsp?version=ODF
OOOBaseVersion=2.4
ProductBuildid=9310
ProductMajor=680
ProductMinor=17
ProductPatch=
ProductSource=OOH680
UpdateID=OpenOffice.org_2_en-US
UpdateURL=http://update24.services.openoffice.org/ProductUpdateService/check.Update?pkgfmt=deb
UpdateUserAgent=OpenOffice.org 2.4 (680m17(Build:9310); $_OS; $_ARCH; BundledLanguages=en-US)

Sunday, May 4, 2008

OpenOffice.org 2.4 working fine


Have been trying OOo 2.4 on Ubuntu 7.10, CentOS 5.1 and MS Win XP. The standard features have been consistent with OOo 2.3 but with faster access to previews and reduced lagging of screen updates in animation. Oh, nested table problems have been reduced. Can't wait to see what other improvements there are.

--
Learning something new each day!

OOOP-accessories template problem with Photos

OOOP-accessories-2.3.1.7.oxt template for OOo 2.3 works with OOo 2.4. This provides a large number of gallery cliparts and photos. The template includes world flags and maps (cant find Malaysia), Linux penguin logo, electronic symbols, shapes, vehicles, faces and various signages. Additionally there are also photos of countries and other stuff. Very useful over the basic clipart that comes with default OOo. The cliparts can be viewed in the OOo gallery view and it can be dragged into any OOo document.

In the OOo gallery, the TAB key can be used to access the different functions. Other interesting keyboard short cuts include
  • Ctrl+Shift+Insert is to create a link to the clipart
  • Ctrl+i is to insert the clipart into the document

The template is usually installed as a normal user, therefore the gallery goes into the user's home directory.

In Ubuntu 7.10, this will be in the directory
~/.openoffice.org2/user

One problem with this template is that the Photos section does appear in the correct folders and can be previewed in gallery. For example, try double-clicking any of the photos, and a blank is shown. Double click on the blank space again, the preview appears again. This means that it can be previewed but it cannot be dragged into any OOo document.

One solution is to do the following.

  1. Amend each Photo that you want to view. For example to view Photo - fauna.
  2. In the Gallery view, Right click "Photo - Fauna" and choose Properties.
  3. Select Files tab. Click "Find Files"
  4. Choose gallery/clipart/fauna/Photos/Fauna
  5. Click "Add All" -> "Ok"
  6. Right click "Photo - Fauna" and choose "Update".
You can now use the Photo - Fauna part of the gallery. Do the same for other Photos that are of interest. Alternative is to install that template as administrator and make accessible to all users. That is another story for another time.

--

Tuesday, April 29, 2008

Firefox 2 could not display Joomla! popups

The problem
I have just update Firefox (via Ubuntu Gnome update tools). Problem occured when I tried to edit my web content using Joomla 1.0 and the text editor choosen was;
TinyMCE result: The editor menu buttons dont appear at all
JoomlaFCK result: The pop up box for links, anchor, insert image and others appear blank

In previous Firefox 2.0.0.12, things look fine for TinyMCE and JoomlaFCK editor.

I am using Firefox 2.0.0.13 on Ubuntu 7.10:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080325 Ubuntu/7.10 (gutsy) Firefox/2.0.0.13

Solution
Upgrade to Firefox 2.0.0.14 or newer. Firefox 3 at the moment is still in beta, so I decided to give it a pass for now.

Saturday, April 26, 2008

Found some info on OOo standards at OpenOffice.org website

Basically it includes:
  1. OASIS
  2. Java -B3, JabRef, Synapsen, DAFFODIL
  3. Perl, Python - Pbib, RISImport.py

Its a good read on what is OOo.

Installing OpenOffice.org 2.4

OpenOffice.org 2.4 is out for almost a month now. Finally got a chance to install it on CentOS 5.1 and Ubuntu 7.10 Linux. I have not been using the OOo that comes with either distros, so lets uninstall the previous OOo 2.3.1 (mainstream) from both distros.

STEP 1: Download OOo 2.4 from http://www.openoffice.org
note: The are different downloads for CentOS (RPM) and Ubuntu (DEB) distros.

STEP 2: Uninstall OOo 2.3.1 (from openoffice.org website)
  1. Change to the OOo install folder and run setup

    cd /opt/openoffice.org2.3
    sudo ./setup

  2. When OOo Installation screen opens, select to uninstall OOo complete.

STEP 3: Install OOo 2.4
  1. Change to the Desktop or wherever you downloaded the OOo 2.4

    cd ~/Desktop

  2. Extract the OOo 2.4 by right click as choose "Extract here" or type

    tar -xzvf OOo_2.4.0_LinuxIntel_install_en-US_deb.tar.gz

  3. Open a terminal and enter into the extracted directory (mine was called OOH680_m12_native_packed-1_en-US.9286)
  4. Run the setup programme at a terminal
    1. in Ubuntu
      sudo ./setup
    2. in CentOS
      su -
      ./setup
  5. Follow the installation instructions and when you are done, better re-login.

At first glance;
  1. It looks just like OOo 2.3.1
  2. Screen refresh rates are much better than OOo 2.3.1
  3. I have done a training session using OOo 2.3.1 materials and all works fine
  4. I have tried with some prev templates and all seems good. The templates include;
    1. calendrier
    2. OOOP-templates
    3. OOOP-accessories
Glitch;
  1. In Impress (on CentOS), I used the wizard to create and save a new presentation. Closed the presentation, then reopen with the slide names all reset to slide1, slide 2, slide 3. Arrgh where did all the slide names go to? I could not repeat this event so didnt file a bug.
--

Friday, April 25, 2008

Using Apache to forward request

I am getting complaints from users that the mail server is not accessible from outside the local network due to the port number being block at other networks. My mail server is using port 8383 for webmail. Following steps allow my webmail to be accessed without needing to change the mail server settings.

The Plan
I need to setup an apache 2 on Linux and later reroute the DNS to use this new sever. All this using mod proxy in Apache.

What is mod proxy? see Apache site
"A typical usage of a forward proxy is to provide Internet access to internal clients that are otherwise restricted by a firewall. "

In this example my mail server details:
servername: mail.myserver.com.my
serverip: 192.93.20.3

STEP 1: Setting up the mod proxy on 192.93.20.4
My proxy is on CentOS 5.1 with Apache 2 (httpd-2.2.3-11.el5_1.centos.3)
  1. Install a Linux with Apache 2 and open the httpd.conf file

    vi /etc/httpd/conf/httpd.conf

  2. Make sure you have the following LoadModule lines (it waas there)
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so

Go to section three of the file and add

ServerName mail2.myserver.com.my
ProxyPass / http://firewall.myserver.com.my/
ProxyPassReverse / http://firewall.myserver.com.my/
RewriteEngine On
RewriteRule ^/$ http://mail.myserver.com.my:8383/ [P]



STEP 2: Redirect DNS
  1. Configure the DNS to accept mail2.myserver.com at the new server 192.93.20.4 which defaults to port 80
-

Thursday, April 17, 2008

Evolution vs Thunderbird vs Outlook

Intrduction to emails

Mail User Agent (MUA) is also known as an Email client. MUA is used to request email
from a Mail Transfer Agent (MTA). The request can be made in 2 forms:


  1. Post Office Protocol (POP3): Messages on the server cannot be flagged (as seen or
    forwarded) and messages are removed by default from the server to the MUA.

  2. Internet Message Access Protocol (IMAP): Messages on the server can be flagged and
    directories are used to managed emails on the server.


MUA must meet formating of email header ( To, CC, BCC, Reply-To) and footer as
described in RFC2822.


For firewall settings, MUA access a standard MTA via port 25 (SMTP). Currently
Transport Layer Security (TLS) is being used in many MTA for connection and transfer
security. Other ports of importance (plain/encrypted):
POP3 (110/995)

IMAP4 (143/993)

HTTP (80/443)

Anyone can read the contents or body of an email moving across MTA and MUA. Therefore
encryption of the Email content is used to protect the sensitive data. This can be in
two forms:S/MIME: requires a trusted body to recognise the userOpenPGP: users can recognise each other (no third party needed)


(T) PluginsLightning: Calendar tool support for WebDav and iCalendarEnigmail: adds OpenPGP message encryption and authentication to your email client. It features automatic encryption, decryption and integrated key management functionality. Enigmail requires GnuPG (www.gnupg.org) or Gpg4win for the cryptographic functions. Note: GnuPG and Gpg4win is not part of the installation.


(O) Viruses


(E) Support ServersMS Exchange, POP3, IMAP, Lotus

(E) clientGmail, Yahoo, AOL, Hotmail


(E) License: LGPL

(T) License: MPL, MPL/GNU GPL/GNU LGPL

(O) License: part of MS Office


(T) Calendar: iCalendar, WebDav

(O) Calendar: iCalendar, WebDav

(E) Calendar: iCalendar, WebDav


Platforms

Linux (E),(T)

MS Windows (T),(O)


Links:




Wednesday, April 16, 2008

Email Signatures and address book in Thunderbird 2

After having some issues with Evolution 2.12.1 on Gnome, I decided to have Thunderbird replace the Evolution Email client. After installing Thunderbird 2.0.0.12 from the mozilla.com website I needed to transfer the Addressbook from Evolution and add my Email signature. So here are the steps I took.

What is Thunderbird?
  • Handles junk mail using Bayesian filtering and detects scams
  • Handle Emails with views, tags, filters, search and virtual folders help
  • Provide reader for RSS feeds like streams of email with filters, search and labeling
A. Importing Addressbook from Evolution
No, there is no direct import for Thunderbird. Thunderbird support import of addressbook in the form of LDIF, csv and tabs. Evolution could only export addresses with the tool evolution-addressbook-export but this continued to give unexplainable errors that seem rather familiar in previous versions. For the record, here is how the command is used

evolution-addressbook-export --format=csv > ~/Desktop/contacts.evolution.csv
  1. So, what I did in the end was to export the Evolution address with the menu
    File ->Save Address Book as VCard
    Select the Desktop and saved as contactlist.vcf
  2. Use a converter to convert VCard to LDIF. For this example I accessed the site http://labs.brotherli.ch/vcfconvert and uploaded the VCard file. No big deal as there was nothing sensitive. However there were some converters that could be installed on the PC for more peace of mind about sensitivity of the data. I saved the file back as contactlist.ldif

    The idea is to convert VCF to LDIF

  3. In Thunderbird, open the addressbook and choose the menu
    Tools ->Import
    Select the contaclist.ldif file
B. Adding a signature for outgoing Emails.
You can add a VCard or a text/HTML file as a signature.
  1. Adding text signature. Create a textfile with your signature and store it on your harddrive. For example save as signature.nicholas.txt
  2. In Thunderbird choose
    Edit ->Account Settings
  3. Choose a profile and checked
    Attach this signature
  4. Click the Choose button and select the signature file signature.nicholas.txt
  5. Click OK

Friday, April 11, 2008

Backup files to rsync server

There are days when I have to make sure that the laptop and PC files are backup file by file. If you have a server to hold all the files, it can be made into a networked backup server. There are many ways to do this but today I will write on the rsync server for CentOS 5.1 Linux.

The rsync does transfer of file by sending just the differences in the files across the link, without requiring that both sets of files are present at one of the ends of the link beforehand. At
first glance this may seem impossible because the calculation of diffs between two files normally requires local access to both files.

1. Setting up the rsync server
  1. Edit the file /etc/xinit.d/rsync where the yes is changed to no.
    disabled = no
  2. Restart the rsync service
    service rsync restart
    chkconfig rsync on
  3. Ensure that the firewall allows rsync through
  4. Ensure that clients can ssh to the server
2. Setting up the pc to send files to the rsync server at ip address 192.168.1.100
  1. Login to the localhost and open a terminal. Type the command

    rsync -avz --delete --timeout=999 -e ssh /home/nicholas/documents/ nicholas@192.168.1.100:/mnt/backup/

    1. -a is to archive
    2. -v is verbos
    3. -z is to compress
    4. -e is to use a secure SSH instead of rsh connection
    5. --delete to remove any files on server that does not exist locally

  2. Type the password for the user nicholas when requested for password.
3. Managing which files to be backed up
  1. To create a file to store the filter rules, open up a text editor. The format of the file is
    RULE FILENAME
    Where RULE + (plus) means include and - (minus) is exclude. An ** means include into sub directories. Example create a file called mylist.txt with the contents as below.

    + files.dir/
    + *.odt
    + **.ods

  2. To make rsync recursively find files in /home based on the rules in mylist.txt

    rsync -avz --exclude-from=mylist.txt --timeout=999 -e ssh /home nicholas@192.168.1.100:/mnt/backup

I will add more details on other aspects of rsync when I have more time. This includes public/private key pair and automated backup.

--

Monday, April 7, 2008

OpenOffice.org Impress broken file links

One problem I encountered today when I copied the the Impress presentation to another computer was that the graphics showed broken links. What happened was that the images in the presentations was not embedded into the copied Impress document. This meant that the document was looking for the source file.

Since it is a common problem (I have heard of this too many times), I will briefly explain a solution on this.

1. Open the original Impress document where all files (example graphics) can appear.

2. Choose Index ->Links

3. Select all the source files and click the "Break Link" button.



4. Click "Close" button.

The Impress file may appear larger after embedding the graphics and other files.

Thursday, April 3, 2008

Copying cells in OpenOffice.org Calc

Moving or copying cells in OpenOffice.org may seem rather strange for MS Office users. One of the problems is that the cursor remains as an "I-bar". In yesterday's training session, how to move single and multiple cells came up. I will explain the steps with an example of contents from cell C6 to C7 or also known as C6:C7.

1. Copying multiple cells.

Aim: To copy cells C6:C7 to B12:

  1. Highlight the cells. Do this by left click on cell C6 and drag to C7.
  2. Release the left button.
  3. Move cursor over the highlighted area (default is black) and left click. Drag cursor over to B12. Release the left button.

2. Copying or moving a single cell

Aim: To copy cells C6 to B12

  1. Highlight the cells. Do this by triple (i.e. 3 times) left click on cell C6. Note that when the cursor is over the selected cell, it is an “I” bar shape.
  2. Drag cell C6 over to B12. Release the left button.

Note: To move the cell, press the Control (i.e. Ctrl) button while dragging.


Saturday, March 29, 2008

Screenlets to enhance Linux

What are Screenlets?
These are mini applications written to provide what a real physical desk/table might have. The applications are eye candy that can be things like a clock, calendar, CPU, RAM and notes. For more details see screenlets (http://www.screenlets.org/index.php/Information) website.

Screenlets are written in Python and can be installed system wide (all users) or for specific user. I am writing this to show how to install the screenlets that come as default and from 3rd party.


A. Installing screenlets (tested on Ubuntu 7.10 Gutsy)
I refer to http://www.screenlets.org/index.php/FAQ website for installation of the screenlets.

1. Add the launchpad repository for screenlets
vi /etc/apt/sources.list
deb http://ppa.launchpad.net/gilir/ubuntu gutsy main universe

2. Update the repository and install screenlets
sudo apt-get update
sudo apt-get install screenlets
sudo apt-get install python-dcop python-feedparser python-chardet

B. Starting screenlets
1. Launch Screenlet Manager


Open a terminal and issue the command

screenlets-manager

or from the Panel choose

Applications ->Accessories ->Screenlets

2. Click on one of the screenlets then click Launch/Add button.
When the screenlet appears, click and drag it to the position that you want. To edit its properties, right click on the screenlet and choose on of its configuration (Example Windows, Properties )

3. The Sreenlet Manager allows installation of new screenlets, restarting screenlets, to automatically start

C. Adding additional screenlets
Download and extract the screenlets to

~/.screenlets

or

/usr/share/screenlets

D. Installing additional screenlets not available with default Screenlets.
Here I am using the 3rd party screenlets to install CPU Meter Screenlet Vista'ish. It appears as two joined meter with several themes.


1. download from http://www.screenlets.org/index.php/CPU_Meter_Vista%27ish

2. Installation
Put it in your /usr/local/share/screenlets and run it from there
or
Install by extracting the contents of the screenlet's archive to the directory ~/.screenlets

3. Develop your own screenlets?
There are possibilities to create and install your own screenlets. Is it easy to create screenlets? see
http://www.screenlets.org/index.php/Documentation

Wednesday, March 26, 2008

gdesklets to enhance Linux

gdesklet to enhance Ubuntu. (Tested on Ubuntu 7.10)

For those who are looking at ways to add eye candy to the Ubuntu desktop, there is gdesklets. It is not installed by default and the universe repository must be enabled. Universe should be by default unless someone changed things. As of today it is version gDesklets 0.35.3-4ubuntu2.



1. Ensure universe repository is enabled

$ sudo gedit /etc/apt/sources.list

deb http://security.ubuntu.com/ubuntu gutsy-security universe
deb-src http://security.ubuntu.com/ubuntu gutsy-security universe

2. Install the gDesklet

sudo apt-get install gdesklets
sudo apt-get install lm-sensors

3. launch gDesklets
From GUI: Choose Applications->Accessories->gDesklets

From CLI: gdesklets start
At the Applet bar right click the gdesklet and choose to configure.
This can also be done by typing

gdesklet shell

4. Add gdesklets to desktop
This example is to add the monthly calendar.

Click Date/Calendars -> Calendar
Choose File->Run Selected Desklet menu

5. To move the desklet
Move mouse over the desklet and right click. Choose Move Desklet. Another way is to press middle button (hold left+right mouse button) and drag.

6. Configure a desklet on desktop

Right click and select the Configure desklet

7. Raising Desklets to the Front of the Desktop
When you want to have the desktop applications appear behind the desklets (since desklet is so fun), press +. This is a default that can be changed later. To bring the desklets to background press same keys again.

8. Adding more desklets.
There are many more desklets around the Internet. However you can find most of them at
http://www.gdesklets.de
http://gdesklets.zencomputer.ca

Select any of the gdesklets, download and drag into a gdesklet shell.

Monday, March 24, 2008

yum with RHEL 5.x and CentOS 5.x

CentOS and RHEL uses the yum tool to install and keep software updated. This manages and tracks the software installed and its dependencies as long as there is an Internet connection. Yum is a kind of front-end to the rpm tool to manage installation of software. The softwarename here refers to a package name. Here are some yum related information that requires root access.

General

1. RHEL needs to register with RHN before yum can access its resources. Use the command:
rhn_register

2. To display list of updated software
yum list updates

3. To download and install updates
yum update
yum update softwarename

4. Display installed software
yum list installed
yum list installed softwarename

5. Display available software and installed software
yum list all
yum list softwarename
yum list reposname

6. To install a software
yum install softwarename

7. Display which software a tool belongs under
yum whatprovides /sbin/iptables


Manage software groups.

1. Display available software groups
yum grouplist

2. To install software in a group
yum groupinstall "group name"
yum groupupdate "group name"

3. To remove all software in a group
yum groupremove

Saturday, March 22, 2008

R60 laptop and projector display

To have the R60 Laptop be able to display with the projector while being able to view the laptop screen I have some suggestions for Linux Ubuntu (Gutsy 7.10) and CentOS 5.1.

Firstly, Gutsy detected and is using an Intel experimental driver for the 945. CentOS detected the driver as Intel i810.

There are three methods that you may want to try out. Please do drop me a comment if it works on other distros or record here if you have problems.

1) Modify xorg.conf file
Modify the options for the graphical device in the /etc/X11/xorg.conf file. Make sure the file have a backup.
1.1) Linux Ubuntu
a) vi /etc/X11/xorg.conf
From:
Section "Device"
Identifier "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
Driver "intel"
BusID "PCI:0:2:0"
EndSection

To:
Section "Device"
Identifier "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
Driver "intel"
BusID "PCI:0:2:0"
Option "MonitorLayout" "NONE,LFP+CRT"
Option "DevicePresence" "true"
Option "CheckLid" "false"
EndSection

Save the file.

b) Plugin the projector and reboot.

1.2) Linux CentOS 5
a) vi /etc/X11/xorg.conf
Find the section "Device" and edit to include the BusID and the 3 options. They are self explainatory.

Section "Device"
Identifier "Videocard0"
Driver "i810"
BusID "PCI:0:2:0"
Option "MonitorLayout" "NONE,LFP+CRT"
Option "DevicePresence" "true"
Option "CheckLid" "false"
EndSection

Save the file.

b) Logout and plugin the projector. If you still cant see the displays, then reboot without the projector plugged in. Plug in when at the login screen.



2) Restarting X
Based on my postings to ubuntuforums titled "HOWTO GUTSY: Laptop dual display with projector/external screen" (Oct 20, 2007). Those who do not want to touch the xorg.conf file can do the following:


a) Start Gutsy and stay at the login screen or Press Ctrl+Alt+Backspace
b) Plug in the external display cable
c) Log-in and you can see the two screens. Play a movie and it appears on the external screen.

Next problem, You have watched the movie on the external screen now you want to remove the external screen and resume work as normal. This includes watching movies on the laptop.
a) Logout and remove the external screen cable.
b) At the login screen press Ctrl+Alt+Backspace
c) Login
d) Play a movie and it appears on the laptop screen.

3. Using command line.
For those who love to just make scripts or give command lines, I suggest using xrandr. However, if you have modified the xorg.conf file, the command may not always work.

a) Login as a normal user. Open a terminal to issue commands.
b) Plugin the external display cable (projector)
c) Type any of the following relevant lines:

xrandr --output VGA --auto
xrandr --output VGA --mode 800x600 --auto
xrandr --output VGA --mode 1024x768 --auto

d) To stop the projection, type

xrandr --output VGA --off

#end

Friday, March 21, 2008

Its Good Friday.

It is Good Friday today and a nice article in The New Straits Times, A celebration of new life today is a good reminder for us Christians of the celebration. It is a rainy day and the mass will be at 6pm today. Holy Thursday will be where the baptisted adults will have their ceremony. Easter Sunday 9am mass is where I will be.

Looking back at all this, what are the technology involvement of the church?

Discussions of ODF by CEPIS started in 2006. The Catholic Semantic Web list several efforts of the church to implement technology.
Theological XML (tXML)
Open Scriptural Information Standard (OSIS)
Open Source Bible Software
Linux distro Ubuntu CE for Christians is described in distrowatch.com
The ATLAS project provided digitisations of scholastic materials.
The Crosswire.org project provides the framework for software like Bibletime.info (for KDE)

Wednesday, March 19, 2008

The thin client for XDMCP

This is a continuation of the previous blog on XDMCP. Firstly we start off with the definition of an XMDCP client. The client is actually an xserver that collects information of the mouse, keyboard and other X matters from a XDMCP server. Well, atleast that is the easiest way to explain. An example of such a client is the multipurpose Xnest.

The Xnest software states the following:
Xnest is a client of the real server which manages windows and graphics requests on its behalf. Xnest is a server to its own clients. Xnest manages windows and graphics requests on their behalf. To these clients Xnest appears to be a conventional server.


The client environment I have tested is on Linux CentOs 5.1. On the XDMCP server is a user called username with the password as password. The example server IP used is 10.20.20.172.

1. Login to a graphical environment (I use GNOME) as a normal user. Choose Applications ->Accessories ->Terminal

2. At the terminal type the following:
$ ssh -X username@10.20.20.172
$ Xnest :1 -geometry 800x600 -query 10.20.20.172

3. Login with the given name and password.

Creating an XDMCP server

X Display Manager Control Protocol or better known as XDMCP is used to provide thin client service. Today we see how to quickly allow XDMCP server to do the following:
1. Centrally control user login
2. Provide software/application from a central source
3. Lower specs machine can use resources from the server

I am having CentOS 5.1 with Gnome Desktop, so this time I will explain based on the given environment.

1) Login as normal user. From menu choose System ->Administration ->Login Screen



2) The Login Window Preference, we select the Remote tab and choose Plain. Then choose Configure XDMCP button and ensure it is selected.




3) Select the Users tab and check the box "Include all users from /etc/passwd"



Another post from me will be on setting up the thin clients to connect to the XDMCP server.

Tuesday, March 11, 2008

OSS in Japan Public Sector

Sometimes, I think back and wondered why I didn't finish my Japanese class which ended abruptly after 2 months. The last FLOSS Japan survey in 2004 was called Free/Libre/Open Source Software Japanese Developers Online Survey. That time the survey concluded with a recommendation to improve on the students skills with regards to FLOSS. Japan now have a site iPedia on OSS utilisation by users and vendors.

Mozilla Labs, Chris Beard was in Tokyo for the Open Source Conference (OSC) 2008 Tokyo/Spring. The conference site is a http://www.ospn.jp/osc2008-spring where the following areas were covered:
GlassFish
Eclipse
Java
Linux
LDAP

Just was at a japan.internet.com where there was a survey result dated 12/12/07 of OSS usage in Japan, carried out by JR Tokai Express Research Inc. Lucky me I found a translated site with the title Japan’s public sector still not moving to Linux, OSS which mentions some results of 222 Public Sector employees from 330 survey participants.

Q1: At your workplace, what is the main operating system installed on desktop and portable computers? (Sample size=222)

Windows (93.2%), Macintosh (5.0%) and Linux (1.8%)

Q2: At your workplace, what server operating systems are in use? (Sample size=126, multiple answer)

Windows(76.3%), Linux(22.2%), Unix(15.9%), Macintosh(3.2%) and Main frame(1.6%)

The Linux distro used at the workplace included:
RedHat, Fedora Core, Debian, Turbo Linux, OpenSuse and CentOS.

Well, looks like if Malaysia did a similar survey what do you think would be the result?

OpenOffice.org in Malaysian Public Sector

OpenOffice.org (OOo) a desktop solution similiar to MS Office have been around Malaysia for many years. It is not new, however many organisations have failed to retain its adoption over the years for several reasons.

Lack of technical support. There are not many known paid-for support for organisations to rely on. As the number of IT staff who are graduates with OOo knowledge is relatively low, I didnt see many who is driven towards OOo.

OOo the software. As a solution on MS Windows environment, there are not many who find its excellent features. Instead its down side is always a highlight. This includes repetitive showing of document error screen, lagging, problems with refreshing the display and functions that are not available.

The society. Almost all desktops have MS Office and if you ask around about OOo usage, you'd hear the same thing.

"Whats that?"

Since users migrated to MS Office 2003, more document formating problems are prevalent when exchanging documents with OOo.

The Malaysian Open Source Software (OSS) initiative is in phase II. One rather visible activity is the pervasive use of OOo in the Public Sector. The motivation for the Public agencies it seems is that there is a directive when making new purchases to be prudent. This itself leads to OOo as the only solution similiar to MS Office. Where there is lesser cost in the form of licensing fees. The schools and education institutions who have the largest number of office users in the Public sector will definitely be going to OOo if they want to be prudent. With the Malaysian Administration, Modernisation and Planning Unit (MAMPU) making a move towards all desktop using OOo, I am sure that other agencies will be more confident in moving towards OOo. However, will other agencies be able to accept the changes that will be shown when MAMPU starts dealing with documents between agencies.

One concern will be the die hard MS Office users from other agencies. Can they or will they want to explore changes in their document interchange with those using OOo. Malaysia will definitely be seeing more OOo in the private sector if the government can make the transition period a short one. I am looking forward to seeing OpenOffice.org taking steps to ensure the Malaysian government succeeds in the OOo move.

Monday, March 10, 2008

Sending Linux Text to MS Windows

A README file was being prepared as part of a CDROM for OpenOffice.org installation on MS Windows. I used K3B to burn the CDROM. However, when the CDROM was open in MS Windows, the text appears in one continuous line. This is a common problem for text between Unix and DOS (or MS Windows). The DOS requires an additional return character and the Linux did not cater for this.

To resolve this, install unix2dos. In Ubuntu this is found in tofrodos package.

$ sudo apt-get install tofrodos

Convert using the command line.

$ unix2dos filename.txt

Gedit. Some text documents are created with Gedit. Gedit can be used to edit text and call the Unix2DOS command. This allows text that is nicely formatted when seen in MS Windows.
  1. On a Linux, open Gedit and choose Edit ->Preferences. Click Plugins tab and check the External Tools
  2. Click Configure Plugin, click New.
  3. Enter the name Unix2DOS. Fill the following values:
    1. Description: Tools to make text readable in MS Windows
    2. Command: unix2dos
    3. Input: Current Document
    4. Output: Replace Current Document
    5. Click Close. Close the Gedit
  4. Open the text document to be used in MS Windows. Choose Tools ->Unix2DOS
  5. Save the document. It is now in a format that can be read in MS Windows.

Sunday, March 9, 2008

Malaysia Polls for 2008

Mar 8 2008, Malaysia went for polling for the 12th time. The Chinese calendar is at Earth Rat. Results are still coming in but looks like some interesting events are as follows:
Shahrizat (BN) lost to Anuarss daughter (Nurul) in Pantai Dalam - PKR
Samy Vellu (BN) lost to Jeyakumar in Sg Siput - PKR
Anuar's Wife, Wan Azizah won a seat in Permatang Pauh, Penang.
Ng Yen Yen (BN) had a close win for Raub.

Penang lost lots of seat to oppositions and looks like it will now fall to the opposition government.

Prime Minister won back his seat in Kepala Batas, Penang.

No results yet for "Maimun Yusuf" of KT Parlimen seat. She is at 89 years of age.

Looks like Malaysia is experiencing a major revamp in its government for 2008.

What are the webservers using when I was browsing for the polls?
sky.com IBM web server
thestar.com.my MS IIS
malaysiakini.com Apache 2.2.4 (down after 10pm)
harakahdaily.net nginx 0.3.31
dap-elections.com Apache 2.0.52
rtm.net.my Apache 2.2.3

Friday, March 7, 2008

OpenOffice.org and MS Office 2003 - Indentation

I am having the chance to use MS Office 2003 today. Thought I'd write on some of the differences I can see. If I get the chance, there will definately be more of these comparisons.


Indent tabs
In MS Office 2003 you see
The rectangle below the lower indent control is used to keep the left paragraph indentation. The lower triangle is the first line indentation.
In OpenOffice.org 2.3.1 you see
First line indent - The upper triangle can move freely (Click+drag) and controls the left distance of the first line from the left.
Left indent - The lower triangle moves together with the upper triangle (Click+drag). The lower indent tab moves together with the upper indent control. It is used to keep the left indentation.
Hanging indent - The lower triangle move freely (Ctrl+Click+drag). This moves the 2nd paragraphs onwards away from the left indentation.

Templates
MS Office 2003 saves the templates to a specific folder that the users must know.
OpenOffice.org saves templates without users needing to worry about its location.

Found a site on more comparisons

Blog Archive