Feeds:
Posts
Comments

Minor enhancement: I finally added an install script for Linux users, and support the saving of settings in ~/.lemma, so you can finally install it into /usr or /usr/local. And along with that, a simple Debian package. I use checkinstall to generate it. I can’t seem to specify Python as a pre-requisite using checkinstall, but the package installs and removes just fine. Go get it now.

Got myself an Asus eeePC 1000HE yesterday. It’s a 10-inch Atom N280-powered “netbook”. I chose this one over other netbooks mainly because of the better keyboard (I tried but can’t type properly on the others) and the longer battery life (claims to run for 7.5-9 hours). The keys are large and flat (aka MacBook style) compared to the smaller bevelled keys on most other netbooks.

First thing I did was to downsize the Windows partition and install Ubuntu 8.10 via USB. It took me a while to figure out how to boot from the USB drive: plug into the left port, then turn on the machine, quickly press F2 to get into BIOS, and set the boot order for hard disk. That’s sooo intuitive… Anyway, the partitioning and installation went smoothly, and after that I could still boot into Windows without it realising it has been packed into a smaller room.

The Wifi, touchpad and soundcard worked out-of-the-box. Ubuntu can’t seem to detect the special Fn function keys though, and mistook the “external monitor” toggle for “increase volume”. I mapped them to the Windows key which is not used anyway, so no worries. Not sure what happened to the external monitor toggle though. Frankly, despite having used Ubuntu for a number of years now, I still have yet to try attaching an external monitor. 🙂

The touchpad is actually an Elantech, not a Synaptics. It has multi-touch capabilities, but it’s a little erratic (under Windows too). I also missed edge scrolling – the two-finger scroll is novel but I personally don’t find it very practical. I’ll have to experiment to see if they can be worked around.

Performance-wise, there’s not much to expect – it’s an Atom after all. It does seem to perform a little better than my venerable Pentium M laptop.

So far, other than the weird USB boot setting in the BIOS, I think I don’t really have anything to complain about.

LeMMA 0.7 is out

One year after my last LeMMA release, here’s version 0.7. It’s a little embarrassing actually, because the last version contained some stupid bugs, especially on the Windows platform, and it was out there for one full year. So version 0.7 is largely a bug fix and “bulletproofing” (I added debug mode and codes for error handling) release. I did squeeze in some minor enhancements though.

Lately I got a couple of emails from folks who got the impression that LeMMA can open any MMA file, in particular the ones that are bundled with MMA. Sorry to disappoint, but that’s not what LeMMA is. LeMMA is meant to just provide an easy way to generate chord progressions. I’m also not certain that it is feasible, or even possible, to create a full-fledged GUI interface to MMA.

Anyway, I hope this release works for all of you, and thanks for the interest!

These are my notes on setting up a minimal Ubuntu server in VirtualBox. The host is Windows Vista. I work in a mostly Java shop, so the focus here is on setting up a typical Apache/Tomcat/MySQL web stack with as small a footprint as I can, for development/testing purposes.

Initial setup:

  • If you need to use port forwarding feature, get VirtualBox 2.1.2 (latest version as of time of writing). This feature is broken in 2.1.0.
  • Download the minimal Ubuntu iso, install as normal. Make sure you have a working Internet connection, as this downloads the packages from the Internet. The minimal install will take up about 1Gb. Perl and Python are already included as part of the minimal install.
  • Try pinging out from the server to test VirtualBox NAT is working.
  • If network has problems, check /etc/udev/rules.d/70-persistent-net.rules to see which MAC address got mapped to eth0. you need to do this if you regenerate a new MAC address in VirtualBox.
  • Set the correct timezone: dpkg-reconfigure tzdata

Install the following packages (note that you can combine them all into a single apt-get line):

  • Sun JDK:  sudo apt-get install sun-java6-jdk
  • Apache 2: sudo apache2
  • MySQL: sudo apt-get mysql
  • Postfix (for sending emails): sudo apt-get postfix
  • Subversion: sudo apt-get svn
  • SSH: sudo apt-get ssh

The following are installed manually, because Ubuntu’s packages include gcj dependencies (which takes up about 20 Mb), but we don’t need/want that because we are using Sun’s Java.

Install optional packages, for convenience:

  • Zip: sudo apt-get zip
  • Vim: sudo apt-get vim (vim-tiny is installed by minimal but has no syntax highlighting)

Let’s set up the port forwarding for the VM first before continuing. This will allow you to access apache and SSH. Do this when the VM is shut down, replace “UbuDev” with the name of your VM.

cd "\Program Files\Sun\xVM VirtualBox"
VBoxManage setextradata UbuDev "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/HostPort" 8888
VBoxManage setextradata UbuDev "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/GuestPort" 80
VBoxManage setextradata UbuDev "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/Protocol" TCP
VBoxManage setextradata UbuDev "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222
VBoxManage setextradata UbuDev "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
VBoxManage setextradata UbuDev "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP
VBoxManage setextradata UbuDev "VBoxInternal/Devices/pcnet/0/LUN#0/Config/tomcat/HostPort" 8880
VBoxManage setextradata UbuDev "VBoxInternal/Devices/pcnet/0/LUN#0/Config/tomcat/GuestPort" 8080
VBoxManage setextradata UbuDev "VBoxInternal/Devices/pcnet/0/LUN#0/Config/tomcat/Protocol" TCP
VBoxManage setextradata UbuDev "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssl/HostPort" 8443
VBoxManage setextradata UbuDev "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssl/GuestPort" 443
VBoxManage setextradata UbuDev "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssl/Protocol" TCP
  • Use PuTTY to check that you can connect to the guest SSH server through port 2222 on the host.
  • For Apache, check that you can access the default “It works!” page at port 8888.
  • Check Tomcat at port 8880 (Tomcat by default will be at guest port 8080).

Set up your site on Apache:

  • Decide where to put your own document root, logs, ssl certs directories. I won’t go into details. Please read the Apache docs and examples.
  • Set up a site and enable it:
    • Use “sudo a2ensite” and “a2dissite” to manage sites
  • Enable mod_ssl (use “sudo a2enmod” and “a2dismod”). I won’t go into details of how to set up an SSL-enabled site. Please read the Apache docs and examples.
  • Generate and configure new self-signed cert:
    • sudo /usr/sbin/make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
  • Note: If you try to use HTTPS on port 80 (host port 8888), VB proxy appears to return a “record too long” error. Check which port you are trying to access first before wasting time trying to Google for a solution!

Set up Tomcat:

  • Set up logrotate for Tomcat (because we installed this manually). This is quite standard, you can get many examples from the Web.
  • logrotate is run daily by default, see /etc/cron.daily

We’ll use mod_proxy_ajp (comes with Apache 2 out of the box) to connect Apache to Tomcat:

  • Enable mod_proxy_ajp
  • Secure the proxy first (from Apache docs):
      <Proxy *>
        Order Deny,Allow
        Deny from all
        Allow from [your allowed IP addresses]      
      </Proxy>
  • Use ProxyPass and ProxyPassReverse to setup the connections to port 8009 (default ajp port)
  • For the configured URLs, try to access them via port 8888 on the host.
  • If ok, you can disable 8080 and 8443 HTTP handlers in tomcat config, so everything will pass through Apache.

Update: This problem has been fixed in Virtual 2.1.2.

This must be wrong season to try out VirtualBox. Previously I had the problem with shared folders in a WinXP guest, then I decided to set up a minimal Ubuntu guest on my Vista machine at work, to act as a development/test server, but I ran into another problem – port forwarding is broken in VirtualBox 2.1.0!

It took me the better part of the day to figure that one out. I eventually switched to Virtual 2.0.6 which works. Sure I can use the host network interface, but I’m using dhcp and I don’t want to keep looking up my latest dynamic IP…

Yep, it’s definitely not yet ready for prime time, but hey, it’s released under a ‘Personal Use and Evaluation’ license, so I guess I shouldn’t complain.

I use the audacious player with AMidi plugin for playing midi files (and most audio files). There are two choices of backends – Timidity and Fluidsynth. I used to use the Timidity backend but found that lately the playback keeps skipping with my soundfonts, so I switched to the Fluidsynth backend and it’s much better now.

I’ve been a happy Ubuntu user for a couple of years now. Just for fun I was trying out VirtualBox to see how well WinXP will run in a VM on my old Dell laptop, when I encountered a nasty problem with the VM hanging and hitting 100% CPU when I tried to access a shared folder. Then I found out there was a bug with the Guest Additions driver for WinXP. You can find details and instructions here. Seems to work well. And I found out that audio performance sucks in a VM, which was one of the reasons why I wanted to try this in the first place – I still occasionally run a few audio-related Windows apps under Wine but imperfectly.