ubuntu: how to open the terminal from c#
using System;
using System.Diagnostics;
namespace runGnomeTerminal
{
class MainClass
{
public static void ExecuteCommand(string command)
{
Process proc = new System.Diagnostics.Process ();
proc.StartInfo.FileName = "/bin/bash";
proc.StartInfo.Arguments = "-c \" " + command + " \"";
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.Start ();
while (!proc.StandardOutput.EndOfStream) {
Console.WriteLine (proc.StandardOutput.ReadLine ());
}
}
public static void Main (string[] args)
{
ExecuteCommand("gnome-terminal -x bash -ic 'cd $HOME; ls; bash'");
}
}
}
Also in C#:
- .net core executenonqueryasync transaction
- c# find comma in text and remove
- c# null conditional operator if statement
- c# read all text from a file
- How can you learn C# on your own
- c# how to use inovke
- C# .net core convert int to enum
- console application in c# ms crm
- s3 upload base64 .net core
- how to open new form on button click in c# xamarin
- getcomponent c#
- c# make http request
- get random number c#
- fibonacci series using recursion
- get all child gameObject of gameObject C#
- resize image c#
- validating file upload asp.net core mvc
- multidimensional meaning
- c# datetime dd/mm/yyy hh:mm:ss
- unity move character
- vb.net check if datatable has rows
- c# initialize array
- c# razor add disabled to button if
- asp.net core mvc not triggering client side validation