How to get any version of libreoffice to install to opt\libreoffice\program?

I currently have LibO_3.5.4_Linux_x86_install-deb_en-US.tar.gz installed. My install location is \opt\libreoffice3.5. I currently have my firefox application setting set to save file but I prefer to use the libreoffice application path in order to open a downloaded file right away.
I have mimetypes for libreoffice installed in firefox. If I need to open a .doc, .xls or .ppt file, I used the following info in the firefox applications preferences setting.


word files


\opt\libreoffice3.5\program\swriter


excel files


\opt\libreoffice3.5\program\scalc


powerpoint files


\opt\libreoffice3.5\program\simpress


I use the above applications path in firefox anytime I want to open a downloaded word, excel or powerpoint file immediately using the firefox applications preferences setting.
Here’s where the problem comes in.
If I install a later version of libreoffice and the program path changes, I can no longer open word, excel or powerpoint files immediately from firefox.
I know I can tell firefox to save the file to the hard drive but I prefer to have the file be opened using firefox right away.
If I installed libreoffice 3.6 or 4.0 the program location would change to
\opt\libreoffice3.6 or \opt\libreoffice4.0 and I could no longer open the files.
Is there anyway to install any version if libreoffice to \opt\libreoffice\program so that I can open word, excel or powerpoint files downloaded using firefox without have to change the application/mimetype path each time a new version is installed?

If you install the desktop-integration package, you will get a launcher in /usr/bin - so just add that instead.

Also there is no need to open files with swriter or scalc directly, as the filetype will be detected automatically and passed on to the correct application anyway.

So install the desktop-integration package (you want to also be able to use LO from your filemanager and your application-menu, don’t you?) and add /usr/bin/libreoffice instead.

I’m using kde and I run libreoffice from the kde menu right now.
I have the desktop-integration package installed.
Am I the only one who likes being able to open .doc, .xls or .ppt file directly from a webpage?
Maybe it’s a female thing.
Everything installs fine but I just want to know if it’s possible for the program path to be changed during the install?
This way every time I install a new version, it won’t mess up my firefox applications path. Thx for responding.

I deleted my firefox mimetype and reran desktop -integration.
I can get .doc, .ppt and .xls to open using firefox with (libreoffce3.5 default).
Now I guess I need to figure out which file association I need to use for .docx, .pptx and .xlxs.
I was able to open these before when I used the file path \opt\libreoffice3.5\program
I’ll keep looking online.
If this works, then hopefully when I install libreoffice 3.6, my firefox applictions mimetype will still work. My original custom firefox mimetype pointed to \opt\libreoffice3.5\program for doc, docx, ppt, pptx, xls, xlsx, etc.

I ended up going back to my original mimetypes file. When deleting the original and starting from scratch, firefox did not know how to handle docx, pptx, xlsx, etc. When I got that fixed, and I tried to open a .zip file downloaded from the net, the zip file tried to open using libreoffice writer. That’s when I figured I’d just go back to my original file. I’ll just manually edit my mimetype file when reinstalling a later version of libreoffice so that the new path is recognized.