Hi all.
I have a problem with the conversion of ods documents to pdf through a shell script.
I use LibreOffice 3.4.5 on a linux workstation (CentOS 6.4).
I found the following solution:
libreoffice --headless --invisible --convert-to pdf file.ods 1>/dev/null 2>&1
which works flawlessly WHEN I USE A GRAPHICAL ENVIRONMENT.
If I try to use the script in (for example) crontab or if I connect to the workstation through ssh (without -X option)
the result of the script is as follows:
/usr/lib64/libreoffice/program/soffice.bin X11 error: Can’t open display:
Set DISPLAY environment variable, use -display option
or check permissions of your X-Server
(See “man X” resp. “man xhost” for details)
Is there any other procedure in order to convert to pdf even if the DISPLAY environment variable cannot be set?
Thank you in advance