Wine - Crossover Office
From Blue-IT.org Wiki
Contents
Wine on ubuntu
Add the ubunutu wine ppa and install the most recent version
apt-get install wine1.7 winetricks
--Apos (talk) 07:26, 19 September 2014 (CEST) : at time of writing wine 1.7 is the actual stable wine version. See at the package list of the ppa. You can simply upgrade earch version.
MSOffice 2010 and Wine
--Apos (talk) 12:16, 8 March 2015 (CET)
YES, Word, Excel and Powerpoint are working very well. And NO, you don't need crossover office. If your Office programs crash, it is most likely, that you didn't follow exactly the rules installing office in wine!
General warnings:
- EXCACTLY follow teh install instructions step by step.
- DON'T use winetricks to install any DLL's, unless you know exactly what you are doing!
- ONLY use a win32 wine prefix and ONLY use this prefix for MS Office, nothing else.
- DON'T use or install old comctl32ocx ActiveX Controls (like the datepicker) with winetricks. This will crash your Office! For an alternative datepicker you can e.g. use this: https://sites.google.com/site/e90e50/calendar-control-class
Only disappointment yet: Outlook is not fully working well!
See this article at winehq.org
The trick is to install MS Office in a separate wine prefix. Follow EXACTLY the instructions mentioned in the official wine appdb above. Exactely follow these steps. DON't use winetricks. DON'T use or install old comctl32 ActiveX Controls (like the datepicker).
Before installing:
- install wine wine-mono
apt-get install wine-mono4.5
- Don't use winetricks yet. Start winecfg in advance and check, if it uses "Windows XP":
env WINEARCH="32bit" WINEPREFIX="${USER}/.wine_msoffice winecfg
Close the wincfg app! Don't change anything else.
- Start the 32bit (!) installer setup.exe from the office cd within a 32bit wine prefix.
env WINEARCH="32bit" WINEPREFIX="${USER}/.wine_msoffice wine setup.exe
Complete the installation. Don't start Office yet.
- Start the winecfg app and ddd msxml6' and riched20 in the library tab. Change the settings for both to "NATIVE,then BUILTIN"! This is very important.
env WINEARCH="32bit" WINEPREFIX="${USER}/.wine_msoffice winecfg
- Install corefonts with winetricks
env WINEARCH="win32" WINEPREFIX="${USER}/.msoffice" winetricks corefonts
Voilá.
I have this and use it in a produktive environment !!!
Instead of active X controls based on the outdated comctl32ocx library
Standard Installation Procedure vor Crossover Office
apt-get remove wine
Install crossover office into /opt/cxoffice.
ln -s /opt/cxoffice/bin/wine /usr/bin/wine
Now you can use the wine command to start windows apps.
Using msi
REALLY, REALLY IMPROTANT !!!:
- It is always wise to use a 32-bit environment!
WINEARCH="win32" WINEPREFIX="/home/$USER/.myWinePrefix" wine \ msiexec /i your_msi_file_32bit.msi
Backup your wine - prefix and icons
If you installed a program with a prefix, there will be a seperate directory in your home directory, e.g.
~# .msoffice2010
where "/home/$USER/.msoffice2010" is your prefix. Beware of the full path!
Icons from e.g. office are stored in this directory:
~/.local/share/icons/hicolor
Be sure to copy this over to a new direction as well!
Your desktop file are located in:
~/.local/share/applications/
and
~/.local/share/applications/wine
Your standard wine installation files are in:
~/.wine
That's it.
Font Size
If your fonts are too tiny for your screen, you can use #Winecfg:
winefcg
Or you can alter the registry directly:
wine ~/.cxoffice/dotwine/fake_windows/Windows/regedit.exe
Edit the key "HKEY_CURRENT_CONFIG\Software\Fonts" and alter the entry "LogPixels" to e.g. "96" (decimal). This is the value in dpi (dots per inch).
If the key is not there, import the following lines.
[HKEY_CURRENT_CONFIG\Software\Fonts] "LogPixels"="96"
Smooth Fonts
The best way to do this is with #Winetricks.
You can also ese the following script to smooth the fonts in wine. This worked for me for the newest (beta) wine version under Ubuntu 9.10 (Karmic Koala). Found here: Ubuntuusers.de Wine. You will find a lot of other useful informations there.
#!/bin/sh # Quick and dirty script for configuring wine font smoothing # # Author: Igor Tarasov <tarasov.igor@gmail.com> WINE=${WINE:-wine} WINEPREFIX=${WINEPREFIX:-$HOME/.wine} DIALOG=whiptail if [ ! -x "`which "$WINE"`" ] then echo "Wine was not found. Is it really installed? ($WINE)" exit 1 fi if [ ! -x "`which "$DIALOG"`" ] then DIALOG=dialog fi TMPFILE=`mktemp` || exit 1 $DIALOG --menu \ "Please select font smoothing mode for wine programs:" 13 51\ 4\ 1 "Smoothing disabled"\ 2 "Grayscale smoothing"\ 3 "Subpixel smoothing (ClearType) RGB"\ 4 "Subpixel smoothing (ClearType) BGR" 2> $TMPFILE STATUS=$? ANSWER=`cat $TMPFILE` if [ $STATUS != 0 ] then rm -f $TMPFILE exit 1 fi MODE=0 # 0 = disabled; 2 = enabled TYPE=0 # 1 = regular; 2 = subpixel ORIENTATION=1 # 0 = BGR; 1 = RGB case $ANSWER in 1) # disable ;; 2) # enable MODE=2 TYPE=1 ;; 3) # enable cleartype rgb MODE=2 TYPE=2 ;; 4) # enable cleartype bgr MODE=2 TYPE=2 ORIENTATION=0 ;; *) rm -f $TMPFILE echo Unexpected option: $ANSWER exit 1 ;; esac echo "REGEDIT4 [HKEY_CURRENT_USER\Control Panel\Desktop] \"FontSmoothing\"=\"$MODE\" \"FontSmoothingOrientation\"=dword:0000000$ORIENTATION \"FontSmoothingType\"=dword:0000000$TYPE \"FontSmoothingGamma\"=dword:00000578" > $TMPFILE echo -n "Updating configuration... " $WINE regedit $TMPFILE 2> /dev/null rm -f $TMPFILE echo ok
32 bit environment
Sometimes it is necessary - and wise - to use a pure 32 bit installation of wine.
See
Mainly it boils down to install a new 32bit wine installation into a new prefix:
export WINEPREFIX=wine32bit # the name for the prefix can be choosen freely export WINEARCH=win32 winecfg
Usage:
env WINEARCH=win32 wine `env WINEARCH=win32 winecfg # for 1st .wine 32 bit bottle
Always a good idea: make the win32-environment permanent:
# sudo vim /etc/environment WINEARCH=win32
If you like to change all your ".desktop"-files to add the WINEARCH="win32" line, you can use the following sed-command:
for i in "$(ls *.desktop)"; do sed -i '/WINEPREFIX/ s:WINEPREFIX:WINEARCH="win32" WINEPREFIX:g' "${i}"; done
Configure wine
winetricks gives a lot of possibilities. Opening winetricks with another prefix than the default, do:
Winetricks
sudo apt-get install winetricks
Then
winetricks
OR (where ".msoffice2010" is a sample prefix, use yours!)
MYPREFIX=.msoffice2010; \ WINEPREFIX=/home/${USER}/${MYPREFIX} winetricks
Winecfg
winecfg
OR (where ".msoffice2010" is a sample prefix, use yours!)
MYPREFIX=.msoffice2010; \ WINEPREFIX=/home/${USER}/${MYPREFIX} winecfg
Control
wine control
OR (where ".msoffice2010" is a sample prefix, use yours!)
MYPREFIX=.msoffice2010; \ WINEPREFIX=/home/${USER}/${MYPREFIX} wine control
Uninstall programs
wine uninstaller
OR (where ".msoffice2010" is a sample prefix, use yours!)
MYPREFIX=.msoffice2010; \ WINEPREFIX=/home/${USER}/${MYPREFIX} wine uninstaller