Showing posts from October, 2008

Ubuntu install on windows box

This post explains the steps to install Ubuntu under Windows with the Wubi installer. It then continues to outline the steps to move the Ubuntu install with LVPM to its own partition and make it the primary OS. Next it explains how to replace the Ubuntu install with another Ubuntu install. Finally it explains how to make the original Windows OS run virtually within/under the Ubuntu OS with VMWare and VirtualBox.

Installing Ubuntu in Windows with Wubi

- Cleanup, compress, remove unnecessary cruft, and empty the trash from existing windows install
- Backup existing windows install with something like Acronis
- Download Wubi Ubuntu installer and install Ubuntu in a file within the existing windows partition

Note: Now Ubuntu will be listed in the boot list and you can boot into either OS.

Moving Ubuntu to its own partition

- Reboot into the Ubuntu live CD and repartition the drive.

- Enter the BIOS menu and set the boot order to CD/DVD drive before HDD, i.e., Restart the computer and repeate…

Developer Humor

Agile and continuous integration

Adopting Agile Development

Design vs Knowledge Creation: Attacking risk early along with early and continuous integration improves development.

Agile attitude: Transparency

Forget Burn-down, Use Burn-up charts: graph both total and completed, that way you can see when backlog was added or removed along with iteration velocity. It is then obvious why decreases in remaining occurred - whether due to backlog changes or velocity changes. I would recommend adding annotations with links to notes indicating what changed. What was added/removed to backlog? Were there less team members due to vacations, etc? Were team members shuffled?

Agile Anti-patterns

Eclipse Ganymede on Ubuntu Hardy Heron 8.04

Install procedure:

tar xzvf eclipse-java-ganymede-linux-gtk.tar.gz

Ubuntu Kung Fu

Ubuntu kung fu tips site
Ubuntu psychocats tips site

text editor features

log file descriptions

/proc - filesystem window into hardware

Setting environment variables, see forum
~/.profile - per-user environment, source reloads in current terminal

/etc/environment - simple key=values, no expansion, system wide environment loaded at boot, source reloads in current terminal shell

A single dot followed by a file is the same as 'source file' which runs in the same shell not a new shell, i.e., '. .bashrc'

sudo gedit /etc/profile - system wide bourn shell environment, only gets read by login shells. For graphical logins you don't get a login shell so it's up to the X session configuration to read /etc/profile. It seems that gdm and kdm are doing this with most Linux distributions, but others may not.

gedit ~/.bashrc to edit local environment


group management

List all groups a user belongs to: groups

linux cheat-sheet

To get list of UUIDs: ls /dev/disk/by-uuid -alh

Keys randomly stuck repeating and cursor randomly jumping around in Ubuntu Hardy Heron 8.04

Turning of mouse clicks on touchpad fixed the cursor jumping around.

System : Preferences : Mouse

Touchpad tab

Disable mouse clicks with touchpad

According to this forum, disconnecting all USB devices for 10 seconds and reconnecting them resets something on the USB bus fixing the randomly stuck keys. This appears to have fixed the problem and I'm not seeing stuck repeating keys anymore. I only had a trackball connected.

Saw GTK errors with JConsole running and it seemed slow to respond

Found BLOG entry about slowness with NetBeans and GTK that switching to metal Look an Feel resolved.

Saw some console errors about GTK, switched to Metal L&F and errors were no longer reported.

jconsole -J-Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel&

C:\Progra~1\java\jdk1.6.0_02\bin\jconsole -help

Usage: jconsole [ -interval=n ] [ -notile ] [ -pluginpath ]
[ -version ] [ connection ... ]

-interval Set the update interval to n seconds (default is 4 seconds)
-notile Do not tile windows initially (for two or more connections)
-pluginpath Specify the path that jconsole uses to look up the
-version Print program version

connection = pid || host:port || JMX URL
pid The process id of a target process
host A remote host name or IP address
port The port number for the remote connection

-J Specify the input arguments to the Java virtual machine
on which jconsole is running

Java 6 Trouble-shooting guide

Ubuntu desktop/window manager freezes up/locks up with multiple windows grouped with Compiz on Hardy Heron 8.04

Setting Window title and initial position Ubuntu Hardy Heron 8.04 with Compiz Fusion

Programmatically setting window titles, see forum entry.

Using Escape Sequences To Set Gnome Terminal Options

1. Edit the Terminal Profile (Edit - Profiles - Title and Command Tab), change dynamically-set title option to "replaces initial title".
2. Edit a script file or run on the command line and change the PROMPT_COMMAND line to

PROMPT_COMMAND='echo -ne "\033]0;"myWindowTitle"\007"'

where (in octal) \033 =>
0 => Ps = 0 (use string as a new icon name and title)
; => non-digit character
string => "myWindowTitle"
\007 => (non-printing character)

The escape sequence I've employed is :-

ESC ] Ps ND string NP OSC Mode
ND can be any non-digit Character (it's discarded)
NP can be any non-printing Character (it's discarded)
string can be any ASCII printable string (max 511 characters)
Ps = 0 -> use string as a new icon name and title
Ps = 1 -> use string is a new icon name only
Ps = 2 -> use string is a new title only
Ps = …

JConsole with JBoss 4.2.3 on Java 6

You must set the following when starting JBoss or you will get .ClassNotFoundException when trying to connect JConsole to the JBoss process see forum entry.

Edit the JBoss startup script

Add to run JConsole without JBoss MBeans


Add to run JConsole with only JBoss MBeans

-Djboss.platform.mbeanserver $JAVA_OPTS"


# Enable the jconsole agent locally JAVA_OPTS="$JAVA_OPTS" # Tell JBossAS to use the platform MBean server JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver" # Make the platform MBean server able to work with JBossAS MBeans JAVA_OPTS="$JAVA_OPTS"

Can get JBoss MBeans through Jboss web consoles.


JConsole not connecting under Linux

In /etc/hosts, the hostname is not mapped to
Needs to be mapped to be mapped to or it won't connect
because it thinks it is trying to connect remotely

Host file changes: localhost troy-laptop # fix for JConsole

See blog entry


Ubuntu Hardy Heron 8.04 sound buttons

Re: sound buttons not working correctly

Go into System -> Preferences -> Sound, then select PCM (and PCM only) in the list near the bottom of the page.

Relabel partition Ubuntu Hardy Heron 8.04

The attached link explains how to manually relabel a partition.

VMware player 2.0.5 on Ubuntu Hardy Heron 8.04

Tried various methods, but couldn't get VMware player 2.5 to install and work. Trying this with bundle.

I used the following method to get VMware player 2.0.5 installed and it is working flawlessly.

sudo aptitude install build-essential linux-headers-generic
downloaded VMware-player-2.0.5-109488.i386.tar.gz to /usr/local/bin/vmware-player
cd /usr/local/bin/vmware-player
tar xf VMware-player-2.0.5-109488.i386.tar.gz
cd vmware-tools-distrib/
sudo ./

Fix VMware player 2.0.5 Windows clock sync under Ubuntu Hardy Heron 8.04

sudo gedit /etc/vmware/config


hostinfo.noTSC = "TRUE"
tools.syncTime = "TRUE"

Ubuntu 8.04 Hardy Heron Hibernate/Resume on Dell Studio 1735


uname -r - to verify kernel version
sudo fdisk -l - to check all partitions
mount - to see what was mounted
more /etc/fstab - to get filesystem and mount points
ls /dev/disk/by-uuid -alh - to get a list of UUIDs

Edited /boot/grub/menu.lst per instructions below

Got Hibernate/Resume working using:

zcat Says:
September 14th, 2008 at 4:32 pm

What I did was three things to get hibernate to work with Ubuntu Hardy ...
1. change platform to shutdown
>sudo gedit /usr/lib/pm-utils/functions
change from “platform” to “shutdown”

2. whitelist ptyq4
>sudo gedit /etc/default/acpi-support:
# Add modules to this list to have them removed before suspend and reloaded
# on resume. An example would be MODULES=”em8300 yenta_socket”
# Note that network cards and USB controllers will automatically be unloaded
# unless they’re listed in MODULES_WHITELIST

3. Changes grub to point to swap on resume
>sudo gedit /boot/grub/menu.lst
UUID (for your swap partition) and no…

EE 5

Setting up jvmstat and visualgc in Linux Ubuntu Hardy Heron

download jvmstat

In a terminal, run: gksudo nautilus
That will start a root file manager (GNOME) - graphical file browser with root access

double click the jvmstat download and uncompress it to /usr/local/bin
Copy /usr/local/bin/jvmstat/bin/visualgc to vgc so the command is shorter

edit ~/.bashrc add the following two lines:

export JVMSTAT_JAVA_HOME='/usr/lib/jvm/java-6-sun'

To run visualgc, from a terminal, run jps to get a list of java process ids, then run vgc

Ubuntu Linux with Compiz Fusion = awesome!

It all just worked - including the integrated wifi, bluetooth, sound, mic, and integrated 2 MP web camera. I only had to do manual config to get hibernate/resume working, see details. Bought a new Dell Studio and upon booting Windows Vista for the first time, I discovered Vista is a pig consuming ~1 GB just to boot up. Had already been playing around with Ubuntu for many months and liked it, however, I wasn't sure it would support all my needs. I was wrong.

I installed Ubuntu with Wubi. Ubuntu only takes ~350 MB to boot up. I added the Compiz Fusion composite window manager and enable 3D for productivity and the sheer enjoyment of using it. Can't keep my kids off my computer now. I configured the Evolution mail client for my various mail accounts and am quite pleased. Installed Skype, Java 6, Maven, Ant, Apache Tomcat, JBoss, GlassFish, MySQL, Eclipse, and NetBeans so my development environment is mostly good-to-go.

With Eclipse, NetBeans, MySQL, FireFox, Evolution, and Skype al…

Big-O notation

Windows quotes and path separators compatible with Java

Windows sub-paths need to be quoted if they have spaces and the sub-paths should not end with path separators. Either of these issues causes problems for JWSDP-2.0.

Correct example:

C:\Java\jdk1.6.0\bin;%ANT_HOME%\bin;%SystemRoot%\system32;"C:\Program Files\MySQL\MySQL Server 5.0\bin"

Incorrect examples:

Missing quotes around a sub-path which includes spaces

C:\Java\jdk1.6.0\bin;C:\ProgramFiles\MySQL\MySQL Server 5.0\bin

Sub-path quoted, but incorrectly ends in a file separator

C:\Java\jdk1.6.0\bin;"C:\Program Files\MySQL\MySQL Server 5.0\bin\";%ANT_HOME%\bin