Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt Creator: Run in Terminal

I want to get full console functionality running the program in Qt Creator, the same problem as described here: Console input with Qt Creator

When I check "Run in Terminal" in configuration properties, empty terminal window is opened, without my program output. Tools - Options - General - Terminal has this value: "x-terminal-emulator -e". How can I get this working? My OS is Ubuntu 10.4.

Note: Please don't close this question, it is not duplicated! I need solution for Ubuntu OS.

like image 827
Alex F Avatar asked Jul 15 '10 11:07

Alex F


2 Answers

Under Tools-Options-Environment-General, change the terminal value from x-terminal-emulator -e to /usr/bin/xterm -e. This did the trick for me.

(Found this fix here: https://bugs.launchpad.net/ubuntu/+source/qtcreator/+bug/566387)

like image 101
Greg S Avatar answered Nov 19 '22 20:11

Greg S


Another nice trick to avoid having to do console commands, or running a bash script is to just modify the .desktop file.

On Ubuntu those are located here:

ls /usr/share/applications/

If you wanted to edit Qt Creator for example you could do.

nano /usr/share/applications/qtcreator.desktop

Edit the variable "Exec" should look like "Exec=/usr/bin/qtcreator" and change it to.

bash -i -c /usr/bin/qtcreator

Or whatever your path to the application you want to change is.

This will enable your different environmental variables with this method as well which is what I assume you are trying to do.

like image 25
Goddard Avatar answered Nov 19 '22 19:11

Goddard