How to install cognex in-sight explorer on linux (and other posix environments)

I have created a thread in the public forum reporting on my results of running Cognex In-Sight Explorer (version 6.5.1) on my machine. And i have received a question if i’m willing to write a how to about how you can install it on your machine. So here we are.

The method you’re going to read is how to install in-sight using wine. Wine stands for “wine is not an emulator”. And like what the name says, wine does not simulate a windows system. Instead it translates function calls to ones that you can find in the POSIX system, like Linux, macOS, & BSD. But sadly it only runs on an x86 (and x64) platform. ARM and Apple Silicon aren’t supported. I tried installing it on my only macos (m3) with rosetta 2 enabled and it hangs when installing dotnet. Also each system varies in which permission the system have. The following instruction is tested to be working on ubuntu 24.04 and fedora 43.

Installing wine

You need at least Wine version 11. And because it is a pretty recent version, not all distros provide it. I recommend downloading it directly from upstream. On WineHG’s wiki you find instructions to download binaries of install it from source.

Creating a wine prefix

Wine creates a c drive directory and important files like a registry in a user defined location that is stored in an environment variable. (WINEPREFIX) It is best practice to create multiple wineprefixes so each application gets the dependencies that it needs. So you can have one for windows 7 application running an old dotnet application. And another that is using settings that can be found on windows 11. You can create a prefix using wineboot --init. And here’s an example of storing one in xdg data home. (if the environment variable isn’t given, it will store it in ~/.wine )

mkdir -p ~/.local/share/wineprefixes/cognex
export WINEPREFIX="$HOME/.local/share/wineprefixes/cognex"
wineboot --init

Installing software and its dependancies

Cognex relies on dotnet 4.5.2 and if you download and run the installer without some changes, like setting the windows version to 2003 it fails to download. Luckily, You dont neet to follow complex procedure to install it because there is a shell script called winetricks that performs those difficult operations. All you need to do is tell it which dependency needs te be installed. You can get the script from your repo’s repositories. Or this github repo. For Cognex In-Sight Explorer need the following procedures:

::information_source: Info: You can pass the --unattended flag to skip the please agree to the Terms Of Service popups but on the other hand you won’t be getting a progress bar which is annoying because dotnet452 can hang after it installed it correctly. And the installation process takes half an hour to forty-five minutes.

winetricks remove_mono
winetricks dotnet452
winetricks dotnet35sp1

Now you can run the installer that you can download from the official website.

wine ~/Downloads/Cognex\ In-Sight\ Software\ 6.5.1.exe

Network permissions

Cognex needs to open an ftp server on port 21 to work with the simulation (or real hardware. I haven’t tested it yet) but on linux you are not allowed to open that without special permissions. You can run it with sudo. But it is better to give wine the ability to open privileged ports by adding a capability to the wineserver binary. First you need to find it because it behind a symlink.

aron@bertus:~$ which wineserver
/usr/bin/wineserver
aron@bertus:~$ ls -l /usr/bin/wineserver
lrwxrwxrwx. 1 root root 31 13 jan 23:32 /usr/bin/wineserver -> /opt/wine-stable/bin/wineserver
aron@bertus:~$ sudo setcap "cap_net_bind_service=ep" /opt/wine-stable/bin/wineserver

Also the binary needs to have access to data from layer two (ethernet) from the hardware port. So no docker or vm if you don’t want to pass through the hardware port.

Running it.

After you have run the installer, you should already have applications shown in the application menus and/or shown on the desktop. You can use those. But if you don’t have it you can launch it using the following command.

wine $WINEPREFIX/drive_c/Program\ Files\ \(x86\)/Cognex/In-Sight/In-Sight\ Explorer\ 6.5.1/In-Sight\ Explorer.exe
1 Like