Download Wine

Software Reviews: Wine

Wine stands for Wine is Not an Emulator because Wine does not actually set up a complete Windows emulation environment. Instead, it allows Windows programs to run natively on Linux, Mac, BSD, OSX, and other POSIX operating systems. It does this by providing many--but not all--of the necessary and commonly-used Windows function calls and services that Windows applications expect. Refer to http:www.winehq.org to learn more about wine.

Do not run as root

Unless you know exactly what you are doing, please do not run wine as root or sudo. Do not add the wine user to privileged groups like the disk group. Some nefarious Windows programs have been known to do damage to partitions even when run from a safe, bootable CD environment. Some Live CD installations run as root and mount local drives. Keep backups.

Icons aren't showing up

If a game or application was installed while logged in as root or sudo it may have installed icons to /root/Desktop instead of /home/$USER/desktop. It may have changed permissions of ~/.wine folder to root, preventing further changes. No problem, su to root, change ownership of ~/.wine folder back to normal:

su
chown -R $USER.$USER .wine  #fixme: make sure $USER variable is set
exit

Using Wine

winecfg: The best command to run after installing wine.

WINEPREFIX environment variable: It may be prudent to bottle wine by setting WINEPREFIX to something other than .wine and then change it when installing a new application suite, such as MSOFFICE. That way, all the registry changes don't mess up other programs. Desktop icons and uninstaller will remember what WINEPREFIX to use. This can prevent some problems later. Each WINEPREFIX is like a new windows install, with its own directories, registry and settings.

export WINEPREFIX=/home/$USER/myWineBottles/MSOFFICE; winecfg

Winetricks takes care of wine prefixes, but it's good to know about them, so that we don't confuse ourselves later. As the site says, winetricks is almost essential to install some programs, but using it limits your support options, particularly when it replaces portions of wine with Microsoft or third-party DLL files and settings over which they have no control.

Winetricks defaults to a GUI presentation, but it did not work well for me on some installations. Thankfully, winetricks may also be run from the command line. Type winetricks -h for help.

Wine Desktop: If a Windows app fails to run, try running it in a fake desktop. It can work around errors, such as "Error - Unable to set the video mode." The terminal will say something like "err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 640x480x8 @0! (XRandR)" "no valid modes" or X Error of failed request BadPixmap | BadDrawable

with games. See my nvidia page for setting up video drivers and modes. This can be set in winecfg for each app since 0.9.61 or from the command line:

wine explorer /desktop=foo,1024x768 somegame.exe

Install web browser for games: Many non-linux games require a browser control to display splash screens, update progress, and status messages during login. The original embedded browser control used a defunct, buggy, and not very secure web browser that used to be a popular target for spyware. Wine can fix this situation since wine 1.1.12 by installing a more secure wine gecko replacement. To do this, simply visit any web page:

wine iexplore http://thenerdshow.com

Install (fake) MIDI Card: Most computers don't have actual MIDI hardware. Instead, the operating system is expected to emulate it in software. Linux can run a synth, such as timidity++ or FluidSynth, at start-up by putting a script in the window manager's startup area or by adding it to user sessions. If not using alsa, then change this. See timidity manual, man timidity. Refer to the window manager's documentation for adding startup programs or sessions. In gnome, go to System->Preferences->Personal->Sessions.

su -c "yum install timidity++"
timidity -iA -Oe & #fixme: see man timidity for correct options

Wine tweaks

What I usually do is navigate to the Useful Registry Keys page and apply some tweaks to the wine registry. See the Wine User Guide for information on regedit and editing the wine (Windows) registry. A useful trick is to use wine's regedit to highlight and export the edited keys and combine them into one or more registry files, such as "mytweaks.reg". Later on, if the .wine folder gets deleted (or when using another WINEPREFIX) these changes can be added back in again by running "regedit mytweaks.reg"

Example tweaks: Use network or other weird printer through KDE (todo: add gnome-print)

[HKEY_CURRENT_USER\Software\Wine\Printing\Spooler]
 "FILE:"="tmp.ps"
 "KDE:"="|kprinter --stdin"
 "LPT1:"="|lpr"
 
==Wine hackers==

Should I use Hacked Wine? Short answer: No, but it is a useful resource for curious users, programmers, and scripters looking to see what can be done with wine internally.

First time using git? See http:wiki.winehq.org/GitWine for in-depth coverage of this useful tool. Try out the official version of wine from GIT first before coming back and trying a hacked version.

Back already? This hacked version of wine is not actively supported by the wine project. Of course everyone is free to try it out at their own risk. Once downloaded, the hacked branch can be examined with git commands (man git) or a gui tool like gitk. I think these patches are a good resource for learning how to add custom C extensions to wine. They contain a lot of cool hacks and useful code for enabling/disabling same using the registry and stuff.

Start Terminal and cd to the Downloads directory and run:

git clone git://repo.or.cz/wine/hacks.git master:hacks
CCBY Copyright © 2024 Henry Kroll III, thenerdshow.com This web page is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.