Author Topic: How to reset terminal settings to default - xterm  (Read 3429 times)

Offline VeeDub

  • Single posting newcomer
  • *
  • Posts: 8
How to reset terminal settings to default - xterm
« on: June 16, 2020, 04:24:06 am »
Hello,

My environment:
Centos v7
C::B 20.03

I have been practicing with console programs.

To change the behaviour of keyboard input I was using tcsetattr

Unfortunately in using tcsetattr I seem to have messed up the terminal settings as printf no longer displays any characters to the console.

Fortunately only the CodeBlocks terminal appears to be affected. Other terminal sessions appear normal.

So I think that I need to reset the CodeBlocks terminal settings back to the default.

I can see in CodeBlocks / Settings / Environment

That the terminal to launch console programs is:
Code
xterm -T $TITLE -e

This is the output in the build log
Code
-------------- Run: Debug in display (compiler: GNU GCC Compiler)---------------

Checking for existence: /home/zen/dev/c/display/bin/Debug/display
Set variable: LD_LIBRARY_PATH=.:
Executing: xterm -T display -e /usr/bin/cb_console_runner LD_LIBRARY_PATH=:. /home/zen/dev/c/display/bin/Debug/display  (in /home/zen/dev/c/display/.)
Process terminated with status 0 (0 minute(s), 29 second(s))

It is not clear to me which terminal session / settings that I should be trying to reset.

I realise that this isn't a purely CodeBlocks question it is CodeBlocks / CentOS; but I haven't had any luck so far trying to find a resolution in Google and I'm hoping someone here might be able to help or at least provide some direction.

Thanks
VW

Offline VeeDub

  • Single posting newcomer
  • *
  • Posts: 8
Re: How to reset terminal settings to default - xterm
« Reply #1 on: June 16, 2020, 07:10:31 am »
Hi,

Just wanted to post an update as I have been doing some more troubleshooting.

I've realised that other projects continue to display without issue.

So whatever the problem is, it is not an issue with the terminal settings; it's something funky with one specific project.

VW

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: How to reset terminal settings to default - xterm
« Reply #2 on: June 16, 2020, 08:45:57 am »
I do not think, that codeblocks has a per project session file for the terminal. So the problem has to be in your code of this project...