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



MS Office 2010 unter Ubuntu 12.04/12.10 installieren (Komplettanleitung)

Heute habe ich versucht, Microsoft Office 2010 auf meinem Ubuntu 12.04 x64 zu installieren. Was mir vor einigen Monaten noch nicht gelang, schien nun möglich zu sein!


Nachfolgend möchte ich alle Arbeitsschritte möglichst komprimiert auflisten:

Schritt 1: Installation von Office 2010

  1. Ich habe mir die 32-Bit-Testversion hier heruntergeladen. Wenn du schon eine Vollversion hast, kannst du diesen Punkt überspringen.
    Hinweis: Da ich ein 64-Bit Ubuntu nutze wollte ich mir natürlich ein 64-Bit-Office installieren. Leider lief dabei die Installation immer schief!
  2. Installiere dir PlayOnLinux, wie hier beschrieben! Die im Ubuntu SoftwareCenter erhältliche Version ist nicht immer die aktuellste!
  3. Öffne PlayOnLinux und klicke Installieren » Büro » Microsoft Office 2010
  4. Bei der von mir verwendeten Version handelt es sich um eine allein stehende .exe-Datei. Da das Installationsskript von PlayOnLinux eine "setup.exe" benötigt, habe ich sie entsprechend umbenannt.
  5. Als Vorbereitung der Installation werden einige erforderliche Bibliotheken automatisch installiert, eine Internetverbindung sollte dabei bestehen, damit die dafür erforderlichen Dateien heruntergeladen werden können.
  6. Bei der Frage nach dem Installationsmedium wählen alle diejenigen die entsprechende CD/DVD, die sie haben. Ich habe nur die eine Installationsdatei, deshalb wähle ich den Ordner, indem sie liegt aus. Die enthaltene "setup.exe" wird dann automatisch erkannt und ausgeführt.
  7. Wie von MS-Installationen gewohnt, dauert es ein wenig, aber es sollte funktionieren.
Schritt 2: Dateiassoziationen erstellen
  1. Damit alle .doc(x), .xls(x), etc. Dateien auch mit den entsprechenden Office-Programmen gestartet werden, müssen die Dateiassoziationen erstellt werden.
  2. Führe den Terminal-Befehl sudo nautilus aus und navigiere zu /usr/share/applications/
  3. Kopiere die auf dem Desktop entstandenen Office-Verknüpfungen dorthin!
  4. Klicke dort bei jeder Office-Verknüpfung einzeln rechte Maustaste » Eigenschaften und gib für den Befehl folgendes ein:
    playonlinux --run "Microsoft [...] 2010" z:%f (wobei du statt [...] entsprechend Word, Excel, Powerpoint usw. schreiben musst.
  5. Danach gehst du zu /home/[dein Nutzername]/.PlayOnLinux/shortcuts (Tipp: mit Strg+H machst du alle verborgenen Ordner sichtbar)
  6. Dort liegen die Shortcut-Dateien der Office-Programme. Öffne jede einzeln (z.B. mit gedit) und ersetzt in der letzten Zeile das $@ mit $a und füge darüber folgende Zeilen ein:

    if [ $@ == "z:" ]; then
          export a="";
    else
          export a=$(echo "$@" | sed -e 's:/*/:\\:g');
    fi
  7. Jetzt solltest du in der Lage sein, beispielsweise bei einer .doc-Datei über rechte Maustaste » Eigenschaften » Öffnen mit das Programm Microsoft Office 2010 als Standard-Anwendung zu wählen.
Schritt 3: Anti-Aliasing
Beim Arbeiten ist mir aufgefallen, dass die schriften nicht so "verwaschen" sind, wie unter Windows üblich. Diejenigen, die das korrigieren wollen, machen folgendes:
  1. Öffne PlayOnLinux und gehe zu Installieren » Anderes » Enable anti-aliasing
  2. Damit kannst du für jedes Programm einzeln die Anti-Aliansing-Funktion einschalten
Schritt 4: Pdf-Drucker einrichten
Die Pdf-Exportfunktion führte bei mir leider zu etwas pixeligen Ausgaben. Deshalb habe ich mir unter Ubuntu noch das Programm CUPS-PDF wie folgt über das Terminal installiert:
sudo apt-get install cups-pdf

Im Office kann man nun unter Drucken » PDF das aktuelle Dokument als Pdf abspeichern. Die Ausgabe erfolgt nach /home/[dein Nutzernahme]/PDF