Difference between revisions of "Wine"
m (updated Mac OS name) |
m (Typo fixing and other clean-up using AWB, typos fixed: along-side → alongside) |
||
Line 3: | Line 3: | ||
To achieve this goal, Wine duplicates functions of the Windows operating system by providing both alternative implementations of the DLLs that Windows programs call and a process to substitute the Windows NT kernel. | To achieve this goal, Wine duplicates functions of the Windows operating system by providing both alternative implementations of the DLLs that Windows programs call and a process to substitute the Windows NT kernel. | ||
− | {{ii}} Note that it is recommended that you have at least basic knowledge of the Terminal/shell before using Wine. If you do not then try [[Wine# | + | {{ii}} Note that it is recommended that you have at least basic knowledge of the Terminal/shell before using Wine. If you do not then try [[Wine#Programs Built Ontop of Wine|Programs Built Ontop of Wine]]. |
'''General information''' | '''General information''' | ||
Line 9: | Line 9: | ||
{{mm}} [http://wiki.winehq.org/ The Wine Wiki] | {{mm}} [http://wiki.winehq.org/ The Wine Wiki] | ||
{{mm}} [http://appdb.winehq.org/ The Wine Application Database] | {{mm}} [http://appdb.winehq.org/ The Wine Application Database] | ||
− | {{mm}} [[Wikipedia: | + | {{mm}} [[Wikipedia:Wine (software)|The Wine Wikipedia Page]] |
== Linux == | == Linux == | ||
Line 121: | Line 121: | ||
== Common Issues == | == Common Issues == | ||
=== .NET/Mono === | === .NET/Mono === | ||
− | Some Windows applications require the [[Wikipedia:. | + | Some Windows applications require the [[Wikipedia:.NET Framework|.NET software framework]] to run (Wine will instruct you to install if an application you try to run requires it), which is not compatible with Wine. However, an open source piece of software called [http://mono-project.com/ Mono] was made to replace it. You can install it via installing [[Wine#Winetricks|winetricks]] and entering this line into the Terminal/shell: |
<code>winetricks mono210</code> | <code>winetricks mono210</code> | ||
=== D-bus (Mac) === | === D-bus (Mac) === | ||
− | Some Windows applications require the [http://www.freedesktop.org/wiki/Software/dbus D-bus process] to run, in order to communicate with certain other applications. While it is installed | + | Some Windows applications require the [http://www.freedesktop.org/wiki/Software/dbus D-bus process] to run, in order to communicate with certain other applications. While it is installed alongside Macports, it will not run unless you tell it to. You only need to do this once, and then the process will run every time on startup: |
<code>sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist</code> | <code>sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist</code> |
Revision as of 19:57, 29 November 2013
Wine is a free and open source software application that aims to allow computer programs written for Windows to run on Linux and Mac.
To achieve this goal, Wine duplicates functions of the Windows operating system by providing both alternative implementations of the DLLs that Windows programs call and a process to substitute the Windows NT kernel.
- Note that it is recommended that you have at least basic knowledge of the Terminal/shell before using Wine. If you do not then try Programs Built Ontop of Wine.
General information
Linux
Wine: Wine Is Not an Emulator
The name Wine is actually an acronym for "Wine Is Not an Emulator." Do take this name into account when attempting to use Windows software on non Windows operating systems, as Wine does not and never will run all non-native software perfectly, if at all. As a rule of thumb, never expect software to work (even if reported as fine by others), however, be grateful if it does.
Installation
To install Wine on your Linux distribution, check your package manager. Most Linux distros DON'T come with Wine pre-installed, but it can be installed just with a single command or a few clicks depending of the distro.
Be aware that the latest version of Wine won't be always the best performing version. Check the Wine appdb for detailed instructions, info and know bugs for your application.
Ubuntu
Open the Ubuntu Software Centre, type wine and then install 'wine'.
Linux Mint
To get the latest Wine release, copy and paste the following two lines, one by one, into the terminal window:
add-apt-repository ppa:ubuntu-wine/ppa && sudo apt-get update
sudo apt-get install wine1.5 winetricks
Fedora
Login as root, then run:
yum install wine
Other
Most instructions for ANY distro can be found by Googling "wine in [your distro's name and version]".
Mac
Installation
- Before following this section make sure that you have read both this and the Homebrew sections
Wine requires Xcode, which can be downloaded and installed via the Mac App Store on OS X 10.6 and above, or via the Apple Developer downloads section.
MacPorts is also required, which can be download and installed from http://www.macports.org/. It then needs to be configured by entering the following two commands into the Terminal:
echo export PATH=/opt/local/bin:/opt/local/sbin:\$PATH$'\n'export MANPATH=/opt/local/man:\$MANPATH | sudo tee -a /etc/profile
if [ `sysctl -n hw.cpu64bit_capable` -eq 1 ] ; then echo "+universal" | sudo tee -a /opt/local/etc/macports/variants.conf; else echo "not 64bit capable"; fi
After this, you may need to agree to the Xcode license, which you can do so by running the following in the Terminal:
sudo xcodebuild -license
Then enter "agree" before closing and reopening the Terminal window.
Now you need to install Wine using MacPorts, by entering the following command (which may take several hours to do):
sudo port install wine
And then Wine will be installed and ready to use!
Homebrew
Homebrew is similar to MacPorts in that the source code to programs is downloaded and compiled. However, Homebrew opts to use the built-in libraries already available as part of the default Mac OS X installation, rather than compiling new versions. This can save time and disk space.
You will, like MacPorts, need XCode to install the required compilers and header files.
Wine is available via Homebrew and can be installed (along with Winetricks) via:
brew install wine winetricks
Making a Dock Icon
To make a dock icon for a Wine program we need to write a program in AppleScript that launches the Windows program. Open the script editor that came with your OS (which can be found in the /Applications/Utilities directory of the computer and is called something like "Script Editor" or "AppleScript Editor" depending on your OS version).
Within the script editor enter the following (where $PATH_TO_PROGRAM is the path from the Program Files directory to your .exe file and TAB is a press of the tab button):
tell application "Terminal"
TABdo script "/opt/local/bin/wine ~/.wine/drive_c/Program\\ Files/$PATH_TO_PROGRAM.exe"
end tell
Then press "Compile" and save the script where you like (making sure to select the "File Format: Application" in the save options, and leaving "Startup Screen" unchecked). Open up the Finder, go to where you saved the script and then drag the file to your Dock, where it will stay. You can then click on that Dock Icon to open up your Windows program.
Updating
To keep Wine up-to-date, it is recommended to run the following command every few months or so via the Terminal/shell:
sudo port selfupdate && sudo port upgrade outdated
Uninstalling
To uninstall both Wine and MacPorts, simply run the following command in the Terminal:
sudo rm -rf /opt ~/.wine /Applications/MacPorts
To uninstall just Wine, simply run the following command in the Termianl/shell:
sudo port uninstall wine
General
Installing Windows Programs
Go to the directory where the Windows .exe installed file is in the Terminal/shell and then enter the following command (where INSTALLED.exe is the name of the .exe file):
wine $INSTALLER.exe
A regular graphical Windows installer will soon appear, which you can click through to complete the installation.
Running Windows Programs
Open the Terminal/shell and go to your Program Files folder via the following command:
cd ~/.wine/drive_c/Program\ Files/
Run ls
to see what Windows programs you have installed. To run a program enter its directory by using cd DIRECTORY_NAME
(where DIRECTORY_NAME is the name of the directory with the program that you want to run. Within that directory there should be an .exe file which you can run with the following command (where PROGRAM.exe is the name of the .exe file):
wine $PROGRAM.exe
The program will soon appear, ready to use.
Common Issues
.NET/Mono
Some Windows applications require the .NET software framework to run (Wine will instruct you to install if an application you try to run requires it), which is not compatible with Wine. However, an open source piece of software called Mono was made to replace it. You can install it via installing winetricks and entering this line into the Terminal/shell:
winetricks mono210
D-bus (Mac)
Some Windows applications require the D-bus process to run, in order to communicate with certain other applications. While it is installed alongside Macports, it will not run unless you tell it to. You only need to do this once, and then the process will run every time on startup:
sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
Tweaking Wine
Winecfg
Winecfg is a GUI (graphical user interface) configuration tool for Wine. It allows you to change options for both the default setting and for specific applications. These options include the way Wine loads DLLs, graphical settings (including Window settings, screen resolution/DPI), desktop integration, drives and audio).
The tool can be accessed with the command:
$ winecfg
A run down on the different tabs of Winecfg is available on the Wine Wiki.
Winetricks
Winetricks is a script that automatically downloads, installs, and configures many tools for Wine. It also contains scripts to automatically install games.
Basic information on how to use winetricks is available on the Wine Wiki.
Programs Built Ontop of Wine
Wineskin
Wineskin is a program based on Wine that acts as a GUI interface, so that the Terminal/shell does not have to be used.
PlayOnLinux/PlayOnMac
PlayOnLinux and PlayOnMac (referred to as PlayOn in this Wiki as both pieces of software are exactly the same and just refer to the operating system they run on) is a graphical-front end for Wine that provides wrapper shell scripts which specify the configuration of Wine in order to install and run a particular application. Using PlayOn is an easy way to use the functionality of Wine without having to worry about its complexity.