-
Open a konsole
Hello,
I was like trying to do this but i could able to achieve. Perhaps I know that there is solution which I couldn't able to find. What I am after is, when I click on a button, I want a console opening up and start executing a exe file which I give. So for example, if I say something like
Code:
system("konsole <exe filename>");
So console is a command which opens up a new console and in that console I want the binary to be executed. Well I could have used exec family function to run the exe file. But the problem is that I need some values reading in from user. So if that was on a new console, obviously the console will prompt the user to enter some value.
It is something like, when user press Alt+F10 on Dev-C++ the program gets compiled and opens a console and runs that binary within that console (Assuming that program compiled with errors and warnings).
How can we do this in Linux. Any help would be much appreciated.
Thanks a lot in advance.
ssharish
-
Read the man page for konsole.
Code:
system("konsole -e <exe filename>");
-
Hey Brewbuck thanks a lot. That worked. That was pretty simple. I tried running this on my local Linux machine it dint work. But surprisingly it worked on uni machine. What i found was that i dint had -e flag displayed in the manual page on my local machine. May be i might be using the older version :-/
Anyway thanks once again.
ssharish