Apache OpenOffice (AOO) Bugzilla – Issue 11219
Command line parameter -userid does not work.
Last modified: 2003-03-13 11:09:43 UTC
The command line parameter -userid=.. does not work as advertised in the document at <URL (see above)>. There are two ways to fix this: One is to correct that document, the other is to reactivate the functionality. I propose to do that latter and actually can propose how a simple fix should look like. From a glance at the code: This parameter is still parsed, but it is then passed to code that does not use it, except in some webtop-specific code that is not even built. Instead the info where the user-installation is, is taken from the bootstrap parameter 'UserInstallation' which is read from $SYSBINDIR/bootstraprc (or bootstrap.ini on non-unx systems) in the normal case. There already is a way to override this on the command line by specifying -env:UserInstallation=<file-url>. But this method is tedious, because the user needs to specify a correct file URL (as required by osl). Thus it makes sense to revive the -userid= parameter, if it can be made to accept ordinary system-specific pathes. This can be done as follows: if (GetCommandLineArgs()->getUserDir(aUserDir)) { OUString aUserDirURL; if (osl::File::getFileUrlFromSystemPath(aUserDir,aUserDirURL) != 0) /* Handle the error */; // now must be a valid file URL. For best results make absolute using // osl::File::getAbsoluteFileURL(getProcessWorkingDirectory(),aUserDirURL,aUserDirURL) // now override the bootstrap setting: rtl::Bootstrap::set( OUString("UserInstallation"), aUserDirURL) } This change of bootstrap parameters should of course be done before trying to use the setting. This means the change should at least be done before initializing UNO.
taking over..
I will take over again.
JA: re-prioritized according to new priority guide lines
CD: I think this could be a valueable fix for some people so I going to work on it.
CD: Fixed for next beta build.
CD->TM: Please check this bugfix. Information: You can now provide the user installation base directory to the Office. The command line parameter is called "-userid". Important: You have to provide the base directory as a system path, that means the folder which contains "user"! If you provide a wrong path the Office fallback to the standard user installation. Usage: soffice -userid=<Path to base of user installation> Example: soffice "-userid=d:\StarOffice 6.1"
.
Checked and verified in "cws basetech" (internal 644 build) -> OK
As mentioned on the qa dev list on March 5th I will close all resolved <wontfix/duplicate/worksforme/invalid> issues. Please see this posting for details.