Wednesday, February 6, 2013

INSTALL MICROSOFT OFFICE 2010 IN UBUNTU 14.04/13.10/13.04/12.10 AND MINT AND MAKE IT DEFAULT


Microsoft Office is my favorite office application. The default LibreOffice in Ubuntu 12.10 lacks a lot of Features available in MS Office. After succesfull installation of Microsoft Office 2007 in Ubuntu 11.10 and 12.04/12.10, I tried installing Microsoft Office 2010 in 12.10. The installation instructions for Microsoft Office 2007 in 12.10 is same as that in 12.04. To install Microsoft Office 2010 in Ubuntu 12.10,  I followed the following steps. There are few changes in the dependencies needed for 2010 when compared to 2007. This method works in Ubuntu 13.04, 13.10 and 14.04 as well. This has been tested on both 32 and 64 bits successfully. This method is reported to work in Ubuntu derivatives like Mint by users through comment.

1. For 64-bit users first step is to install mesa OpenGL and the 32-bit libraries. For all except 14.04 :

 

For Ubuntu 14.04 users the ia32-libs is replaced by lib32z1

 

For 32 bit users first step is to install mesa OpenGL only and move to step 3 skipping step 2:

 


2. 64 bit users need to create softlinks for the 32-bit OpenGL libraries. 32-bit users can skip this step


 

3. Install wine1.5 or above from the Official Wine PPA.

 

4. 64 bit users only must run the following commands in a terminal. This will set the Windows version as 32 bit. The Microsoft Office is available for 32 bit only. This is important since only Microsoft Office 2010 32-bit works on Wine and you need a 32-bit Wine environment to run 32-bit Windows applications. This time we are creating a new WINEPREFIX instead of changing the wine settings globally as it might cause problem with other applications installed under wine. The WINEPREFIX can be any directory of your choice.


 


32 bit users can set the WINEPREFIX. WINEARCH is not needed for 32 bit users.


5. In winetricks install the following dll components: vcrun2008, dotnet20, dotnet40, msxml6, riched20, riched30, gdiplus, vb2run (not mandatory), vb3run, vb4run, vb5run, vb6run, ie8. Also install corefonts from fonts in winetricks. Some components needs to be downloaded manually for this purpose. Download these and paste in ./cache/winetricks/ under home. You can download all the dependencies from this link and extract to ./cache/winetricks in home. The .cache directory is hidden and can be unhided by pressing Ctrl+H. After extracting you can run the single command to install all these in terminal.

 

Alternatively select the packages from graphical interface. Run winetricks in terminal and following screen appears. Select Install a Windows DLL or Component and Press Ok.
ms office ubuntu

Tick the following packages: vcrun2008, dotnet20, dotnet40, msxml6, riched20, riched30, gdiplus, vb2run, vb3run, vb4run, vb5run, vb6run, ie8.
[Some components needs to be downloaded manually for this purpose. Download these and paste in ./cache/winetricks/ under home. You can download all the dependencies from this link and extract to ./cache/winetricks in home. The .cache directory is hidden and can be unhided by pressing Ctrl+H.]



6. Now run winecfg in terminal. In the wine settings window that appears go to "Libraries" tab. From the "Existing overrides" section, select the above installed dll components and click Edit and change from"(native, built-in)" to "Native (Windows)" and click OK.

ms office ubuntu

7. The dependencies needed for Microsoft Office 2010 are installed and now we can install Microsoft office. Copy the installer to home and cd to that folder. Now run "wine Setup.exe". Replace setup.exe with filename or path of Installer. Now follow the Installer and complete the setup. The office can be run from Dash by searching Microsoft.


Note: If you close the  terminal in between installation the default wineprefix might change in that case installation can be done by using the following command instead:
WINEPREFIX=/home/user/.wineprefixes/office2010/ wine Setup.exe



ms office ubuntums office ubuntu

ms office ubuntu

ms office ubuntu

ms office ubuntu

ms office ubuntu

ms office ubuntu

ms office ubuntu

ms office ubuntu

ms office ubuntu



8. The microsoft office applications can be made default by adding the following lines to  ~/.local/share/applications/mimeaaps.list.
This must be added under both [Default Applications] as well as [Added Associations] section

 

Note : 1. By installing cups-pdf (sudo apt-get install cups-pdf), we can have a pdf printer in wine. This way, we can export to PDF not only from MS Office, but also from any other application installed in wine.
                 2. VBA macros need microsoft visual basic runtimes which is available for installation via winetricks as vb2run, vb3run, vb4run, vb5run, vb6run, etc. Install these as in Step 5 if they are required.