Holger's Blog A good shell is the best user interface.

19Jan/120

“bestfit” is back

I recently recycled an old script I wrote several years ago to automatically generate an ISO image from selected subfolders. The idea is, that these folders are written to an archive CD/DVD if the total capacity passes the media's limit.
The script callsĀ bestfit (release 0.2.0 by Oskar Liljeblad) and that tool was no longer installed on my current workstation. But now it's back...

Please visit http://nerdbynature.de/bits/bestfit/ for a 32 Bit Debian package or an archive of the sources (tar.gz).
I used the sources to build an AMD64 package just by a call to

fakeroot debian/rules binary

within the source folder.

Usage of bestfit was simple in my case:

bestfit --quiet --invert --space="$((700*1024*1024/2048))" candidates/*

That will give me a list of folders I have to move away from the parent folder candidates, so the remaining folders will fit perfectly on the 700MBs of a Data CD.

18Dec/110

Java 7 for Ubuntu

Ubuntu announced to discontinue packaging of Sun/Oracle's Java for Ubuntu, because Oracle changed the licensing.

Please be careful with upgrades on these packages, since it may drop your Java installation on the system, not only the browser plug-in.

So I followed these steps to establish Java 7 support on my Ubuntu 10.04 LTS:

  • Downloadjdk-7*-linux-*.tar.gz from Oracle
  • Get privileges: sudo bash
  • Extract the archive: tar -C /usr/lib/jvm -zxf jdk-7*-linux-*.tar.gz
  • Link to generic name java-7-oracle: cd /usr/lib/jvm && ln -snf jdk1.7* java-7-oracle
  • Register Java commands using update-alternatives: register-alternatives.sh
    • If you have a 32Bit-Linux, changed the downloaded .sh-script appropriately, i.e. replace amd64 by i386:
      sed -i -e 's/amd64/i386/g' register-alternatives.sh
  • Prepare /usr/lib/jvm/.java-7-oracle.jinfo.
    • Mind the name, it begins with a dot.
    • If you have a 32Bit-Linux, change the downloaded .jinfo-file appropriately, i.e. replace amd64 by i386:
      sed -i -e 's/amd64/i386/g' /usr/lib/jvm/.java-7-oracle.jinfo
  • Switch Java release: update-java-alternatives --set java-7-oracle

Check the Installation

  • On the command line you can check the Java version by simply calling:
    java -version
  • In the browser, just follow testjava.jsp.
  • In a Firefox you can also see a related Java entry in the about:plugins.

Updates

Since the default Java release is no longer bound to the Ubuntu packaging, you have to take care of updates on your own.

Choose some channel (e.g. heise security, Oracle Security Alerts) to at least watch out for security-related updates.

An update itself should be fairly easy, repeat the first steps of the installation:

  • Downloadjdk-7*-linux-*.tar.gz from Oracle
  • Get privileges: sudo bash
  • Extract the archive:
    tar -C /usr/lib/jvm -zxf $(ls -t jdk-7*-linux-x64.tar.gz | head -1)
  • Link to generic name java-7-oracle:
    cd /usr/lib/jvm && ln -snf $(ls -td jdk1.7* | head -1) java-7-oracle
Tagged as: , No Comments
17Aug/110

Netbook vs. iBook G4

It's done, the iBook G4 is now replaced by an Asus Netbook. Since I currently tend to use Ubuntu, this was a logical step:

  • Battery lifetime is decreasing for the iBook, even though more than 1h is not bad after all those years. The free replacement of the battery a few years ago was really flawless and a nice upgrade.
  • Ubuntu/PowerPC on iBook G4 is working, but on a Atom-based netbook it's even better.
  • Sometimes you just need Flash.
  • The Atom is a lot faster than G4 (800 MHz).

Still the iBook G4 was a good decision back in 2003/2004. Using Ubuntu it's even working with my UMTS stick by Huawai.