contour-terminal / contour

Modern C++ Terminal Emulator
http://contour-terminal.org/
Apache License 2.0
2.31k stars 100 forks source link

TERM variable no longer set #1475

Closed cqexbesd closed 4 months ago

cqexbesd commented 4 months ago

Contour Terminal version

0.4.4-master-ee4d25ce

Installer source

Github: source code cloned

Operating System

Arch Linux as of this morning

Architecture

x86-64

Other Software

No response

Steps to reproduce

Start a new Contour process. Note that the shell does not inherit a TERM env variable (or COLORTERM)

Expected Behavior

TERM would be set to contour as it always has before.

Actual Behavior

Variable is not set

Additional notes

I don't do anything specifically in my config file, I have just been relying on default behaviour up until . Confirmed with strace that the env variable isn't passed to exec. IIRC 5f9a1edfbb1902b97c463bd561635849a0e6b86f worked OK.

Haven't had a chance to delve any deeper.

christianparpart commented 4 months ago

Hey @cqexbesd. Sorry for this bad experience. This is most likely due to the very recent merge of #1300. Currently @Yaraslaut knows the most about it. I'm trying to catch up on this topic :)

cqexbesd commented 4 months ago

No need to apologise. We have all added our fair share of bugs over the years - it happens. Secondly one of the reasons I build from git is to try and pick up some bugs. I don't have time to learn the code but as I'm running contour anyway I may as well try to test it at the same time, to help in some small way. At least I am (hopefully) slightly more equipped to understand what might be going wrong, and work around the worst problems, than the average user who gets a build from their distro.

Contour is by far the best terminal I have used (sorry Roxterm - you served me well for so many years). It has (almost) all the features I want and the speed that bugs are fixed when I do report them is very impressive. It does you, and @Yaraslaut et al credit.

Yaraslaut commented 4 months ago

Hi @cqexbesd thanks for your feeedback and constant testing of master :) I created PR to adress this issue https://github.com/contour-terminal/contour/pull/1476 can you please give it a try?

cqexbesd commented 4 months ago

I created PR to adress this issue #1476 can you please give it a try?I tried it and it works for me. I’m a bit unsure if it will work for e.g. systems using termcap though. Perhaps it would be better to just try and set TERM and see if it works?My shell settings already have a series of fallbacks that use tcsh’s termname to find a working value. I forget what termname actual calls (though I think it might have been me who added it). I don’t know if the terminal should be doing this logic at all though because the movement you e.g. ssh it is all in vain.I’m currently in a location where GitHub seems to be banned so I don’t know if you will see this…

Yaraslaut commented 4 months ago

I created PR to adress this issue #1476 can you please give it a try?I tried it and it works for me. I’m a bit unsure if it will work for e.g. systems using termcap though. Perhaps it would be better to just try and set TERM and see if it works?My shell settings already have a series of fallbacks that use tcsh’s termname to find a working value. I forget what termname actual calls (though I think it might have been me who added it). I don’t know if the terminal should be doing this logic at all though because the movement you e.g. ssh it is all in vain.I’m currently in a location where GitHub seems to be banned so I don’t know if you will see this…

I see this message :)
We have some logic for fallback of term env see getDefaultTERM function, basically we check if terminfo files are present and use the term that is supported via terminfo file. in worst case this will be "vt100" (for example when using termcap and absense of terminfo files) but i supose that we can relly on user in such case, in the future we want to make user experince a bit better with generation of temrinfo files on demand, see https://github.com/contour-terminal/contour/issues/1289