Registered: Jan 2004
Distribution: Kubuntu 10.04 (Dell Linux-preinstalled laptop + a desktop); Maemo 5 (N900 phone computer)
My mistake; here's how I fixed it
Just in case someone else has similar problems or simply wants to know: "Where on earth do all these problems come from?" I will list the solution, how I found the solution, and tie up various loose ends.
It turns out that I had copied my home directory from my other computer (Heathrow, where OpenOffice.org worked) to this computer (Monterey, where OOo did not work). After all, my home dir has lots of config info for various programs that I didn't want to redo by hand.
I had cleverly used the "rsync" command to copy from Heathrow to Monterey, but I didn't realize that such rsync'd files are made non-executable, unless I specify the "-p" flag (for "permissions"). One such directory copied was my ~/.openoffice directory.
In this directory is a script file that is run as part of OpenOffice. Presumably every user has a copy in his/her own ~/.openoffice directory, to set up a config that is specific to the user. But this script file simply wouldn't execute. (No error messages, either, you dimhead OOo programmers. Thanks a lot!)
You would have thought that I would "chmod u+x" the offending file, but I didn't even bother. I "erased" my ~/.openoffice directory (actually, I moved it somewhere else and renamed it) and ran OOo. The program found that I didn't have a ~/.openoffice directory set up yet, and proceeded to set one up automatically. Everything ran smoothly after that.
How I Found the Problem
I checked that there was indeed an OpenOffice program. Checking the KDE menu, I saw that the program was called "oowriter". Then, on a console, I typed "oowr" and then hit Tab. The Tab Completion function of "bash" (the program that runs in a console, or when you use text-only) checked what possible commands I could be typing and automatically filled in "iter", since "oowriter" was the only possible command. This confirmed there was a oowriter command. I hit Enter, but as before, I just got the prompt back with nothing happening.
I then typed "which oowriter", and it told me that when I ran "oowriter", it used the program from "/usr/bin/oowriter". I checked the /usr/bin directory, and found that "oowriter" was a link to the "ooffice" file; this was a Perl file.
I made a backup copy of "ooffice", and then, as root, edited the "ooffice" file, inserting 'print "## Here I am! 01";' commands all over the place. (You have to know a minimal amount of Perl to know this.) I gave them different numbers so I could see when the program got to which part. I put in the "##" so I could easily find and delete my added statements later. When I ran "oowriter" again (as a normal user), this time I saw:
## Here I am! 01
## Here I am! 02
## Here I am! 03
## Here I am! 04
... and so forth. Every single one of the "## Here I am!" statements showed up. So the entire program was executing, but something was simply making it exit as soon as it was started.
I recognized that the Perl file executed another file, this one in my home directory, called ~/.openoffice/soffice, so I edited that one too with statements.
Now, on a TV show, I would say: I discovered that "soffice" wasn't running, and located the problem. What really happened was that I was too sleepy because it was late, so I went to bed. The next morning, I woke up thinking, "Hey, waitaminnit, is that 'soffice' file even executable?" That's how I found the problem. Isn't the truth just so wonky sometimes?
To answer beejayzed: yes, I did try to run it as root, and it failed, but this time with an error message about "xhost". So I had to, as normal user, give permission for other users like "root" to use my X display. Then root could run OpenOffice, but it ran really slowly. And normal user still couldn't run OpenOffice.
So then I tried installing again with "urpmi openoffice", but it said, "Everything is already installed." Then I uninstalled with "rpm -e openoffice", and then reinstalled with "urpmi openoffice", and this time it installed again. But same problem.
Later on, I found the solution, as given above.
I hope this gives some newbies some ideas about how to go about solving problems. Not that I'm necessarily skilled at this, but I've always been frustrated: "If Linux is open source, then sooner or later I should be able to figure out what the heck is going on! So why is there an error?"