diff -pruN 0.9.2-1/debian/changelog 0.9.2-1ubuntu2/debian/changelog
--- 0.9.2-1/debian/changelog	2010-11-02 14:34:14.000000000 +0000
+++ 0.9.2-1ubuntu2/debian/changelog	2011-04-15 17:05:35.000000000 +0100
@@ -1,3 +1,19 @@
+dssi-vst (0.9.2-1ubuntu2) natty; urgency=low
+
+  * debian/control: Add missing build-dep on libjack-dev (LP: #749124)
+
+ -- Andreas Moog <amoog@ubuntu.com>  Fri, 15 Apr 2011 18:05:03 +0200
+
+dssi-vst (0.9.2-1ubuntu1) natty; urgency=low
+
+  * Merge from debian unstable.  Remaining changes:
+    - debian/control: Build-Depends on wine1.2-dev instead of libwine-dev.
+    - debian/patches/wine1.2-compatibility.patch: Deal with wine1.2's
+      different naming, i.e wine1.2 adds .exe to the end of shell
+      script filenames.
+
+ -- Artur Rona <ari-tczew@ubuntu.com>  Sun, 28 Nov 2010 20:23:11 +0100
+
 dssi-vst (0.9.2-1) unstable; urgency=low
 
   * New upstream release, closes: #601671.
@@ -8,6 +24,36 @@ dssi-vst (0.9.2-1) unstable; urgency=low
 
  -- Samuel Mimram <smimram@debian.org>  Tue, 02 Nov 2010 14:34:06 +0000
 
+dssi-vst (0.9.2-0ubuntu1) maverick; urgency=low
+
+  * New upstream snapshot
+  * Switch to 3.0 quilt format
+  * Update to standards 3.9.1
+  * Build against wine1.2. The package FTBFS against wine1.0 on i386 in
+    maverick
+  * debian/patches/wine1.2-compatibility.patch: Deal with wine1.2's different
+    naming, i.e wine1.2 adds .exe to the end of shell script filenames
+
+ -- Luke Yelavich <themuso@ubuntu.com>  Mon, 02 Aug 2010 22:19:57 +1000
+
+dssi-vst (0.8-2ubuntu3) maverick; urgency=low
+
+  * No-change rebuild to pick up new j-a-c-k shlibs
+
+ -- Luke Yelavich <themuso@ubuntu.com>  Wed, 21 Jul 2010 12:57:36 +0200
+
+dssi-vst (0.8-2ubuntu2) lucid-proposed; urgency=low
+
+  * No changes rebuild to build on new Wine1.0 (LP: #572470)
+
+ -- Scott Ritchie <scottritchie@ubuntu.com>  Fri, 30 Apr 2010 01:41:29 -0700
+
+dssi-vst (0.8-2ubuntu1) lucid; urgency=low
+
+  * debian/control: build-depend on wine1.0-dev instead of libwine-dev
+
+ -- Scott Ritchie <scottritchie@ubuntu.com>  Sun, 25 Apr 2010 23:39:14 -0700
+
 dssi-vst (0.8-2) unstable; urgency=low
 
   * Update copyright file (thanks Torsten Werner).
diff -pruN 0.9.2-1/debian/control 0.9.2-1ubuntu2/debian/control
--- 0.9.2-1/debian/control	2010-11-02 14:33:51.000000000 +0000
+++ 0.9.2-1ubuntu2/debian/control	2011-04-15 17:03:42.000000000 +0100
@@ -1,8 +1,9 @@
 Source: dssi-vst
 Section: contrib/sound
 Priority: extra
-Maintainer: Samuel Mimram <smimram@debian.org>
-Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.46-7~), gcc-multilib [amd64], g++-multilib [amd64], dssi-dev, libwine-dev, liblo-dev, libasound-dev
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Samuel Mimram <smimram@debian.org>
+Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.46-7~), gcc-multilib [amd64], g++-multilib [amd64], dssi-dev, wine1.2-dev, liblo-dev, libasound-dev, libjack-dev
 Standards-Version: 3.9.1
 Homepage: http://breakfastquay.com/dssi-vst/
 
diff -pruN 0.9.2-1/debian/patches/series 0.9.2-1ubuntu2/debian/patches/series
--- 0.9.2-1/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ 0.9.2-1ubuntu2/debian/patches/series	2011-04-15 17:01:36.000000000 +0100
@@ -0,0 +1 @@
+wine1.2-compatibility.patch
diff -pruN 0.9.2-1/debian/patches/wine1.2-compatibility.patch 0.9.2-1ubuntu2/debian/patches/wine1.2-compatibility.patch
--- 0.9.2-1/debian/patches/wine1.2-compatibility.patch	1970-01-01 01:00:00.000000000 +0100
+++ 0.9.2-1ubuntu2/debian/patches/wine1.2-compatibility.patch	2011-04-15 17:01:36.000000000 +0100
@@ -0,0 +1,45 @@
+From: Artur Rona <ari-tczew@ubuntu.com>
+Description: Deal with wine1.2's different naming, i.e wine1.2 adds .exe to the end of shell script filenames.
+Author: Luke Yelavich <themuso@ubuntu.com>
+
+diff -urN dssi-vst-0.9.2/Makefile dssi-vst-0.9.2.new/Makefile
+--- dssi-vst-0.9.2/Makefile	2010-05-04 19:01:29.000000000 +1000
++++ dssi-vst-0.9.2.new/Makefile	2010-08-02 22:15:24.351564591 +1000
+@@ -43,14 +43,14 @@
+ 		mkdir -p $(BINDIR)
+ 		install dssi-vst.so $(DSSIDIR)
+ 		install dssi-vst.so $(LADSPADIR)
+-		install dssi-vst-server.exe.so dssi-vst-server dssi-vst-scanner.exe.so dssi-vst-scanner dssi-vst_gui $(DSSIDIR)/dssi-vst
++		install dssi-vst-server.exe.so dssi-vst-server.exe dssi-vst-scanner.exe.so dssi-vst-scanner.exe dssi-vst_gui $(DSSIDIR)/dssi-vst
+ 		install vsthost $(BINDIR)
+ 
+ clean:
+ 		rm -f $(OBJECTS) $(OBJECTS_W32) libremoteplugin.a libremoteplugin.w32.a
+ 
+ distclean:	clean
+-		rm -f $(TARGETS) dssi-vst-scanner dssi-vst-server *~ *.bak
++		rm -f $(TARGETS) dssi-vst-scanner.exe dssi-vst-server.exe *~ *.bak
+ 
+ %.exe.so:	%.cpp libremoteplugin.w32.a $(HEADERS)
+ 		wineg++ -m32 $(CXXFLAGS) $< -o $* $(LDFLAGS) -L. -lremoteplugin.w32 -lpthread
+diff -urN dssi-vst-0.9.2/remotevstclient.cpp dssi-vst-0.9.2.new/remotevstclient.cpp
+--- dssi-vst-0.9.2/remotevstclient.cpp	2010-05-04 19:01:29.000000000 +1000
++++ dssi-vst-0.9.2.new/remotevstclient.cpp	2010-08-02 22:16:25.541564591 +1000
+@@ -55,7 +55,7 @@
+ 	closedir(directory);
+ 
+ 	struct stat st;
+-	std::string fileName = subDir + "/dssi-vst-server";
++	std::string fileName = subDir + "/dssi-vst-server.exe";
+ 
+ 	if (stat(fileName.c_str(), &st)) {
+ 	    continue;
+@@ -318,7 +318,7 @@
+ 	closedir(directory);
+ 
+ 	struct stat st;
+-	std::string fileName = subDir + "/dssi-vst-scanner";
++	std::string fileName = subDir + "/dssi-vst-scanner.exe";
+ 
+ 	if (stat(fileName.c_str(), &st)) {
+ 	    continue;
diff -pruN 0.9.2-1/Makefile 0.9.2-1ubuntu2/Makefile
--- 0.9.2-1/Makefile	2010-05-04 10:01:29.000000000 +0100
+++ 0.9.2-1ubuntu2/Makefile	2011-04-15 21:39:31.000000000 +0100
@@ -43,14 +43,14 @@ install:	all
 		mkdir -p $(BINDIR)
 		install dssi-vst.so $(DSSIDIR)
 		install dssi-vst.so $(LADSPADIR)
-		install dssi-vst-server.exe.so dssi-vst-server dssi-vst-scanner.exe.so dssi-vst-scanner dssi-vst_gui $(DSSIDIR)/dssi-vst
+		install dssi-vst-server.exe.so dssi-vst-server.exe dssi-vst-scanner.exe.so dssi-vst-scanner.exe dssi-vst_gui $(DSSIDIR)/dssi-vst
 		install vsthost $(BINDIR)
 
 clean:
 		rm -f $(OBJECTS) $(OBJECTS_W32) libremoteplugin.a libremoteplugin.w32.a
 
 distclean:	clean
-		rm -f $(TARGETS) dssi-vst-scanner dssi-vst-server *~ *.bak
+		rm -f $(TARGETS) dssi-vst-scanner.exe dssi-vst-server.exe *~ *.bak
 
 %.exe.so:	%.cpp libremoteplugin.w32.a $(HEADERS)
 		wineg++ -m32 $(CXXFLAGS) $< -o $* $(LDFLAGS) -L. -lremoteplugin.w32 -lpthread
diff -pruN 0.9.2-1/.pc/applied-patches 0.9.2-1ubuntu2/.pc/applied-patches
--- 0.9.2-1/.pc/applied-patches	1970-01-01 01:00:00.000000000 +0100
+++ 0.9.2-1ubuntu2/.pc/applied-patches	2011-04-15 21:39:31.000000000 +0100
@@ -0,0 +1 @@
+wine1.2-compatibility.patch
diff -pruN 0.9.2-1/.pc/.version 0.9.2-1ubuntu2/.pc/.version
--- 0.9.2-1/.pc/.version	1970-01-01 01:00:00.000000000 +0100
+++ 0.9.2-1ubuntu2/.pc/.version	2011-04-15 21:39:31.000000000 +0100
@@ -0,0 +1 @@
+2
diff -pruN 0.9.2-1/.pc/wine1.2-compatibility.patch/Makefile 0.9.2-1ubuntu2/.pc/wine1.2-compatibility.patch/Makefile
--- 0.9.2-1/.pc/wine1.2-compatibility.patch/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ 0.9.2-1ubuntu2/.pc/wine1.2-compatibility.patch/Makefile	2010-05-04 10:01:29.000000000 +0100
@@ -0,0 +1,78 @@
+
+DSSIDIR		= /usr/local/lib/dssi
+LADSPADIR	= /usr/local/lib/ladspa
+BINDIR		= /usr/local/bin
+
+# To compile with the VeSTige compatibility header:
+CXXFLAGS	= -Ivestige -Wall -fPIC
+
+# To compile with the official VST SDK v2.4r2:
+#CXXFLAGS	= -I./vstsdk2.4/pluginterfaces/vst2.x -Wall -fPIC
+
+LDFLAGS		= 
+
+TARGETS		= dssi-vst-server.exe.so \
+		  dssi-vst-scanner.exe.so \
+		  dssi-vst.so \
+		  dssi-vst_gui \
+		  vsthost
+
+HEADERS		= remoteplugin.h \
+		  remotepluginclient.h \
+		  remotepluginserver.h \
+		  remotevstclient.h \
+		  rdwrops.h \
+		  paths.h
+
+OBJECTS		= remotevstclient.o \
+		  remotepluginclient.o \
+		  remotepluginserver.o \
+		  rdwrops.o \
+		  paths.o
+
+OBJECTS_W32	= remotepluginclient.w32.o \
+		  remotepluginserver.w32.o \
+		  rdwrops.w32.o \
+		  paths.w32.o
+
+all:		$(TARGETS)
+
+install:	all
+		mkdir -p $(DSSIDIR)/dssi-vst
+		mkdir -p $(LADSPADIR)
+		mkdir -p $(BINDIR)
+		install dssi-vst.so $(DSSIDIR)
+		install dssi-vst.so $(LADSPADIR)
+		install dssi-vst-server.exe.so dssi-vst-server dssi-vst-scanner.exe.so dssi-vst-scanner dssi-vst_gui $(DSSIDIR)/dssi-vst
+		install vsthost $(BINDIR)
+
+clean:
+		rm -f $(OBJECTS) $(OBJECTS_W32) libremoteplugin.a libremoteplugin.w32.a
+
+distclean:	clean
+		rm -f $(TARGETS) dssi-vst-scanner dssi-vst-server *~ *.bak
+
+%.exe.so:	%.cpp libremoteplugin.w32.a $(HEADERS)
+		wineg++ -m32 $(CXXFLAGS) $< -o $* $(LDFLAGS) -L. -lremoteplugin.w32 -lpthread
+
+libremoteplugin.a:	remotepluginclient.o remotepluginserver.o rdwrops.o paths.o
+		ar r $@ $^
+
+libremoteplugin.w32.a:	remotepluginclient.w32.o remotepluginserver.w32.o rdwrops.w32.o paths.w32.o
+		ar r $@ $^
+
+%.w32.o:	%.cpp $(HEADERS)
+		wineg++ -m32 $(CXXFLAGS) $< -c -o $@
+
+%.o:		%.cpp $(HEADERS)
+		g++ $(CXXFLAGS) $< -c
+
+dssi-vst.so:	dssi-vst.cpp libremoteplugin.a remotevstclient.o $(HEADERS)
+		g++ -shared -Wl,-Bsymbolic -g3 $(CXXFLAGS) -o dssi-vst.so dssi-vst.cpp remotevstclient.o $(LDFLAGS) -L. -lremoteplugin -lasound
+
+vsthost:	vsthost.cpp libremoteplugin.a remotevstclient.o $(HEADERS)
+		g++ $(CXXFLAGS) vsthost.cpp remotevstclient.o -o vsthost $(LDFLAGS) -L. -lremoteplugin -ljack -lasound -lpthread
+
+dssi-vst_gui:	dssi-vst_gui.cpp rdwrops.h
+		g++ $(CXXFLAGS) dssi-vst_gui.cpp rdwrops.o -o dssi-vst_gui $(LDFLAGS) -llo
+
diff -pruN 0.9.2-1/.pc/wine1.2-compatibility.patch/remotevstclient.cpp 0.9.2-1ubuntu2/.pc/wine1.2-compatibility.patch/remotevstclient.cpp
--- 0.9.2-1/.pc/wine1.2-compatibility.patch/remotevstclient.cpp	1970-01-01 01:00:00.000000000 +0100
+++ 0.9.2-1ubuntu2/.pc/wine1.2-compatibility.patch/remotevstclient.cpp	2010-05-04 10:01:29.000000000 +0100
@@ -0,0 +1,419 @@
+// -*- c-basic-offset: 4 -*-
+
+/*
+  dssi-vst: a DSSI plugin wrapper for VST effects and instruments
+  Copyright 2004-2010 Chris Cannam
+*/
+
+#include "remotevstclient.h"
+
+#include <sys/un.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/poll.h>
+#include <fcntl.h>
+#include <iostream>
+#include <dirent.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <errno.h>
+#include <cstdio>
+#include <stdlib.h>
+
+#include "rdwrops.h"
+#include "paths.h"
+
+RemoteVSTClient::RemoteVSTClient(std::string dllName, bool showGUI) :
+    RemotePluginClient()
+{
+    pid_t child;
+    std::string arg = dllName + "," + getFileIdentifiers();
+    if (showGUI) arg = "-g " + arg;
+
+    const char *argStr = arg.c_str();
+
+    // We want to run the dssi-vst-server script, which runs wine
+    // dssi-vst-server.exe.so.  We expect to find this script in the
+    // same subdirectory of a directory in the DSSI_PATH as a host
+    // would look for the GUI for this plugin: one called dssi-vst.
+    // See also RemoteVSTClient::queryPlugins below.
+
+    std::vector<std::string> dssiPath = Paths::getPath
+	("DSSI_PATH", "/usr/local/lib/dssi:/usr/lib/dssi", "/.dssi");
+
+    bool found = false;
+
+    for (size_t i = 0; i < dssiPath.size(); ++i) {
+
+	std::string subDir = dssiPath[i] + "/dssi-vst";
+
+	DIR *directory = opendir(subDir.c_str());
+	if (!directory) {
+	    continue;
+	}
+	closedir(directory);
+
+	struct stat st;
+	std::string fileName = subDir + "/dssi-vst-server";
+
+	if (stat(fileName.c_str(), &st)) {
+	    continue;
+	}
+
+	if (!(S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) ||
+	    !(st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) {
+
+	    std::cerr << "RemoteVSTClient: file " << fileName
+		      << " exists but can't be executed" << std::endl;
+	    continue;
+	}
+
+	found = true;
+
+	std::cerr << "RemoteVSTClient: executing "
+		  << fileName << " " << argStr << std::endl;
+
+	if ((child = fork()) < 0) {
+	    cleanup();
+	    throw((std::string)"Fork failed");
+	} else if (child == 0) { // child process
+	    if (execlp(fileName.c_str(), fileName.c_str(), argStr, NULL)) {
+		perror("Exec failed");
+		exit(1);
+	    }
+	}
+
+	break;
+    }
+
+    if (!found) {
+	cleanup();
+	throw((std::string)"Failed to find dssi-vst-server executable");
+    } else {
+	syncStartup();
+    }
+}
+
+RemoteVSTClient::~RemoteVSTClient()
+{
+    for (int i = 0; i < 3; ++i) {
+	if (waitpid(-1, NULL, WNOHANG)) break;
+	sleep(1);
+    }
+}
+
+bool
+RemoteVSTClient::addFromFd(int fd, PluginRecord &rec)
+{
+    char buffer[64];
+
+    try {
+	tryRead(fd, buffer, 64);
+	rec.dllName = buffer;
+    } catch (RemotePluginClosedException) {
+	// This is acceptable here; it probably just means we're done
+	return false;
+    }
+    
+    tryRead(fd, buffer, 64);
+    rec.pluginName = buffer;
+    
+//	    std::cerr << "Plugin " << rec.pluginName << std::endl;
+    
+    tryRead(fd, buffer, 64);
+    rec.vendorName = buffer;
+    
+    tryRead(fd, &rec.isSynth, sizeof(bool));
+    tryRead(fd, &rec.hasGUI, sizeof(bool));
+    tryRead(fd, &rec.inputs, sizeof(int));
+    tryRead(fd, &rec.outputs, sizeof(int));
+    tryRead(fd, &rec.parameters, sizeof(int));
+    
+//	    std::cerr << rec.parameters << " parameters" << std::endl;
+    
+    for (int i = 0; i < rec.parameters; ++i) {
+	tryRead(fd, buffer, 64);
+	rec.parameterNames.push_back(std::string(buffer));
+	float f;
+	tryRead(fd, &f, sizeof(float));
+	rec.parameterDefaults.push_back(f);
+//		std::cerr << "Parameter " << i << ": name " << buffer << ", default " << f << std::endl;
+    }
+    
+    tryRead(fd, &rec.programs, sizeof(int));
+    
+//	    std::cerr << rec.programs << " programs" << std::endl;
+    
+    for (int i = 0; i < rec.programs; ++i) {
+	tryRead(fd, buffer, 64);
+	rec.programNames.push_back(std::string(buffer));
+//		std::cerr << "Program " << i << ": name " << buffer << std::endl;
+    }
+
+    return true;
+}
+    
+void
+RemoteVSTClient::queryPlugins(std::vector<PluginRecord> &plugins)
+{
+    // First check whether there are any DLLs in the same VST path as
+    // the scanner uses.  If not, we know immediately there are no
+    // plugins and we don't need to run the (Wine-based) scanner.
+    // If there are, but they all have up-to-date cache files, then
+    // we can just read those and again not have to run the scanner.
+    
+    std::vector<std::string> vstPath = Paths::getPath
+	("VST_PATH", "/usr/local/lib/vst:/usr/lib/vst", "/vst");
+
+    bool haveDll = false;
+    bool haveAllCaches = false;
+    bool haveCacheDir = false;
+    int version = int(RemotePluginVersion * 1000);
+
+    char *home = getenv("HOME");
+    std::string cacheDir = std::string(home) + "/.dssi-vst";
+    DIR *test = opendir(cacheDir.c_str());
+    if (test) {
+	haveCacheDir = true;
+	haveAllCaches = true; // until proven otherwise
+	closedir(test);
+    }
+
+    for (size_t i = 0; i < vstPath.size(); ++i) {
+	
+	std::string vstDir = vstPath[i];
+	DIR *directory = opendir(vstDir.c_str());
+	if (!directory) continue;
+	struct dirent *entry;
+
+	while ((entry = readdir(directory))) {
+	    
+	    std::string libname = entry->d_name;
+
+	    if (libname[0] != '.' &&
+		libname.length() >= 5 &&
+		(libname.substr(libname.length() - 4) == ".dll" ||
+		 libname.substr(libname.length() - 4) == ".DLL")) {
+
+		haveDll = true;
+		if (!haveCacheDir) break;
+
+		if (haveAllCaches) {
+
+		    std::string cacheFileName = cacheDir + "/" + libname + ".cache";
+		    struct stat st;
+
+		    if (stat(cacheFileName.c_str(), &st)) {
+			haveAllCaches = false;
+		    } else {
+			int testfd = open(cacheFileName.c_str(), O_RDONLY);
+			int testVersion = 0;
+			if (testfd < 0 || 
+			    read(testfd, &testVersion, sizeof(int)) != sizeof(int) ||
+			    testVersion != version) {
+			    haveAllCaches = false;
+			}
+			if (testfd >= 0) close(testfd);
+		    }
+		}
+	    }
+	}
+
+	closedir(directory);
+	if (haveDll && !haveAllCaches) break;
+    }
+
+    if (!haveDll) return;
+
+    if (haveCacheDir && haveAllCaches) {
+	
+	std::cerr << "RemoteVSTClient: all cache files are up-to-date, "
+		  << "not running scanner" << std::endl;
+
+	for (size_t i = 0; i < vstPath.size(); ++i) {
+	
+	    std::string vstDir = vstPath[i];
+	    DIR *directory = opendir(vstDir.c_str());
+	    if (!directory) continue;
+	    struct dirent *entry;
+
+	    while ((entry = readdir(directory))) {
+	    
+		std::string libname = entry->d_name;
+
+		if (libname[0] != '.' &&
+		    libname.length() >= 5 &&
+		    (libname.substr(libname.length() - 4) == ".dll" ||
+		     libname.substr(libname.length() - 4) == ".DLL")) {
+
+		    std::string cacheFileName = cacheDir + "/" + libname + ".cache";
+		    int fd = -1;
+		    int testVersion = 0;
+
+		    if ((fd = open(cacheFileName.c_str(), O_RDONLY)) < 0) continue;
+		    if (read(fd, &testVersion, sizeof(int)) != sizeof(int) ||
+			testVersion != version) {
+			close(fd);
+			continue;
+		    }
+
+		    PluginRecord rec;
+		    if (addFromFd(fd, rec)) {
+			plugins.push_back(rec);
+		    }
+
+		    close(fd);
+		}
+	    }
+	}
+
+	return;
+    }
+
+    char fifoFile[60];
+
+    sprintf(fifoFile, "/tmp/rplugin_qry_XXXXXX");
+    if (mkstemp(fifoFile) < 0) {
+	throw((std::string)"Failed to obtain temporary filename");
+    }
+
+    unlink(fifoFile);
+    if (mkfifo(fifoFile, 0666)) { //!!! what permission is correct here?
+	perror(fifoFile);
+	throw((std::string)"Failed to create FIFO");
+    }
+
+    // We open the fd nonblocking, then start the scanner, then wait
+    // to see whether the scanner starts sending anything on it.  If
+    // no input is available after a certain time, give up.
+
+    int fd = -1;
+
+    if ((fd = open(fifoFile, O_RDONLY | O_NONBLOCK)) < 0) {
+	unlink(fifoFile);
+	throw((std::string)"Failed to open FIFO");
+    }
+
+    // We want to run the dssi-vst-scanner script, which runs wine
+    // dssi-vst-scanner.exe.so.  We expect to find this script in the
+    // same subdirectory of a directory in the DSSI_PATH as a host
+    // would look for the GUI for this plugin: one called dssi-vst.
+    // See also the RemoteVSTClient constructor above.
+
+    std::vector<std::string> dssiPath = Paths::getPath
+	("DSSI_PATH", "/usr/local/lib/dssi:/usr/lib/dssi", "/.dssi");
+
+    bool found = false;
+    pid_t child;
+
+    for (size_t i = 0; i < dssiPath.size(); ++i) {
+
+	std::string subDir = dssiPath[i] + "/dssi-vst";
+
+	DIR *directory = opendir(subDir.c_str());
+	if (!directory) {
+	    continue;
+	}
+	closedir(directory);
+
+	struct stat st;
+	std::string fileName = subDir + "/dssi-vst-scanner";
+
+	if (stat(fileName.c_str(), &st)) {
+	    continue;
+	}
+
+	if (!(S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) ||
+	    !(st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) {
+
+	    std::cerr << "RemoteVSTClient: file " << fileName
+		      << " exists but can't be executed" << std::endl;
+	    continue;
+	}
+
+	found = true;
+
+	std::cerr << "RemoteVSTClient: executing "
+		  << fileName << " " << fifoFile << std::endl;
+
+	if ((child = fork()) < 0) {
+	    unlink(fifoFile);
+	    throw((std::string)"Fork failed");
+	} else if (child == 0) { // child process
+	    if (execlp(fileName.c_str(), fileName.c_str(), fifoFile, NULL)) {
+		perror("Exec failed");
+		unlink(fifoFile);
+		exit(1);
+	    }
+	}
+
+	break;
+    }
+
+    if (!found) {
+	unlink(fifoFile);
+	throw((std::string)"Failed to find dssi-vst-scanner executable");
+    }
+
+    struct pollfd pfd;
+    pfd.fd = fd;
+    pfd.events = POLLIN;
+    int sec;
+    int timeout = 15;
+
+    for (sec = 0; sec < timeout; ++sec) {
+
+	int rv = poll(&pfd, 1, 1000);
+
+	if (rv < 0) {
+	    if (errno == EINTR || errno == EAGAIN) {
+		// try again
+		sleep(1);
+		continue;
+	    } else {
+		close(fd);
+		unlink(fifoFile);
+		throw ((std::string)"Plugin scanner startup failed.");
+	    }
+	} else if (rv > 0) {
+	    break;
+	}
+    }
+
+    if (sec >= timeout) {
+	close(fd);
+	unlink(fifoFile);
+	throw ((std::string)"Plugin scanner timed out on startup.");
+    }
+
+    try {
+	int version = 0;
+
+	tryRead(fd, &version, sizeof(int));
+	if (version != int(RemotePluginVersion * 1000)) {
+	    throw ((std::string)"Plugin scanner version mismatch");
+	}
+
+	while (1) {
+	    PluginRecord rec;
+	    if (!addFromFd(fd, rec)) break; // done
+	    plugins.push_back(rec);
+	}
+
+    } catch (std::string s) {
+	std::cerr << s << std::endl;
+    } catch (RemotePluginClosedException) {
+	std::cerr << "Plugin scanner exited unexpectedly." << std::endl;
+    }
+
+    close(fd);
+    unlink(fifoFile);
+
+    for (int i = 0; i < 3; ++i) {
+	if (waitpid(-1, NULL, WNOHANG)) break;
+	sleep(1);
+    }
+}
+
+
diff -pruN 0.9.2-1/remotevstclient.cpp 0.9.2-1ubuntu2/remotevstclient.cpp
--- 0.9.2-1/remotevstclient.cpp	2010-05-04 10:01:29.000000000 +0100
+++ 0.9.2-1ubuntu2/remotevstclient.cpp	2011-04-15 21:39:31.000000000 +0100
@@ -55,7 +55,7 @@ RemoteVSTClient::RemoteVSTClient(std::st
 	closedir(directory);
 
 	struct stat st;
-	std::string fileName = subDir + "/dssi-vst-server";
+	std::string fileName = subDir + "/dssi-vst-server.exe";
 
 	if (stat(fileName.c_str(), &st)) {
 	    continue;
@@ -318,7 +318,7 @@ RemoteVSTClient::queryPlugins(std::vecto
 	closedir(directory);
 
 	struct stat st;
-	std::string fileName = subDir + "/dssi-vst-scanner";
+	std::string fileName = subDir + "/dssi-vst-scanner.exe";
 
 	if (stat(fileName.c_str(), &st)) {
 	    continue;
