Thursday, August 24, 2006

Sun JDK1.3.1

I needed to install Sun's Java SDK v1.3.1, so I downloaded and installed j2sdk-1_3_1_18-linux-i586. However, when attempting to run it the following error was produced.
$ /opt/jdk1.3.1_18/bin/java
/opt/jdk1.3.1_18/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
To workaround this I installed the GNU stdc++ library (libstdc++2.10-glibc2.2) using Synaptic. This creates the file /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so which I then symlinked to libstdc++-libc6.1-1.so.2 as follows:
$ cd /usr/lib
$ sudo ln -s libstdc++-3-libc6.2-2-2.10.0.so libstdc++-libc6.1-1.so.2

Friday, July 14, 2006

USB disconnect when downloading images from Canon PowerShot S50

I have been attempting to download photos from my Canon PowerShot S50. When I connect the camera it is correctly detected. However, when I attempt to download (a large number of) photos it fails after some time, and I see the following in the kernel ring buffer:

$ dmesg | tail
[17203180.356000] usb 2-1: USB disconnect, address 2
[17203648.852000] usb 2-1: new full speed USB device using uhci_hcd and address 3
[17203953.496000] usb 2-1: usbfs: USBDEVFS_CONTROL failed cmd gthumb rqt 64 rq 4 len 118 ret -71
[17203953.544000] usb 2-1: USB disconnect, address 3

vpnc drops connection after apparent inactivity

I have been successfully using vpnc to provide a VPN connectivity on Ubuntu Dapper Drake. However, it seemed to drop the connection more frequently than I was used to when using the Cisco client vpn-client.

This tended to coincide with periods of inactivity so I tried running a periodic ping

ping -i ip-host

and the problem appears to have been solved.

Monday, June 19, 2006

vpnc - Cisco VPN Client

I needed a client to access work's Cisco VPN client. Apparently, the official client from Cisco (version 4.8 or later) can be built to run on Dapper Drake. However, there is an open source alternative vpnc, for which there is an apt package.

I installed the vpnc package and it ran (sudo) without any problems. As an added bonus (unlike the official client) vpnc doesn't disable LAN traffic, is not a kernel module and doesn't require recompilation with each kernel upgrade.

Installing Sun's Java - Problem Solved

A recent problem I had installing Sun's Java5 package for Ubuntu turned out to be due to me having misconfigured Synaptic's repositories; I hadn't properly referenced the multiverse repository. Once I had corrected this as described in this guide, I was able to install the sun-java5 packages using Synaptic.

After installation I ran sudo update-alternatives --config java and selected /usr/lib/jvm/java-1.5.0-sun/jre/bin/java as the default java.

Friday, June 16, 2006

Monday, June 12, 2006

Installing Sun's Java

[ Update: problem solved ]

It appears that at one time Sun's Java 5 was available for installation via apt-get/Synaptic (sun-java5-* packages). This no longer appears to be the case and I suspect it's related to recent problems with the terms of Sun's Java license.

Therefore, to install the JRE/JDK one must resort to the standard download and installation process from Sun's web-site. For example, to install the Sun's Java runtime environment (JRE 5.0 Update 7) do the following:
  1. download the self-extracting bin file
  2. make executable
    chmod +x jre-1_5_0_07-linux-i586.bin
  3. run the executable (requires acceptance of the terms of the license)
    sudo ./jre-1_5_0_07-linux-i586.bin
  4. move the extracted file-tree to a suitable location
    sudo mv jre1.5.0_07/ /opt
  5. configure the browser plug-in, e.g. for Firefox:
    cd /usr/lib/firefox/plugins/
    sudo ln -s /opt/jre1.5.0_07/plugin/i386/ns7/libjavaplugin_oji.so
  6. set your JAVA_HOME environment variable and put it into your PATH variable e.g. in $HOME/.bash_profile add
    JAVA_HOME=/opt/jre1.5.0_07
    PATH="${PATH}:${JAVA_HOME}/bin"
  7. To run the Control Panel
    ControlPanel

Saturday, June 10, 2006

Perl CPAN depends on make and libc6-dev packages

I tried running a Perl script I'd written and found that while Perl is installed, a couple of modules, namely HTML::Entities and Text::CSV, are not.

I ran CPAN (using sudo cpan and automatic config) but it failed to build any modules because make is not installed and nor are many C header files. The fix is to make sure the make and libc6-dev packages are installed.

Friday, June 09, 2006

Real and Windows media playback

In addition to restricted video formats such as MPEG, playback of other non-free formats such as Real media and Windows media, also requires manual installation. This comprehensive guide provides details. In my case I installed totem-xine (and its firefox-plugin), RealPlayer 10 and the win32 codecs.

Wednesday, June 07, 2006

MPEG/MPG movie player

By default Ubuntu Dapper Drake supports various free video formats (ogg vorbis/theora) but not restricted formats such as MPEG. Therefore, following this informative guide, it is necessary to install the gstreamer0.10-plugins-ugly (and optionally mpg321 & vorbis-tools) package in order to view MPEGs in the Totem movie player. These packages are available from the "Universe" and "Multiverse" repositories.