In this article, we’ll guide you step-by-step on how to install and run dbForge Studio for PostgreSQL on Ubuntu using Wine. Sometimes, specific .NET libraries might not install seamlessly with Wine alone. To resolve this, we’ll employ Winetricks—a script designed to simplify the installation of various redistributable runtime libraries needed to run some programs in Wine.
There are multiple versions of Wine available, but the most commonly used version for running Windows applications is WineHQ. Here’s how to install it:
1. Open a Terminal. You can open a terminal in Ubuntu by pressing Ctrl + Alt + T or searching for Terminal in the application launcher.
2. Update APT. First, make sure your package lists are up to date by running the following command:
sudo apt update
3. Install WineHQ. You can install WineHQ by adding its repository and then installing it. Here are the commands to do this:
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo apt update
sudo apt install --install-recommends winehq-staging:amd64
4. Check the Wine version. After the installation is complete, you can check the Wine version to verify that it was installed correctly:
wine --version
5. Run Wine in an isolated environment. The following command sets up a 64-bit Wine environment with a custom Wine prefix directory at /home/$USER/.wine_dbforge
and then opens the Wine Configuration tool for further configuration. This can be useful when you want to isolate specific Windows applications or configurations from your main Wine installation.
WINEARCH=win64 WINEPREFIX="/home/$USER/.wine_dbforge" winecfg
Wine does not automatically install the Mono package required for .NET applications to work correctly. Therefore, it displays the following dialog.
In the dialog, click Cancel. We will be using Winetricks to install and run .NET libraries.
1. Install Winetricks. Use the following commands to install Winetrics on your Ubuntu system:
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks -P ~/.local/bin/source ~/.profile
sudo chmod 700 ~/.local/bin/winetricks
2. Verify the installation. After the installation is complete, you can verify that Winetricks has been installed correctly by running:
winetricks --version
This should display the version number of Winetricks, confirming that it has been installed.
At this step, we will run Winetricks within an isolated environment to install additional software, specifically, the .NET Framework. For this, we will use the following commands:
WINEPREFIX="/home/$USER/.wine_dbforge" winetricks
winetricks dlls list | grep -i "dotnet"
WINEPREFIX="/home/$USER/.wine_dbforge" winetricks dotnet48
Note
.NET version 4.7 is sufficient for the successful installation and operation of dbForge Studio for PostgreSQL. However, it may not install correctly under Wine. Therefore, we recommend installing and using a higher version of .NET, such as 4.8, for improved compatibility and performance.
The .NET installers will guide you through all the steps. You will need to agree to the license terms and click Continue to proceed.
In last window of the installation wizard, click Finish.
You can download dbForge Studio for PostgreSQL from Devart’s official website.
To install dbForge Studio for PostgreSQL using Wine on your Linux system, use the following command:
WINEARCH=win64 WINEPREFIX="/home/$USER/.wine_dbforge" wine /home/ubuntu/Downloads/dbforgepostgresql.exe
The provided command sets up a 64-bit Wine environment with a custom Wine prefix directory at /home/$USER/.wine_dbforge and then runs the dbforgepostgresql.exe
installer located in the /home/test/Downloads/
directory within that Wine environment.
The installation wizard for dbForge Studio will launch. Simply follow the wizard’s steps to install the application.
To run dbForge Studio for PostgreSQL using Wine, run the following command:
WINEPREFIX="/home/$USER/.wine_dbforge" wine "/home/$USER/.wine_dbforge/drive_c/Program Files/Devart/dbForge Studio for PostgreSQL/dbforgepostgresql.exe"
This command specifies the Wine prefix and the path to the dbForge Studio for PostgreSQL executable within that prefix. After running this command, dbForge Studio for PostgreSQL should launch.