Ask Your Question
0

How to get 2 instances of LibreOffice running?

asked 2018-07-18 21:32:25 +0200

thesun gravatar image

I use VNC and also sit locally at my computer. If I've started LibreOffice locally, any document I open in VNC opens locally, invisible to me in VNC. And likewise, if I've left any docs open in VNC, when I return home and open a document, it opens in the VNC window and I have to log in, close all open docs, then restart VNC again.

Is there a way to have the same user (I'm running Linux) open two separate instances of LibreOffice or force it to display a window on a particular display? My VNC is at :3.0 and my localhost is :0.0. I've successfully done this with some programs using the --display parameter but this doesn't work for LibreOffice.

It's a very frustrating limitation. Especially since when I'm working remotely, the only way to get LibreOffice to run on the VNC terminal is to kill it, causing any work or open documents to risk being unsaved. They usually are safely "Recovered" but still...it just seems silly to have it not spawn a separate process in whichever display is being used.

Any thoughts or work-arounds would be fantastic.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-07-18 23:28:57 +0200

Use -env:UserInstallation=file:///path/to/dedicated/user/profile when launching LibreOffice in VNC session using the command line. Use dialogs of that instance of LO to open files (not double-clicking to files in file manager).

edit flag offensive delete link more

Comments

Hey, fantastic. So the cli example would be:

:~$ libreoffice --writer -env:UserInstallation=file:///home/myusername

Is there any way to set this via bash or something so that it will be possible to use it doubleclicking? For instance, if I doubleclick an attachment within Thunderbird, can it open this way by default?

thesun gravatar imagethesun ( 2018-07-19 02:39:31 +0200 )edit

@Mike-Kaginski, alas, tried this and it doesn't seem to work. Perhaps because it's the same user profile? Could that be what's causing the issue...? I'm running VNC on the same machine and same user profile as I'm using on localhost.

thesun gravatar imagethesun ( 2018-07-19 02:41:30 +0200 )edit

https://wiki.documentfoundation.org/UserProfile

By the way, the easiest way to spell names correctly is use copy-paste.

Mike Kaganski gravatar imageMike Kaganski ( 2018-07-19 02:46:13 +0200 )edit

@mike-kaganski, apologies for the typo. I've tried and am getting the same thing. If I've already opened an instance of LibreOffice, it's bound to the existing one. Tried with the /home/myusername/.config/libreoffice/4/user location and still opens up on localhost. Am I doing something wrong still?

thesun gravatar imagethesun ( 2018-07-19 03:05:38 +0200 )edit

It's strange... I don't run Linux; still, for me, command "C:\Program Files\LibreOffice\program\soffice.exe" -env:UserInstallation=file:///C:/Users/mk/AppData/Roaming/LibreOffice/4.suppl works as expected. I'd expect that for you, something like libreoffice -env:UserInstallation=file:///home/myusername/.config/libreoffice/4vnc --writer should do.

Mike Kaganski gravatar imageMike Kaganski ( 2018-07-19 03:08:45 +0200 )edit

I had the flag --writer in the middle, but no, it's not working. Thanks for trying though, and who knows, maybe I made a typo or something. Will keep playing around.

thesun gravatar imagethesun ( 2018-07-19 04:22:06 +0200 )edit

A wild guess: can't that be that libreoffice is a kind of script that itself does some "smart" processing that finds the running instance, and so doesn't allow the actual binary (soffice.bin) to handle the -env switch?

Mike Kaganski gravatar imageMike Kaganski ( 2018-07-19 04:32:22 +0200 )edit

Alas, no, that doesn't seem to help either. Tried with soffice instead of libreoffice and it's the same result.

thesun gravatar imagethesun ( 2018-07-19 15:19:24 +0200 )edit

I hoped you'd try soffice.bin. Well - /me is out of ideas, sorry. Will only be able to test on a Linux in two weeks...

Mike Kaganski gravatar imageMike Kaganski ( 2018-07-19 15:33:20 +0200 )edit

Well, I've had this issue for months now, so I am happy to wait a few weeks until you can test on Linux! :-) No worries. Thanks for all your time thus far.

thesun gravatar imagethesun ( 2018-07-20 21:50:01 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-07-18 21:32:25 +0200

Seen: 296 times

Last updated: Jul 18 '18