On Jul 2, 2006, at 2:02 PM, ara.t.howard / noaa.gov wrote:

> On Mon, 3 Jul 2006 transfire / gmail.com wrote:
>
>>
>> James Adam wrote:
>>> Beware that you're technically detecting both windows and mac  
>>> (darwin)
>>> with /win/. You might want to check for win32 (or, i suppose,  
>>> win64?)
>>> instead.
>>
>> Thanks. I'll change that. How does one do this on mac btw?
>>
>> T.
>
> the xterm command should work fine.
>
> -a
> -- 
> suffering increases your inner strength.  also, the wishing for  
> suffering
> makes the suffering disappear.
> - h.h. the 14th dali lama
>

Eh, yeah but it's not ideal (You'll have to wait for X11 to start  
usually, which it may or may not do automatically, I'm not sure. i  
think it might if  opened  via the Finder but not from the command  
line).

What I would do is

IO.popen("osascript", "w") do |io|
    io.puts <<APPLESCRIPT
tell Application "Terminal"
   activate
   do script "#{command_here}"
end tell
APPLESCRIPT
end

This has the advantage of  not opening a new instance of terminal if  
one is already open, (but it will if necessary) and not requiring the  
user to a) have X11 installed and b) have it running.