Difference between revisions of "Wine - Crossover Office"

From Blue-IT.org Wiki

(Backup your wine - prefix and icons)
Line 226: Line 226:
  
 
[[Category:Ubuntu]]
 
[[Category:Ubuntu]]
 +
[[Category:Wine]]

Revision as of 19:24, 27 February 2015

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

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 a separate wine prefix
  • The wine installation must be a 32 bit installation, use WINEARCH=win32. See #32_bit_environment.
  • Install the "msxml6" package with winetricks in this prefix

Voilá.

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

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

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

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