Lodahl's blog: administration
Showing posts with label administration. Show all posts
Showing posts with label administration. Show all posts

13 October 2014

Managing settings (on Windows)

I have written quite a few articles about installation and administration of LibreOffice on Windows. My latest post was an update on the installation parameters (read it here: http://lodahl.blogspot.dk/2014/09/silent-installation-on-windows-again.html ).

This time I will write about a new and very convenient way of managing the user settings on each desktop computer. In earlier versions settings could be manipulated by installing an extension with some XML-files. Nice but not perfect as you had to distribute files to each and every computer. This method is on the other hand independent of operating system so the same extension can be used for both Mac, Linux and Windows computers.

From LibreOffice 4.2 its possible to change settings through the Windows Registry and this can be managed through one or more Group Policies in the Active Directory or similar administration system.

Read more about that here: https://wiki.documentfoundation.org/ReleaseNotes/4.2#Windows_Registry_changes.
 You can find some more detailed examples here: http://ask.libreoffice.org/en/question/29537/42-registry-configuration-backend-not-applying-all-settings/.

In this example I needed to make two small changes:

  1. Set “Warn alien format” to “false” and lock the setting. 
  2. Set “Macro security level” to “High” and lock the settings.
All I needed to do was to create two new keys in the Windows Registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Save\Document\WarnAlienFormat]
"Value"="false" 
"Final"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Security\Scripting\MacroSecurityLevel]
"Value"="2" 
"Final"=dword:00000001


Export

When you have implemented the new keys on one computer and tested it, you can easily export the new keys.

Select the branch of the registry tree (HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common) and click Files - Export. In the dialogue you should select Selected branch and enter the name "Common" because that is the brach you want to export.

Click Save and you will get a Common.reg-file with the following content:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Save][HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Save\Document][HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Save\Document\WarnAlienFormat]
"Value"="false"
"Final"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Security]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Security\Scripting]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.Common\Security\Scripting\MacroSecurityLevel]
"Value"="2"
"Final"=dword:00000001 
This file can easily be imported on other computers or you can push them to the computers through a new Group Policy to the machines:
You create a new Group Policy object and link it to the OU you have configured for all the relevant users in the domain.
  1. You open it up and edit “User Configuration | Windows Settings | Scripts (Logon/Logoff).
  2. Under the Logon node, you add you settings so that regedit.exe calls your Common.reg file silently (with the /s switch): REGEDIT.EXE Common.reg /s
  3. You click Show Files and drop your Common.reg into SYSVOL. 

Some information about Microsoft Windows Registry:
http://technet.microsoft.com/en-us/library/cc753092.aspx http://blog.thesysadmins.co.uk/group-policy-preferences-1-deploying-registry-settings.html
http://blogs.technet.com/b/askds/archive/2007/08/14/deploying-custom-registry-changes-through-group-policy.aspx

Conclusion

I must say this is a much easier approach than the extension method and it makes the whole setup much more flexible since we don't need to handle extensions on each computer any more. For enterprises I recommend using this method for future maintenance.

13 December 2012

MSIEXEC parameters

Some time ago I wrote a few articles about administrative installation of LibreOffice on Windows. I have had quite a lot of feedback. Later there has come a wiki page on The Document Foundation wiki: Its called Deployment and Migration.

Nice but its still rather cumbersome to actually create a parameter string that works.

I have created a MSIEXEC parameter generator in a very simple spreadsheet. You can fill in the questionnaire and with a single click you get the complete string of parameters. There is not much error handling and evaluation so you can actually generate strings that doesn't work when you try to run it. But that might come later if any interest?

You can find the template with the macro on the extension website: http://templates.libreoffice.org/template-center/libreoffice-msi-generator . The template is waiting for approval currently, but I expect it to be approved shortly. Until the template gets approved you can get it from Dropbox here: http://dl.dropbox.com/u/9348527/LibreOffice_MSI.ots.

25 May 2011

Administrating LibreOffice

Professional use of LibreOffice requires the ability to manage and control the installation from the IT department. I have written earlier on how to install LibreOffice silently http://lodahl.blogspot.com/2011/02/silent-installation-of-libreoffice-on.html .

In many organizations restrictions is made enforcing that no data can or may be stored on the local hard drive, so all documents and other data are stored on the network. There can be many different reasons for this, and the most often used excuse is that its easier to back up the data from a server on the network, but its also much easier to exchange the local hardware without consequenses for the user.

LibreOffice stores quite a lot of information on the local harddrive under ..\[username]\Application Data \LibreOffice\3\user\… . This is among many things the users own settings, autotexts and user dictionaries. Not all these settings and data can be redirected in Tools - Options - Paths, but it is possible to redirect the whole user catalog to e.g. a personal drive on a network server.

It's done by changing the content of the file “Bootstrap.ini” (on Linux “bootstraprc”) that is found in the program folder (E.g.. C:\Program files\LibreOffice\program\bootstrap.ini”). The file is a text file like this:

[Bootstrap]
BaseInstallation=${OOO_BASE_DIR}
InstallMode=
ProductKey=LibreOffice 3.3
UserInstallation=$SYSUSERCONFIG/.libreoffice/3
[ErrorReport]
ErrorReportPort=80
ErrorReportServer=

The line “UserInstallation=$SYSUSERCONFIG/LibreOffice/3″ kcan be replaced by e.g., “UserInstallation=File:///p:/Application Data/LibreOffice/3″.
If this change takes place in conjunction with a first time installation you don't need to do more than changing the path. But if LibreOffice has been installed (or is installed), you must remember to copy or move the user library from the local harddrive to the new position on the network.

I have noticed that this method can result in errors if you are using a Citrix Terminal server with Roaming profiles. In this case you can exerience an errer; “fatal error. The Application cannot be started. [context="user']Caught Unexpected Exception!“.
If anyone can tell me the reason for this and perhaps also a solution, I would be happy to hear from you.