Monthly Archives: July 2016

How to Setup LTSpice IV in Wine

LTspice IV is a freeware SPICE (Simulation Program with Integrated Circuit Emphasis) published by Linear Technology for use in simulating electronic circuits, including those containing integrated circuits.

Currently, I’m working on developing a DC power supply for a 40W dual channel audio amplifier that I built and will be simulating the power supply in LTspice. Since I predominately use linux, and LTspice was designed to be able to run in WINE, here’s a quick guide on installing LTspice in WINE on linux.

Installing LTspice in WINE

Of course, first we must download LTSpice from the Linear Technology website.

Next, let’s setup a fresh WINE prefix (in my case, I installed it into a projects directory that I have). I like to install programs in WINE in their own prefixes so that if something messes up with one program, it doesn’t affect any other programs I’m running with WINE. To set up a fresh prefix:

WINEPREFIX=/path/to/directory/that/you/want winecfg 

If you do not wish to use a different prefix, don’t include the “WINEPREFIX” variable in the next steps. Now install LTspice into the freshly created prefix:

WINEPREFIX=/path/to/directory/that/you/want wine LTspiceIV.exe

and simply follow the installation wizard instructions. Just like that, LTspice is installed! Not too bad eh? Once the installation process is complet, LTSpice should start up automatically the first time. The program may prompt you about updating, which is a good idea. To do this, select the “Sync Release” option from the “Tools” menu. Now, you can get simulating those circuits. If you are in need of a tutorial to get you started, I suggest this one by Al Williams from Hackaday.

Starting LTspice

During the installation process, a desktop shortcut should automatically be made on your linux desktop. If this didn’t happen for some reason, you have two options: 1) start LTspice using the terminal with:

WINEPREFIX=/path/to/directory/that/you/want wine /path/to/directory/that/you/want/drive_c/Program\ Files\ \(x86\)/LTC/LTspiceIV/scad3.exe

or 2) create a .desktop file to use for starting up LTspice. A .desktop file with the following contents should work:

[Desktop Entry]
Name=LTspice IV
Exec=env WINEPREFIX="/path/to/directory/that/you/want" /usr/bin/wine C:\\\\Program\\ Files\\ \\(x86\\)\\\\LTC\\\\LTspiceIV\\\\scad3.exe
Type=Application
StartupNotify=true
Comment=Linear Technology Corporation's LTspice IV
Path=/path/to/directory/that/you/want/dosdevices/c:/Program Files (x86)/LTC/LTspiceIV
Icon=0E18_scad3.0

Once the .desktop file is created, it can be added to the application menu by copying it into the “/usr/share/applications” directory and then executing  “update-desktop-database” both of which require root privileges.

May your simulations be extra spice-y!