PDA

View Full Version : [SOLVED] System Calls in C++ Program



anEarthCitizen
August 6th, 2011, 01:30 AM
Hi,

I have developed a Qt front-end for a command line program.

It just takes the user's input through the GUI, then executes the corresponding system command in the terminal using system ("") from stdlib.h.

The problem is: when I run the application form the terminal it works fine as expected, but when I make a launcher for my application only the GUI shows up but no terminal.

I have made a workaround but it's useless (as well as bad practice), since I preceded the command with
"usr/bin/konsole -e". I know this is wrong, but it works.

So, any ideas? Many Thanks.

karlson
August 6th, 2011, 03:49 AM
Hi,

I have developed a Qt front-end for a command line program.

It just takes the user's input through the GUI, then executes the corresponding system command in the terminal using system ("") from stdlib.h.

The problem is: when I run the application form the terminal it works fine as expected, but when I make a launcher for my application only the GUI shows up but no terminal.

I have made a workaround but it's useless (as well as bad practice), since I preceded the command with
"usr/bin/konsole -e". I know this is wrong, but it works.

So, any ideas? Many Thanks.

Why would you need a terminal if you are developing a GUI frontend?

anEarthCitizen
August 6th, 2011, 04:40 AM
Why would you need a terminal if you are developing a GUI frontend?Take WinFF for example, when you encode a video, say from mp4 to avi:

you choose the file you want and the output type and destination through the GUI and WinFF then executes a long ffmpeg command (that may seem impossible for a new user to memorize). This new command is executed in the terminal, and the encoding control (stop/pause) is controlled through the terminal (since ffmpeg is the actual program underneath).

See the attached image.

anEarthCitizen
August 6th, 2011, 04:56 AM
Solved! :D

Silly me, I looked into WinFF's and they are using
/usr/bin/x-terminal-emulator with
-e argument.

Finally, The application runs perfectly. Thanks for your time.