Skip to content

Instantly share code, notes, and snippets.

@raelgc
Last active February 26, 2024 03:10
Show Gist options
  • Save raelgc/4ccc023830bfd12c0227 to your computer and use it in GitHub Desktop.
Save raelgc/4ccc023830bfd12c0227 to your computer and use it in GitHub Desktop.
Install MSOffice on Ubuntu

Install Microsoft Office 2010 on Ubuntu

Requirements

We'll install MSOffice using the PlayOnLinux wizard. Additionally, MSOffice requires samba and winbind to properly work.

So, if not installed, install them:

sudo apt-get install playonlinux samba winbind

Of course, you'll need the MSOffice installer files (either DVD/folder files), in the 32 bits version. Even if you're under Ubuntu 64, we'll use a 32 bits wine installation.

Then open POL (PlayOnLinux) from command line (playonlinux &) or using Dash.

Pre Install

In the POL window menu, go to Tools > Manage Wine versions and install Wine 2.13. Versions below it will crash after click on a document hyperlink. Versions above it will not properly handle the launcher icon (due missing WM_CLASS when window is maximized).

Install

In the POL window, click on Install at top (the one with a plus sign).

1. PlayOnLinux Install menu

At the Install window, at the bottom, select Office and make sure Commercial (at top) is marked.

Now select Microsoft Office 2010 and click on Install.

2. Welcome to PlayOnLinux Installation Wizard

Nothing to do here other then click on the Next button.

3. Please Choose an Installation Method

Now it's up to you: select DVD or file installation according your MSOffice installation.

Then click on Next.

Browse the files or the DVD: the goal here is select the MSOffice setup.exe, from the 32 bits version.

Now, after click on Next: you'll see a sequence of PlayOnLinux installation windows, configuring the new Windows virtual drive, installing components, etc.

4. The MSOffice Install Wizard

Automatically the MSOffice installer will be displayed.

Install the MSOffice as on Windows: agree with EULA, select install type, etc.

In the last Install window, click on Close in the MSOffice installer: you'll see a PlayOnLinux window still running some additional configurations.

Then, a successful message: click on Next and the install window will be closed.

Now you can close PlayOnLinux.

Post Install

1. Desktop Files

Current PlayOnLinux Office2010 script already creates the below shortchuts.

But in case you deleted them or want to fix something...

Let's create some .desktop files to provide better integration into Ubuntu: you can associate typical MSOffice files, like .docx to Word; at Dash, type winword to run Word, etc.

Open a text editor (like gedit, nano or vim) and create 3 files under ~/.local/share/applications, with the following names and contents.

Please, replace /home/<user> (at the Icon line) by your home folder path:

  • Word.desktop
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Categories=Office;WordProcessor;
StartupWMClass=WINWORD.EXE
Name=Microsoft Office Word 2010
Comment=winword
Exec=env XMODIFIERS='' playonlinux --run "Microsoft Word 2010" %F
Icon=/home/<user>/.PlayOnLinux/icones/full_size/Microsoft Word 2010
  • Excel.desktop
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Categories=Office;Spreadsheet;
StartupWMClass=EXCEL.EXE
Name=Microsoft Office Excel 2010
Comment=excel
Exec=env XMODIFIERS='' playonlinux --run "Microsoft Excel 2010" %F
Icon=/home/<user>/.PlayOnLinux/icones/full_size/Microsoft Excel 2010
  • PowerPoint.desktop
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Categories=Office;Presentation;
Terminal=false
StartupWMClass=POWERPNT.EXE
Name=Microsoft Office PowerPoint 2010
Comment=powerpnt
Exec=env XMODIFIERS='' playonlinux --run "Microsoft Powerpoint 2010" %F
Icon=/home/<user>/.PlayOnLinux/icones/full_size/Microsoft Powerpoint 2010
  • OneNote.desktop
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Categories=Office;Documentation;
Terminal=false
StartupWMClass=ONENOTE.EXE
Name=Microsoft Office OneNote 2010
Comment=onenote
Exec=env XMODIFIERS='' playonlinux --run "Microsoft OneNote 2010" %F
Icon=/home/<user>/.PlayOnLinux/icones/full_size/Microsoft OneNote 2010

After create those 4 files, open a terminal (Ctrl+Alt+T) and run this command to refresh the Dash entries:

sudo update-desktop-database

One clarification: the env XMODIFIERS='' command in the Exec line is to prevent wine to change keyboard behavior (sometimes while using wine the keyboard uses a different layout, so accents will not work properly, etc).

2. Printers

If you have a printer properly configured under Ubuntu, probably it'll be automatically available to MSOffice under wine.

If not, we can make it available. Basically, your printer must be installed using cups. No problem if the printer is installed using other softwares/drivers, but to get it available for wine, it must be installed under cups too.

If cups package is not installed, install it:

sudo apt-get install cups

Then, open http://localhost:631/ and add your printer.

After configure it, print a test page using the related printer in Printers from System Settings.

Now, make sure you have this file: /etc/printcap. If it's not present, create it this way:

ln -sf /var/run/cups/printcap /etc/printcap

Reboot wine: open PlayOnLinux, click Configure, select Office2010, click on Wine tab and click on Windows reboot button.

3. Fix Alternate between Excel windows

When you open 2 files in Excel, and click on Excel icon in the launcher by the second time to see opened files (Expose), you'll see a weird behavior: one window properly rendered, and the second with just a single icon.

To fix this, open Excel, then File > Options > Advanced > General and check Ignore other applications that use Dyanamic Data Exchange (DDE).

Then, to alternate between Excel files, on Excel click on View tab and then click on Alternate Windows.

@Deva0507
Copy link

How to get the setup file for Ms Office 2010?
It would be very helpful if you provide a link for downloading it.

@tvhong
Copy link

tvhong commented Jan 25, 2018

Note: For those who wishes to use OneNote 2010, it doesn't have notebook syncing functionality and you can't use OneDrive to sync the notebooks down either (https://docs.microsoft.com/en-us/onedrive/developer/rest-api/#working-with-onenote-notebooks). So if you plan to install Office 2010 just for OneNote, bear that in mind.

@Deva0507: MS has this page to download old office installers: https://www.microsoft.com/en-ca/software-download/office. But it errors out trying to validate my key and I couldn't contact their support.. I wish you better luck.

@raelgc
Copy link
Author

raelgc commented Mar 14, 2018

@Deva0507: I have an original MSOffice 2010 DVD/CD media with a valid key.

@akshaysansare25
Copy link

thank you so much

@raelgc
Copy link
Author

raelgc commented Oct 8, 2018

PLEASE: DON'T ASK ME MSOFFICE KEYS: YOUR COMMENT WILL BE DELETED!

You can download the original installer from the Microsoft website, if you have your original serial: https://www.microsoft.com/en-us/software-download/office

@raelgc
Copy link
Author

raelgc commented Jan 23, 2019

Just to share: aside older versions of wine, this works with Wine 2.13 too.

@filimonov
Copy link

when i did it it start downloading wine 3.0.2
See https://www.playonlinux.com/en/app-801.html

@andi-bergeson
Copy link

^^

Mine also automatically downloads Wine version 3.0.2, and the installation subsequently crashes. Not sure what to do.

@raelgc
Copy link
Author

raelgc commented Dec 18, 2019

@andi-bergeson and @filimonov, if you're following the instructions, pay attention to the Pre Install steps, when we're selecting the wine version.

@mjh217
Copy link

mjh217 commented Jan 2, 2020

Unfortunately I ran in to the same problem. Despite selecting wine 2.13 in POL versions manager, as explained in your Pre Install steps (and not having any other versions installed), POL then automatically installs version 3.0.2 as soon as I initiate the Office2010 install

@raelgc
Copy link
Author

raelgc commented Jan 2, 2020

Maybe you guys can try install with any version and change it after install.

@mjh217
Copy link

mjh217 commented Jan 4, 2020

Unfortunately that didn't work for me.

@kabukun
Copy link

kabukun commented May 21, 2020

i'm having troubles at the end of the entire installation, as soon as it finishes it promts me to install windows fonts but then it appears a windows that says that it'll install them for me, but then says that i must agree and select next, but all i get is a blank window
Captura de pantalla de 2020-05-20 22-31-32
Captura de pantalla de 2020-05-20 22-34-14

@raelgc
Copy link
Author

raelgc commented May 21, 2020

@kabukun It appears that the fonts are white due your dark theme. One solution would be you, just temporarily, change your theme to a non dark one, finish the install, then get back to the dark theme.

Other possible solution: use your mouse and scroll down using the mouse wheel and check if the "next" button will be enabled. A lot of this EULA dialogs require that you "read" the text (i.e., scroll down until the bottom) before enable the "next" button.

@comperem
Copy link

Maybe you guys can try install with any version and change it after install.

you've got a great step-by-step, and others including me have followed every step carefully but it's not working. the 3.0.2 downloads and there's no way to stop it or use the 2.13. numerous error messages and then failure. my fonts installed - apparently - well enough, but still, Outlook no workeeeee

@comperem
Copy link

comperem commented Aug 16, 2020

I'm going to pay for Crossover and give it a go. Outlook 2010 seems to be pretty modern and yet still works with the emulators better than Office 2013 or 2016

@raelgc
Copy link
Author

raelgc commented Aug 16, 2020

@comperem: I'm sorry to hear that Outlook is not working (sorry, I never tested it). By the way, Crossover is really nice!

@comperem
Copy link

comperem commented Aug 18, 2020 via email

@raelgc
Copy link
Author

raelgc commented Jan 19, 2021

Please, don't post alternative download links here (or ask for keys).

@AugustoCesarLacerda
Copy link

Like a charm in my case !
Thank you so much !

@Dragonizedpizza
Copy link

does this work with newer versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment