Bug 450424
Summary: | tput: No value for $TERM and no -T specified | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Andrew Schultz <ajschult784> | |
Component: | coreutils | Assignee: | Ondrej Vasik <ovasik> | |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | low | Docs Contact: | ||
Priority: | low | |||
Version: | rawhide | CC: | david.w.h.chin, kdudka, ovasik, satyajeet.deshpande, trevor, twaugh, wormholio | |
Target Milestone: | --- | Keywords: | Reopened | |
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | coreutils-7.6-11.fc12 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 586947 (view as bug list) | Environment: | ||
Last Closed: | 2010-03-20 07:54:04 UTC | Type: | --- | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 586947 |
Description
Andrew Schultz
2008-06-08 04:57:53 UTC
This is message is not caused by a change in openssh package. I cannot reproduce your problem and also the nonexistent $TERM when executing remote command is correct. sshd behave this way in previous versions too. It seems that your bash profile or rc scripts execute the tput command when they shouldn't - that is in the case the bash is not run in the interactive mode. yup. I tracked this down to a profile.d script that was executing due to changes I made to csh.cshrc. Please reopen this bug and set component to coreutils. This *is* a bug, introduced between F8 and F10. F8 didn't complain with the same setup. F10 does. Maybe a change in tput? It will only hit users of csh/tcsh. That is why you didn't reproduce it before. The problem is in /etc/profile.d/colorls.csh line 20. You can't have the tput here without a check for whether you have an interactive terminal. Actually, looking at the code above it is checking $TERM, yet it still is doing a tput even if there is no term. Perhaps we just need to move the tput stuff up into the if $TERM block. Quick workaround with no loss of functionality anywhere would care about is to comment out the lines: #if ( -e "/etc/DIR_COLORS.256color" ) then # if ( "`tput colors`" == "256" ) then # set COLORS=/etc/DIR_COLORS.256color # endif #endif I just checked and the stock /etc/csh.cshrc and /etc/csh.login both source the files in /etc/profile.d, so you can't know in the /etc/profile.d/* scripts if you are interactive or not. The lines that you have mentioned to be commented out are not present in the /etc/profile.d/colorls.csh file. Do you know of any other workaround to this problem. Hmm, what Fedora version are you running? What's your coreutils? rpm -q coreutils ; I'm -6.12-20.fc10.i386. I verified the lines are in my file. Do a grep tput /etc/profile.d Wherever you see it in a .csh file, that's where you need to comment it. I m using RHEL 5 flavour and the coreutils are -5.97-19.el5. The lines are not present in my file. Hmm, what's important is the computer you are CONNECTING to. Is the ssh server RHEL5 or something newer? Did you run the grep I suggested (on the server)? I'll be shocked if your server doesn't have a tput in the /etc/profile.d You could also grep the local user setting: grep tput ~/.csh* ~/.tcsh* For the command "grep tput ~/.csh* ~/.tcsh*" I am not getting any output . I tried the grep that you suggested previously but am not seeing any output there as well. The ssh server is RHEL5 only. Hmm, might be a different bug for Satyajeet, or you're just not finding the hidden tput. For good measure, run those greps on the client and the server. Oh, maybe my comment #5 was buggy... instead run: grep -r tput /etc/profile.d You possibly might have to follow any includes (source or .) in any home dir cshrc's and /etc/profile.d's. It can be convoluted and require a bit of csh knowledge. You are running a (t)csh, right?? This bug should not hit bash users, which is the vast majority. I found this problem in Fedora 10. Instead of commenting out the block in /etc/profile.d/colorls.csh I corrected it to read if ( "`tty -s && tput colors`" == "256" ) then That is, put 'tty-s &&' before the tput command to only run tput if on a terminal. This is a good solution. Does someone want to put this tweak in rawhide? Why is this bug marked NOTABUG? Thanks for reassigning, fixed in coreutils-8.4-6.fc14 - closing RAWHIDE. coreutils-8.4-6.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/coreutils-8.4-6.fc13 coreutils-7.6-11.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/coreutils-7.6-11.fc12 coreutils-7.2-8.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/coreutils-7.2-8.fc11 coreutils-8.4-6.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. coreutils-7.2-8.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report. coreutils-7.6-11.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report. I am seeing this error message when connecting to a RHEL6 box. The RHEL6 box has coreutils-8.4-16.el6, and the /etc/profile.d/colorls.csh does reflect the fix by Eric Myers in https://bugzilla.redhat.com/show_bug.cgi?id=450424#c10 Double checked that that 'tty -s' does return 1 when connecting without terminal: ssh remotehost 'tty -s ; echo $?' |