07 January 2009

HowTo: Adding fonts to OpenOffice.org 2 on Linux with 'spadmin.bin'

OpenOffice.org* is an office suite for Linux, Windows, and now the Mac desktops. Its similarity in appearance to Microsoft Office (pre-Office 2007) is both a blessing and a curse, as it allows people familiar with MSOffice to get to work quickly but frustrates them to no end when an expected function isn't in the same place or doesn't work the same way as it does on MSOffice.

One problem that I've always had with OpenOffice.org is getting my Linux system's fonts to show up in OpenOffice.org (OOo). Then I found out about the executable 'spadmin.bin' and everything is easier now. Not yet easy, unfortunately, but easier. Play along to get your fonts working in OOo as well!

Installing your fonts
First, let's make sure that we have the Microsoft TrueType fonts installed, since everyone seems hung up on these (I use the Liberation fonts for Free Software licensing altruism, so we'll do those as well).

There are two ways to do this, either from the command line (my preference) or from Synaptic Package Manager (or another package manager). Here is the first, on the Debian command line; first we search for the terms, and then install the pacgage names it returns (as always, click the image to make it larger) :


Here is the second method, installing the same packages but using Synaptic; after (1) searching for "Microsoft TrueType" you'll want to right-click the box and (2) Mark it for install, then click (3) Apply at the top:

Now, of course you must also have OpenOffice.org installed; if you don't have OOo, use either of the above two methods to install it along with your fonts.

Locating and Running 'spadmin'
Once we have the fonts installed, we'll want to run the 'spadmin.bin' program. This program isn't in a normal place, so we'll have to find it. It may be in the same path on my computer as it is on your computer, but lets check anyway. In a Konsole, Terminal, or other command prompt, run this:
locate -i spadmin.bin
And hopefully you'll get a return like this:
/usr/lib/openoffice/program/spadmin.bin
That is the computer's path for the application. For you Windows users, it's kind of like C:\User Programs\Libraries\OpenOffice\programs\spadmin.bin (except for the fact that a Windows machine doesn't have its files laid out like that, but that is a DOS path example anyway).

The path that your locate command returns is the path of the application that we want to run, so our next command is exactly that:
/usr/lib/openoffice/program/spadmin.bin
See this screenshot to make sure that your locate commands did what I hoped they would (click to enlarge) :

On one machine where I ran this, it took almost four minutes to get the OpenOffice.org spadmin.bin program to actually open. Yeah, it is very slow. Check my screen shot #3 again (just above) to see if it looks the same if you're wondering where the window is at.

When the spadmin.bin program finally opens, it looks like this:

Click on the [Fonts] button; a new window will open. Click on [Add...] and a third window will open. In the Source Directory field at the bottom, erase all of that and type in this path:
/usr/share/fonts/
Check mark the Soft Links option -- this means you don't have another copy of the fonts taking up space, just a link to the original fonts. Also make sure to have Search Subdirectories checkmarked, since there will be a lot of fonts in the subdirectories as well.

Click the [Select All] button. Phew! It should now look like this:


Click the [OK] button and it will install your fonts! There, nothing to it, right?

If the program asks if you want to overwrite previous fonts that may have the same name, I would answer 'None' as this shows, but you can answer however you feel. If you think some fonts that you have now are wrong, hit Yes for them, or All to do all of the overwrites.

As you can see from this last screenshot, OOo stores your fonts (or links to the fonts) in the path
/home/USERNAME/.openoffice.org2/user/fonts/
If you have fonts in OOo that you don't want, you can remove the links or files from this folder. Note that removing a link doesn't uninstall the font from your computer, just OOo. Also note that removing a real font from this directory removes it forever, so if its the only copy it may be best to move the real font file somewhere else. Anything that you installed with my HowTo should not be the only copy of a font.


This path '/home/USERNAME/.openoffice.org2/user/fonts/' is probably different in the newly released OpenOffice.org 3.x and maybe this whole font thing is taken care of in that release. But until then, this should do the trick.

Thanks for stopping by, and I hope that you learned something!

EDIT: I realized that I missed any fonts installed to your own personal login! After importing the fonts in the last step (above), you likely will want to install the other fonts that you have at /home/USERNAME/.fonts/ So rerun the above [Fonts] > [Add] thing and for this next round, navigate to /home/USERNAME/.fonts/ and again checkmark 'Search Subdirectories' and again 'Select All' and again 'Create Soft Links Only'. This was a huge hole in our HowTo and I hope this helps!



*Yeah, OpenOffice.org. OpenOffice was already a trademarked German software offering, and so when StarOffice was OpenSourced and Freed, it was named OpenOffice.org. At least, I think that is how it goes.

Free Software is not Freeware (aka, more corporate FUD)

In the 6 January 2009 online NYTimes.com (and also in "print on January 7, 2009, on page B6 of the New York edition" according to the article), there is a two-page write-up about R, the Free software statistical analysis software. I had never heard of this until a friend in a grad course used it.

The article misrepresents Free and Open Source software as being the same thing, but the intent of the author isn't to confuse the two terms -- I think the tech reporter needs to learn a bit more about the subject here, but that isn't the point.

Apparently, R is eating into the SAS Institutes userbase of its closed, proprietary statistical analysis software. I don't find this unusual with any quality Free Software project, nor do I find the SAS Institute's response atypical. It's the standard approach of FUD: spreading Fear, Uncertainty, and Doubt about the quality of Free Software. I quote,
Anne H. Milley, director of technology product marketing at SAS [said], “We have customers who build engines for aircraft. I am happy they are not using freeware when I get on a jet.”

Free software is not freeware. Freeware is a limited-functionality, closed-source, non-Free piece of software that may or may not be quality, and may or may not be trustworthy. Free Software has open code, can be improved or modified, and its quality and functions are open for review by anyone that wants to do so.

This doesn't mean that all Free Software is trustworthy or quality, but it is within the users rights to study the code (or pay someone else to do that, if they desire) to make sure it does what its meant to do. Major projects like the Linux kernel, the Mozilla products like Firefox or Thunderbird, desktop environments like KDE, web servers like Apache -- these all are regularily reviewed by large numbers of contributors, coders, enthusiasts, and corporations that depend on these programs; they are of a very high quality. Bugs are found, filed, and squashed. Can SAS Institute say the same about their software? Certainly not, but that is why they spread their FUD.

I don't really code, so I cannot attest to the quality of R, but I would expect that it is very high indeed, with Google and others relying on it. An apt comparison here may be, "I am happy that my bank uses Windows to secure my data; I wouldn't want to bank with a company that uses [Free Software] to keep my data secure." We all know how secure Windows is, and that is why no one has ever said this. Ever.



05 January 2009

Scalix email and calendar server with KDE's Kontact/Kalendar - Fixing Kalendar's Free/Busy

We have a Scalix server for mail and shared calendars; when we set up Kontact with Debian's 'scalixwizard' tool, scalixwizard puts this into the "Configure Kontact > Calendar > Free/Busy > Server URL" fields (for both Publish and Recieve) area, which leads to failures:
scalix://User%20Name@xxxx.myscalixdomain.net/freebusy/Calendar/User.Name@emaildomain.com
Note what it is doing, scalixwizard replaced the . (dot) in my User.Name's email address with %20 (and, later, the other punctuation is replaced as well, but Kalendar gets its error before that data is sent) and fixing this alone doesn't resolve the issue. When one then tries to publish or retrieve information, this leads to the error:
The software could not upload your free/busy list to the URL 'scalix://UserAuthorization failed, Unable to login. Probably the password is wrong. The server xxxx.myscalixdomain.net replied: LOGIN failure, user name or password rejected authentication not supported0Name@xxxx.myscalixdomain.net/freebusy/Calendar/User.Name%40emaildomain.com'. There might be a problem with the access rights, or you specified an incorrect URL.
The system said: %2.
Please check the URL or contact your system administrator.

The work around for this is to single-quote the Server URL after correcting it, so that it reads:
'scalix://User.Name@xxxx.myscalixdomain.net/freebusy/Calendar/User.Name@emaildomain.com'

Note that double-quoting the Server URL doesn't work, nor does trying to escape (\) the punctuation issues.

This error may not exist for everyone, as it likely depends somewhat on how one is required to log into the server, etc., but it has been a long time annoyance with only recently the work-around figured out.

I hope it helps some of you out there!