Install MetaTrader on Linux using Wine Howto

Avatar
  • updated

So you want to install MetaTrader on Linux.

Below I will show you how to install Wine on various Linux Distros and what else needs to be done to get it as fully working as possible, including the Market so you can install our favourite Expert Advisor CommunityPowerEA.

I shall start with Linux Mint 20.1 as it is the Disro I am using at the moment (will add other distros with time). there are various flavours of desktops for Mint as there are for all the Distros I'm using Xfce as I find it soothingly minimalistic.

Linux Mint 20.1

First thing as usual, you must make sure that your installation is up to date. so run the Update Manager and make sure its all done.

Or if you prefer using the Terminal,the following command.

$ sudo apt-get update

followed by

$ sudo apt-get upgrade

Wine Installation on Linux Mint from Default Mint Repositories

Wine package is available in the default Mint repositories. Therefore, we can easily install it using the apt package manager. Follow the steps below to install Wine using default repositories in Mint OS:


Step 1: Wine is available in 32-bit and 64-bit versions. Before the installation of Wine, you will need to check if you are running a 32-bit or 64-bit Mint system. Follow the steps below to do so:

Open the command-line Terminal using the Ctrl+Alt+T keyboard shortcut and then issue the following command in it:

$ lscpu

You will see a similar output:

Image 862

By looking at the CPU op-mode(s) value, you can find out the flavour of the Mint system. The 32-bit value indicates that you are running a 32-bit system, while the 32-bit, the 64-bit value indicates that you are running a 64-bit OS.


Step 2: To install Wine on a 64-bit Mint system, issue the following command in Terminal:

$ sudo apt install wine64

Image 863

After running the above command, the system might ask for confirmation that if you want to continue the installation or not. Press y to continue, after that, Wine will be installed on your system.

To install Wine on a 32-bit Mint system, issue the following command in Terminal:

$ sudo apt install wine32

Once the installation of Wine is completed, you can verify it using the following command in Terminal:

$ wine --version

With the above command, you can also check the installed version of Wine.

Image 864

Wine Configuration

After the Wine is installed, set up the Wine environment. To do so, issue the following command in Terminal:

$ winecfg

After running the above command, you will be prompted to install wine-mono and Gecko packages. These packages are required for MetaTrader and components to work properly (this is the bit that gets Market working and enables you to log into Mql5.com.

First, you will be prompted for installing the wine-mono package. Click the Install button to install it.

Image 865

After the installation of the wine-mono package is completed, you will be prompted to install Gecko. Click the Install button to install it.

Image 866

Once Gecko is installed, the Wine configuration window will appear which allows you to configure various settings. After configuring required settings, close the configuration window. Now you have Wine installed and configured on your system.

Uninstalling Wine

If you want to uninstall Wine from your system; you can do so with the following command in Terminal:

$ sudo apt-get purge winehq-stable

Installing Metatrader

MetaTrader 4 / 5 is installed as you would normally under Windows, just prefix the setup.exe with "wine" in the terminal.

$ wine setup.exe

Setup will start and you just follow the same procedure you would for windows to install it.

Depending on what options you chose installing MetaTrader you will have an Icon on the desktop for both MetaTrader Terminal and MetaEditor, as well as within your menu under Wine.

Image 867

Double click you desktop icon and away you go.

Image 868

Hope this helps somebody, I've taken the fastest route to installation,and I will ad other Distros if there is a need, BTW these instructions should also work for Ubuntu 20.04 as THis version of Mint is based on it.

Avatar
Paolo Benassi

.Just a quick and dirty shell script that will install Wine 6 on Mint 20.1 and Ubuntu 20.04.

It will run automatically all the steps up to the Mono and Gecko installs, where winecfg will prompt for you to install each, after you have configured and exited Wine Configuration, MetaTrader 5 will automatically be downloaded and installed.

Download Wine6InstallMnt20.1.sh, open a terminal and use the following command to start the script, you will be prompted for your sudo admin password (this is needed).

bash Wine6InstallMnt20.1.sh

MetaTrader will now be installed, just start it in the normal way.

I have tested this install.

I endeavour to make a document covering a few distros, please comment with the distro's you prefer and I will create an installer for it, its certainly faster than cutting and pasting :-)

Avatar
Andrey Khatimlianskyi

Paolo, thank you for your guide!


I've successfully installed MT5 on my Mint 20.2 Cinnamon.

But I can't open Market tab, it is just empty. What can be the reason?

Avatar
Hannes Waser

How is the speed of the MT UI? I run it too under Linux but the UI behaves rather slow. It takes always up to 500ms until it reacts to a button click. But maybe it's because I only use it via vnc (my Mt installation in completely in a headless docker container).

Avatar
Andrey Khatimlianskyi
Quote from Hannes Waser

How is the speed of the MT UI? I run it too under Linux but the UI behaves rather slow. It takes always up to 500ms until it reacts to a button click. But maybe it's because I only use it via vnc (my Mt installation in completely in a headless docker container).

It is fast and smooth, like on my powerful windows PC.

Avatar
Ulises Cune
Quote from Andrey Khatimlianskyi

Paolo, thank you for your guide!


I've successfully installed MT5 on my Mint 20.2 Cinnamon.

But I can't open Market tab, it is just empty. What can be the reason?

But I can't open Market tab, it is just empty. What can be the reason?

This is a known bug by Metatrader.

How to Install the Platform on Linux (MT5)

https://www.metatrader5.com/en/terminal/help/start_advanced/install_linux


Install Terminal on Linux (MT4)

https://www.metatrader4.com/en/trading-platform/help/userguide/install_linux


Avatar
Andrey Khatimlianskyi
Quote from Ulises Cune

But I can't open Market tab, it is just empty. What can be the reason?

This is a known bug by Metatrader.

How to Install the Platform on Linux (MT5)

https://www.metatrader5.com/en/terminal/help/start_advanced/install_linux


Install Terminal on Linux (MT4)

https://www.metatrader4.com/en/trading-platform/help/userguide/install_linux


But Paolo said it works for him. So, it is possible, I guess.

Avatar
Paolo Benassi
Quote from Andrey Khatimlianskyi

But Paolo said it works for him. So, it is possible, I guess.

Ah Sorry been away for some time.

For the Market to work you need both the Mono and Gecko installs, the original instructions missed this part for some reason.

I haven't retried the script in the appended reply again, but the last time I used it it did complete and work fully. Just make sure you install everything when prompted at MT5 install time.

Avatar
Andrey Khatimlianskyi
Quote from Paolo Benassi

Ah Sorry been away for some time.

For the Market to work you need both the Mono and Gecko installs, the original instructions missed this part for some reason.

I haven't retried the script in the appended reply again, but the last time I used it it did complete and work fully. Just make sure you install everything when prompted at MT5 install time.

Oh, missed your comment with script. Will try it today, thank you!

Avatar
Andrey Khatimlianskyi
Quote from Paolo Benassi

Ah Sorry been away for some time.

For the Market to work you need both the Mono and Gecko installs, the original instructions missed this part for some reason.

I haven't retried the script in the appended reply again, but the last time I used it it did complete and work fully. Just make sure you install everything when prompted at MT5 install time.

Paolo, now it works good (Market tab too).

But I can't stop the MT (terminal64.exe process leaves running for a while).

Have you faced with such issue?

Avatar
Paolo Benassi
Quote from Andrey Khatimlianskyi

Paolo, now it works good (Market tab too).

But I can't stop the MT (terminal64.exe process leaves running for a while).

Have you faced with such issue?

I have on occasion had trouble with the terminal freezing up on me, everything still runs, but it becomes unresponsive. Still haven't figured out if this is a problem with Wine, I've tried various ways to sort it but without success so far.