Use Wine without Terminal 1: ".command" Method
Making Wine feel more at home in OS X
Wine logo
A lot of OS X users aren't used to poking around in the Terminal, so using Wine, which relies heavily on the command-line, can seem pretty intimidating. So, I've thrown together two different ways that you can use Wine on a day-to-day basis without having to open Terminal.
For the other method, see Use Wine without Terminal 2: Automator Method.
Making an executable .command script that launches a Windows app with Wine
Here's a video of the process, and step-by-step instructions are located below:
One-step (Terminal) method:
Copy and paste the following into a blank Terminal.app window, replacing the [placeholders] with your actual paths and names:
cd [FolderContainingApplication.exe]
echo "DYLD_FALLBACK_LIBRARY_PATH=/usr/X11/lib \
'/User/[username]/[PathTo]/wine' \
'/User/[username]/[PathTo]/[ApplicationName].exe'" > \
[ApplicationName].command
chmod +x [ApplicationName].command # makes it executable
sh [ApplicationName].command
Here's what this does:
- Changes to the right directory (folder)
- Creates a file and its contents
- Makes that file executable
- Runs that executable file
Detailed (graphical + Terminal) method:
- Open Terminal.app
- Type
cd, drag-and-drop the folder containing your Windows application onto the Terminal window, and press return - Run
open -ein Terminal (or open TextEdit some other way) -
In the blank text document, enter the following, replacing the two paths with the absolute paths to your actual wine binary and Windows Application:
DYLD_FALLBACK_LIBRARY_PATH=/usr/X11/lib "/path/to/wine" "/path/to/Application.exe"- You can drag and drop these files into the text document to get their paths
-
Save the file with a
.commandextension- This will make it a shell script that will run when you double-click on it from the Finder
- Run
chmod +x [name of your .command file]in Terminal - Double-click your .command file in Finder
- That's it!
Pros:
- Runs through Terminal, so terminal output is visible (important for diagnosing problems)
- Good command-line practice
- Can be done in one step
- Small (around 40 KB)
Cons:
- Not a proper OS X application (it's a .command, not a .app), so it can only be added to the documents side of the Dock
- Requires command-line work to set up
- Opens Terminal.app, increasing screen clutter a bit