Please see comments inline. (I've been doing some research after reading your answer)
Joerg Barfurth wrote:
after searching a while through the developer guide and several more places, i was thinking that I might be able to do this through the slots-usage where I probably can lock down the particulare settings in the OOo gui so that the user cannot change the values from within openoffice, while this will work with 98% of all the users that is going to run openoffice (students in a school) the remaining 2 percent will probably figure out that they can edit the settings by hand by editing the configuration files (I cannot lock these down for editing in the filesystem, since they should be able to change some settings but not all)
You need a decent OS/file system, so that you can prevent your users from changing files in the OOo program installation (or another directory).
At the time of writing I only knew of 2 places where this could take plase, in the shared registry and in the user registry, ofcourse we can lock the file in the user registry (we cannot use the shared registry since not all users should have the restrictions) so that only an administrator can read them, but this works only for the Commands.xcu file and not for any of the other configuration files where parts might be changeable by the user and parts by the administrator. just read on, no need to comment .-)
after reading some more I was thinking that I might be able to do this by using a configuration backend that ties into OOo and makes sure that the settings are what they should be when the user starts OOo (so even if he manually changes the file, the "locked" properties will remain with the values I have set.
Even now OOo merges data from multiple locations. These locations all use the same file-based backend. Of course the files holding the user preferences need to be placed in a user-writable location. But the files holding default values can (and should) be placed in a location that is not writable by the user. By default this is under the OOo installation directory. With a standard multi-user installation this will be non-writable for ordinary users both on un*x systems and on Windows 2000/XP (with NTFS and appropriately restricted user accounts).
in the configmgrrc file for Openoffice there is a CFG_strata line that I thought I could use to solve my problem.
if I add my own path in this line just before the userpath declaration
I should be able to do the things i want. I've tried it and it works, HOWEVER there is a smal problem... it looks like I can only add paths that starts with a configuration value?
for example CFG_UserLayerUrl=$UserInstallation/user/registry CFG_MyLayerUrl=$UserInstallation/mydata/registry
CFG_LocalDataSvc=com.sun.star.comp.configuration.backend.LocalStratum
CFG_Strata=[...];${CFG_LocalDataSvc}:$CFG_MyLayerUrl;${CFG_LocalDataSvc}:$CFG_UserLayerUrl;will work, however changeing CFG_MyLayerUrl to for example /opt/mydata/registry
Openoffice will not start anymore..
is there some way to specify Absolute url:s here? or do I always have to base it on a specified variable? $BaseInstallation/$UserInstallation/etc ?
and is there a way to specify the user-id into this? I'd would like to be able to write
CFG_MyLayerUrl=/opt/mydata/$user/registry
/Christian Andersson
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
