Thursday, May 26, 2011

Fix: Flash Builder 4 / VS2010: An internal error occured during:"Launching Main" java.lang.NullPointerException

After setting up Visual Studio 2010 and Flash Builder 4 on my new development machine, I found that I could not start my flex projects anymore. A click on the debug or run icon resulted in the following error message:


'Launching Main' has encountered a problem.An internal error occurred during "Launching Main".java.lang.NullPointerException



It turned out, that Flash Builder could not find the ASP.NET development server which I use to debug my flex-projects:

Flash Builder searches for C:\Windows\Microsoft.NET\Framework\v2.0.50727\WebDev.WebServer.exe, so I copied the files WebDev.WebServer20.exe and WebDev.WebServer20.exe.config from C:\Program Files (x86)\Common Files\microsoft shared\DevServer\10.0\ to C:\Windows\Microsoft.NET\Framework\v2.0.50727\ and renamed them to WebDev.WebServer.exe and WebDev.WebServer.exe.config.

Now everything runs fine again

Saturday, May 14, 2011

Very Cheap (10 EUR) LCD Monitor for the Stora

As I've already written on the OpenStora forum some time ago, I have followed bastel's guide to add a very cheap lcd pictureframe as status display using lcd4linux to my stora. I plan to eventually integrate this in the front panel of the case and connect it to usb internally. The display is currently available for 10 € at PEARL

Tuesday, April 26, 2011

Ubuntu 11.04 - VMware-Player dies when opening a virtual machine: FIX

Since the update from April 21st, VMWare Player dies every time a virtual machine is started. the log shows:

(vmware-unity-helper:3090): GLib-WARNING **: /build/buildd/glib2.0-2.28.6/./glib/goption.c:2132: ignoring no-arg, optional-arg or filename flags (8) on option of type 0
(vmware-unity-helper:3090): GLib-WARNING **: /build/buildd/glib2.0-2.28.6/./glib/goption.c:2132: ignoring no-arg, optional-arg or filename flags (8) on option of type 0
(vmware-unity-helper:3142): GLib-WARNING **: /build/buildd/glib2.0-2.28.6/./glib/goption.c:2132: ignoring no-arg, optional-arg or filename flags (8) on option of type 0
(vmware-unity-helper:3142): GLib-WARNING **: /build/buildd/glib2.0-2.28.6/./glib/goption.c:2132: ignoring no-arg, optional-arg or filename flags (8) on option of type 0

To fix this, you have to tell VMWare Player to use its own glib: Insert the line
export LD_PRELOAD=/usr/lib/vmware/lib/libglib-2.0.so.0/libglib-2.0.so.0
into the file /usr/bin/vmplayer - right after the copyright notice. The Beginning of the file should now look as follows:
#!/usr/bin/env bash
#
# Copyright 2005-2008 VMware, Inc.  All rights reserved.
#
# Wrapper for the real 'vmplayer' binary. Ensure that the
# binary will find all the shared libraries it needs. If a shared
# library is not available from any of the standard system-wide
# locations, we provide it from the location where the VMware software
# is installed.
#
export LD_PRELOAD=/usr/lib/vmware/lib/libglib-2.0.so.0/libglib-2.0.so.0
set -e

Save the file and restart VMWare player - you should be back in business.


Update: BobS commented on this issue - scroll down for his comment and linked to a thread. I personally haven't been able to try this out (Natty just causes too many problems on my maschine), but will do so shortly. Thanks BobS!

Saturday, April 16, 2011

Controlling the fan of the netgear stora

I recently bought a netgear stora. I like the small form-factor of the device and also the fact that it can be hacked easily and you can put a plain vanilla debian on it. While the fan is not nearly as noisy as the fan of the dns-230 which I owned previously, I still got annoyed. I figured that the two hdds (WD EARS 2TB) don't produce much heat anyway so I decided turn off the fan. This has worked for me for more than two weeks now, and the stora never gets much warmer than room temperature (even under heavy load).

HOWEVER, I TAKE NO RESPONSIBILITY WHATSOEVER IF YOUR HARDDISKS GET FRIED OR YOUR HOUSE BURNS DOWN IN THE PROCESS

Here is, how you can control the fan (you must have debian installed on the stora):
  1. log in as root
  2. install ic2-tools:
    root@pico:~# apt-get install i2c-tools
  3. create two scripts to start and stop the fan:
    echo "i2cset -y 0 0x1b 0x04 0x0b" >/usr/bin/fan_off
  4. echo "i2cset -y 0 0x1b 0x04 0x0a" >/usr/bin/fan_on
    chmod +x /usr/bin/fan_off
  5. chmod +x /usr/bin/fan_on
  6. you can now switch on/off the fan using the commando sudo fan_on / sudo fan_off
  7. enjoy the silence :-)

Friday, April 15, 2011

Accessing VMWare Server 2 with native remote console

  1. Install the firefox plugin via the "console" tab in the webaccess
  2. go to the plugin directory, e.g. /home/chris/.mozilla/firefox/3oj121wq1.default/extensions/VMwareVMRC@vmware.com/plugins
  3. you can run  ./vmware-vmrc -h from here to get the connection dialog that lets you connect to your vmware server
  4. in the field host-name, type in your server-name or ip-address followed by :8333, e.g. server.example.com:8333
  5. Enter your credentials and connect - you'll get a list of the registered vms which you can manage from here
vmware remote console

Accessing VMWare Server 2 with Firefox > 3.5

If you get timeouts while trying to access the webinterface of Vmware Server with Firefox, you might have to enable ssl2 authentication:

in a new browser tab, type about:config in the address bar. Now enter ssl2 in the filter box. change the entry "security.enable_ssl2" to "true".

You should now be able to access the webinterface again.

Friday, March 11, 2011

Preventing OOM killer from terminating your vmware session

The linux-kernel comes with a mechanism (OOM-Killer) that will terminate processes in order to free up memory when it runs out of memory. After upgrading my Ubuntu 10.10 setup to a 2.6.36 kernel, my vmware session repeatedly got terminated, despite plenty of free memory and swap.
In order to prevent this from happening I figured out that you can change the the value of the /proc/[id_of_vmware_vmx_process]/oom_adj to -17.  I have made a small shell script that checks whether the vmware process is running and if this is the case, adjust the oom_adj value:

contents of /usr/bin/vmware-protect-from-oom.sh:

#!/bin/bash
pid=$(pidof vmware-vmx)
if [ $pid > 0 ]; then
sudo echo "-17" > /proc/$pid/oom_adj
fi


In order to run this automatically, add the following line to the end of your root user's cronjob list:  sudo crontab -e):

* * * * * /usr/bin/vmware-protect-from-oom.sh