Samstag, 23. Juni 2012

How to install MS Office 2010 on Ubuntu 12.04/12.10 [EN]


Today I tried to install Microsoft Office 2010 on my Ubuntu 12.04 x64. Surprisingly instead of my last month's tries it runs very well!

Following I will report each step to go:





Step 1: Install Office 2010

  1. I've downloaded the 32-bit trial version here. If you own a full version you can skip this point.
    Tip: I use a 64-bit Ubuntu, but I wasn't able to install the 64-bit version of Office 2010.
  2. You need to install PlayOnLinux, which you can find here. Don't use the Ubuntu SoftwareCenter version because it's probably not up-to-date!
  3. If PlayOnLinux has been installed you can open it. Go to Install » Office » Microsoft Office 2010
  4. My used version is an stand-alone .exe-file. The PlayOnLinux-installscript need a "setup.exe"-file, that's why I renamed it.
  5. PlayOnLinux will download and install the needed libraries in the background, so you need to enable your internet meanwhile!
  6. If the script ask you for the install CD/DVD you need to choose it. In my case I've chosen the path where the "setup.exe"-file is located.
  7. As we all know the installation of MS-products will take a lot of time, but it indicates  that it is running well!
Step 2: Create the file-association
  1. In the next step we associate the .doc(x), .xls(x), etc. -files with the MS-Office programs.
  2. Run the command sudo nautilus in the terminal an go to /usr/share/applications/
  3. Copy the created desktop-shortcuts in this directory!
  4. Open the properties for each of them by the context menu and edit the command field by insert
    playonlinux --run "Microsoft [...] 2010" z:%f (replace the [...] with Word,  Excel,  Powerpoint and so on)
  5. After that you go to /home/[you username]/.PlayOnLinux/shortcuts (Tip: you can show the hidden directories by Ctrl+H)
  6. There are the shortcut-files of the Office-programs. Open each of them (e.g. with gedit) and replace the $@ at the last line with $a and copy above the following:

    if [ $@ == "z:" ]; then
          export a="";
    else
          export a=$(echo "$@" | sed -e 's:/*/:\\:g');
    fi
  7. Now you should be able to associate e.g. a .doc-file by the context menu » properties » Open with and choose the program Microsoft Office 2010
Step 3: Anti-Aliasing
During my work I registered the sharp letters e.g. in Word by writing a text. If you want to change it you need to do the following two points
  1. Open PlayOnLinux and go to Install » Others » Enable anti-aliasing
  2. There you can enable this function for each program
Step 4: Setup a Pdf-printer
In my case the Pdf-export of Word is very pixelated. Therefore I installed the package CUPS-PDF by execute the following line in the terminal
sudo apt-get install cups-pdf
Now you should see a new printer in Word. Use it and the created file will be located in  /home/[your username]/PDF



2 Kommentare:

  1. hi,

    i did the step to associate office with the new endings. i could chose word from the menue. office starts after clicking the .doc file but it says it couldnt find the file. first that it couldnt find the file under "z:..." and than under "c:..." do you know a way to solve this problem?

    AntwortenLöschen
  2. Hi donkarz,

    Thanks for your comment. I found the problem and changed it in the description obove. The trick is that you need to replace the $@ with an $a and put the following code above:
    if [ $@ == "z:" ]; then
    export a="";
    else
    export a=$@;
    fi

    The shortcut-file in /home/[you username]/.PlayOnLinux/shortcuts e.g. for Excel should look like:
    ...
    ...
    if [ $@ == "z:" ]; then
    export a="";
    else
    export a=$@;
    fi
    POL_Wine "EXCEL.EXE" "$a"

    AntwortenLöschen