Discovery Gaming Community

Full Version: How to play Discovery Freelancer on Linux (Wine)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Introduction

Yes, it's possible.

Generally there are three ways for Linux users to run Windows applications. Those ways are Wine, virtual machines and dual boot. Each of those ways is less preferable than the other. Wine is generally the best because it runs Windows applications almost natively in Linux by providing a compatibility layer between the application and the OS, translating the API calls from Windows ones to Linux ones. This essentially means very little performance loss at the cost of infrequent bugs and lack of functionality.

This shows in Freelancer in that I haven't found a way to run Freelancer without the Vsync forced on using Nvidia drivers. This is perhaps possible, however I couldn't find a good way to do it and as such this makes it borderline impossible to use for snub pvp. However if you just want to fly around in game, do trading or cap combat then it should generally be doable (however I don't know the implications of low-fps during cap combat).

Just to quickly touch on other ways of doing this. I know that several community members here use a dual-boot with Windows 7 to play Freelancer (I do it myself this way as well) and this is probably the most preferable way when it comes to game performance, however this of course means you have to stop whatever you're doing on Linux and boot into Windows to play the game which is rarely the most optimal thing to do. Also you need a Windows license.

The third way of course is virtualisation, either through direct methods like VFIO (if you manage to get this working, hats off) or a hypervisor. The issue with Freelancer is that VirtualBox flat out doesn't work or doesn't provide playable performance, Vmware Player causes issues with the mouse cursor in game and Vmware Workstation is goddamn expensive. I managed to get Freelancer running on Vmware Workstation once upon a time and the results, while better than Wine were still very unsatisfactory (like 100% CPU core usage). Of course this also requires a Windows license.

So this is not a way to fully replace Windows booting (because of the aforementioned Vsync issue as well as possible updates to the DSLauncher which might break things), but just a way for Linux users to have at least a way of playing the game.

Prerequisites

I've done this on elementary OS Loki (0.4). The installation process should be very similar on other Linux distributions, especially various flavours of Ubuntu. Also before begin I need to put in some very important red text.

DO NOT EVER UNDER ANY CIRCUMSTANCE INSTALL "directx9" COMPONENT

I don't know why that is but the only fix after installing it through winetricks or otherwise was a full reinstallation of the distro. Again, no clue why that's a thing but it is. Deleting wineprefixes or other things didn't help, so don't even try to install it because it will break things.

As far as the prerequisites are concerned, you will need to install the newest versions of Wine (2.0-rc5 at the time of writing). If you are on an Ubuntu-flavoured distro you can follow this guide from WineHQ to get the staging versions of Wine. If you are on Arch then like everything it's probably in the AUR. Others, I don't know. I suggest that after installing wine you use the terminal command

Code:
wine --version

to check your version.

You will also need winetricks and playonlinux.

Code:
sudo apt install winetricks playonlinux

PlayOnLinux is a very convenient tool to manage wineprefixes, wine versions and components. One thing you'll want to do before proceeding with the installation is to ensure you have the 32-bit wine version installed in POL alongside your system one. Do it by opening Tools -> Manage Wine Versions in the POL window.

You will also need Freelancer and the Discovery Freelancer installer. I used the repacked version made by some Russian going by the name "Origami". I suppose ThePirateBay links might be slightly out of line here so you might try with the ISO but I don't guarantee it's going to work. You can get Discovery Freelancer launcher exe from the forums.

Installation

Open POL and create a new 32-bit wineprefix by going to Configure -> New. Choose the system wine version (in my case 2.0-rc5) and name it something descriptive. For the purposes of this tutorial I will assume you named it freelancer.

Next we will need to install several required winetricks components. Note that this requires a bit of attention to the terminal output, especially if you haven't installed any winetricks components previously as not all of them can be fetched automatically. Sometimes winetricks will prompt you to manually download a file from a target website and place it in a certain directory and rerun the command.

Code:
WINEPREFIX=$HOME/.PlayOnLinux/wineprefix/freelancer winetricks d3dx9 directplay dotnet20 dotnet30 dotnet40 mfc42 vcrun6 vcrun6sp6

Once the command finishes successfully (you can rerun it to see if all components are installed), open POL and go to Configure -> freelancer -> Miscellaneous -> Run a Windows executable in this virtual drive and select the Freelancer installation .exe. If you use the ISO, make sure to unpack it first. Then, after the installation finishes, install the NoCD patch (if you use the Origami version, the NoCD patch is included in the repack). Remember to always use the default installation directories.

Now go to Configure -> freelancer -> General -> Make a new shortcut from this virtual drive and select Freelancer.exe. Run it and see if it works.

Next, we will need to install Discovery. Go again to Configure -> freelancer -> Miscellaneous -> Run a Windows executable in this virtual drive and select the Discovery Freelancer installer .exe. Click through the installer and install everything to default directories. Ignore the fonts integrity error, we will fix that later. Repeat the process of making a shortcut this time with DSLauncher.exe.

Note that the DSLauncher is quite buggy in Wine and can be tough to work with. Sometimes the prompts will not accept mouse clicks and you will have to use the keyboard to click through them. The patch downloads can sometimes also drop connection, in which case you will have to restart DSLauncher.

When the DSLauncher is done updating, try running the game to see if it works and if you can connect to the server.

Fixes

Fonts:
Download this (courtesy of ) and unpack it to ~/.PlayOnLinux/wineprefix/freelancer/drive_c/windows/Fonts.

Importing accounts:
Go to your Windows partition and copy Users/name/My Documents/My Games/Discovery/launcheraccounts.xml to ~/Documents/My Games/Discovery (or your default documents folder if you use a different one).

Windowed mode:
Running Freelancer in windowed through DSLauncher doesn't work (most of the time). Instead in POL open Configure -> freelancer -> Wine -> Configure Wine -> Graphics and check "Emulate a virtual desktop". Insert the resolution you want the window to be and run Freelancer again.

Alt-tabbing causes a black screen:
On some desktop environments (I noticed this on Pantheon) alt-tabbing causes the game to black screen. This can be solved by running PlayOnLinux in a separate workspace and then switching between workspaces instead of alt-tabbing.

Vertical sync:
Note that this does not limit your FPS. If your FPS exceed 155 while fighting, you might be sanctioned for cheating.
Note that this does not work on Nvidia graphics drivers. Confirmed working only on Nouveau. Instead of opening POL normally, run it from terminal with:
Code:
__GL_SYNC_TO_VBLANK=0 vblank_mode=0 playonlinux
Then, instead of running DSLauncher normally, click on Debug. Additionally, you can go to Configure -> freelancer and in the field Debug flags input "+fps".
Thx for solution, but it not work for me. After first launch i'm see server but can't connect to it (timeout error). Any other launches not show server anymore.

Share your working wineprefix (without freelancer account ofcourse), i try it.
For now i play via virtualbox (in past i play in vmware, but now some strange issues happened with it).
Only issue with virtualbox - if it use more then one core, periodically freelancer begin "silenced" (no any sounds). Restart helping. with one core this issue not happened.
I share my configured vm later.
(01-29-2017, 03:40 AM)Red Sparrow Wrote: [ -> ]Only issue with virtualbox - if it use more then one core, periodically freelancer begin "silenced" (no any sounds). Restart helping. with one core this issue not happened.

That's not really an issue, considering Freelancer isn't multithreaded anyway.
(01-29-2017, 04:24 AM)Durandal Wrote: [ -> ]
(01-29-2017, 03:40 AM)Red Sparrow Wrote: [ -> ]Only issue with virtualbox - if it use more then one core, periodically freelancer begin "silenced" (no any sounds). Restart helping. with one core this issue not happened.

That's not really an issue, considering Freelancer isn't multithreaded anyway.

Yes, but not only Freelacer's process eat cpu. for example directx-to-opengl translator also eat it (via "interrupts"). So 2 cores can help on slow CPUs (one core for freel and another for all other system).
Few notes from my own experience. For me it actually worked without an older versions of .NET (2.0 and 3.0). Rest of the components in 's post are absolutely necessary.

With an older version of Wine it will install and work, but won't detect the server. Worked fully for me on 2.0 and higher, including 2.13, so I would say just use the newest version. (PlayOnLinux is installing Freelancer with 1.5 when using it's listed pattern, so always install it as not listed program).

And the last, but not least. For the sake of experiment I just installed .NET, DirectPlay and other stuff and then copied my windows-installed disco folder into the Wine prefix folder. Then just run DSLaucher.exe in Miscellaneous tab and it worked. If it will work for you as well, all you'll need to do is install fonts, because life without them is BAD.

Alt-tab is not working under Unity (game just freezing), but with XFCE tabbing is very smooth.
May not work anymore. At least it doesn't work for me anymore since the new Launcher got released. Wine somehow won't open the launcher anymore for me, no matter what I do.
DSLauncher crashes all the time. I followed the guides carefully and tried four times. All the same...
My system:
Ubunutu 18.10

http://yourhomeworkhelp.org/ tutorials and reviews
I tried to follow the guide but I had some troubles on my Fedora 38.
Here is a short summary of my notes:

- Installed winetricks and playonlinux
- Created a 32 bit wine prefix
- Installed .NET Core (had troubles with the dotnet30) 2.0, 2.1, 2.2, 3.0, 3.1 by downloading them from https://dotnet.microsoft.com/en-us/download/dotnet:
* dotnet-sdk-2.1.202-win-x86.exe
* dotnet-sdk-2.1.818-win-x86.exe
* dotnet-sdk-2.2.207-win-x86.exe
* dotnet-sdk-3.0.103-win-x86.exe
* dotnet-sdk-3.1.426-win-x86.exe
Note: Most probably some of them is not needed but it doesn't hurt
- Set the path for the APPDATA for user "USERNAME":
WINEPREFIX=$HOME/.PlayOnLinux/wineprefix/$PREFIXNAME wine regedit
HKEY_CURRENT_USER\Environment -> new -> String Value -> APPDATA -> Modify -> C:\users\USERNAME\AppData
- Executed 'WINEPREFIX=$HOME/.PlayOnLinux/wineprefix/$PREFIXNAME winetricks d3dx9 directplay mfc42'
- Executed 'WINEPREFIX=$HOME/.PlayOnLinux/wineprefix/$PREFIXNAME winetricks vcrun6 vcrun6sp6'
- Executed 'WINEPREFIX=$HOME/.PlayOnLinux/wineprefix/$PREFIXNAME winetricks wmp9 ie8'
On IE prompt to restart I have selected "No", then opened PlayonLinux -> prefix -> Wine -> restart windows -> wait till main window completes with the winetricks

Note: wmp9 is needed for the Game cinematics, while ie8 is needed for the DSLauncher.exe

- Set Wine to use ALSA or the game is without audio:
WINEPREFIX=$HOME/.PlayOnLinux/wineprefix/$PREFIXNAME winetricks sound=alsa
In PlayonLinux ->select the prefix name -> config -> audio -> adjust till the test sound works
- Install the game from the ISO
- Patch the game to 1.0 (it's in the crack tools)
- Apply the No CD patch
- Install DS Launcher
- Start the Launcher and update it
- Patch the game and start it

Note: I'm attaching the list of RPMs installed on my system , as this is the 5th Wine prefix and most probably I missed a step/package.
Hey thanks . Finally got it on Garuda which is based of Arch that may make it helpful for any other Arch users, probably any Linux users tbh.

I just had to do one more thing to get this to work
Quote:Uninstalled amdvlk and lib32-amdvlk, then installed vulkan-radeon and lib32-vulkan-radeon

As well make sure the correct gpu drivers are installed otherwise it will launch but you just get a black screen.

Cheers.
Thanks hunter86_bg,

got it finally to run on Arch and wine 8.18 with your tutorial.

kind regards
Brabax