Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I determine which version of open office is installed? I'd like to be able to issue this command on an Ubuntu machine as well as a Mac OS X machine.

share|improve this question
    
possible half dupe: superuser.com/questions/222017/… –  Paul Nov 29 '11 at 22:25
add comment

1 Answer

up vote 2 down vote accepted

Look at the contents of the file versionrc. It's installed next to the binaries and its content is the following (on OS X):

$ cat versionrc 
[Version]
AllLanguages=en-US
buildid=330m20(Build:9567)
ExtensionUpdateURL=http://updateexte.services.openoffice.org/ExtensionUpdateService/check.Update
OOOBaseVersion=3.3
ProductBuildid=9567
ProductMajor=330
ProductMinor=20
ProductSource=OOO330
UpdateID=OpenOffice.org_3_en-US
UpdateURL=http://update36.services.openoffice.org/ProductUpdateService/check.Update?pkgfmt=dmg
UpdateUserAgent=<PRODUCT> (${buildid}; ${_OS}; ${_ARCH}; BundledLanguages=${AllLanguages})

On OS X, it's in /Applications/OpenOffice.org.app/Contents/MacOS/versionrc (depending on your installation path, of course).

In the RedHat 32 bit download, it's provided by openoffice.org3-3.3.0-9567.i586.rpm and is in /opt/openoffice.org3/program/versionrc.


Alternatively, run soffice -h (in the same directory as versionrc, if it's not on your path as e.g. on OS X):

$ ./soffice -h 2>&1 | head -n1
OpenOffice.org 3.3  330m20(Build:9567)

Filtered to remove help on soffice's command line arguments.

share|improve this answer
    
On OS X, you could also read the CFBundleGetInfoString from Info.plist. –  slhck Nov 29 '11 at 22:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.