Install Wine with Mono & Gecko in Ubuntu 20.04
Warning: Do not try those command in your main PC, I test in a virtual Machine
Note: Most of commands are from the Dockerfile in Reference section. If you want to test wine, just run their docker container
Setup PPA
1 | sudo dpkg --add-architecture i386 |
Install Wine on Ubuntu
1 | sudo apt-get update |
Check Wine Version
1 | wine --version |
Install Mono
1 | sudo mkdir /opt/wine-stable/share/wine/mono |
Download Gecko
1 | sudo mkdir /opt/wine-stable/share/wine/gecko |
After above steps, you should find wine-mono & wine-gecko as following screenshots:

Set WINE env config in bashrc
note: do not run any windows program before this setup
Run following lines will add WINE env config in your .bashrc file
1 | # Wine Setup |
Run explore.exe to setup wine folder automatically.
Use following command in bash terminal, and it will take a while for setup.
1 | wine /opt/wine-stable/lib/wine/i386-windows/explorer.exe |
Here is screenshot of Windows explorer
If setup successfully, go to My Computer -> Control Panel -> Add/Remove Programs.
Then, there should have Wine Mono Windows Support and Wine Gecko.
Here are some screenshots:
After double clicks
My Computer
After double clicks
Control Panel
Manually install Mono and Gecko
After you double click Add/Remove Programs, nothing happenned or prompt some error message (such as no suitable program to open Add/Remove Programs). You may need to install Mono and Gecko, I used following steps.
Open control.exe in system32
Go to
My Computer -> C: -> Windows -> system32, findcontrol.exeand double clicks it
Double click
Add/Remove Programs
If there is no any program on the list (in the middle of Add/Remove Programs window), need to install manually.
Install wine-gecko
- Click
Installbutton on theAdd/Remove Programswindow, then, It will show upfile dialog. Find thewine-gecko-x86.msifile which download in previous step, and select & open it.
Then,wine-geckoshould show up on theAdd/Remove Programswindow.
Install wine-mono
- Click
Installbutton on theAdd/Remove Programswindow, then, It will show upfile dialog. Find thewinemono-support.msifile which download in previous step, and select & open it.
Then,Wine Mono Windows Supportshould show up on theAdd/Remove Programswindow.
Test some Windows programs with Wine
Here are some screenshots:
Run PuTTY
Run Built-in Windows programs (such as Task Manager, Notepad, and cmd.exe), you can find them in system32 folder
Reference
https://github.com/solarkennedy/wine-x11-novnc-docker/blob/master/Dockerfile
https://tecadmin.net/install-wine-on-ubuntu/
Note:
This note is originally posted in gist



