Unity Linux open CMD
Hi, I'm trying to open CMD from a unity script, execute a line in CMD sudo cat /dev/usb/hiddev0 | hexdump -C
and have unity read from this.
void Start()
{
Process process = Process.Start("/usr/bin/gnome-terminal");
process.WaitForExit();
process.Close();
}
the following code does actually open up terminal, but I still haven't figured out how to execute the command or read from it.
Answer by xxmariofer · Nov 25, 2020 at 02:52 PM
I have never done this from unity, but you should be able to execute the command as an argument. for running scripts (.sh files) I used this command, so i imagine there should be any problems for executing your command
gnome-terminal -x bash "/path/to/the/script/initAndroid.sh"
Your answer
Follow this Question
Related Questions
Plugin dependencies and compiler flags 1 Answer
Enabling Python in Unity 2 Answers
Issues running gdb debug mode in runtime,Running GDB during run time of application 0 Answers
Is it possible to register a serial via the command line without actually running a build? 0 Answers
How to start a coroutine from a command line script 2 Answers