Index: gui-wx/wxpython.cpp
--- gui-wx/wxpython.cpp.orig
+++ gui-wx/wxpython.cpp
@@ -237,6 +237,8 @@ static void GetPythonExceptions()
     Py_XDECREF(exmod);
 }
 
+// handle for libutil
+static wxDllType libutildll = NULL;
 // handle for Python lib
 static wxDllType pythondll = NULL;
 
@@ -246,15 +248,37 @@ static void FreePythonLib()
         wxDynamicLibrary::Unload(pythondll);
         pythondll = NULL;
     }
+    
+    if ( libutildll ) {
+        wxDynamicLibrary::Unload(libutildll);
+        libutildll = NULL;
+    }
 }
 
 static bool LoadPythonLib()
 {
+    // load libutil
+    wxDynamicLibrary dynlibUtil;
     // load the Python library
     wxDynamicLibrary dynlib;
     
     // don't log errors in here
     wxLogNull noLog;
+    
+    // Load libutil first, needed for openpty() and forkpty() symbols
+    if ( !dynlibUtil.Load(wxT("libutil.so"), wxDL_NOW | wxDL_VERBATIM | wxDL_GLOBAL) ) {
+        return false;
+    }
+    
+    if ( dynlibUtil.IsLoaded() ) {
+        libutildll = dynlibUtil.Detach();
+    }
+    
+    if ( libutildll == NULL ) {
+        // should never happen
+        Warning(_("Oh dear, libutil is not loaded!"));
+        return false;
+    }
     
     // wxDL_GLOBAL corresponds to RTLD_GLOBAL on Linux (ignored on Windows) and
     // is needed to avoid an ImportError when importing some modules (eg. time)
