User forums > Help
Help code blocks not launching termial when program is executed [solved]
osdt:
Looks like the project path and executable name contains spaces. Remove them and it should work (if xterm is installed).
@devs: where do the backslashes come from? ...
--- Code: ---xterm -T my\ first\ c\ project ...
--- End code ---
should be ...
--- Code: ---xterm -T "my first c project" ...
--- End code ---
?
- osdt
scarphin:
'\' is the escape character i.e. to insert a space afaik.
osdt:
--- Quote from: scarphin on May 08, 2013, 02:26:57 pm ---'\' is the escape character i.e. to insert a space afaik.
--- End quote ---
Indeed, it works to guard spaces ...
--- Code: ---mkdir "/tmp/aaa bbb"
echo "#/bin/sh\necho Hello World" > "/tmp/aaa bbb/hello world.sh"
chmod +x "/tmp/aaa bbb/hello world.sh"
xterm -T /tmp/aaa\ bbb -e /usr/bin/cb_console_runner /tmp/aaa\ bbb/hello\ world.sh
Process returned 0 (0x0) execution time : 0.009 s
Press ENTER to continue.
xterm -T "/tmp/aaa bbb" -e /usr/bin/cb_console_runner "/tmp/aaa bbb/hello world.sh"
Process returned 0 (0x0) execution time : 0.009 s
Press ENTER to continue.
--- End code ---
Funny, I've never seen it to be used like this :D
- osdt
king601:
--- Quote from: oBFusCATed on May 08, 2013, 08:46:12 am ---king601: Do you have xterm installed on the system?
--- End quote ---
No I don't have one. I tried all the options in the environment setting but code blocks does not detect terminal. My system is arch Linux with XFCE installed so I can launch terminal from main menu . What is the difference to have xterm?. How do I install it ?
king601:
Update: I was able to xterm from arch repositories and now code blocks works ;D thank you guys for your help
Update 2: I am now able to run the program in xfce terminal by doing this code :
xfce4-terminal -T $TITLE -x , many thanks
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version