Java or GTK applications crashing in KDE

In Kubuntu 13.10 Java applications seemed to crash at start up with the following error:

# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x00007f8f34cb9b3c, pid=25450, tid=140253340165888
# JRE version: Java(TM) SE Runtime Environment (7.0_45-b18) (build 1.7.0_45-b18)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.45-b08 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [] g_type_check_instance_is_a+0x3c

The same error occurred regardless of the Java Runtime Environment installed. Some GTK applications are also affected.

As mentioned (and in many other bugs) this is related to the KDE oxygen-gtk theme.

In System Settings -> Application Appearance -> GTK change GTK2 and GTK3 themes to something else than oxygen-gtk.


Thunderbird 16.0.2: Account exceeded command or bandwidth limits failure

Ubuntu 12.10 (Quantal Quetzal) ships with Mozilla Thunderbird 16.0.2. This version of Thunderbird suffers from a bug related to repeatedly downloading IMAP account content. In my case Gmail account returned the
The server returned the error: Account exceeded command or bandwidth limits.
error message daily, and the account remained blocked until the next day. Even when working, reading the Gmail account was painfully slow.

The remedy is to update to Thunderbird version 17.0, not yet included in Ubuntu 12.10, but available in the Ubuntu Mozilla Security Team PPA repository.

sudo add-apt-repository ppa:ubuntu-mozilla-security/ppa
sudo apt-get update
sudo apt-get install thunderbird

Fixing font sizes in MATLAB under Ubuntu

MATLAB runs in Ubuntu 12.04 without any major problems. However, one issue that I noticed was that changing the font size in figures has no effect; the text always appears in default (small) size in Matlab. The correct font size has an effect only in exported PDF and EPS files. The font spacing is incorrect though, as it seems to be based on the fonts that Matlab uses. As Matlab is often used (only?) for making figures, this can be a major problem.

As mentioned in this thread, the problem is related to Matlab not finding the correct fonts in Ubuntu OS. As a remedy install the following packages:

sudo apt-get install xfonts-100dpi xfonts-75dpi

and logout and login again. Matlab should now be able to show the plots in correct size. The fonts do not look pretty, though, which is probably related to broken anti-aliasing. Maybe there are other broken dependencies?
However, exported PDF and EPS files should now have the correct font spacing (e.g. the size of the legend box) and should be usable.

Script for downloading bibtex file using DOI

Digital Object Identifier (DOI) and bibtex files are common for anyone citing scientific articles. The DOI is used to uniquely identify any object, such as an electronic document, while bibtex is used to cite an article in Latex environment.

An article can be found on the internet via the address followed by the DOI, e.g. However, it takes a while to browse the publishers website, locate the appropriate bibtex file and save it to disk.

Here is a very handy Python script that fetches a bibtex file from NASA’s Astrophysics Data System using the article’s DOI.

It requires Python Beautiful Soup XML/HTML parser.
In Ubuntu-like linux distributions it can be installed easily:
sudo apt-get install python-beautifulsoup


>> 10.1016/j.ocemod.2004.08.002
author = {{Shchepetkin}, A.~F. and {McWilliams}, J.~C.},
title = "{The regional oceanic modeling system (ROMS): a split-explicit, free-surface, topography-following-coordinate oceanic model}",
journal = {Ocean Modelling},
year = 2005,
volume = 9,
pages = {347-404},
doi = {10.1016/j.ocemod.2004.08.002},
adsurl = {},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}

Fixing screen brightness keys in MacBook + Ubuntu 10.10

After upgrading to Ubuntu 10.10 natty, the keyboard backlight keys and screen brightness keys did not work in macbook pro.

Make sure that Mactel-support PPA repository in enabled. It is usually deactivated during the upgrade process.
Install nvidia-bl-dkms package:
sudo apt-get update 
sudo apt-get install nvidia-bl-dkms

Installing 32-bit MATLAB on 64-bit Linux (Ubuntu)

Currently 64-bit Linux distributions are stable and well established so there are virtually no problems in opting for a 64-bit system.
However, some MATLAB Linux versions, notably the student version, only exists in 32-bit and it is not so obvious to get it installed in 64-bit Linux environment.

Here’s how I got it done (MATLAB R2009a in Ubuntu 10.04 Lucid):
1) Install some 32-bit libraries:
sudo apt-get install ia32-libs lib32ncurses5
2) Mount the CD (e.g. open the content in a file manager)
3) Install MATLAB, force to use the 32-bit executable:
sudo /media/cdrom0/ -glnx86
Install matlab to some convenient place, typically /usr/local/matlab (assumed here).
The installation will fail, complaining about 64-bit java.
4) Fix the java problem (change the path according to your installation):
sudo ln -s /usr/local/matlab/sys/java/jre/glnx86/ /usr/local/matlab/sys/java/jre/glnxa64
5) Register your matlab
sudo /usr/local/matlab/bin/
6) You can now run MATLAB:
matlab -glnx86

KDE touchpad configuration disabled in Kubuntu Maverick

After upgrade from Kubuntu Lucid 10.04 to Maverick 10.10 the touchpad configuration was disabled in KDE system settings (System settings -> Input devices -> Touchpad). All the controls were disabled, the “Informations” section reading “Touchpad Name: Device not found”.

I have Apple Macbook Pro (macbook5,5) which uses bcm5974 driver. Apparently the driver is included in the recent linux kernels, but it can also be installed from the Mactel Support repository. First thing to do is to check if the drive is loaded in the kernel:
lsmod | grep bcm5974
If the command doesn’t print anything, you need to install the driver.

If the driver is installed, like in my case, but the KDE configuration is still disabled, check if xserver synaptics package is installed:
sudo apt-get install xserver-xorg-input-synaptics

The KDE touchpad configuration module is provided by the package kde-config-touchpad.

%d bloggers like this: