Difference between revisions of "Wine - Crossover Office"

From Blue-IT.org Wiki

(MSOffice 2010 and Wine)
 
(34 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
== Wine on ubuntu ==
 +
Add the ubunutu wine ppa and install the most recent version
 +
 +
* https://launchpad.net/~ubuntu-wine/+archive/ubuntu/ppa
 +
 +
apt-get install wine1.7 winetricks
 +
 +
--[[User:Apos|Apos]] ([[User talk: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 ==
 
== MSOffice 2010 and Wine ==
YES, Word, Excel and Powerpoint are working very well. And NO, you don't need crossover office.
+
--[[User:Apos|Apos]] ([[User talk:Apos|talk]]) 12:16, 8 March 2015 (CET)
 +
* http://ubuntuforums.org/showthread.php?t=2233041
 +
 
 +
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 the 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
 +
* https://appdb.winehq.org/objectManager.php?sClass=version&iId=4992&iTestingId=83074
 +
 
 +
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
  
Only disappointment yet: Outlook is not working well!
+
* Install '''corefonts''' with winetricks
  
The trick:
+
env WINEARCH="win32" WINEPREFIX="${USER}/.msoffice" winetricks corefonts
  
* Install Office with [[#Winetricks]] in its one wine prefix!
 
* Install the "msxml6" package with  winetricks
 
  
 
Voilá.
 
Voilá.
Line 13: Line 59:
 
I have this and use it in a produktive environment !!!
 
I have this and use it in a produktive environment !!!
  
==Standard Installation Procedure==
+
 
 +
Instead of active X controls based on the outdated comctl32ocx library
 +
 
 +
==Standard Installation Procedure vor Crossover Office==
 
  apt-get remove wine
 
  apt-get remove wine
  
Line 21: Line 70:
 
Now you can use the ''wine'' command to start windows apps.
 
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|32-bit environment]]!
 +
 +
WINEARCH="win32" WINEPREFIX="/home/$USER/.myWinePrefix" wine \
 +
'''msiexec /i''' your_msi_file_32bit.msi
  
 
== Backup your wine - prefix and icons ==
 
== Backup your wine - prefix and icons ==
  
If you installed a program with a prefix, there will be a seperate directory in your home directory
+
If you installed a program with a prefix, there will be a seperate directory in your home directory, e.g.
  .msoffice2010
+
  ~# .msoffice2010  
  
where ''"msoffice2010"'' is your prefix.
+
where ''"/home/$USER/.msoffice2010"'' is your prefix. Beware of the full path!
  
 
Icons from e.g. office are stored in this directory:
 
Icons from e.g. office are stored in this directory:
 
  ~/.local/share/icons/hicolor
 
  ~/.local/share/icons/hicolor
  
Be sure to copy this over.
+
Be sure to copy this over to a new direction as well!
  
 
Your desktop file are located in:
 
Your desktop file are located in:
Line 47: Line 103:
 
==Font Size==
 
==Font Size==
 
* Also see: [http://www.linux.com/feature/123854 Linux.com Give Wine apps the look and feel of GNOME or KDE]
 
* Also see: [http://www.linux.com/feature/123854 Linux.com Give Wine apps the look and feel of GNOME or KDE]
If your fonts are too tiny for your screen, you can alter the registry.
+
 
 +
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
 
  wine ~/.cxoffice/dotwine/fake_windows/Windows/regedit.exe
  
Line 57: Line 118:
  
 
== Smooth Fonts ==
 
== Smooth Fonts ==
Use 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: [http://wiki.ubuntuusers.de/Wine Ubuntuusers.de Wine]. You will find a lot of other useful informations there.
+
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: [http://wiki.ubuntuusers.de/Wine Ubuntuusers.de Wine]. You will find a lot of other useful informations there.
 
  #!/bin/sh
 
  #!/bin/sh
 
  # Quick and dirty script for configuring wine font smoothing
 
  # Quick and dirty script for configuring wine font smoothing
Line 139: Line 202:
 
   
 
   
 
  echo ok
 
  echo ok
 +
 +
== 32 bit environment ==
 +
Sometimes it is necessary - and wise - to use a pure 32 bit installation of wine.
 +
 +
See
 +
* http://askubuntu.com/questions/74690/how-to-install-32-bit-wine-on-64-bit-ubuntu
 +
 +
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 ==
 
== Configure wine ==
Line 145: Line 233:
 
=== Winetricks ===
 
=== Winetricks ===
  
  sudo apt-get isntall winetricks
+
  sudo apt-get install winetricks
  
 
Then
 
Then
 
  winetricks
 
  winetricks
  
OR
+
OR (where ".msoffice2010" is a sample prefix, use yours!)
  
 
  MYPREFIX=.msoffice2010; \
 
  MYPREFIX=.msoffice2010; \
Line 158: Line 246:
 
  winecfg
 
  winecfg
  
OR
+
OR (where ".msoffice2010" is a sample prefix, use yours!)
  
 
  MYPREFIX=.msoffice2010; \
 
  MYPREFIX=.msoffice2010; \
Line 167: Line 255:
 
  wine control
 
  wine control
  
OR
+
OR (where ".msoffice2010" is a sample prefix, use yours!)
  
 
  MYPREFIX=.msoffice2010; \
 
  MYPREFIX=.msoffice2010; \
Line 176: Line 264:
 
  wine uninstaller
 
  wine uninstaller
  
OR
+
OR (where ".msoffice2010" is a sample prefix, use yours!)
  
 
  MYPREFIX=.msoffice2010; \
 
  MYPREFIX=.msoffice2010; \
Line 183: Line 271:
  
 
[[Category:Ubuntu]]
 
[[Category:Ubuntu]]
 +
[[Category:Wine]]

Latest revision as of 11:18, 8 March 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

--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 the 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 !!!:

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