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 [libgobject-2.0.so.0+0x31b3c] 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.

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

Advertisements

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.

KBibtex in Ubuntu Oneiric 11.10

KBibtex is a useful bibtex bibliography management tool for the KDE desktop.
However, it seems that the package is missing in the Ubuntu 11.10 repositories.

A quick remedy (as tweeted here) is to install the package from the Debian Sid distribution: kbibtex.
To install on the command line (check the exact name of the .deb file)
sudo dpkg -i kbibtex_0.4-1_amd64.deb

Alternatively .deb packages can be installed in the GUI (e.g. by opening the file in Dolphin).

The package should be compatible with Ubuntu 11.10, and seems to work fine.

The 0.4 version has improved a lot and has a very useful online search tool for acquiring bibtex files. Google scholar and other data bases can be used.
Other tools include a reference preview (though bibtex2html) and a PDF preview.

Fixing Klipper shortcut keys in KDE4.5+

After an update to Kubuntu 11.04 Natty Narwhal (possibly also Lucid and Maverick) the commonly used Klipper shortcut Ctrl+Alt+V for invoking the pop-up menu does not work anymore. Very annoying, for browsing the clipboard history was very useful.

Here’s a fix (for Natty):

Go to System settings->Shortcuts and Gestures->Global Keyboard Shortcuts and select Plasma Desktop Shell in the KDE component box. Look for Systemtray-Klipper-10 and assign Ctrl-Alt-V to it. Most likely this will create a conflict with Klipper keyboard shortcuts, accept to force the change.

Pressing Ctrl-Alt-V should now bring up the Klipper pop-up menu. To select an item in history using only keyboard, choose with up/down arrows. The press Enter (to choose the item), press Esc (to close the pop-up). This is different than before when Enter also closed the pop-up. Note that the chosen item is not indicated in any way in the pop-up. Hopefully this will change in the future.

This hassle is all due to the fact that same shortcut is defined in (at least) two places. As plasma desktop shell is handling the shortcuts now, the old setting in Klipper section is simply ignored, but still present.

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.

Solution:
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

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.

Linux audio: Device or resource busy

Usually audio playback causes no problems in Linux, but sometimes audio vanishes suddenly and you cannot get playback until you logout/restart the system. Here’s how you can restore audio playback without restarting.

Usually the problem is caused by a crashed program that is still using the audio device preventing other processes accessing it. If you run a playback software from the command line (e.g. vlc foo.mp3) you typically see an error like:
/dev/dsp: Device or resource busy

The solution is simple, you just need to identify the runaway process and kill it. Command
lsof | grep snd
gives a list of candidates that might be occupying the audio device. These can be terminated by
killall program_name or kill PID, where PID is the process ID shown in the second column of lsof output.

%d bloggers like this: