Skip to content

Instantly share code, notes, and snippets.

@yohangdev
Last active May 14, 2018 14:35
Show Gist options
  • Save yohangdev/2d5fce9c522ffc6eb1e7689bb09fe7b4 to your computer and use it in GitHub Desktop.
Save yohangdev/2d5fce9c522ffc6eb1e7689bb09fe7b4 to your computer and use it in GitHub Desktop.
Alfresco 5 Office Preview Fix

check if libreoffice is running

/opt/alfresco-5.0.a/libreoffice/scripts/libreoffice_ctl.sh status

edit the file /opt/alfresco-5.0.a/alfresco.sh modify the line LIBREOFFICE_SCRIPT with the correct script path

LIBREOFFICE_SCRIPT=$INSTALLDIR/libreoffice/scripts/libreoffice_ctl.sh

test for missing libraries

/opt/alfresco-5.0.a/libreoffice/program/soffice.bin --nofirststartwizard --nologo --headless --accept=socket,host=localhost,port=8100

install missing libraries (I had missing libxinerama1 and libdbus-glib-1-2)

apt-get install libxinerama1
apt-get install libdbus-glib-1-2

Debian 8:
libglu1-mesa libcups2 libfontconfig1

Edit libreoffice_ctl.sh (remove "")

Soffice="$SOFFICEWRAPPER --nofirststartwizard --nologo --headless --accept=socket,host=localhost,port=$SOFFICE_PORT;urp;StarOffice.ServiceManager"

try to start opeoffice using the script

/opt/alfresco-5.0.a/libreoffice/scripts/libreoffice_ctl.sh start

restart alfresco

/etc/init.d/alfresco restart

you must see the line

/opt/alfresco-5.0.a/libreoffice/scripts/libreoffice_ctl.sh : libreoffice started at port 8100
Credit: caolem, arannasousa
https://community.alfresco.com/thread/209303-document-preview-problem-was-fixed-by-changing-libreoffices-ctlsh-to-libreofficectlsh
@usayao
Copy link

usayao commented May 14, 2018

why not work in alfresco5.2.0 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment