Friday, July 15, 2011

Gnome Panel Slow to Appear

I have a single gnome panel at the top of my screen that holds all the applets I need.  It started taking ages to appear (tens of seconds) after logging in.  I tried deleting various applets in the hope that one of them was responsible for the issue but nothing worked.

Some Googling lead me to Bug #593226 in Launchpad.  I opened the Passwords & Encryption tool (in Applications > Accessories) and found that my passwords included two for Desktop Couch.  I deleted both - problem solved.

Tuesday, June 28, 2011

How to Delete an Invisible Panel Applet

Something went wrong with my Weather Report applet.  It had disappeared from its panel but was still present as it kept displaying a warning message about its inability to connect with the weather server.

I added a second Weather Report applet, configured it and it worked properly.  So, how to delete the faulty one?  I couldn't right-click and remove it as it wasn't visible.

The panel's applets are represented in the file system in

~/.gconf/apps/panel/applets 

and are (usefully) named applet_0, applet_1, ... 

I could have opened each one's XML configuration file and examined it to locate the Weather Report applet but a quicker alternative was to run gconf-editor and examine each applet's configuration directly.

This also gave me the opportunity to compare the configurations of the working and broken Weather Report applets but other than their locations in the panel their configurations were identical.

It turned out that applet_13 was the the malfunctioning one, so I deleted it from ~/.gconf/app/panel/applets.

Wednesday, August 11, 2010

InstallShield Wizard Fails With OpenJDK

I tried installing software packaged using InstallShield but each time I ran the installer it would fail with the message:

could not load wizard specified in /wizard.inf (104)

The problem turned out to be that after recently installing Lucid Lynx the JRE is OpenJDK, even though I had installed the Sun Java packages (sun-java6-*) I hadn't updated my Java alternatives. All that was needed was to switch to the Sun JRE, thus:

sudo update-java-alternatives -v -s java-6-sun

In fact, I subsequently removed all OpenJDK-related packages.

Thursday, August 05, 2010

External Monitor as Primary/Default Display

I recently installed Lucid Lynx on my Dell Inspiron 9400. One niggling annoyance was that the Dell's LCD screen was the primary display, whereas I wanted my external monitor (BenQ T2200D via DVI) to be the primary display.

Ultimately, the solution was simple:
  1. run the NVidia X Server Settings tool (gksudo nvidia-settings)
  2. in the X Server Display Configuration I made sure the Dell's display (Seiko) was disabled
  3. when saving to the X Configuration file, i.e. /etc/X11/xorg.conf, I chose not to merge with existing file
  4. restart X

Installing Lucid Lynx 10.04 on Dell Inspiron 9400

After successfully installing Lucid on a Compaq Evo 510s and a Fujitsu-Siemens Lifebook T4020 I decided to get serious and upgrade my workhorse Dell Inspiron 9400 from Hardy to Lucid.

I decided to do a clean install rather than an upgrade as I've generally had better success doing so in the past, and the result is usually cleaner as I only reinstall packages that I need rather than upgrading packages that I might no longer use. The downside is that it can take considerably longer.

The installation went smoothly and I have only a couple of unresolved problems:
  1. I have an external monitor (BenQ T2200HD) connected to the Dell via DVI. Whenever X-windows (re-)starts (e.g. boot, logout) the display switches back to the Dell's LCD display, so I have to manually switch to the BenQ (Fn+F8 twice) before logging in. Switching displays after logging in results in the LCD's display resolution being applied to the Benq, which is annoying.
  2. If I switch users and then logout of the second user account the display goes irretrievably blank/black rather than displaying the first user's screen-saver (locked). This appears to be a known bug.

Sunday, May 30, 2010

Lucid Lynx cifs support needs smbfs package

After a recent upgrade to Lucid Lynx I attempted to mount a network drive using mount -t cifs ... It failed each time with the following in dmesg:

CIFS VFS: cifs_mount failed w/return code = -22

Ultimately, the solution was to install the smbfs package.

Saturday, May 22, 2010

No XDMCP in Lucid Greeter

I recently upgraded a Compaq Evo 510s from Hardy to Lucid. The Evo is essentially a thin-client via XDMCP. However, after upgrading I found that the gdm greeter in Lucid no longer offers an option to remotely connect to another X-server.

This appears to be a bone of contention for many users, me included. Several options exist to work-around this problem. Ultimately, I chose to install kdm, whose greeter does include an option to use XDMCP to connect to a remote X-server.

X unstable running Lucid on a Compaq Evo 510s

I recently upgraded a Compaq Evo 510s from Hardy to Lucid. The first problem I encountered was instability running X-windows. The display would go black with a few white stripes.

It seems I wasn't alone - other Lucid users with Intel's integrated graphics chip were reporting similar problems. Several solutions have been proposed. I went with the simplest - switching to the VESA video driver. This solves the problem at the expense of losing hardware accelerated graphics. However, as the Evo is essentially a thin-client this wasn't a problem.

Installing Lucid Lynx 10.04 on a Compaq Evo 510s

I have a policy of only installing Ubuntu's LTS releases, so with the release of Lucid Lynx it was time to migrate from Hardy. I started with an aging Compaq Evo 510s. I used the upgrade path via the update-manager.

Things went smoothly aside from a couple of warnings regarding the flashplugin-nonfree package. I dismissed these, however, at the completion of the upgrade the warning became an error and the upgrade process exited before clean-up and completion.

Upon rebooting the Evo appeared to have Lucid installed but it was very unstable (a separate issue). Fortunately, the Evo is little more than a (XDMCP) thin-client. So, I burned a Lucid ISO and performed a fresh installation. This time the installation completed successfully.

Wednesday, March 18, 2009

Java Plug-In Next Generation with Firefox 3.0

I wanted to use Sun's Java Plug-In "Next Generation" (NG) with Firefox 3.0. However, at the time of writing the latest packages available in Ubuntu's repositories are sun-java6-*, which correspond to Java 6.0 update 7. This contains the "classic" plug-in; the NG plug-in was introduced in Java 6.0 update 10.

So, I downloaded the latest Sun JDK - v6.0 update 12 - and installed it in /opt/java. Then I performed the following steps:
  1. Create a symbolic link from /usr/lib/jvm to the installed JDK
    cd /usr/lib/jvm
    sudo ln -s /opt/java/jdk1.6.0_12 java-6u12-sun

  2. Created /usr/lib/jvm/.java-6u12-sun.jinfo. I simply copied .java-6-sun and editted (see below).
    Note, that in order to use the NG rather than "classic" plug-in, I specified /usr/lib/jvm/java-6u12-sun/jre/lib/i386/libnpjp2.so for the *-javaplugin.so alternatives. I also needed to add an entry for firefox-3.0-javaplugin.so, which is missing from .java-6-sun.jinfo.
  3. Installed alternatives for /usr/lib/jvm/java-6u12-sun. For each line of .java-6u12-sun.jinfo I ran update-alternatives --install, e.g.
    sudo update-alternatives --install \
    /usr/bin/firefox-3.0-javaplugin.so \
    firefox-3.0-javaplugin.so \
    /usr/lib/jvm/java-6u12-sun/jre/lib/i386/libnpjp2.so \
    64
    
    Doing this manually is a bit tedious, so I created a Perl script to do - see below.

  4. Selected the java-6u12-sun jav alternative, i.e.
    sudo update-java-alternatives -s java-6u12-sun
The /usr/lib/.java-6u12-sun.jinfo I created in step 2.
name=java-6-sun-1.6.0.12
alias=java-6u12-sun
priority=64
section=non-free

jre ControlPanel /usr/lib/jvm/java-6u12-sun/jre/bin/ControlPanel
jre java /usr/lib/jvm/java-6u12-sun/jre/bin/java
jre java_vm /usr/lib/jvm/java-6u12-sun/jre/bin/java_vm
jre javaws /usr/lib/jvm/java-6u12-sun/jre/bin/javaws
jre jcontrol /usr/lib/jvm/java-6u12-sun/jre/bin/jcontrol
jre keytool /usr/lib/jvm/java-6u12-sun/jre/bin/keytool
jre pack200 /usr/lib/jvm/java-6u12-sun/jre/bin/pack200
jre policytool /usr/lib/jvm/java-6u12-sun/jre/bin/policytool
jre rmid /usr/lib/jvm/java-6u12-sun/jre/bin/rmid
jre rmiregistry /usr/lib/jvm/java-6u12-sun/jre/bin/rmiregistry
jre unpack200 /usr/lib/jvm/java-6u12-sun/jre/bin/unpack200
jre orbd /usr/lib/jvm/java-6u12-sun/jre/bin/orbd
jre servertool /usr/lib/jvm/java-6u12-sun/jre/bin/servertool
jre tnameserv /usr/lib/jvm/java-6u12-sun/jre/bin/tnameserv
jre jexec /usr/lib/jvm/java-6u12-sun/jre/lib/jexec
jdk HtmlConverter /usr/lib/jvm/java-6u12-sun/bin/HtmlConverter
jdk appletviewer /usr/lib/jvm/java-6u12-sun/bin/appletviewer
jdk apt /usr/lib/jvm/java-6u12-sun/bin/apt
jdk extcheck /usr/lib/jvm/java-6u12-sun/bin/extcheck
jdk idlj /usr/lib/jvm/java-6u12-sun/bin/idlj
jdk jar /usr/lib/jvm/java-6u12-sun/bin/jar
jdk jarsigner /usr/lib/jvm/java-6u12-sun/bin/jarsigner
jdk java-rmi.cgi /usr/lib/jvm/java-6u12-sun/bin/java-rmi.cgi
jdk javac /usr/lib/jvm/java-6u12-sun/bin/javac
jdk javadoc /usr/lib/jvm/java-6u12-sun/bin/javadoc
jdk javah /usr/lib/jvm/java-6u12-sun/bin/javah
jdk javap /usr/lib/jvm/java-6u12-sun/bin/javap
jdk jconsole /usr/lib/jvm/java-6u12-sun/bin/jconsole
jdk jdb /usr/lib/jvm/java-6u12-sun/bin/jdb
jdk jhat /usr/lib/jvm/java-6u12-sun/bin/jhat
jdk jinfo /usr/lib/jvm/java-6u12-sun/bin/jinfo
jdk jmap /usr/lib/jvm/java-6u12-sun/bin/jmap
jdk jps /usr/lib/jvm/java-6u12-sun/bin/jps
jdk jrunscript /usr/lib/jvm/java-6u12-sun/bin/jrunscript
jdk jsadebugd /usr/lib/jvm/java-6u12-sun/bin/jsadebugd
jdk jstack /usr/lib/jvm/java-6u12-sun/bin/jstack
jdk jstat /usr/lib/jvm/java-6u12-sun/bin/jstat
jdk jstatd /usr/lib/jvm/java-6u12-sun/bin/jstatd
jdk jvisualvm /usr/lib/jvm/java-6u12-sun/bin/jvisualvm
jdk native2ascii /usr/lib/jvm/java-6u12-sun/bin/native2ascii
jdk rmic /usr/lib/jvm/java-6u12-sun/bin/rmic
jdk schemagen /usr/lib/jvm/java-6u12-sun/bin/schemagen
jdk serialver /usr/lib/jvm/java-6u12-sun/bin/serialver
jdk wsgen /usr/lib/jvm/java-6u12-sun/bin/wsgen
jdk wsimport /usr/lib/jvm/java-6u12-sun/bin/wsimport
jdk xjc /usr/lib/jvm/java-6u12-sun/bin/xjc
plugin xulrunner-1.9-javaplugin.so /usr/lib/jvm/java-6u12-sun/jre/lib/i386/libnpjp2.so
plugin firefox-javaplugin.so /usr/lib/jvm/java-6u12-sun/jre/lib/i386/libnpjp2.so
plugin firefox-3.0-javaplugin.so /usr/lib/jvm/java-6u12-sun/jre/lib/i386/libnpjp2.so
plugin iceape-javaplugin.so /usr/lib/jvm/java-6u12-sun/jre/lib/i386/libnpjp2.so
plugin iceweasel-javaplugin.so /usr/lib/jvm/java-6u12-sun/jre/lib/i386/libnpjp2.so
plugin mozilla-javaplugin.so /usr/lib/jvm/java-6u12-sun/jre/lib/i386/libnpjp2.so
plugin midbrowser-javaplugin.so /usr/lib/jvm/java-6u12-sun/jre/lib/i386/libnpjp2.so
plugin xulrunner-javaplugin.so /usr/lib/jvm/java-6u12-sun/jre/lib/i386/libnpjp2.so


The perl-script used in step 3. above. Copy-and-paste into /tmp/java6u12sun.pl then:
cd /tmp
chmod +x java6u12sun.pl
sudo ./java6u12sun.pl

-----
#!/usr/bin/perl

use strict;

# Read .jinfo file.
my @lines = ();
open(JINFO, '/usr/lib/jvm/.java-6u12-sun.jinfo')
or die "Can't open .jinfo file.";
@lines = ;
close(JINFO);

# Install alternatives.
for (@lines)
{
if ($_=~ m+/usr/lib/jvm/java-6u12-sun+)
{
my @split = split ' ', $_;
system "update-alternatives --install /usr/bin/@split[1]  @split[1]  @split[2] 64";
}
}

1;

Wednesday, October 15, 2008

Sun Java 6.0 update 7 resets alternatives

For some reason the recent updates for the sun-java6-* packages to v6-07-3 reset my Java alternatives to java-6-openjdk. Fixed with

sudo update-java-alternatives -s java-6-sun

Monday, July 21, 2008

SOLVED: Firefox 3 Sun Java Plug-In

Having recently switched from Firefox 2 to Firefox 3, I found that the Java Plug-In was no longer working. Looking at the list of browser plugins being used by Firefox 3 (enter "about:plugins" in the browser's navigation field) I discovered that the OpenJDK GCJ was being used rather than Sun's JRE v6.0 plugin (from the sun-java6-* packages).

It took some time to work out why this was the case - /usr/lib/firefox/plugins contained a symbolic link to /etc/alternatives/mozilla-firefox-javaplugin.so, which in turn was set to Sun's JRE v6.0 plug-in.

The only Java Plug-In alternative set to OpenJDK's was that of xulrunner-1.9. So, I changed it's setting to Sun's JRE v.6.0 of the plugin:

sudo update-alternatives --config xulrunner-1.9-javaplugin.so

and upon restarting Firefox 3 it used Sun's Java Plug-In.

Very weird, and possibly related to this bug?

SOLVED: Firefox2 removal

After upgrading from Dapper Drake to Hardy Heron I decided to keep using Firefox 2 rather than Firefox 3, even though the latter had been installed - no problem.

However, a few annoying problems with Firefox 2 prompted me to make the switch. So, I ran

sudo update-alternatives --config x-www-browser

to set Firefox 3 to the default web-browser and uninstalled the firefox-2 package. However, clicking on the Firefox icons continued to run Firefox 2.

After digging around I realised that I still had a local copy of the Mozilla Firefox 2 build due to having used ubuntuzilla. To fix this I did the following:
  1. uninstalled the local copy of Firefox
  2. uninstalled ubuntuzilla
  3. reset System > Preferences > Preferred Applications > Web Browser to Firefox

Friday, July 18, 2008

SOLVED: vpnc and resolvconf

I've been using vpnc to connect to a Cisco 3000 VPN Concentrator. Since upgrading from Dapper Drake to Hardy Heron I noticed that after about 20 minutes domain name resolution would fail even though the VPN was still up.

It turned out that /etc/resolv.conf we being overwritten by the DHCP client when the DHCP lease expired (and needed renewal).

The solution was to install the resolvconf package, which manages /etc/resolv.conf.

Friday, June 06, 2008

SOLVED: Thunderbird Lightning extension upgrade

After recently upgrading from Dapper Drake to Hardy Heron I noticed that the Thunderbird Lightning calendar add-on wasn't working. I could see that it was installed but the calendar toolbar was not available.

The upgrade had installed Thunderbird 2.0.0.14 and I had installed the latest available version of the extension (0.8) directly from Mozilla.

Ultimately, I discovered that several files (in $HOME/.mozilla-thunderbird) related to the Lightning extension were owned by root. The fix was simply change ownership to me.

cd $HOME/.mozilla-thunderbird/my_profile_dir
sudo chown -R my_user_id:my_group_id *

Friday, May 16, 2008

Compiz effects causing problems for Java Swing applications

As a Java developer I use IntelliJ's IDEA Java IDE, which is itself a Java Swing application. Unfortunately, after upgrading to Hardy Heron I noticed that some IDEA dialogs weren't being displayed as empty windows. This turns out to be a known bug with Java Swing and Compiz.

I tried two workarounds:
  1. Setting the environment variable AWT_TOOLKIT=MToolkit. This solved the problem with empty Swing dialog windows but introduced a new problem with windows losing keyboard focus.
  2. I also installed Sun's JDK6.0 update 10 beta (build24) and used this to run IntelliJ IDEA. Compiz now works correctly with IntelliJ IDEA.

Tuesday, May 13, 2008

Rhythmbox segmentation faults

After recently upgrading from Dapper Drake to Hardy Heron I noticed that Rhythmbox was intermittently crashing (segmentation fault).

The problem appears to be a known bug.

Meanwhile there is a work-around which involves (re-)enabling the cover art plug-in. This worked for me.

Update 2008-06-06: unfortunately the problem persists. Let's hope the recent update (0.11.5) solves the problem.

Dapper Drake to Hardy Heron upgrade

I took the plunge and decided to upgrade from Dapper Drake to Hardy Heron. I was motivated by the fact that Hardy is a Long-Term Support (LTS) release and finding that fewer third-party software packages were being released in a format compatibly with Dapper.

I kicked off the upgrade with a simple:

sudo update-manager -d

and then clicking the "upgrade" button listed in the update manager. The upgrade notes suggest you can do this via gksu but I found I had to use sudo from a terminal command-line.

I ran the upgrade overnight so am not sure how long it actually took as there were user prompts waiting to be answered the next morning.

After upgrading I had only one major problem:
  • the Nvidia video driver wasn't working, which I fixed after a lot of hassle,
and a few minor problems:
  1. No sound from the Firefox Flash plugin if another audio application was running
  2. No NFS client
  3. Thunderbird Lightning extension not working (fix)
  4. Rhythmbox intermittently crashing (workaround)
  5. Java Swing applications, e.g. IntelliJ IDEA, now working with Compiz (workaround)
which were easily fixed.

Tuesday, June 26, 2007

Microphone Audio Capture Very Faint

After installing skype (via Synaptic) I found that audio captured via my microphone (plugged into the external jack) was almost inaudible on playback. Ultimately, I overcame this as follows:
  1. From the command-line run alsamixer
  2. Select the "Capture" channel and increase the recording levels, e.g. 75/75
  3. In skype select Tools > Options... > Sound Devices > Audio System to use: ALSA

Sunday, June 24, 2007

Flash audio problems in Firefox 2 - Solved

After upgrading to Firefox 2 I had problems with the Flash plugin no longer producing sound when another audio application was running - a problem I'd not previously had with Firefox 1.5.

The fix was fairly simple. I had libflashplayer.so in my .mozilla/plugins directory. This was being used by Firefox 2 for the application/x-shockwave-flash MIME type in preference to Shockwave Flash v9.0 (flashplugin-nonfree package).

After removing libflashplayer.so and flashplayer.xpt from my .mozilla/plugins directory audio playback works perfectly in the Flash plugin in Firefox 2.