Page 1 of 1

[Solved] Both OpenOffice & LibreOffice on same installation

Posted: Wed Oct 26, 2016 12:31 am
by endtimes
I installed OpenOffice without running the desktop integration deb.
LibreOffice still runs as normal.
I can run OpenOffice by going to /opt/openoffice4/program in a file manager and clicking on soffice.
It seems to work OK (although there are occasional crashes).
I'd be grateful if someone could tell me how to make a desktop shortcut to start OpenOffice.

Re: Both OpenOffice and LibreOffice on same installation

Posted: Wed Oct 26, 2016 4:47 am
by robleyd
One way; open a file manager and drag the soffice executable to your desktop. At least in KDE this will create a desktop shortcut.

OpenOffice is usually installed in /opt/openoffice4 and the file you want is /opt/openoffice4/program/soffice

Re: Both OpenOffice and LibreOffice on same installation

Posted: Wed Oct 26, 2016 8:55 am
by esperantisto
Who needs shortcuts? I would simply create a bash script of just two lines:

Code: Select all

#!/bin/bash
/opt/openoffice4/program/soffice
save it to ~/bin (for example, ~/bin/aoo) and make executable. Then simply Alt+F2 and enter aoo. Of course, you can create a shortcut to that script.

Re: Both OpenOffice and LibreOffice on same installation

Posted: Wed Oct 26, 2016 10:17 am
by endtimes
esperantisto wrote:Who needs shortcuts? I would simply create a bash script of just two lines:

Code: Select all

#!/bin/bash
/opt/openoffice4/program/soffice
save it to ~/bin (for example, ~/bin/aoo) and make executable. Then simply Alt+F2 and enter aoo. Of course, you can create a shortcut to that script.
That worked.

I made a folder called aoo containing executable text file in /bin.
Wrote:
#!/bin/bash
/opt/openoffice4/program/soffice
in the file.
A link to it on desktop works but only if file manager is set to run executable text files instead of open them.
Created a launcher to it (using the "create launcher..." option from right click on desktop and putting /bin/aoo/oo in command field).
The launcher is not pleasing to the eye but works.

Good solution - Thankyou very much.

Re: Both OpenOffice and LibreOffice on same installation

Posted: Wed Oct 26, 2016 10:26 am
by endtimes
robleyd wrote:One way; open a file manager and drag the soffice executable to your desktop. At least in KDE this will create a desktop shortcut.

OpenOffice is usually installed in /opt/openoffice4 and the file you want is /opt/openoffice4/program/soffice
Thanks, but that didn't work on Mint. It created a copy of the file on the desktop but clicking on that either opens the flle or does nothing depending on file manager settings. Creating a desktop link to the soffice file doesn't work either.

Re: Both OpenOffice and LibreOffice on same installation

Posted: Wed Oct 26, 2016 10:30 am
by RoryOF
Right click on desktop and create a Launcher?

Re: Both OpenOffice and LibreOffice on same installation

Posted: Wed Oct 26, 2016 10:38 am
by robleyd
Just for curiosities sake, what window manager does your version of Mint use.

My suggestion worked on my KDE.

Re: Both OpenOffice and LibreOffice on same installation

Posted: Wed Oct 26, 2016 11:12 am
by endtimes
robleyd wrote:Just for curiosities sake, what window manager does your version of Mint use.

My suggestion worked on my KDE.

Caja 1.14.2

Re: Both OpenOffice and LibreOffice on same installation

Posted: Wed Oct 26, 2016 11:16 am
by endtimes
RoryOF wrote:Right click on desktop and create a Launcher?
I thought I had tried that and it didn't work at the time, but have tried again and it does now - thanks.

[I had made some change to the swriter file, but after a purge and reinstall of OpenOffice, a launcher to /opt/openoffice4/program/swriter works fine.]

Re: Both OpenOffice and LibreOffice on same installation

Posted: Wed Oct 26, 2016 10:02 pm
by Hagar Delest
If the right click to create a launcher doesn't work, you can also create a desktop entry (the equivalent of the shortcuts but recognized at the desktop manager level):
Create an openoffice.desktop file that contains:

Code: Select all

[Desktop Entry]
Exec=/opt/openoffice4/program/soffice
Icon=/opt/openoffice4/program/logo.png
Name=OpenOffice
Terminal=false
Type=Application
Version=4
Save it in ~/.local/share/applications
Make it executable.
It should now appear in the menus if they follow the freedesktop standard.

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the edit button if your issue has been fixed.

Re: Both OpenOffice and LibreOffice on same installation

Posted: Wed Oct 26, 2016 11:04 pm
by endtimes
Hagar Delest wrote:If the right click to create a launcher doesn't work, you can also create a desktop entry (the equivalent of the shortcuts but recognized at the desktop manager level):
Create an openoffice.desktop file that contains:

Code: Select all

[Desktop Entry]
Exec=/opt/openoffice4/program/soffice
Icon=/opt/openoffice4/program/logo.png
Name=OpenOffice
Terminal=false
Type=Application
Version=4
Save it in ~/.local/share/applications
Make it executable.
It should now appear in the menus if they follow the freedesktop standard.
This was easy and works. I did it for soffice and swriter. I use synapse as a launcher and both OpenOffice and Swriter became available immediately through synapse. They also appear under "Other" in the menu and dragging from there to desktop gives a shortcut with the seagull icon on it - lovely. Thankyou.

Re: Both OpenOffice and LibreOffice on same installation

Posted: Thu Oct 27, 2016 9:20 pm
by Hagar Delest
endtimes wrote:I use synapse as a launcher and both OpenOffice and Swriter became available immediately through synapse. They also appear under "Other" in the menu
You can add the following line and it should disappear from the "Other" menu.
Categories=Application;Office;

Re: Both OpenOffice and LibreOffice on same installation

Posted: Thu Oct 27, 2016 11:39 pm
by endtimes
Hagar Delest wrote:You can add the following line and it should disappear from the "Other" menu.
Categories=Application;Office;
It worked for soffice. It didn't work for the similar "desktop entry I made for swriter.

I fiddled about with the files etc and now it works for swriter and not for soffice. The swriter entry appears in the Office menu with the name OpenOfficeWriter and the soffice entry appears in the Other menu with the name OpenOffice.desktop

The two desktop entry files in .local/share/applications currently contain:

1) soffice file:
[Desktop Entry]
Exec=/opt/openoffice4/program/soffice
Icon=/opt/openoffice4/program/logo.png
Name=OpenOffice
Terminal=false
Type=Application
Version=4
Categories=Application:Office;

2) the similar one I made for swriter:
[Desktop Entry]
Exec=/opt/openoffice4/program/swriter
Icon=/opt/openoffice4/program/logo.png
Name=OpenOfficeWriter
Terminal=false
Type=Application
Version=4
Categories=Application;Office;

Notes:
1) Something had added the following line to the end of the files last time I'd written them:
Name[en_GB]=openofficeWriter
2) Editing the current "Name=xxx" line to "Name[en_GB]=xxx" means the program doesn't appear in any menu.
3) The last word in the current files (ie Office") appears highlighted in red in my text editor. Changing it to "office" - ie lower case, takes away the highlighting and it may still work.
4) The OpenOfficeWriter.desktop file has retained its extension but the soffice one is simply called Openoffice, can be renamed OpenOffice.desktop but is inclined to revert to being extensionless.
5) Earlier today I clicked on the desktop icon I now have for oo writer. I got a message asking (and I paraphrase), Do you trust this?, and on clicking yes, it too suddenly got the seagulls icon.
6) While typing these points, the line: "Name[en_GB]=OpenOffice.desktop" has again been added to the end of the soffice file but not to the swriter one.
7) I'm very happy with the result you've helped me achieve. It is for someone else and is better than I expected. He uses desktop shortcuts instead of the menus so it is a good result, however if you are able to make sense of these notes and gild the lily, I'll continue. Thankyou.

Re: Both OpenOffice and LibreOffice on same installation

Posted: Fri Oct 28, 2016 12:41 pm
by endtimes
Hagar Delest wrote:You can add the following line and it should disappear from the "Other" menu.
Categories=Application;Office;
OK, both the entries - Office & Writer have now moved to the correct menu.

The desktop entry files now read:

[Desktop Entry]
Name=OpenOffice
Exec=/opt/openoffice4/program/soffice
Icon=/opt/openoffice4/program/logo.png
Type=Application
Version=4
Categories=GTK:GNOME;Office;

and

[Desktop Entry]
Name=OpenOfficeWriter
Exec=/opt/openoffice4/program/swriter
Icon=/opt/openoffice4/program/logo.png
Type=Application
Version=4
Categories=GTK:GNOME;Office;

The last word is still showing up highlighted in red but perhaps that doesn't matter.

The lily is now gilded. Thankyou very much for your help - and going the extra mile.

Re: Both OpenOffice and LibreOffice on same installation

Posted: Fri Oct 28, 2016 9:47 pm
by Hagar Delest
endtimes wrote:The last word is still showing up highlighted in red but perhaps that doesn't matter.
I see that also in some of my desktop entries. Don't know either what it means.