0% found this document useful (0 votes)
7 views

How 2 Wine

Uploaded by

parappanon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

How 2 Wine

Uploaded by

parappanon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Title: HOW I GOT WINE TO WORK ON FREEBSD (and how you can do it, too!

I’ve been able to daily drive FreeBSD without any sort of issue or problem for a while now – browsing,
media consooming, writing and even drawing and some photo edinting are all perfectly possible
without needing to do antything in particular after installing the right programs.

However, there’s one thing that has always required some more setup than usual on this otherwise
amazing operating system: gaming.
Because unless all you care about when it comes to gaming are the original DOOM and Quake and
maybe some emulation, you’ll defintely want to fiddle with virtual machines (especially if you also
want to use software such as Photoshop), switch to another operating system as a cope … or grab some
WINE.

And since my CPU lacks integrated graphics (meaning no passthrough for me), the only option left was
the Wine (a Wine I had drank before, mind you, just not in a long time).

I had tried to set up Wine some months ago, but to no avail until now. As for why I’m writing this
guide, it’s because, well, back when I first tried every guide I found for running WINE on FreeBSD
was outdated – and while thankfully the page for it on the FreeBSD handbook has now been updated, I
still would like to write a smaller guide for those who just want to get things to work.

Installing and Setting up WINE on FreeBSD

1. Requirements
- A PC running FreeBSD (duh)
- A Poudriere setuip (if building from ports)
- Willingness to use the command line (duh)

1.5. Installation Notes

In order to install any program into a FreeBSD installation, there are two optionis: binary packages
(which are installed as-is to yout systems from an online repository) and ports (which are compiled by
your own computer).
While I’ll show instructions for both methods, I personally prefer ports, so instructions will be more
detailed for that one.

Also, some commands will show “sudo/doas” at the beginning. These two programs basically serve the
same purpose – sudo is the default in Linux distros and more common, but I prefer OpenBSD’s doas so
I use that instead.

2. Installing WINE

In order to install WINE in a FreeBSD system that uses packages as it’s installation method, the only
thing that will be needed is the following command:

sudo/doas pkg install wine wine-gecko wine-mono

When it comes to installing from ports, however, the setup gets a tiny bit more complicated.
2.1 Installing WINE… from ports.
I like to think that the first thing you should do before you start building any important ports is to check
the port options. You can see what options you can set for a certain program through FreshPorts, and if
you build them with Poudriere like I do, it is also simple to not just look at the options, but also to set
them.

2.2 Setting up Port Options

In WINE’s case, you’ll type in the following command:

sudo/doas poudriere options -c -j JAILNAME emulators/wine

You’ll see the following screen:

PICTURE

Make sure to set GECKO and MONO to ON, as that’ll save you the amount of characters that you’ll
type into the temrinal and perhaps compile time as well.
The other configuration option I change is the audio one – from the default ALSA to OSS (which is the
FreeBSD default) – I mostly do this due to my personal dislike of Linux-isms, but if you aren’t as anal
about things such as PulseAudio/Pipewire as I am feel free to keep the default option.

Once you’ve set up the port options for WINE, just press CTRL+C in order to exit the port options
screen, which will have now moved on to a dependency – what you selected for WINE has already
been saved.

2.3. Building with Poudriere

Assuming you have Poudriere set up in your computer, installing the 64-bit version of WINE will only
take the following command.

sudo/doas poudriere bulk -j JAILNAME -c emulators/wine

In theory, this should allow for a basic installation. In reality, however, just 64-bit WINE won’t be
enough for most: many older games were not made with 64-bit architectures in mind, and newer games
might need other additional configurations and even software to work.

This guide is exclusively centered on WINE, so I’ll focus on the former case for the next subsection
(and so is my usecase)

2.4 32-bit WINE

In order to build the 32-bit version of WINE, we’ll need a completely new jail. And in order to install
it, you’ll require the 64-bit version to be already installed in your system.

Poudriere makes the first part easy:

sudo/doas poudriere jail -c -v {freebsd-version) -a i386 -j 32bitjail


Once you type in this command, a jail for building 32-bit packages will be created. After the jail is set
up, repeat Step 2.2, but with the jail name changed to “32bitjail” (or whatever you decided to turn your
32-bit jail;s name into), then do the same with step 2.3

The real difference between the 64 and 32-bit versions of WINE, when compiled from ports lies on the
installation - due to the separate architecture and jail, you can’t just pkg update and pkg install wine.
Instead, you’ll have to do the following setup, starting from creating the repo file for the 32-bit
software based on the following blocks of code:

Wine32: {
url : file:///usr/local/poudriere/data/packages/32bitjail-default
enabled: yes
}

Change the name from 32bitjail to whatever the jail you created previously’s name is if you previously
used a different name and save it to /usr/local/etc/pkg/repos as wine32.conf.
Once that’s done, run the following command:

/usr/local/share/wine/pkg32.sh update

Notice the wine after /usr/local/sshare? This is what I meant with “requiring the 64-bit version of
WINE” earlier on – it’s a fool’s errand to skip this step, and it’ll allow you to run some newer things as
well if you ever want to.

Once that’s done, let’s install the 32-bit version of WINE

/usr/local/share/wine/pkg32.sh install wine

3. A Basic WINE setup

Setting up WINE is actually pretty easy – just run the following command:

WINEPREFIX:~/.wine winecfg

If you want to create a 32-bit WINE enviroment, add in WINEARCH=win32 to the command above in
order to make it a 32-bit envroment. And if you want to have multiple enviroments, just change the
location you input after typing in WINEPREFIX.

You can then run Windows programs by using wine followed by the .exe file on the command line –
just make sure to not forget about the WINEPREFIX!

You might also like