Wine - Crossover Office

From Blue-IT.org Wiki

Revision as of 10:53, 22 August 2014 by Apos (talk | contribs) (Smooth Fonts)

MSOffice 2010 and Wine

YES, Word, Excel and Powerpoint are working very well. And NO, you don't need crossover office.

Only disappointment yet: Outlook is not working well!

The trick:

  • Install Office with #Winetricks in its one wine prefix!
  • Install the "msxml6" package with winetricks

Voilá.

I have this and use it in a produktive environment !!!

Standard Installation Procedure

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.


Backup your wine - prefix and icons

If you installed a program with a prefix, there will be a seperate directory in your home directory

.msoffice2010

where "msoffice2010" is your prefix.

Icons from e.g. office are stored in this directory:

~/.local/share/icons/hicolor

Be sure to copy this over.

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 alter the registry.

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 alos 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

Configure wine

winetricks gives a lot of possibilities. Opening winetricks with another prefix than the default, do:

Winetricks

sudo apt-get isntall winetricks

Then

winetricks

OR

MYPREFIX=.msoffice2010; \
WINEPREFIX=/home/${USER}/${MYPREFIX} winetricks

Winecfg

winecfg

OR

MYPREFIX=.msoffice2010; \
WINEPREFIX=/home/${USER}/${MYPREFIX} winecfg

Control

wine control

OR

MYPREFIX=.msoffice2010; \
WINEPREFIX=/home/${USER}/${MYPREFIX} wine control

Uninstall programs

wine uninstaller

OR

MYPREFIX=.msoffice2010; \
WINEPREFIX=/home/${USER}/${MYPREFIX} wine uninstaller