简体   繁体   中英

How to open mac terminal using gtk#

I have made a gtk# tool in Mac OS using xamarin. The problem is that, i want to open Mac terminal and pass some arguments.

From my code i was opening windows console like this but i want to do this for MAC.

    System.Diagnostics.Process p = new System.Diagnostics.Process();
    System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo ();
    info.FileName="cmd.exe";
    info.Arguments ="/C commands||pause";
    p.StartInfo = info;
    p.Start ();

Is there any other way of achieving this thing like making a shell file and make changes in it and execute etc. This is my first time i am working on Mac. Please explain from scratch. i Can't find related information on internet.

If you are running Jaguar (OS X 10.2) then the Terminal app will be in the /Applications/Utilities folder as previously posted. If it is not there, then it has been deleted. In this case, you'll either need to obtain a copy from another Mac system, or repair your OS X installation.

You can open the terminal with this command.

$ open /Applications/Utilities/Terminal.app

Or just call bash or sh

$ bash <options> <file>

$ sh <options> <file>

You will see the options in the manual page.

Just type this command into the terminal on your Mac or even Linux.

$ man bash

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM