Difference between revisions of "Wine - Crossover Office"
From Blue-IT.org Wiki
(→Font Size) |
(→Font Smooth) |
||
Line 17: | Line 17: | ||
[HKEY_CURRENT_CONFIG\Software\Fonts] | [HKEY_CURRENT_CONFIG\Software\Fonts] | ||
"LogPixels"="96" | "LogPixels"="96" | ||
+ | |||
+ | == 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] | ||
+ | #!/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 |
Revision as of 13:45, 5 January 2010
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.
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
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: Ubuntuusers.de Wine
#!/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