xterm is installed with X11.
X11 is available (in Optional Installations) with each Mac OS X version starting from 10.4
After x11 installed, symbolic link can be created at /usr/local/bin.
open Terminal
sudo ln -s /usr/X11/bin/xterm /usr/local/bin/xterm
P.S: xterm is also installed with Fink.
The logic of TProcess with poNewConsole is hardwired to the Unix/Windows notion that every time you create a new window this automatically creates a new process, which is incorrect in case of Mac OS X (unless you use a traditional Unix utility such as xterm).
can TProcess be patched in the following way? (patch file is also attached to this message
)
Yes, it's less control over size of the window, but still should work fine, on any darwin, since 'open' is darwin/nextstep tool.
Index: src/unix/process.inc
===================================================================
--- src/unix/process.inc (revision 13818)
+++ src/unix/process.inc (working copy)
@@ -160,6 +160,9 @@
CommandToList(Cmd,S);
if poNewConsole in P.Options then
begin
+ {$ifdef darwin}
+ S.Insert(0,'open');
+ {$else}
S.Insert(0,'-e');
If (P.ApplicationName<>'') then
begin
@@ -172,6 +175,7 @@
S.Insert(0,'-geometry');
end;
S.Insert(0,'xterm');
+ {$endif}
end;
if (P.ApplicationName<>'') then
begin
hmm, may be additional command-line should be: 'open -n -a Terminal', instead of a just 'open'?