Samstag, Juli 04, 2009

install sshd without X dependencies

The new debian installation is missing a ssh server. The obvious solution with apt-get listed a lot of X dependencies. As X is not installed and I want a more or less minimal system I installed it by hand.

download the dep package

the easiest way is to use apt-get with -d to only download the packages. apt-get -d install openssh-server

install the dep package

dpkg -i /var/cache/apt/archives/openssh-server...deb


This step required only the blacklists to be installed.

Freitag, Juli 03, 2009

update to lenny via net installation

I have an old PC which OS is totally out of date. As it has testing on it for quite some time and I also tried out a lot of programs, a new installation looks like the best thing to to.

To save me the trouble of downloading the boot CD and burning it, I will try the net installation. The installer will be started (booted into) from the HD (see debian installation manual).


  • download from initrd.gz and linux from debian nl (for squeeze) or any other debian server to /boot/new.

  • update menu.lst:
    title New Install
    root (hd0,0)
    kernel /boot/new/linux
    initrd /boot/new/initrd.gz

  • reboot

  • let the installer repartition/format the HD you booted from

  • continue like normal installation



After the first reboot the file system check failed with this error:
The file system size (according to the superblock) is 992013 blocks The physical size of the device is 736981 blocks Either the superblock or the partition table is likely to be corrupt
Running fsck by hand didn't help. Booting from a rescue CD and running resize2fs /dev/hda1 fixed the problem.

Sonntag, Juni 28, 2009

groovy tools very picky at GROOVY_HOME

Today my groovy script wouldn't start. It couldn't find org/apache/commons/cli/CommandLineParser. As I didn't use this class I tried groovy -version. This also produced:

java.lang.NoClassDefFoundError: org/apache/commons/cli/CommandLineParser
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getMethod0(Class.java:2670)
at java.lang.Class.getMethod(Class.java:1603)
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:99)
at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.CommandLineParser
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:402)
... 6 more

Next I checked if I had set GROOVY_HOME and JAVA_HOME. OK.

Asked the web and found a bug report with the same error message. The conclusion is that startGroovy fails to accesses some resources, if a constructed path from GROOVY_HOME, contains //.

As I had created my GROOVY_HOME with TAB completion, the path had a / at the end. Removing this one fixed the problem.

Samstag, Juni 27, 2009

mixing Java and Groovy in Eclipse

As a server back end for Greasemonkey calls I use com.sun.net.httpserver.HttpServer. The work is done inside an implementation of the com.sun.net.httpserver.HttpHandler interface. To write the HttpHandler in Java started to take more time as I was willing to spend. So I thought it is a good idea to try out Groovy.

Installing Groovy and the corresponding Eclipse plugin was no problem. Running the first test script was straight forward also. But compiling a Java and a Groovy class inside the same project didn't work.

Therefore I did a test by hand.

  • set JAVA_HOME and GROOVY_HOME

  • compile the Groovy class inside projects src directory:

    1. groovyc PlayHttpHandler.groovy

    2. javac AjaxHttpHandler.java

    3. javac AjaxHttpServer.java


  • start the server: java -cp /Volumes/Macintosh\ HD/Applications/groovy-1.6.3/embeddable/groovy-all-1.6.3.jar AjaxHttpServer


This worked. So try again in Eclipse.

First step was to clean the project. But it still doesn't work. All classes are build twice. In bin the Groovy class has an unresolved compile problem. To me it looks like the class was build with javac. In bin-groovy the Groovy class is OK. Unfortunately the Groovy class used during run time is the one from bin. Not sure how to fix this.

Donnerstag, Juni 25, 2009

Javascript speed of Firefox 3.5

Today I installed Firefox 3.5 RC. The first thing I did was to test the speed of the new Javascript engine. For this I used sunspider. On my machine Safari is still twice as fast as Firefox.

But as long as Safari has no security features like NoScript and CS Lite I will not use it.