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
ferdinand tampubolon
Quote from Dioconnoi

Please how can I do same? I have tried a lot using various tutorials on youtube but it never worked?

Can you point me to a video or any kind of explanation on how to do it like you did?

Thank you!

before start can i know what os do you running? example ubuntu xx:xx or debian 10/11

type terminal lscpu and paste here...

i am follow  many trick  follow this

mkdir ~/exagear
cd ~/exagear


wget https://dl.insrt.uk/mirror/exagear/exagear_3428-1_arm64.deb
wget https://dl.insrt.uk/mirror/exagear/exagear-dsound-server_010_arm64.deb
wget https://dl.insrt.uk/mirror/exagear/exagear-guest-debian-8_3428_all.deb

sudo dpkg --add-architecture armhf
sudo dpkg -i exagear*3428*.deb
sudo dpkg -i exagear-dsound*.deb
sudo dpkg -i exagear-guest*.deb


curl https://dl.insrt.uk/mirror/exagear/patch.sh | sudo bash

sudo apt-get update && sudo apt-get upgrade -y

$ exagear
$ sudo dpkg --add-architecture i386


$sudo nano /etc/apt/sources.list

deb http://security.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security/ stretch/updates main contrib non-free

deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free

deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free

Save CTRL+O, Exit CTRL+X.

$sudo apt update : sudo apt upgrade -y
$ sudo apt-get update && sudo apt-get install wine winbind -y

$exit

$ sudo apt-get install wine64-tools


go to browser download mt5 exe for windows

after that right click mt5 .exe open with other aplication
scrool down choose " wine windows blablabla "

finish enjoy
note it works mt4 or mt5

Avatar
Dioconnoi
Quote from ferdinand tampubolon

running ubuntu focal  arm64 wine succes low power 

# sudo apt-get install wine64-tools

Image 4222

Please how can I do same? I have tried a lot using various tutorials on youtube but it never worked?

Can you point me to a video or any kind of explanation on how to do it like you did?

Thank you!

Avatar
ferdinand tampubolon

running ubuntu focal  arm64 wine succes low power 

# sudo apt-get install wine64-tools

Image 4222

Avatar
ferdinand tampubolon
Quote from Dioconnoi

Hi Paolo

I tried quite a number of times to run Wine on an ARM-64 linux VPS and didn't succeed

Do you know if this is possible?

yes it is can running

windows arm and linux arm can running mt5

ii will update when it is running today i get server on arm 2core  12gb ram running ubuntu 20.04 will pos later

Avatar
Dioconnoi

Hi Paolo

I tried quite a number of times to run Wine on an ARM-64 linux VPS and didn't succeed

Do you know if this is possible?

Avatar
Andrey Khatimlianskyi
Quote from Paolo Benassi

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.

For me it is just keeps running after I close it:


And I can't run it again without killing the terminal64.exe process.

Never mind, it doesn't affect trading)

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.

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
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
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.