sawjew
November 23rd, 2005, 11:02 PM
I spend a lot of time viewing Word, Powerpoint and Excel files online and I don't really want to download each one to view it. I like to view the file first and then I can save it if I so desire. I came up with this simple modification to enable me to view MS Office documents using the Openoffice plugin in Firefox.
The first thing is to make sure you have the Mozilla-openoffice.org package installed.
The next step is to open any Openoffice interface (I usually use Writer) and go to Tools > Options > Internet > Mozilla Plug-in and check "enable".
Next go to /home/<your_name>/.mozilla/firefox/
note: you will have to enable "Show Hidden Files" in Nautilus
You will find a file named "pluginreg.dat", open the file with a text editor.
NOTE that you must have Firefox closed when you modify pluginreg.dat or it will overwrite your modified file with the defaults when you close it.
You should find a section like this;
OpenOffice.org Plug-in handles all its documents:$
OpenOffice.org Plug-in:$
31
0:application/vnd.stardivision.calc:StarCalc 3.0 - 5.0:sdc:$
1:application/vnd.stardivision.chart:StarChart 3.0 - 5.0:sds:$
2:application/vnd.stardivision.draw:StarDraw 3.0 - 5.0:sda:$
3:application/vnd.stardivision.impress:StarImpress 3.0 - 5.0:sdd:$
4:application/vnd.stardivision.impress-packed:StarImpress-packed 3.0 - 5.0:sdp:$
5:application/vnd.stardivision.math:StarMath 3.0 - 5.0:smf:$
6:application/vnd.stardivision.writer:StarWriter Template 3.0 - 5.0:vor:$
7:application/vnd.stardivision.writer-global:StarWriter Global 3.0 - 5.0:sgl:$
8:application/vnd.staroffice.writer:StarWriter 3.0 - 5.0:sdw:$
9:application/vnd.sun.xml.calc:StarOffice 6.0/7 Spreadsheet:sxc:$
10:application/vnd.sun.xml.calc.template:StarOffice 6.0/7 Spreadsheet Template:stc:$
11:application/vnd.sun.xml.draw:StarOffice 6.0/7 Drawing:sxd:$
12:application/vnd.sun.xml.draw.template:StarOffice 6.0/7 Drawing Template:std:$
13:application/vnd.sun.xml.impress:StarOffice 6.0/7 Presentation:sxi:$
14:application/vnd.sun.xml.impress.template:StarOffice 6.0/7 Presentation Template:sti:$
15:application/vnd.sun.xml.math:StarOffice 6.0/7 Formula:sxm:$
16:application/vnd.sun.xml.writer:StarOffice 6.0/7 Text Document:sxw:$
17:application/vnd.sun.xml.writer.global:StarOffice 6.0/7 Master Document:sxg:$
18:application/vnd.sun.xml.writer.template:StarOffice 6.0/7 Text Document Template:stw:$
19:application/vnd.oasis.opendocument.text:OpenDocument Text:odt:$
20:application/vnd.oasis.opendocument.text-template:OpenDocument Text Template:ott:$
21:application/vnd.oasis.opendocument.text-master:OpenDocument Master Document:odm:$
22:application/vnd.oasis.opendocument.text-web:HTML Document Template:oth:$
23:application/vnd.oasis.opendocument.spreadsheet:OpenDocument Spreadsheet:ods:$
24:application/vnd.oasis.opendocument.spreadsheet-template:OpenDocument Spreadsheet Template:ots:$
25:application/vnd.oasis.opendocument.graphics:OpenDocument Drawing:odg:$
26:application/vnd.oasis.opendocument.graphics-template:OpenDocument Drawing Template:otg:$
27:application/vnd.oasis.opendocument.presentation:OpenDocument Presentation:odp:$
28:application/vnd.oasis.opendocument.presentation-template:OpenDocument Presentation Template:otp:$
29:application/vnd.oasis.opendocument.formula:OpenDocument Formula:odf:$
30:application/vnd.sun.xml.base:OpenDocument Database:odb:$
Add three lines to the end of this section so that there are now 33 lines and change the number at the top from 31 to 34. The section should now read like this;
OpenOffice.org Plug-in handles all its documents:$
OpenOffice.org Plug-in:$
34
0:application/vnd.stardivision.calc:StarCalc 3.0 - 5.0:sdc:$
1:application/vnd.stardivision.chart:StarChart 3.0 - 5.0:sds:$
2:application/vnd.stardivision.draw:StarDraw 3.0 - 5.0:sda:$
3:application/vnd.stardivision.impress:StarImpress 3.0 - 5.0:sdd:$
4:application/vnd.stardivision.impress-packed:StarImpress-packed 3.0 - 5.0:sdp:$
5:application/vnd.stardivision.math:StarMath 3.0 - 5.0:smf:$
6:application/vnd.stardivision.writer:StarWriter Template 3.0 - 5.0:vor:$
7:application/vnd.stardivision.writer-global:StarWriter Global 3.0 - 5.0:sgl:$
8:application/vnd.staroffice.writer:StarWriter 3.0 - 5.0:sdw:$
9:application/vnd.sun.xml.calc:StarOffice 6.0/7 Spreadsheet:sxc:$
10:application/vnd.sun.xml.calc.template:StarOffice 6.0/7 Spreadsheet Template:stc:$
11:application/vnd.sun.xml.draw:StarOffice 6.0/7 Drawing:sxd:$
12:application/vnd.sun.xml.draw.template:StarOffice 6.0/7 Drawing Template:std:$
13:application/vnd.sun.xml.impress:StarOffice 6.0/7 Presentation:sxi:$
14:application/vnd.sun.xml.impress.template:StarOffice 6.0/7 Presentation Template:sti:$
15:application/vnd.sun.xml.math:StarOffice 6.0/7 Formula:sxm:$
16:application/vnd.sun.xml.writer:StarOffice 6.0/7 Text Document:sxw:$
17:application/vnd.sun.xml.writer.global:StarOffice 6.0/7 Master Document:sxg:$
18:application/vnd.sun.xml.writer.template:StarOffice 6.0/7 Text Document Template:stw:$
19:application/vnd.oasis.opendocument.text:OpenDocument Text:odt:$
20:application/vnd.oasis.opendocument.text-template:OpenDocument Text Template:ott:$
21:application/vnd.oasis.opendocument.text-master:OpenDocument Master Document:odm:$
22:application/vnd.oasis.opendocument.text-web:HTML Document Template:oth:$
23:application/vnd.oasis.opendocument.spreadsheet:OpenDocument Spreadsheet:ods:$
24:application/vnd.oasis.opendocument.spreadsheet-template:OpenDocument Spreadsheet Template:ots:$
25:application/vnd.oasis.opendocument.graphics:OpenDocument Drawing:odg:$
26:application/vnd.oasis.opendocument.graphics-template:OpenDocument Drawing Template:otg:$
27:application/vnd.oasis.opendocument.presentation:OpenDocument Presentation:odp:$
28:application/vnd.oasis.opendocument.presentation-template:OpenDocument Presentation Template:otp:$
29:application/vnd.oasis.opendocument.formula:OpenDocument Formula:odf:$
30:application/vnd.sun.xml.base:OpenDocument Database:odb:$
31:application/msword:Opendocument Text:doc:$
32:application/vnd.ms-excel:Opendocument Spreadsheet:xls:$
33:application/vnd.ms-powerpoint:Opendocument Presentation:ppt:$
Note the modifications highlighted in the text.
Save this file and then go up one level to /home/<user_name>/.mozilla/ where you will find a duplicate copy of "pluginreg.dat". Replace this pluginreg.dat with your modified pluginreg.dat.
It seems that if you don't replace both of these files the original version will overwrite the modified file next time you open Firefox.
Next time you open Firefox you should be able to view MS Office documents in a browser window.
To check if this worked open Firefox and open Edit > Preferences > Downloads > Plug-ins and you should see DOC, PPT and XLS listed as supported filetypes.
I have found this to be very successful on Gnome but in KDE I found that the files open correctly, but when you close a tab with an MS Office document in it it crashes Firefox. I have no idea what causes this. give it a try and see if it works.
The first thing is to make sure you have the Mozilla-openoffice.org package installed.
The next step is to open any Openoffice interface (I usually use Writer) and go to Tools > Options > Internet > Mozilla Plug-in and check "enable".
Next go to /home/<your_name>/.mozilla/firefox/
note: you will have to enable "Show Hidden Files" in Nautilus
You will find a file named "pluginreg.dat", open the file with a text editor.
NOTE that you must have Firefox closed when you modify pluginreg.dat or it will overwrite your modified file with the defaults when you close it.
You should find a section like this;
OpenOffice.org Plug-in handles all its documents:$
OpenOffice.org Plug-in:$
31
0:application/vnd.stardivision.calc:StarCalc 3.0 - 5.0:sdc:$
1:application/vnd.stardivision.chart:StarChart 3.0 - 5.0:sds:$
2:application/vnd.stardivision.draw:StarDraw 3.0 - 5.0:sda:$
3:application/vnd.stardivision.impress:StarImpress 3.0 - 5.0:sdd:$
4:application/vnd.stardivision.impress-packed:StarImpress-packed 3.0 - 5.0:sdp:$
5:application/vnd.stardivision.math:StarMath 3.0 - 5.0:smf:$
6:application/vnd.stardivision.writer:StarWriter Template 3.0 - 5.0:vor:$
7:application/vnd.stardivision.writer-global:StarWriter Global 3.0 - 5.0:sgl:$
8:application/vnd.staroffice.writer:StarWriter 3.0 - 5.0:sdw:$
9:application/vnd.sun.xml.calc:StarOffice 6.0/7 Spreadsheet:sxc:$
10:application/vnd.sun.xml.calc.template:StarOffice 6.0/7 Spreadsheet Template:stc:$
11:application/vnd.sun.xml.draw:StarOffice 6.0/7 Drawing:sxd:$
12:application/vnd.sun.xml.draw.template:StarOffice 6.0/7 Drawing Template:std:$
13:application/vnd.sun.xml.impress:StarOffice 6.0/7 Presentation:sxi:$
14:application/vnd.sun.xml.impress.template:StarOffice 6.0/7 Presentation Template:sti:$
15:application/vnd.sun.xml.math:StarOffice 6.0/7 Formula:sxm:$
16:application/vnd.sun.xml.writer:StarOffice 6.0/7 Text Document:sxw:$
17:application/vnd.sun.xml.writer.global:StarOffice 6.0/7 Master Document:sxg:$
18:application/vnd.sun.xml.writer.template:StarOffice 6.0/7 Text Document Template:stw:$
19:application/vnd.oasis.opendocument.text:OpenDocument Text:odt:$
20:application/vnd.oasis.opendocument.text-template:OpenDocument Text Template:ott:$
21:application/vnd.oasis.opendocument.text-master:OpenDocument Master Document:odm:$
22:application/vnd.oasis.opendocument.text-web:HTML Document Template:oth:$
23:application/vnd.oasis.opendocument.spreadsheet:OpenDocument Spreadsheet:ods:$
24:application/vnd.oasis.opendocument.spreadsheet-template:OpenDocument Spreadsheet Template:ots:$
25:application/vnd.oasis.opendocument.graphics:OpenDocument Drawing:odg:$
26:application/vnd.oasis.opendocument.graphics-template:OpenDocument Drawing Template:otg:$
27:application/vnd.oasis.opendocument.presentation:OpenDocument Presentation:odp:$
28:application/vnd.oasis.opendocument.presentation-template:OpenDocument Presentation Template:otp:$
29:application/vnd.oasis.opendocument.formula:OpenDocument Formula:odf:$
30:application/vnd.sun.xml.base:OpenDocument Database:odb:$
Add three lines to the end of this section so that there are now 33 lines and change the number at the top from 31 to 34. The section should now read like this;
OpenOffice.org Plug-in handles all its documents:$
OpenOffice.org Plug-in:$
34
0:application/vnd.stardivision.calc:StarCalc 3.0 - 5.0:sdc:$
1:application/vnd.stardivision.chart:StarChart 3.0 - 5.0:sds:$
2:application/vnd.stardivision.draw:StarDraw 3.0 - 5.0:sda:$
3:application/vnd.stardivision.impress:StarImpress 3.0 - 5.0:sdd:$
4:application/vnd.stardivision.impress-packed:StarImpress-packed 3.0 - 5.0:sdp:$
5:application/vnd.stardivision.math:StarMath 3.0 - 5.0:smf:$
6:application/vnd.stardivision.writer:StarWriter Template 3.0 - 5.0:vor:$
7:application/vnd.stardivision.writer-global:StarWriter Global 3.0 - 5.0:sgl:$
8:application/vnd.staroffice.writer:StarWriter 3.0 - 5.0:sdw:$
9:application/vnd.sun.xml.calc:StarOffice 6.0/7 Spreadsheet:sxc:$
10:application/vnd.sun.xml.calc.template:StarOffice 6.0/7 Spreadsheet Template:stc:$
11:application/vnd.sun.xml.draw:StarOffice 6.0/7 Drawing:sxd:$
12:application/vnd.sun.xml.draw.template:StarOffice 6.0/7 Drawing Template:std:$
13:application/vnd.sun.xml.impress:StarOffice 6.0/7 Presentation:sxi:$
14:application/vnd.sun.xml.impress.template:StarOffice 6.0/7 Presentation Template:sti:$
15:application/vnd.sun.xml.math:StarOffice 6.0/7 Formula:sxm:$
16:application/vnd.sun.xml.writer:StarOffice 6.0/7 Text Document:sxw:$
17:application/vnd.sun.xml.writer.global:StarOffice 6.0/7 Master Document:sxg:$
18:application/vnd.sun.xml.writer.template:StarOffice 6.0/7 Text Document Template:stw:$
19:application/vnd.oasis.opendocument.text:OpenDocument Text:odt:$
20:application/vnd.oasis.opendocument.text-template:OpenDocument Text Template:ott:$
21:application/vnd.oasis.opendocument.text-master:OpenDocument Master Document:odm:$
22:application/vnd.oasis.opendocument.text-web:HTML Document Template:oth:$
23:application/vnd.oasis.opendocument.spreadsheet:OpenDocument Spreadsheet:ods:$
24:application/vnd.oasis.opendocument.spreadsheet-template:OpenDocument Spreadsheet Template:ots:$
25:application/vnd.oasis.opendocument.graphics:OpenDocument Drawing:odg:$
26:application/vnd.oasis.opendocument.graphics-template:OpenDocument Drawing Template:otg:$
27:application/vnd.oasis.opendocument.presentation:OpenDocument Presentation:odp:$
28:application/vnd.oasis.opendocument.presentation-template:OpenDocument Presentation Template:otp:$
29:application/vnd.oasis.opendocument.formula:OpenDocument Formula:odf:$
30:application/vnd.sun.xml.base:OpenDocument Database:odb:$
31:application/msword:Opendocument Text:doc:$
32:application/vnd.ms-excel:Opendocument Spreadsheet:xls:$
33:application/vnd.ms-powerpoint:Opendocument Presentation:ppt:$
Note the modifications highlighted in the text.
Save this file and then go up one level to /home/<user_name>/.mozilla/ where you will find a duplicate copy of "pluginreg.dat". Replace this pluginreg.dat with your modified pluginreg.dat.
It seems that if you don't replace both of these files the original version will overwrite the modified file next time you open Firefox.
Next time you open Firefox you should be able to view MS Office documents in a browser window.
To check if this worked open Firefox and open Edit > Preferences > Downloads > Plug-ins and you should see DOC, PPT and XLS listed as supported filetypes.
I have found this to be very successful on Gnome but in KDE I found that the files open correctly, but when you close a tab with an MS Office document in it it crashes Firefox. I have no idea what causes this. give it a try and see if it works.