Open IT Experts for Enterprise

Zylk empresa de desarrollo de ecommerce

Online edition with Libreoffice in Alfresco 5

Cesar Capillas
Cesar Capillas
Last days I was asked for a tip (again) for enabling online edition
via webdav with Libreoffice in Alfresco 5. It is tested with this setup:
  • Ubuntu 14.04 LTS (although it can work in other Linux)
  • Libreoffice 4.2.8.2 (it comes with the Linux distro)
  • Alfresco CE 5.0c && 5.0d (the jar is valid for Alfresco 4 too)
  • Last versions of Firefox and Chrome
So, in your Alfresco 5 server you need to download the jar file and
copy in $ALF_HOME/tomcat/shared/lib directory, restarting alfresco service:
 
 
Once, you should see "Edit. Online" action for MS-Office
and Libreoffice mimetypes. It is clear that you need webdav enabled in
your repository (and access to the webdav context).
 
Then, for make it work, you need to register an url-handler based
protocol for dav:// and davs:// urls with Libreoffice. This can be
done via two methods (that can work in different versions of Linux).
 
Method 1:
 
Create
the next file
, and the corresponding path, if it does not exist.
 
$ vim ~/.local/share/applications/libreoffice-alf.desktop 
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=LibreOffice for Alfresco
GenericName=LibreOffice for Alfresco
Comment=Online Editing in Alfresco via webdav
Icon=libreoffice-writer
TryExec=soffice
Exec=soffice %U
Terminal=false
Type=Application
Categories=Office;
MimeType=x-scheme-handler/davs;x-scheme-handler/dav;x-scheme-handler/vnd.sun.star.webdavs;x-scheme-handler/vnd.sun.star.webdav
 
2. Create the mimeapps.list file, if it does not exist. If it
exist, just add the two x-scheme handlers,
 
$ vim ~/.local/share/applications/mimeapps.list
[Added Associations]
x-scheme-handler/davs=libreoffice-alf.desktop;
x-scheme-handler/dav=libreoffice-alf.desktop;
x-scheme-handler/vnd.sun.star.webdavs=libreoffice-alf.desktop; 
x-scheme-handler/vnd.sun.star.webdav=libreoffice-alf.desktop;
 
Method 2: 
 
This is done for all users of the operating systems, you need
sudoer privileges
 
1. Just create the file in the next path:
 
$ sudo vim /usr/share/applications/libreoffice-alf.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=LibreOffice for Alfresco
GenericName=LibreOffice for Alfresco
Comment=Online Editing in Alfresco via webdav
Icon=libreoffice-writer
TryExec=soffice
Exec=soffice %U
Terminal=false
Type=Application
Categories=Office;
MimeType=x-scheme-handler/davs;x-scheme-handler/dav;x-scheme-handler/vnd.sun.star.webdavs;x-scheme-handler/vnd.sun.star.webdav
 
2. Add x-scheme-handlers to mimeinfo.cache
 
$ sudo vim /usr/share/applications/mimeinfo.cache
# Add to the file
x-scheme-handler/davs=libreoffice-alf.desktop;
x-scheme-handler/dav=libreoffice-alf.desktop;
x-scheme-handler/vnd.sun.star.webdavs=libreoffice-alf.desktop; 
x-scheme-handler/vnd.sun.star.webdav=libreoffice-alf.desktop;
 
3. Update desktop cache
 
$ sudo update-desktop-database 
 
Then when you "Edit. online", you see some dialog for
remembering the action for opening the url. Libreoffice asks for your
credentials once in a session.
 
For Windows users, it is possible to register the protocol too,
with the help of (there is also a .reg file in the downloads section
of the googlecode project – put the correct path for the Libreoffice command):
 
 
Update: The addon is now available at:
 
 
 
For Libreoffice 5.1 and Alfresco 4.x and 5.x setups, based on
vnd.sun.star.webdav(s) url schemes. Tested on Ubuntu 16.04 LTS clients.

Si te ha parecido interesante comparte este post en RRS

Facebook
LinkedIn
Telegram
Email

Leer más sobre temas relacionados

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *