Registered Member
|
I have just installed KDevelop and really liked it.
In the Run -> Launch configurations -> Use external terminal option, the default command is "konsole --noclose --workdir %workdir -e %exe". However, the problem with konsole is that it does not close when user presses a key, but it remains open and has to be closed by clicking 'X' option. My question is - can one use another terminal like gnome-terminal, xterm or terminal in the "Use external terminal" option? If yes, what is the command to be inserted in the "Use external terminal" box when using another terminal (not konsole)? |
Global Moderator
|
You can, that's why you can specify the command -- but what options you have to set depends on the terminal emulator your use. You need to tell it to actually execute your program.
I'm working on the KDevelop IDE.
|
Registered Member
|
I am actually quite new to Ubuntu, but If I were to use the terminal "/bin/sh", then what would the command in "Use external terminal" be? I am executing a simple C++ console program. |
Global Moderator
|
There is a difference between shell and terminal emulator. The shell is the command-line program executing your commands, displaying the prompt, providing job-control etc. /bin/sh is a shell and doesn't really play a role here. The terminal emulator is the GUI application which provides the character-display capabilities and associated features. konsole is a terminal emulator. You need to choose a terminal emulator here, not a shell, so your question doesn't make sense.
Best, Sven
I'm working on the KDevelop IDE.
|
Global Moderator
|
|
Registered Member
|
I am learning C++ programming and need to run simple hello-world type console programs. The default terminal emulator in KDevelop is konsole. While konsole works when clicking 'execute', when I click on debug it throws an error "Can't receive konsole tty/pty. Check that konsole is actually a terminal and that it accepts these arguments: -e sh -c "tty> /tmp/kdevelop.A10064 ;exec<&-;exec>&-;while :;do sleep 3600;done""
So I want a simple option that works well BOTH, during execution and debugging. After starting this forum post, I have discovered that the "Use external terminal" command has a drop-down menu (with commands for xterm, gnome-terminal and konsole). I have selected the option "xterm -hold -e %exe" and this works well for both execution and debugging. However, all the emulators in the drop-down menu have one common (minor) problem - they do not ask the user to press a key to close and have to be manually closed by pressing the 'X' button. Apart from this, the option "gnome-terminal -e %exe" in the dropdown menu does nothing when I click 'execute', but shows the output while I click on 'debug'. Anyway, thanks for your help Sven! |
Global Moderator
|
Hm, do you actually need a true terminal emulator for that? Just tick off "use external terminal emulator" and use kdevelop's builtin output view.
I'm working on the KDevelop IDE.
|
Registered Member
|
KDevelop's built-in output view does not accept user input. For example if a program asks a user to enter his/her name, then the output panel does not allow me to type anything. So that's not very convenient.
|
Global Moderator
|
True, but to be honest i feel like almost all applications accepting "your name :" cin >> name style input are tutorial applications from the first three pages of a C++ book ... console input is not something you will typically need. Instead, applications typically get input from config files or command line arguments. So maybe the most pragmatic path of action is to simply execute those five applications which need console input by hand in a terminal emulator (after kdevelop has built them), and after that use the built-in output view.
I'm working on the KDevelop IDE.
|
Registered Member
|
Okay, that's what I will do then. Thank you for your advice and patience scummos.
|
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]