Index: gui/wxpython/wxgui.py
===================================================================
--- gui/wxpython/wxgui.py	(revision 37356)
+++ gui/wxpython/wxgui.py	(working copy)
@@ -28,6 +28,7 @@
 import string
 import getopt
 import platform
+import shlex
 
 ### XML 
 import xml.sax
@@ -282,7 +283,7 @@
             helpString = help
 
         menuItem = menu.Append(wx.ID_ANY, label, helpString, kind)
-        
+
         self.menucmd[menuItem.GetId()] = gcmd
 
         if len(gcmd) > 0 and \
@@ -459,12 +460,12 @@
 
         if cmd[:2] == 'd.' and not self.curr_page:
             self.NewDisplay(show=True)
-        
-        if len(cmd.split(' ')) > 1:
-            self.goutput.RunCmd(cmd, switchPage=True)
+
+        if len(shlex.split(cmd)) > 1:
+            self.goutput.RunCmd(shlex.split(cmd), switchPage=True)
         else:
-            self.goutput.RunCmd(cmd, switchPage=False)
-        
+            self.goutput.RunCmd(shlex.split(cmd), switchPage=False)
+
         self.OnUpdateStatusBar(None)
 
     def OnCmdErase(self, event):
@@ -1034,9 +1035,9 @@
         command = ' '.join(command)
         
         if 'OS' in os.environ and os.environ['OS'] == "Windows_NT":
-            cmdlist = ["cmd.exe", "/c", 'start "%s"' % runbat, command]
+            cmdlist = ["cmd.exe", "/c", 'start "%s"' % runbat, shlex.split(command)]
         else:
-            cmdlist = [xtermwrapper, '-e "%s"' % grassrun, command]
+            cmdlist = [xtermwrapper, '-e "%s"' % grassrun, shlex.split(command)]
 
         p = gcmd.Command(cmdlist)
 

