Index: platformX86UNIX/x86UNIXOGLVideo.cc
===================================================================
Index: platformX86UNIX/x86UNIXGL.cc
===================================================================
--- platformX86UNIX/x86UNIXGL.cc	(revision 1)
+++ platformX86UNIX/x86UNIXGL.cc	(working copy)
@@ -163,8 +163,9 @@
       OpenGLDLLShutdown();
 
       // load libGL.so
-      if (SDL_GL_LoadLibrary("libGL.so") == -1 &&
-         SDL_GL_LoadLibrary("libGL.so.1") == -1)
+      //if (SDL_GL_LoadLibrary("libGL.so") == -1 &&
+		if(  SDL_GL_LoadLibrary(NULL) == -1)
+       //  SDL_GL_LoadLibrary("libGL.so.1") == -1)
       {
          Con::errorf("Error loading GL library: %s", SDL_GetError());
          return false;
Index: platformX86UNIX/x86UNIXFont.h
===================================================================
--- platformX86UNIX/x86UNIXFont.h	(revision 1)
+++ platformX86UNIX/x86UNIXFont.h	(working copy)
@@ -43,7 +43,7 @@
 		virtual PlatformFont::CharInfo &getCharInfo(const UTF16 ch) const;
 		virtual PlatformFont::CharInfo &getCharInfo(const UTF8 *str) const;
 
-		virtual bool create(const char *name, dsize_t size, U32 charset = TGE_ANSI_CHARSET);
+		bool create(const char *name, U32 size, U32 charset = TGE_ANSI_CHARSET);
 };
 
 #endif
Index: platformX86UNIX/x86UNIXProcessControl.cc
===================================================================
--- platformX86UNIX/x86UNIXProcessControl.cc	(revision 1)
+++ platformX86UNIX/x86UNIXProcessControl.cc	(working copy)
@@ -22,6 +22,10 @@
 #include <SDL/SDL.h>
 #endif
 
+#ifdef __GLIBC__ 
+#include <execinfo.h>
+#endif
+
 extern void SendQuitEvent();
 
 ProcessMutex pMutex;
@@ -43,6 +47,7 @@
    }
 }
 
+
 //-----------------------------------------------------------------------------
 static void SignalHandler(int sigtype)
 {
@@ -50,6 +55,21 @@
    {
       signal(SIGSEGV, SIG_DFL);
       signal(SIGTRAP, SIG_DFL);
+	  
+#ifdef __GLIBC__
+	  void *array[64]; int size, i;
+	  char **syms;
+	  
+	  fprintf(stderr, "Process %d Stack dump:\n\n", (int)getpid());
+	  size = backtrace(array, (sizeof array)/(sizeof array[0]));
+	  syms = backtrace_symbols(array, size);
+	  for ( i=1; i<size; ++i ) {
+		  fprintf(stderr, "\t%s\n", syms[i]);
+	  }
+	  free(syms);
+	  fprintf(stderr, "\n");
+#endif
+	  
       // restore the signal handling to default so that we don't get into 
       // a crash loop with ImmediateShutdown
       ImmediateShutdown(-sigtype, sigtype);
@@ -126,7 +146,7 @@
 
    // we're not interested in the exit status of child processes, so this 
    // prevents zombies from accumulating.
-#if defined(__FreeBSD__)
+#if defined(SIGCHLD)
    signal(SIGCHLD, SIG_IGN);
 #else
    signal(SIGCLD, SIG_IGN);
Index: platformX86UNIX/x86UNIXMath.cc
===================================================================
Index: platformX86UNIX/x86UNIXStrings.cc
===================================================================
--- platformX86UNIX/x86UNIXStrings.cc	(revision 1)
+++ platformX86UNIX/x86UNIXStrings.cc	(working copy)
@@ -200,7 +200,7 @@
    return strncpy(dst,src,len);
 }   
 
-U32 dStrlen(const char *str)
+dsize_t dStrlen(const char *str)
 {
    return strlen(str);
 }   
@@ -245,12 +245,12 @@
    return strrchr(str,c);
 }   
 
-U32 dStrspn(const char *str, const char *set)
+dsize_t dStrspn(const char *str, const char *set)
 {
    return(strspn(str, set));
 }
 
-U32 dStrcspn(const char *str, const char *set)
+dsize_t dStrcspn(const char *str, const char *set)
 {
    return strcspn(str, set);
 }   
Index: platformX86UNIX/x86UNIXInputManager.cc
===================================================================
--- platformX86UNIX/x86UNIXInputManager.cc	(revision 1)
+++ platformX86UNIX/x86UNIXInputManager.cc	(working copy)
@@ -45,7 +45,7 @@
 static const U32 AllInputEvents = MouseMask | KeyboardMask | JoystickMask;
 
 // defined in SDL
-extern "C" Uint16 X11_KeyToUnicode( SDLKey keysym, SDLMod modifiers );
+// extern "C" Uint16 X11_KeyToUnicode( SDLKey keysym, SDLMod modifiers );
 
 //==============================================================================
 // Static helper functions
@@ -61,6 +61,7 @@
    SDLKey skey = (SDLKey)SDLkey;
    SDLMod mod = KMOD_NONE;
    // lower case
+#if 0
    key = X11_KeyToUnicode( skey, mod );
    AsciiTable[tkey].lower.ascii = key;
    // upper case
@@ -71,8 +72,8 @@
    mod = KMOD_MODE;
    key = X11_KeyToUnicode( skey, mod );
    AsciiTable[tkey].goofy.ascii = key;
+#endif
 
-#if 0
    if (xkeysym == 0)
       return;
 
@@ -120,7 +121,6 @@
       // ignore everything but first char
       AsciiTable[tkey].upper.ascii = *keybuf;
    }
-#endif
 }
 
 //------------------------------------------------------------------------------
Index: platformX86UNIX/x86UNIXFont.cc
===================================================================
--- platformX86UNIX/x86UNIXFont.cc	(revision 1)
+++ platformX86UNIX/x86UNIXFont.cc	(working copy)
@@ -335,3 +335,34 @@
 {
   return getCharInfo(oneUTF32toUTF16(oneUTF8toUTF32(str,NULL)));
 }
+
+void enumeratePlatformFonts( Vector<StringTableEntry>& fonts,
+			char* fontFamily ) {
+	char **xfonts;
+	int maxfonts = 10000; // This is a lot of fonts.
+				// My Mac's X Server has 5834
+	char pattern[32] = "*";
+	int count;
+	Display *display = XOpenDisplay(getenv("DISPLAY")); // ew
+
+	if(fontFamily) {
+		dSprintf(pattern, 32,
+			"-%s-*", fontFamily);
+		// There is a space reserved for X fonts IN HELL
+	}
+	xfonts = XListFonts(display, pattern, maxfonts, &count);
+
+	char **f = xfonts;
+
+	while(*f) {
+		if(NULL != fontFamily || '-' != **f) {
+			// Only show aliases, unless
+			// 	they've asked for a specific famliy
+			fonts.push_back( StringTable->insert(*f));
+		}
+		f++;
+	}
+	XFreeFontNames(xfonts);
+	XCloseDisplay(display);
+}
+
Index: platformX86UNIX/x86UNIXFileio.cc
===================================================================
--- platformX86UNIX/x86UNIXFileio.cc	(revision 1)
+++ platformX86UNIX/x86UNIXFileio.cc	(working copy)
@@ -1194,7 +1194,7 @@
         }
 
         char cmd[MaxPath];
-        sprintf(cmd, "\"%s &\"", x86UNIXState->getExePathName());
+        sprintf(cmd, "%s &", x86UNIXState->getExePathName());
         Con::printf("---- %s -----",cmd);
         if(!system(cmd))
         {
Index: platformX86UNIX/x86UNIXWindow.cc
===================================================================
--- platformX86UNIX/x86UNIXWindow.cc	(revision 1)
+++ platformX86UNIX/x86UNIXWindow.cc	(working copy)
@@ -41,6 +41,7 @@
 #include <SDL/SDL.h>
 #include <SDL/SDL_syswm.h>
 #include <SDL/SDL_version.h>
+
 #endif
 
 x86UNIXPlatformState *x86UNIXState;
@@ -53,8 +54,12 @@
 static MRandomLCG sgPlatRandom;
 
 #ifndef DEDICATED
+
+#ifndef TORQUE_OS_MAC_OSX // Just quietly ignore on OSX
 extern void InstallRedBookDevices();
 extern void PollRedbookDevices();
+#endif
+
 extern bool InitOpenGL();
 // This is called when some X client sends 
 // a selection event (e.g. SelectionRequest)
@@ -153,6 +158,10 @@
 //------------------------------------------------------------------------------
 static bool InitSDL()
 {
+
+	setenv("SDL_VIDEODRIVER", "x11", 0); // Don't overwrite
+	setenv("DISPLAY", ":0", 0); // Don't overwrite
+
    if (SDL_Init(SDL_INIT_VIDEO) != 0)
       return false;
 
@@ -575,10 +584,12 @@
       Input::process();
       PROFILE_END();
 
+#ifndef TORQUE_OS_MAC_OSX // Just quietly ignore on OSX
       // poll redbook state
       PROFILE_START(XUX_PollRedbookDevices);
       PollRedbookDevices();
       PROFILE_END();
+#endif
 
       // if we're not the foreground window, sleep for 1 ms
       if (!x86UNIXState->windowActive())
@@ -679,9 +690,11 @@
       // initialize input
       Input::init();
 
+#ifndef TORQUE_OS_MAC_OSX // Just quietly ignore on OSX
       // initialize redbook devices
       if (x86UNIXState->getCDAudioEnabled())
          InstallRedBookDevices();
+#endif
 
       Con::printf( "Video Init:" );
 
