5

I'm running LibreOffice 4.2.8.2, and I also use Dropbox. My problem is that I often modify my documents on different machines: one at work and one at home (both run Ubuntu 14.04).

After modifying the document at work, say, I go home and my laptop syncs its version of the document with the one in the cloud. The next time I try to open the document at home, however, LibreOffice notices that the document has changed since the last time it was open, and tries to get me to run the recovery process.

Is it possible to tell LibreOffice not to try to recover documents from the Dropbox directory, without turning off document recovery altogether?

After some web searching, I've turned up nothing except for instructions on how to turn off document recovery altogether for LibreOffice.

  • I have partially adapted the answer from this post and use that in a diffferent way instead. Details in my answer below. – clearkimura Dec 31 '15 at 19:30
  • Updated my answer for using parameter in Nautilus Actions; version 2.99 and newer should use %F instead of %M for the full path to the selected file or files. – clearkimura Jan 1 '16 at 8:46
4
+50

No, it is not possible from my finding. There is no way to disable recovery per file basis, unless you run LibreOffice from command line with --norestore option.

However, I found a workaround that is less a hassle.

Nautilus Actions

In Ubuntu 14.04, the default file manager is Nautilus. Its context menu or right-click menu can be configured further by using Nautilus Actions.

Nautilus Actions Configuration Tool

The screenshot above was taken via Synaptic package manager (The appearance may vary for newer releases). By default, there may be no items listed in Nautilus Actions Configuration Tool.

Thunar Custom Actions (alternative)

In Xubuntu 14.04, the default file manager is Thunar. Similarly, Thunar has already built-in Custom Actions that manages the custom context menus.

Thunar Custom Actions window

Thunar Edit Action window

The screenshots above were taken from my own machine, running Xubuntu 14.04 with custom theme colour. By default, there are only two items: "Open Terminal Here", "Find in this folder".

How to do workaround

By using either of two configuration tools, create a new action i.e. "Open file without recovery" in context menu that includes the command line of LibreOffice with --norestore option.

  • Typical command line looks like this:

    libreoffice --norestore -o FILENAME
    

    whose FILENAME is replaced with the document filename i.e. test.odt, which could also be multiple files separated by a space after each filename i.e. test1.odt test2.odt

    and -o is to open documents regardless whether they are templates or not

  • In Nautilus Actions, it is modified to this:

    libreoffice --norestore -o %M
    

    where by %M is the full path to the selected file or files; Use %F for version 2.99 or newer

  • In Thunar Custom Actions, it is modified to this:

    libreoffice --norestore -o %F
    

    where by %F is the paths to all selected files

Additionally, the custom context menu can be made visible for certain files only i.e. *.odt,*.doc such that the menu will only appear if files with specified extensions were selected.

The workaround in action

Since my machine is running Xubuntu 14.04, I will demonstrate using Thunar only. Select one or multiple files and right-click on mouse to open the context menu.

"Open file without recovery" in action

Then, select "Open file without recovery" (or whatever name given to the custom menu) to skip the recovery dialog and open the documents directly in LibreOffice.

Disclaimer

While I have tested the workaround using LibreOffice 4.2.8.2 and Thunar Custom Actions in Xubuntu 14.04, I didn't do any test using Nautilus Actions in anyway. However, I have taken care and checked the customization options in Nautilus Actions based on my finding on the Web.

References

  1. How to prevent LibreOffice running 'recover' at each startup? on Super User.

  2. Manpage of libreoffice - LibreOffice office suite on Ubuntu Manpage.

  3. Version changelog for Nautilus Actions on GitHub repository, last visited on 2016.01.01.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.