Installing in parallel/Linux

From The Document Foundation Wiki
Jump to: navigation, search

This page provides instruction on how to Install multiple copies of LibreOffice in Parallel on GNU+Linux.

Introduction

Note:

  • Old releases between versions 4.1 and 5.2 fail to start in certain newer Linux versions (eg. Ubuntu 17.10) with the default gtk VCL plugin. Use the gen VCL plugin instead:
SAL_USE_VCLPLUGIN=gen ./soffice
  • In the case of debug builds (marked with the suffix -dbg), you can simply download and extract the .tar.gz file and run soffice found in the program directory. Remember to never test performance issues with a debug build.

Automated installation

The script for creating LibreOffice AppImages is a convenient way to automate the fetching of various LibreOffice versions. Once you have the AppImage, it is convenient to handle as it is a single, self-contained executable requiring no additional dependencies.

An example of creating an AppImage of the newest daily master build without any additional language or help packages:

  1. Make sure you have dpkg installed (install from your package manager)
  2. Download the script and make it executable, for example with
    wget https://raw.githubusercontent.com/antoniofaccioli/libreoffice-appimage/master/make_libreoffice_appimage -O make_libreoffice_appimage.sh && chmod +x make_libreoffice_appimage.sh
    
  3. Run the script like so:
    ./make_libreoffice_appimage.sh daily x86-64 N N N N
    

The AppImage file will be in the directory called out. Now you can make it executable and run it. The downloaded and extracted files used in the AppImage packaging process will be in the directory called LibreOfficeDev.

For more examples and full documentation, see the README file in the GitHub repository of the script.

Manual installation

Detecting Your System Architecture

LibreOffice packages are offered for the two main types of package systems on Linux: RPM and DEB, and for the two different architectures, 32-bit and 64-bit.

RPM packages are used on Linux distros based on Fedora, openSUSE, Mandriva, etc.

DEB packages are used on Linux distros based on Debian, ubuntu, etc.

If you are not sure which architecture is used by your CPU, open a terminal (konsole on KDE, gnome terminal on gnome...) and type

uname -m

if the output is "x86_64" you are running a 64-bit system. If the output is something like "i386" or "i586" your CPU is 32 bits.

If the command "uname -i" answers "unknown", try

uname -a

. You should find "x86_64" in the answer for a 64-bit CPU or something like "i386" or "i586" if you have a 32-bit CPU.

Detecting the right CPU architecture is important as the packages are different for the CPU types.

Downloading and Unpacking the Installation Files

After you download the right package (resp. from here for pre-releases), unpack the package, either graphically with the tools from your desktop environment (for example, on KDE: right click ▸ Extract package here) or using the following command on a terminal:

tar -vxzf file-name

a folder with a name similar to LibO_3.3.0rc2_Linux_x86-64_install-rpm_en-US will be created. Inside that folder, and depending on the version downloaded, you will find a folder called RPMS or DEBS. Inside that folder you will find some other folders and roughly 50 or so files.

Tweaking the Install Destination

From inside the (RPMS or DEBS) folder, create now a new folder with a simple name, something like "install" with your file manager or from the shell by executing mkdir install. Start a virtual terminal in that folder (or, if in a shell already, just issue cd install to change into that folder). From there, issue as normal user:

For RPM packages:

for i in ../*.rpm; do rpm2cpio $i | cpio -id; done

For DEB packages

for i in ../DEBS/*.deb; do dpkg-deb -x $i . ; done

or alternatively (if dpkg-deb is not available):

for i in ../DEBS/*.deb; do ar p $i data.tar.xz | tar -xJf - ; done

Enter the appropriate command exactly as shown above! Do not omit even a single dot!

You will see a new folder named "opt" has been created there with several other folders and files that contain the entire LibreOffice installation.

Optional, but Recommended when Testing: Changing the User Profile location

NOTE: you can find a complete article about the user profile here.

By default, the user profile is stored in ~/.config/libreoffice/4/user/ (versions since LibreOffice 4, older versions used ~/.libreoffice/3/user).

You can change the user directory that will be used by the new installation by editing the file bootstraprc you find in

path-to-install-folder/install/opt/libreoffice/program/bootstraprc

To do so, you need add write permission for that file so that you can modify it. You can modify the file permission by using either the tools from your desktop environment (for example, on KDE: right click ▸ Properties ▸ Permissions and change the value for Owner to "Read and write possible") or by using the chmod command on a shell command line:

chmod +w bootstraprc

By editing this file, you can change the value for the "UserInstallation" variable from $SYSUSERCONFIG/.libreoffice/3 to any other directory of your choice. For example

UserInstallation=$ORIGIN/..

(Don't omit any of the dots!) will use as user folder the "install" folder, which is one level up in the file hierarchy from $ORIGIN.

Optional: Applying a Language Pack

After unpacking the language pack, in the same way described to unpack the installation packages, you will obtain an "opt" folder with all the localized files. Opening a terminal in the folder that contains this new opt folder, you can now proceed to do a "recursive copy" of that folder over the other "opt" that contains the full LibreOffice suite:

cp -R * path-to-install-folder/install/

Optional: Applying a Local Help Pack

After unpacking the help pack, in the same way described to unpack the installation packages, you will obtain an "opt" folder with all the localized help files. Opening a terminal in the folder that contains this new opt folder, you can now proceed to do a "recursive copy" of that folder over the other "opt" that contains the full LibreOffice suite:

cp -R * path-to-install-folder/install/

Starting the Application

Add a script at the top-level of the LibreOffice directory hierarchy to start the program:

Alternative:

On

path-to-install-folder/install/opt/libreoffice/program

you will find different scripts to start the different LibreOffice apps: soffice, swriter, scalc, sdraw, simpress.

NOTE: with this kind of "user installation" you cannot use the desktop integration package, you will need to associate files and create system menu entries "by hand" - if you wish (but there's no need to do any desktop integration), it is easy to start any of the LibreOffice apps by opening a shell, changing to the "program" folder beneath the above-created installation folder (called "install") [the whole path might look like install/opt/libreoffice3.4/program] and starting the desired application: You can issue e.g.,

./soffice

to start the LibreOffice application or

./swriter

to start Libreoffice Writer (or ./scalc for Calc, ./simpress for impress, and so on.

Of course, you can start any of the above LibreOffice apps by just clicking its filename (soffice, swriter, scalc, sdraw, simpress, smath or sbase) in your file manager. But starting them from a shell gives you some additional info about program execution which might be helpful for testing/debugging purposes.