--- Main.pm	2013-01-29 11:00:08.000000000 +0100
+++ Main-new.pm	2013-01-29 16:55:01.000000000 +0100
@@ -2099,9 +2099,18 @@
 					system qq(xterm -sb -e "$cmd; sleep 1000" &);
 				}
 			}
-		} elsif (Padre::Constant::UNIX) {
-
+		} elsif (Padre::Constant::MAC) {
 			# tome
+			
+			my $pwd = $self->current->document->project_dir();			
+			my $tmp = File::Temp->new(TEMPLATE => 'PF_XXXXXXXX', SUFFIX => '.command', DIR => '/tmp', UNLINK => 0);
+			binmode( $tmp, ":utf8" );
+			print $tmp "#!/bin/sh\ncd \"". $pwd ."\"; clear; $cmd;\n";
+			close $tmp;
+			system qq(/bin/chmod 755 $tmp);
+			system qq(/usr/bin/open $tmp);
+			( -f $tmp ) && unlink $tmp;
+
 		} else {
 			system qq(xterm -sb -e "$cmd; sleep 1000" &);
 		}
