Thread: Open a konsole

  1. #1
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732

    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

  2. #2
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Read the man page for konsole.

    Code:
    system("konsole -e <exe filename>");

  3. #3
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Open Source Licenses
    By Mario F. in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 10-10-2006, 08:53 PM
  2. Big help in Astar search code...
    By alvifarooq in forum C++ Programming
    Replies: 6
    Last Post: 09-24-2004, 11:38 AM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. Problems with open and save boxes
    By pinkcheese in forum Windows Programming
    Replies: 3
    Last Post: 05-21-2002, 06:03 PM
  5. Ghost in the CD Drive
    By Natase in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 10-12-2001, 05:38 PM