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.

Duplex printing for HP Color printers in Ubuntu

In office we have this fast HP Color LaserJet CP3505 printer, that should be able to print on both sides. I installed the driver using some GUI (system-config-printer I think) and everything worked like a charm, except the duplex printing. Trying to enable duplex printing in kprinter, for example, resulted an error “Some options selected are in conflict” as the Duplex Unit was not installed.

The printer setup can be changed (as instructed in this thread) in the CUPS HTML interface, accessible via any browser:

http://localhost:631

1) Choose Manage Printers and Set Printer Options of the printer at hand.

2) In Options Installed change radio button to Duplex Unit : Installed.

3) Click Set Printer Options.
You may be asked for a user name and password. Type in your local login user name and password. Sometimes, as in my case, you may need to input root and the superuser password.

Presumably the same configuration can be done in the GUIs as well, for example:
sudo system-config-printer and tick Duplex Unit in Installable Options tab. (In KDE use kdesu instead of sudo.)

Japanese input method in KDE 3.5 (Hardy Heron)

The easiest (and recommended) way to enable Japanese input in KDE is through System Settings -> Regional & Accessibility -> Country/Region & Language. Installing support for Japanese also installs the scim-anthy input method. If you need to use Japanese in terminal, the easiest way is to set Japanese as system language (but that indeed changes the default language, e.g. most man pages and system commands like apt-get will be in Japanese).

However, this will not enable Japanese input in non-KDE programs like Firefox. For this you need to install scim-bridge-client-gtk and im-switch. Then run

im-switch -s scim-bridge

to set scim-bridge as default input method for all applications.

scim-bridge is a new socket based input method module that fixes the many annoying problems that were present with scim, like various crashes in Firefox and Thunderbird and whitespace mapping bugs in KDE. The only thing that doesn’t work is Japanese input in Skype, which is a pity. Apparently this is fixed in KDE 4.0.

All in all this is very painless procedure compared to what it used to be in Dapper or Edgy.

Using kompare to view Subversion differences

When you’re using Subversion (svn) repositories for code development, it is sometimes useful to check differences between code revisions (i.e. when things went wrong for the first time). If you are using KDE, Kompare is a graphical difference viewer that can be easily used for this task. Simply run

svn diff -r 1020:1047 | kompare -o -

in a directory that belongs to the svn tree. Kompare window will open showing comparison of all the changed files in that directory tree. The numbers refer to revision numbers, i.e. in this case revisions 1020 and 1047 are being compared. The revision switch -r accepts other formulations, too:

'{' DATE '}' revision at start of the date
'HEAD' latest in repository
'BASE' base rev of item's working copy
'COMMITTED' last commit at or before BASE
'PREV' revision just before COMMITTED

For more information on the svn difference command run svn -h diff.

nVidia 8600 GT direct rendering on Hardy Heron

I made a clean install of the new Kubuntu 8.04 on Shuttle SP35P2. Everything went reasonably smoothly, I could even install nVidia drivers though KDE->System->Hardware Drivers Manager.

However, setting up the compiz desktop effects (KDE->System->Desktop Effects) didn’t quite work out. After reboot I logged in and got the white screen of death. I had to switch to terminal by Ctrl+Alt+F1, restart the X server by

sudo /etc/init.d/kdm restart

and login in failsafe mode. One can access the desktop effects setup from terminal by running

desktop-effects-kde4

After disabling all the effects I was able to log in in normal mode again.

It turned out that although the driver was installed, it wasn’t working properly. Running glxinfo printed out


...
direct rendering: No (If you want to ...
server glx vendor string: SGI
...

Clearly there’s something wrong here…
I installed newest drivers from the repositories, and also installed drivers using EnvyNG. Even went to nVidia homepage and got the latest driver installer and when even that didn’t work I downloaded the nvidia beta drivers from the same site. No remedy.

In the end it turned out that the trouble was package xserver-xgl that prevents direct rendering (DRI) in all cases. Removing the package and rebooting did the trick for me. I’m now using the nVidia beta drivers (173.08) and the compiz effects seems to work ok. The drawback is that I noticed some decrease in performance when xserver-xgl was not installed.

To put the long story short:
If you are using nvidia drivers but don’t get direct rendering working, check if you have the latest (beta?) drivers and if xserver-xgl is installed (remove it if it is).

— Edit 2008-05-28 —
Upgrading to kernel 2.6.24-17 broke the nvidia driver. The nvidia kernel module would not load correctly anymore which was probably due to the manual beta driver installation (see Ubuntu forums). I decided to go back to nvidia-glx-new from Ubuntu repositories.

I had to remove the new kernel 2.6.24-17 and purge all nvidia related packages. After rebooting I reinstalled the new kernel and rebooted again. Then installed nvidia driver from Hardware Drivers Manager and rebooted. Everything was OK except that the 3d desktop effects still don’t work with xserver-xgl.

To summarize: It’s better to stick with Ubuntu drivers for future compatibility.

Follow

Get every new post delivered to your Inbox.