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
sudo dpkg --add-architecture i386
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo tee /etc/apt/trusted.gpg.d/winehq.asc
# for Ubuntu 20.04
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
sudo apt-get update
sudo apt-get -y install winehq-stable=7.0.0.0~focal-1
# if ask paudio (or similar) different from ...., I choose to use Default [N]
wine --version
# It will prompt `wine-7.0`
sudo mkdir /opt/wine-stable/share/wine/mono
sudo wget -O - https://dl.winehq.org/wine/wine-mono/7.0.0/wine-mono-7.0.0-x86.tar.xz | sudo tar -xJv -C /opt/wine-stable/share/wine/mono
sudo mkdir /opt/wine-stable/share/wine/gecko
sudo wget -O /opt/wine-stable/share/wine/gecko/wine-gecko-2.47.1-x86.msi https://dl.winehq.org/wine/wine-gecko/2.47.1/wine-gecko-2.47.1-x86.msi
sudo wget -O /opt/wine-stable/share/wine/gecko/wine-gecko-2.47.1-x86_64.msi https://dl.winehq.org/wine/wine-gecko/2.47.1/wine-gecko-2.47.1-x86_64.msi
After above steps, you should find wine-mono & wine-gecko as following screenshots:
note: do not run any windows program before this setup Run following lines will add WINE env config in your .bashrc file
# Wine Setup
echo "export WINEPREFIX=~/prefix32" >> ~/.bashrc
echo "export WINEARCH=win32" >> ~/.bashrc
Use following command in bash terminal, and it will take a while for setup.
wine /opt/wine-stable/lib/wine/i386-windows/explorer.exe
# or
/opt/wine-stable/bin/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 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.
If there is no any program on the list (in the middle of Add/Remove Programs
window), need to install manually.
- Click
Install
button on theAdd/Remove Programs
window, then, It will show upfile dialog
. Find thewine-gecko-x86.msi
file which download in previous step, and select & open it.Then,
wine-gecko
should show up on theAdd/Remove Programs
window.
- Click
Install
button on theAdd/Remove Programs
window, then, It will show upfile dialog
. Find thewinemono-support.msi
file which download in previous step, and select & open it.Then,
Wine Mono Windows Support
should show up on theAdd/Remove Programs
window.
Here are some screenshots:
Run Bult-in Windows programs (such as Task Manager
, Notepad
, and cmd.exe
), you can find them in system32
folder
https://github.com/solarkennedy/wine-x11-novnc-docker/blob/master/Dockerfile
https://tecadmin.net/install-wine-on-ubuntu/
Hi, thanks for the gist. I am old/new to wine (i.e. tried it years ago and gave up). Now that Microsoft seem to be trying very hard to persuade users to dump Windows completely (or give up their data and live in microsoft.com - trying to be Google it seems) it is time to move to Linux 100%. Only problem for me is that some apps I rely on are Windows only and unlikely to change any time soon.
Suggested update
You may want to update step 1 as this method of obtaining APT keys is deprecated for some time (see DEPRECATION under man 8 apt-key) and could trip up some users.
The line should now read something like this, though there are other ways too.
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo tee /etc/apt/trusted.gpg.d/winehq.asc