Open a konsole

This is a discussion on Open a konsole within the Linux Programming forums, part of the Platform Specific Boards category; Hello, I was like trying to do this but i could able to achieve. Perhaps I know that there is ...

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

    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
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,263
    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,682
    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, 09:53 PM
  2. Big help in Astar search code...
    By alvifarooq in forum C++ Programming
    Replies: 6
    Last Post: 09-24-2004, 12:38 PM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 10:54 AM
  4. Problems with open and save boxes
    By pinkcheese in forum Windows Programming
    Replies: 3
    Last Post: 05-21-2002, 07: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, 06:38 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21