DDMS on Ubuntu throws exception ?

I downloaded the latest Android SDK and connected my Nexus One. Once starting DDMS, it throws up this
[codesyntax lang="xml" title="DDMS error"]
user@wanaka-ubuntu:~/android-sdk-linux_x86/tools$ ./ddms

(ddms:10868): Gdk-WARNING **: gdk_window_set_icon_list: icons too large
04:37:36 E/ddms: shutting down due to uncaught exception
04:37:36 E/ddms: java.lang.UnsatisfiedLinkError: Can’t load library: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1649)
at java.lang.Runtime.load0(Runtime.java:787)
at java.lang.System.load(System.java:1022)


If you read the log, you realize it tries to use the openjdk version, but we want to use the SUN (ahem Oracle) JRE.

Open the ddms script file and change the line (around line no.65)



javaCmd=”/usr/lib/jvm/java-6-sun-” (adapt it to your proper path to the java binary!)

There we go ! Lets snoop inside the phone

Dalvik Debug Monitor (DDMS)

and we can even create screenshots !

Android Screenshot

Debug Android Nexus One with Eclipse

Using Ubuntu and Eclipse you follow the instructions here:

  • Create  the file /etc/udev/rules.d/51-android.rules
  • Change the rights chmod a+r /etc/udev/rules.d/51-android.rules
  • and add the line  SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
  • but running adb devices gets you a bunch of ???? and ‘no permission‘ and you cant connect from Eclipse.

The proper vendor id for HTC Nexus One is 18d1

SUBSYSTEM==”usb”, SYSFS{idVendor}==”18d1″, MODE=”0666″

(No clue why they never updated the docs)

Installing PostgreSQL 9.0 on Ubuntu

Thanks to Martin Pitt , who maintains the packages for Ubuntu, nstalling the latest version of PostgreSQL on Ubuntu (Lucid) is nothing more than updating your /etc/apt/sources.list with

deb http://ppa.launchpad.net/pitti/postgresql/ubuntu lucid main
deb-src http://ppa.launchpad.net/pitti/postgresql/ubuntu lucid main


apt-get update


apt-get installpostgresql-9.0

I recommend reading the release notes and he outstanding good postgresql documentation.

How does Virtualbox help me in hacking with Netbeans, Glassfish and PostgreSQL ? (2)

Did you read yet Part 1 ? If not, I recommend to run through it here.

We started from the scratch with VirtualBox and created a new virtual machine running Ubuntu Server 9.10. The last step was to shutdown the virtual machine. Now it is time to clean up, update our server, finetune the configuration and install JDK and Glassfish.
Continue reading

How does Virtualbox help me in hacking with Netbeans, Glassfish and PostgreSQL ?

Using the Netbeans IDE together with Glassfish as application server is quite easy and comes out-of-the box with the Netbeans installer. To install PostgreSQL is not significantly harder to install on Linux (or Windows). Our team uses Ubuntu 9.10, Netbeans 6.8, Glassfish and PostgreSQL 8.4.2. If you work alone, it is usually no problem to develop and deploy locally but once you are embedded into a team, you better ensure that you deploy and test applications in the same environment. Very quick you will have Ubuntu updating the OS and PostgreSQL and someone might install Glassfish updates or even add optional modules, soon you have as many deployment environments as you have team-members (times 2). The straight forward answer would be to have all working with the same one server running the application server and the DB, but we still need the comfort of a local sandbox playground and in-dependency from being online or in the office. Certainly I do not advocate island development leading to a different codebase and varying DB’s. But after the tutorial you will agree with me our solution is a reasonable approach.

Our approach: We create a virtual server (with VirtualBox) that everyone is running on his/her desktop and also one instance on a central server. One team-member is responsible to create so-called raw virtual images of the server and documents new versions that are deployed to each desktop. Each team-member does nothing but starting the guest Server in VirtualBox (Glassfish and PostreSQL autostarting) and immediately can connect with Netbeans and pgadmin to AS and DB.

Virtual Ubuntu 9.10 Server

Not all developers are familar with setting up Ubuntu Server and VirtualBox, so I compiled this tutorial as a walk-through the necessary steps to get you started witthout knowing too much about  the OS nitty-gritty stuff. You want to concentrate on creating your application, not learning to hack the operating system (even I recommend to know as much as possible on Linux).
A remark on the naming: Your desktop or Notebook running VirtualBox is the HOST and the server or OS you run in the virtual machine is the GUEST.

Continue reading

On Passwords

After running live CD’s or installing Ubuntu and openSolaris several times, I keep on forgetting the default passwords for the default user and or root user.

openSolaris (2008.11 Live)

  • root – opensolaris
  • jack – jack


  • Runningthe LiveCD does not require login.
  • The root account is not activated after installation. Better read this article on root and sudo (link)

Remark: After installation the passwords are your own business. But there are ways to reset a passwords (at least in Ubuntu, see link)

News: Ubuntu 9.04

Since a couple of hours you find the latest release of the popular Linux distribution ready for download. 9.04 comes, as usual, as a live CD (700MB), easy to try and easy to install. With most of the mirrors pretty busy right now, it might a couple of hours to get the iso image. I am looking forward to install it, and different from other OS, you can be sure there is no need to add additional CPU’s and memory to see the desktop.

There is also a new version/download dedicated to Netbooks. You might want to check the compatibility list first (link)

Download at Ubuntu.com (link)

Switch to Ubuntu

Using a fairly powerful Dell Vostro 1500 notebook running a Intel® CoreTM2 Duo Mobile Processor T8300 with 4 GB of RAM I decided to switch over from running fulltime XP PRO to Ubuntu ! I bought a sep. harddisk with a bezel and can switch between the 2 fulltime OS anytime. I still need Windows for some simulation and games using the NVidia 8600 horsepower.

Installing Ubuntu Desktop 8.10 (intrepid) tooks less than 15min plus another 20min downloading all the actual updates and patches.
Additional installed software:

  • JDK 1.6.10  (How to install: Open Terminal and “$ sudo apt-get install sun-java6-jdk“)
  • Netbeans 6.5 (How to install: Download from www.netbeans.org, make the netbeans-6.5-ml-linux.sh executbale (chmod +x fiename) and start it $ ./filename)
  • Skype
  • Virtualbox (link)

Using VirtualBox I run Windows XP (thanks to the licence that came with the notebook), Solaris 10, OpenSolaris 2008.11 smoothly and do development in Netbeans (which starts up much faster compared to Windows). Using Windows XP PRO with dedicated 2GB is smooth (except the NVidia card) at the same time I use Ubuntu.

I installed also third harddisk with a fulltime OpenSolaris, but I use USB harddisks for storage and OpenSolaris wont mount them (at the moment).

The only thing missing: JavaFX ! I will have a look at the receipe to do it (link) or just wait for the official release (whenever that gonna happen..?).