LibreOffice Online bzw. Office Dokumente bearbeiten

Danke fĂŒr die Infos.
Zusammengefasst:
Aktuell kann ich auf meinem eingerichteten Webserver mit nc noch keine Onlinebearbeitung von Office Dokumenten anbieten?
Es wĂ€re sicherlich hilfreich, wenn man dieses Feature mal irgendwo mit dem aktuellen und zukĂŒnftigen Stand erlĂ€utert. Das durchforsten von mehreren ForeneintrĂ€gen ist da doch sehr mĂŒĂŸig und am Ende weiß man noch nicht, ob es neben irgendeiner “KrĂŒcke” doch schon eine Installation einer App gibt.

Ich bleibe dran :wink:

1 Like

Kannst du grundsĂ€tzlich schon, nur steckt das ganze derzeit noch in den Kinderschuhen, und wird auf keinen Fall durch simples “One-Click” Installing gelingen. Ich denke das ganze wird in den nĂ€chsten Monaten weiter reifen, und irgendwann auch fĂŒr Endkunden möglich sein. Es wird aber vermutlich immer ein “wenig” mehr Konfigurationsarbeit erfordern als eine Kontakte- oder Kalender-Anwendung, da ja ein LibreOffice Online-Server laufen muss :wink:

Sollte es tatsÀchlich nur um Dokumente gehen, bietet dir die derzeitige Documents App (auch in Nextcloud) gute Dienste (
auch mit Collaborative Editing).


oder du baust dir die Lösung mit ein bisschen Handarbeit und den o.g. Repositories selbst zusammen. Die Anleitung ist hier zu finden: richdocuments/README.md at master · owncloud/richdocuments · GitHub

Das mĂŒsste grundsĂ€tzlich funktionieren - ĂŒber StabilitĂ€t etc. kann ich dir jedoch gar keine Auskunft geben. Vielleicht hast du ja Lust, ein bisschen zu experimentieren - ich wĂŒrde mich freuen, wenn du uns von deinen Erfahrungen berichten könntest :wink:

:thumbsup: 
Empfehlen kann ich dir hierfĂŒr unseren Newsletter: https://newsletter.nextcloud.com :wink:

Newsletter ist bereits vom ersten Tage an abonniert :smiley:

Ansonsten teste ich einfach mal, welche Variante den Praxistest besteht.
Vielen Dank aber fĂŒr die schnelle UnterstĂŒtzung und gutes Gelingen fĂŒr eure zukĂŒnftige Arbeit!

1 Like

@Speedysurf

SEE ALSO THE NEW UPDATED TOPIC

Hallo an alle NextCloud-Umsteiger und LibreOffice-Freunde,

ich habe heute mein OwnCloud nach NextCloud migriert. Alles lief ohne Probleme
ordentlich durch.

LibreOffice-Online kann ich jetzt auch - wie vorher unter OwnCloud - in
der NextCloud-Umgebung nutzen.

Hier mal die grundsĂ€tzlichen Schritte zur Umsetzung fĂŒr LOL


Ausgangspunkt war bei mir ein aktuelles ArchLinux ohne installiertes
LibreOffice.

Schritt 1: LibreOffice aus den Quellen bauen (https://github.com/LibreOffice/core)
Schritt 2: LibreOffice Online WebSocketServer bauen (https://github.com/LibreOffice/online)
Schritt 3: NextCloud-Pluggin einbinden (https://github.com/owncloud/richdocuments)

Diese Schritte hatte ich schon fĂŒr die OwnCloud-Installation vollzogen. Die
Installation lÀuft jetzt ebenfalls mit der neuen NextCloud-Umgebung, da ja dem
WebSocketServer relativ egal ist, von welchem Client er angesprochen wird.

NatĂŒrlich ist die ganze Geschichte noch auf einer experimentellen Stufe, was man vordergrĂŒndig am Leistungsumfang des Plug-Ins bemerkt, aber die ersten großen Schritte in Richtung einer wirklichen OnlineOffice-Alternative sind gemacht und ich freue mich auf mehr.

FĂŒr die Schritte der Installation habe ich oft den Benutzer “http” missbraucht,
da unter ArchLinux der Apache unter diesem lĂ€uft. Angemeldet war ich als “root”


Schritt 1 - LibreOffice bauen:

Erst die AbhĂ€nigkeiten fĂŒr LibreOffice installieren. Hier habe ich mir relativ
wenig Gedanken ĂŒber die Notwendigkeit der Pakete gemacht (genug Platz auf der HDD)


pacman -S --needed \
glew gperf gtk3 redland cups hyphen libabw libcdr libe-book \
libetonyek liblangtag libmspub libmwaw libodfgen libpagemaker \
librevenge libvisio libwpd libwpg libwps lpsolve libcmis \
libexttextcat libixion liborcus gdb libpng libcap libcap-ng

Hier soll spÀter die fertige Installation landen:

mkdir /opt/LibreOfficeFromSource

Quellen holen:

cd /tmp; \
git clone https://github.com/LibreOffice/core.git LibreOfficeCore; \
cd /tmp/LibreOfficeCore; \
chown -R http:http /tmp/LibreOfficeCore

Die Build-Optionen kann man natĂŒrlich an die eigenen Anforderungen anpassen.
Die “–with-system-” Optionen setzen natĂŒrlich voraus, dass die entsprechenden
Pakete auch vorhanden sind. Das “make” dauert natĂŒrlich eine ganze Weile


sudo -u http ./autogen.sh --prefix=/opt/LibreOfficeFromSource \
--with-lang='de' \
--with-help \
--with-myspell-dicts \
--with-alloc=system \
--without-java \
--without-system-dicts \
--disable-dconf \
--disable-odk \
--disable-firebird-sdbc \
--disable-postgresql-sdbc \
--enable-release-build=yes \
--enable-python=system \
--enable-hardlink-deliver \
--with-system-apr \
--with-system-boost=yes \
--with-system-cairo \
--with-system-clucene \
--with-system-curl \
--with-system-expat \
--with-system-graphite \
--with-system-harfbuzz \
--with-system-icu \
--with-system-jpeg \
--with-system-lcms2 \
--with-system-libatomic_ops \
--with-system-libpng \
--with-system-libxml \
--with-system-neon \
--with-system-nss \
--with-system-odbc \
--with-system-openldap \
--with-system-openssl \
--with-system-poppler \
--with-system-redland \
--with-system-serf \
--with-system-zlib

sudo -u http make
make install

Wenn alles gut gegangen ist, befindet sich die fertige Installation unter
/opt/LibreOfficeFromSource

Die Quellen braucht man jetzt nicht mehr. Man kann diese jetzt oder spÀter
löschen
muss aber nicht
 (rm -rf /tmp/LibreOfficeCore)

#####################################################################################

Schritt 2 - LibreOfficeOnline WebSocketServer:

Hier benötigt man die “poco” Pakete, die man sie entweder aus den Quellen bauen kann
oder - wie ich bei meinem ArchLinux - aus dem AUR holt.
Da ich pacaur installiert habe, konnte ich das mit

pacaur -y poco-git

erledigen.

Quellen holen und vorbereiten:

cd /opt; \
git clone https://github.com/LibreOffice/online.git lool; \
cd /opt/lool/loolwsd; \
libtoolize; \
aclocal; \
automake --add-missing; \
autoreconf; \
autoheader

Konfiguration fĂŒr make:

/opt/lool/loolwsd/configure \
--sysconfdir=/opt/lool/loolwsd/etc \
--prefix=/opt/lool/loolwsd \
--enable-silent-rules \
--with-lokit-path=/opt/lool/loolwsd/bundled/include \
--with-lo-path=/opt/LibreOfficeFromSource/lib/libreoffice \
--enable-debug

chown -R http /opt/lool; \
sudo -u http mkdir /opt/lool/loolwsd/var; \
sudo -u http mkdir /opt/lool/loolwsd/var/cache; \
sudo -u http mkdir /opt/lool/loolwsd/var/cache/loolwsd

sudo -u http make

Da ich Letsencrypt nutze, habe ich die auch fĂŒr loolwsd verwendet:

rm -rf /etc/loolwsd; \
mkdir /etc/loolwsd; \
cp -L /etc/letsencrypt/live/...DOMAIN.../cert.pem /etc/loolwsd/cert.pem; \
cp -L /etc/letsencrypt/live/...DOMAIN.../chain.pem /etc/loolwsd/ca-chain.cert.pem; \
cp -L /etc/letsencrypt/live/...DOMAIN.../privkey.pem /etc/loolwsd/key.pem

Jetzt wird noch der Client-Teil benötigt:

cd /opt/lool/loleaflet
make

Start von loolwsd auf der Konsole (zum Testen):

sudo -u http /opt/lool/loolwsd/loolwsd \
--o:sys_template_path=/opt/lool/loolwsd/systemplate \
--o:lo_template_path=/opt/LibreOfficeFromSource/lib/libreoffice \
--o:child_root_path=/opt/lool/loolwsd/jails

Meine Servicedatei sieht unter Arch so aus:


cat /etc/systemd/system/loolwsd.service

[Unit]
Description=LibreOffice On-Line WebSocket Daemon
After=network.target

[Service]
ExecStart=/opt/lool/loolwsd/loolwsd --version --o:sys_template_path=/opt/lool/loolwsd/systemplate --o:lo_template_path=/opt/LibreOfficeFromSource/lib/libreoffice --o:child_root_path=/opt/lool/loolwsd/jails --o:file_server_root_path=/opt/lool
User=http
KillMode=control-group
Restart=always

[Install]
WantedBy=multi-user.target

#####################################################################################

Anpassung fĂŒr die App “Collabora Online” (richdocuments) in NextCloud:

Damit man auch aus der Files-App Dokumente öffnen kann, muss noch ein "Listener"
hinzugefĂŒgt werden
(neu ab V9.0)

NEXCLOUDDIR/apps/richdocuments/appinfo/app.php 43ff:

$c->getServer()->getNavigationManager()->add($navigationEntry);

//Script for registering file actions
/*
$request = \OC::$server->getRequest();
if (isset($request->server['REQUEST_URI'])) {
        $url = $request->server['REQUEST_URI'];

        if (preg_match('%index.php/apps/files(/.*)?%', $url)) {
                \OCP\Util::addScript('richdocuments', 'viewer/viewer');
                \OCP\Util::addStyle('richdocuments', 'viewer/odfviewer');
        }
}
*/

$eventDispatcher = \OC::$server->getEventDispatcher();
$eventDispatcher->addListener(
        'OCA\Files::loadAdditionalScripts',
        function() {
                \OCP\Util::addScript('richdocuments', 'viewer/viewer');
                \OCP\Util::addStyle('richdocuments', 'viewer/odfviewer');
        }
);

//Listen to delete file signal
\OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Richdocuments\Storage", "onDelete");

#####################################################################################

OptimierungsvorschlĂ€ge sind natĂŒrlich sehr willkommen!!

SEE ALSO THE NEW UPDATED TOPIC

6 Likes

Hey mad_mat,
vielen Dank, funktioniert gut habs gerade auf Debian jessie nach deiner Anleitung zum laufen gebracht.

Es hat nicht auf anhieb funktioniert, da Poco seine bibliotheken nach /usr/local installiert hat, wo debian sie anscheinend nicht findet.
Das HinzufĂŒgen von

cat /etc/ld.so.conf.d/99local.conf
/usr/local/lib
hat geholfen.

1 Like

Du hĂ€ttest auch “loolwsd” anpassen können:

If you have self-built Poco, add the following to ./configure:

    --with-poco-includes=<POCOINST>/include --with-poco-libs=<POCOINST>/lib

where <POCOINST> means the Poco installation location.

Quelle:
https://github.com/LibreOffice/online/tree/master/loolwsd

Aber auf alle FĂ€lle freut es mich, wenn Du es zum Laufen gebracht hast.

Den --with-poco-includes=<POCOINST>/include hatte ich beim Kompelieren dabei, das Problem ist erst richtig beim ersten starten aufgetretten, da er beim ausfĂŒhren die Biblithek nicht gefunden hat.

Und Du hast <POCOINST> auch mit den richtigen Pfadangaben ersetzt? 
ist ja nur ein Platzhalter in der README

--with-poco-includes=<POCOINST>/include --with-poco-libs=<POCOINST>/lib

bei den beiden Angaben muss <POCOINST> nicht zwingend gleich sein. Das kommt darauf an, was Du beim Bauen von POCO angegeben hast.

Wie gesagt den --with-poco-includes=<POCOINST>/include hatte ich richtig gesetzt (/usr/local/include) beim kompilieren, dass hat ja auch ohne probleme funktioniert. Den --with-poco-libs hatte ich beim kompilieren nur vergessen zu setzen und hatte dann beim ersten starten von loolwsd das problem das er die Biblithek nicht laden konnte. Ich hatte dann keine Lust neu zu Kompilieren, debian beizubringen wo es die Bibliothek findet schien mir dann schneller.

Would be nice to have this in the AUR

Hi.

Thanx for the detailed description. I have just tried to implement this in my cloud.
Downloaded stable libreoffice 5.1.4.2 & libreoffice on-line from the git repository.
After compilation and trying to start loolwsd I see:

frk-32080-00 00:00:00.073630 [ loolforkit ] No lok_preinit symbol in /opt/libreoffice-5.1.4.2/lib/libreoffice/program/libsofficeapp.so: /opt/libreoffice-5.1.4.2/lib/libreoffice/program/libsofficeapp.so: undefined symbol: lok_preinit
wsd-32071-00 00:00:02.021066 [ loolwsd ] Child process [32080] exited with code: 70.

Which problem causes this and how to solve it? The same error appeared also when I tried to use libreoffice4 from the OS. Googling didn’t help :frowning:

Thanx.

Please use the master-branch from git.

git clone https://github.com/LibreOffice/core.git

I think it is a 5.3 version


And I think too
the best way is to use included loolswd toolkit
see --with-lokit-path=/opt/lool/loolwsd/bundled/include by configure the loolwsd-build
see

/opt/lool/loolwsd/configure \
--sysconfdir=/opt/lool/loolwsd/etc \
--prefix=/opt/lool/loolwsd \
--enable-silent-rules \
--with-lokit-path=/opt/lool/loolwsd/bundled/include \
--with-lo-path=/opt/LibreOfficeFromSource/lib/libreoffice \
--enable-debug

in my example


if you build the libre from core by yourself, you always have the chance to select your own installationdir
see

./autogen.sh --prefix=/opt/LibreOfficeFromSource
.
.
.

in my post. So you can keep more then one libreoffice-builds in your os (for testing)


good luck!

I think that makes no sense at this time cause of the experimental state of loolwsd an the richdokuments app

BUT sometimes it would be nice!

thanx for the replay.

as in your explanation I used --with-lokit-path=/opt/lool/loolwsd/bundled/include to configure loolwsd.

I have just downloaded virtual image for CODE to check what they have inside. So their loolwsd is of course older but libreoffice too. And there are no such kind of lok_preinit symbol in their libraries as well as libsofficeapp.so.
Ok. I will take the latest libreoffice from the git.
But still there are mentions about _preinit in libreoffice on-line but not in the libreoffice core sources. Maybe it can be solved by choosing configuration parameters in libreoffice core?

But - I think - it is an DEV-Bulid and not a stable.

Please inform us about your try


Please use the “master branch” from git.

git clone https://github.com/LibreOffice/core.git

and do not set

--enable-mergelibs

option in autogen.sh.

--enable-mergelibs
Enables linking of big, merged, library.
Experimental feature, tested only for Linux at some
stage in history, but possibly does not work even
for Linux any more. This will link a core set of
libraries into libmerged.

Then you will get a proper libsofficeapp.so. (In my case, it worked so)

In the collabora-vm-image libre is build with --enable-mergelibs. So there is no libsofficeapp.so but the libmergedlo.so.
This may work but must not
in my case I can’t build libreoffice with this option.

Yes, I saw that collabora-vm-image libre uses mergelibs. Anyways, libreoffice branch from git compiled libsofficeapp.so with this lok_preinit symbol and loowsd does not complain this already.
But now I have a new problem:

kit-64204-00 00:00:16.140231 [ loolkit ] Initialized jail files.
kit-64204-00 00:00:16.140337 [ loolkit ] mknod(/opt/libreoffice-online/loolwsd/jails/64204//dev/random) failed. (errno: Operation not permitted)
kit-64204-00 00:00:16.140364 [ loolkit ] mknod(/opt/libreoffice-online/loolwsd/jails/64204//dev/urandom) failed. (errno: Operation not permitted)
kit-64204-00 00:00:16.140376 [ loolkit ] chroot("/opt/libreoffice-online/loolwsd/jails/64204/")
kit-64204-00 00:00:16.140394 [ loolkit ] chroot("/opt/libreoffice-online/loolwsd/jails/64204/") failed. (errno: Operation not permitted)
frk-64188-00 00:00:17.004916 [ loolforkit ] Child 64204 has exited, removing its jail '/opt/libreoffice-online/loolwsd/jails/64204'

loolwsd is started as www-data user and all directories & files in this path (except /opt) /opt/libreoffice-online/loolwsd/jails are belong to www-data user.
Will try to figure out later on what kind of permissions it complains about but maybe someone has a hint.

Thanx.

Could it be a SELinux problem?

Did you install “libcap”?

LibreOffice On-Line WebSocket server
====================================

Dependencies
------------

LibreOffice On-Line WebSocket server has the following dependencies:

* libpng
* Poco library: http://pocoproject.org/index.html.
* libcap-progs

See: https://github.com/LibreOffice/online/tree/master/loolwsd

Hi,
thanx for the quick replay. SELinux is disabled. libcap is installed.
I saw in spec files for redhat/debian packages in loolwsd sources that they use setcap for loolwsd & loolforkit. Would be this a case to prevent these permission errors?

setcap cap_fowner,cap_mknod,cap_sys_chroot=ep /usr/bin/loolforkit || true
setcap cap_sys_admin=ep /usr/bin/loolmount || true

Hallo, Danke fĂŒr die Tolle Anleitung. Leider kann ich den loolwsd nicht starten.
Ich bekomme die Fehlermeldung:
frk-29542-00 00:00:00.879335 [ loolforkit ] No lok_preinit symbol in /usr/lib/libreoffice/program/libmergedlo.so: /usr/lib/libreoffice/program/libmergedlo.so: undefined symbol: lok_preinit

Kann jemand was damit anfangen? Die github Seite von lool hat leider keinen Issue Seite, so dass ich da nciht mit den Entwicklern kommunizieren kann.

Ich habe Ubuntu 16.04 LTS. Libreoffice habe ich aus den Paketquellen Installiert. Poco und loolwsd zu bauen hat ohne Fehlermeldungen geklappt (nach ein paar anlÀufen).

Muss ich Libreoffice aus den quellen selber bauen?