Posted by Brian @ 12:15 pm on May 7th 2011

Completely disabling Akonadi in Kubuntu 11.04

Akonadi is a storage service that certain KDE programs use heavily. I only use the KDE windowing environment and I don’t use any of the applications in KDE, so akonadi was just wasting RAM and potentially CPU.

So to disable it, set StartServer=false in .config/akonadi/akonadiserverrc:

[QMYSQL]
Name=akonadi
......
StartServer=false

It might still load if you use KDE-dependent apps, or it might cause your system to blow up. But that should do the trick.

Posted by Brian @ 11:16 pm on May 6th 2011

Fix a NameError: global name ‘OPENOFFICE_BIN’ is not defined in LibreOffice

Just minutes ago I upgraded to Kubuntu 11.04. I noticed that OpenOffice has been replaced with LibreOffice (yay!) so I ran a critical python-based OpenOffice script that I use, expecting it to break. It did break, but the fix is easy.

Here’s the error that the script threw:
NameError: global name 'OPENOFFICE_BIN' is not defined

All I did was to locate where LibreOffice put itself and add that to the script. In my script there’s a section that looks like this:

# Find OpenOffice.
_oopaths=(
('/usr/lib64/ooo-2.0/program', '/usr/lib64/ooo-2.0/program'),
('/usr/lib/openoffice/program', '/opt/openoffice.org/basis3.1/program'),
)

See that first instance of /usr/lib64/ooo-2.0/program? I replaced it with /usr/lib64/libreoffice/program and now the script works perfectly. Never in a million years would I expect this with an upgrade from a proprietary vendor. Once again, free open source software just saved me lots of time and money.

New script looks like this:
# Find OpenOffice.
_oopaths=(
('/usr/lib64/libreoffice/program', '/usr/lib64/ooo-2.0/program'),
('/usr/lib/openoffice/program', '/opt/openoffice.org/basis3.1/program'),
)