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.