How to install libreoffice macros via command line on CentOS?

Below are the LibreOffice version details I’m using. I need help with a command that lets me install macro from command line.

Name: libreoffice
Arch: x86_64
Epoch: 1
Version: 4.2.8.2
Release: 11.el6

OS Name: CentOS
Distributor ID: CentOS
Description: CentOS release 6.6 (Final)
Release: 6.6

[Edit: added CentOS6.6 + lo4.2.8 tags]

Hi

I’ve used/administered CentOS extensively for 10+ years. On a server. Here is the best that I can think of for you. Note that ‘soffice.bin’ is the prime executable for LO. Note also that there is a great deal more output than I have shown.

:~$ locate soffice.bin
/opt/libreoffice4.4/program/soffice.bin
/opt/libreoffice5.0/program/soffice.bin
:~$ /opt/libreoffice5.0/program/soffice.bin --help
LibreOffice 5.0.0.5 437e4abdf9e72fd0a6e6f8697a0e659bc77f9b10

Usage: soffice [options] [documents...]

Options:
--minimized    keep startup bitmap minimized.
--invisible    no startup screen, no default document and no UI.
--norestore    suppress restart/restore after fatal errors.
--quickstart   starts the quickstart service
--nologo       don't show startup screen.
--nolockcheck  don't check for remote instances using the installation
--nodefault    don't start with an empty document
--headless     like invisible but no user interaction at all.
--help/-h/-?   show this message and exit.
--version      display the version information.
--writer       create new text document.
--calc         create new spreadsheet document.
--draw         create new drawing.
--impress      create new presentation.
--base         create new database.
--math         create new formula.
--global       create new global document.
--web          create new HTML document.
-o             open documents regardless whether they are templates or not.
-n             always open documents as new files (use as template).

I do not think that any of the above will assist. To discover why, look at Q35598 and the very full reply from Regina.

If this helps then please tick the answer (:heavy_check_mark:)

Hi Alex,

I tried to find or locate “soffice.bin” but I get this

find: `soffice.bin’: No such file or directory

Is this “soffice” a package which comes by default with libreoffice or do we need to install it separately?

And I was also looking @ Q35598 and the full reply from Regina but as I’m working on a server I do not have a GUI to install the macros. So can we do that from command line.

I take back I could locate the soffice.bin. But I still need to find way to install the macros…

Thanks for the link to Regina’s post and also the the stuff you posted I guess it helped me to figure out how thins work… Thanks again Alex :slight_smile:

something like:

cd /path/to/your/userconfig_backup 
cp -r basic ~/.config/libreoffe/4/user/basic

Hi Karolus,

Could you be more specific of what you are trying to say. I meant when you say userconfig_backup do you mean the path to my macro file??

And should I just copy my file to that location??

Awesome I got it. I understood what was happening here. Thanks for the input Karolus :slight_smile: