I have been using HeidiSQL (an open source GUI for MySQL / MSSQL) on Windows for a while now. However, as I'm moving to Ubuntu for development, I'd like to continue using HeidiSQL.

The website states that it can be used with an application called Wine, but there isn't any documentation on how to do this.

share|improve this question
up vote 19 down vote accepted

Step 1: install Wine

There are three ways how you can get Wine. You can either download the stable version from the official Ubuntu repository, download it from Wine's repository, or compile the source yourself.

The simplest option is probably downloading it from the Ubuntu repository, using the command line:

sudo apt-get install wine

Follow the instructions, you will need to accept a license agreement for TrueType fonts. Use the arrow keys ( and ) and Enter to accept the terms.

Step 2: download HeidiSQL

Download the installer from http://www.heidisql.com/download.php.

Step 3: install HeidiSQL using Wine

Open the installer for HeidiSQL with Wine and follow the steps to install the application.

Step 4: add the HeidiSQL icon to the launcher (optional)

This step is optional, even without it you can start using HeidiSQL. However, I wanted to add a shortcut to the launcher, but this wasn't as easy as I thought it would be. I finally managed to do so by following these steps:

  1. First, find out where Wine is storing the HeidiSQL icon. In my instance, it was in /home/nic/.local/share/icons/hicolor/48x48/apps.
  2. You also need the location of the HeidiSQL executable. In my instance, it's in /home/nic/.wine/drive_c/Program Files/HeidiSQL.
  3. With this information, we can create a new file in ~/.local/share/applications, called heidisql.desktop.

    sudo gedit ~/.local/share/applications/heidisql.desktop
    

    (you can use another text editor instead of gedit, of course).

    Fill it with:

    [Desktop Entry]
    Name=HeidiSQL
    Comment=HeidiSQL on Ubuntu
    Exec=env WINEDEBUG=-all WINEPREFIX=/home/USER/.wine wine heidisql.exe
    Icon=/home/USER/.local/share/icons/hicolor/48x48/apps/9103_heidisql.0.png
    Path=/home/USER/.wine/drive_c/Program Files/HeidiSQL
    Terminal=false
    Type=Application
    Categories=Wine;
    StartupNotify=true
    StartupWMClass=heidisql.exe
    

    (of course you need to change the paths after Exec=, Icon= and Path= with the appropriate ones. StartupWMClass= is not compulsory but having this entry pointed to application executable filename fixes issue with unity launcher showing generic wine app icon when the app is running)

  4. Add the icon to the launcher. Either go to /home/USER/.local/share/applications using the file browser, look for the HeidiSQL icon and drag it to the launcher, or search for HeidiSQL in Dash and drag the icon from there. (as Dash might contain two identical icons for HeidiSQL, and only one is the right one, I suggest the first method)

For more information about .desktop files, see https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles.

share|improve this answer
    
HeidiSQL works great with wine (good luck, I found no similarly smart SQL client for linux...), yet the font in the lower pane (SQL log) seems broken. The characters look somewhat pseudo-monospaced. Is there a wine setting to correct for this? – BurninLeo Sep 19 '14 at 19:58
2  
Easy to solve ... if you know where to look: Run winetricks (install, if not yet installed), select "Select the default wineprefix" -> "Install Font" -> all fonts. Done. – BurninLeo Oct 8 '14 at 20:25
    
You can also use the 128x128 icon to make it look nicer. – simbabque May 28 '17 at 18:56
    
I'm getting an "Error while loading the archive" when opening any of the installers. – Christian 2 days ago

I just installed HeidiSQL 9.4.0.5151 using the 32-bit installer with Wine on my Ubuntu 16.04. An icon was placed directly on my desktop. I looked and found the following:

~/.local/share/applications/wine/Programs/HeidiSQL/HeidiSQL.desktop 

So the above answer containing information on how to do this is not needed.

Double-clicking on the HeidiSQL desktop icon runs HeidiSQL under Wine with no problem.

share|improve this answer
$ sudo add-apt-repository ppa:wine/wine-builds
$ sudo apt-get update
$ sudo apt-get install --install-recommends wine-staging
$ sudo apt-get install winehq-staging

Source

cd ~/.wine/drive_c/<your path>/
/opt/wine-staging/bin/wine file.exe

Wine Usage

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.