I gave an answer in this thread (the only difference being the terminal you want to use).
But if you want to keep using xterm, use the following command instead :
In codeblocks :
- Go to Settings > Environment > General Settings.
- Change the "Terminal to launch console programs" option to :
xterm -T $TITLE -geometry WIDTHxHEIGHT+XOFF+YOFF -e
WIDTH : The width of the terminal window
HEIGHT : The height of the terminal window
+XOFF : The left edge of the window is to be placed XOFF pixels in from the left edge of the screen
+YOFF : The top edge of the window is to be YOFF pixels below the top edge of the screen
I used the following to have the terminal almost centered on my screen (change them to fit your screen resolution):
xterm -T $TITLE -geometry 80x20+300+240 -e