Is there a difference between declaring a terminal (e.g. xterm-256colors) via $TERM vs. from terminal program?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-2
down vote

favorite












By default, Putty identifies itself as "xterm" terminal type, but it's possible to change its settings so it identifies itself as "xterm-256colors".



As far as I understand, this is done by setting "$TERM" variable.



The problem is that this requires every individual user to change their Putty configurations one by one.



To eliminate that, I am considering forcing every user to have "xterm-256colors" $TERM value centrally (e.g. via .login).



Assuming that every user uses a terminal program which supports "xterm-256colors", is there any difference whatsoever between doing this from the Unix side directly instead of from the terminal program? (I'm mostly looking for possible issues/downsides).







share|improve this question




















  • The correct terminfo types for PuTTY are putty and putty-256color.
    – JdeBP
    Jan 23 at 6:48










  • @JdeBP - I'm trying to ensure people in XTerm and Putty have same experience/colors, so setting TERM to "xterm*" seems a better option
    – DVK
    Jan 23 at 10:27










  • That is quite wrong. To give them the same experience, you have to tell applications programs the correct information about the terminals they are talking to, which involves telling them different information about the two different terminal emulators.
    – JdeBP
    Jan 23 at 11:11











  • @JdeBP - the assumption was that Putty emulates xTerm functionality. Perhaps incorrect
    – DVK
    Jan 23 at 13:25














up vote
-2
down vote

favorite












By default, Putty identifies itself as "xterm" terminal type, but it's possible to change its settings so it identifies itself as "xterm-256colors".



As far as I understand, this is done by setting "$TERM" variable.



The problem is that this requires every individual user to change their Putty configurations one by one.



To eliminate that, I am considering forcing every user to have "xterm-256colors" $TERM value centrally (e.g. via .login).



Assuming that every user uses a terminal program which supports "xterm-256colors", is there any difference whatsoever between doing this from the Unix side directly instead of from the terminal program? (I'm mostly looking for possible issues/downsides).







share|improve this question




















  • The correct terminfo types for PuTTY are putty and putty-256color.
    – JdeBP
    Jan 23 at 6:48










  • @JdeBP - I'm trying to ensure people in XTerm and Putty have same experience/colors, so setting TERM to "xterm*" seems a better option
    – DVK
    Jan 23 at 10:27










  • That is quite wrong. To give them the same experience, you have to tell applications programs the correct information about the terminals they are talking to, which involves telling them different information about the two different terminal emulators.
    – JdeBP
    Jan 23 at 11:11











  • @JdeBP - the assumption was that Putty emulates xTerm functionality. Perhaps incorrect
    – DVK
    Jan 23 at 13:25












up vote
-2
down vote

favorite









up vote
-2
down vote

favorite











By default, Putty identifies itself as "xterm" terminal type, but it's possible to change its settings so it identifies itself as "xterm-256colors".



As far as I understand, this is done by setting "$TERM" variable.



The problem is that this requires every individual user to change their Putty configurations one by one.



To eliminate that, I am considering forcing every user to have "xterm-256colors" $TERM value centrally (e.g. via .login).



Assuming that every user uses a terminal program which supports "xterm-256colors", is there any difference whatsoever between doing this from the Unix side directly instead of from the terminal program? (I'm mostly looking for possible issues/downsides).







share|improve this question












By default, Putty identifies itself as "xterm" terminal type, but it's possible to change its settings so it identifies itself as "xterm-256colors".



As far as I understand, this is done by setting "$TERM" variable.



The problem is that this requires every individual user to change their Putty configurations one by one.



To eliminate that, I am considering forcing every user to have "xterm-256colors" $TERM value centrally (e.g. via .login).



Assuming that every user uses a terminal program which supports "xterm-256colors", is there any difference whatsoever between doing this from the Unix side directly instead of from the terminal program? (I'm mostly looking for possible issues/downsides).









share|improve this question











share|improve this question




share|improve this question










asked Jan 22 at 17:10









DVK

15118




15118











  • The correct terminfo types for PuTTY are putty and putty-256color.
    – JdeBP
    Jan 23 at 6:48










  • @JdeBP - I'm trying to ensure people in XTerm and Putty have same experience/colors, so setting TERM to "xterm*" seems a better option
    – DVK
    Jan 23 at 10:27










  • That is quite wrong. To give them the same experience, you have to tell applications programs the correct information about the terminals they are talking to, which involves telling them different information about the two different terminal emulators.
    – JdeBP
    Jan 23 at 11:11











  • @JdeBP - the assumption was that Putty emulates xTerm functionality. Perhaps incorrect
    – DVK
    Jan 23 at 13:25
















  • The correct terminfo types for PuTTY are putty and putty-256color.
    – JdeBP
    Jan 23 at 6:48










  • @JdeBP - I'm trying to ensure people in XTerm and Putty have same experience/colors, so setting TERM to "xterm*" seems a better option
    – DVK
    Jan 23 at 10:27










  • That is quite wrong. To give them the same experience, you have to tell applications programs the correct information about the terminals they are talking to, which involves telling them different information about the two different terminal emulators.
    – JdeBP
    Jan 23 at 11:11











  • @JdeBP - the assumption was that Putty emulates xTerm functionality. Perhaps incorrect
    – DVK
    Jan 23 at 13:25















The correct terminfo types for PuTTY are putty and putty-256color.
– JdeBP
Jan 23 at 6:48




The correct terminfo types for PuTTY are putty and putty-256color.
– JdeBP
Jan 23 at 6:48












@JdeBP - I'm trying to ensure people in XTerm and Putty have same experience/colors, so setting TERM to "xterm*" seems a better option
– DVK
Jan 23 at 10:27




@JdeBP - I'm trying to ensure people in XTerm and Putty have same experience/colors, so setting TERM to "xterm*" seems a better option
– DVK
Jan 23 at 10:27












That is quite wrong. To give them the same experience, you have to tell applications programs the correct information about the terminals they are talking to, which involves telling them different information about the two different terminal emulators.
– JdeBP
Jan 23 at 11:11





That is quite wrong. To give them the same experience, you have to tell applications programs the correct information about the terminals they are talking to, which involves telling them different information about the two different terminal emulators.
– JdeBP
Jan 23 at 11:11













@JdeBP - the assumption was that Putty emulates xTerm functionality. Perhaps incorrect
– DVK
Jan 23 at 13:25




@JdeBP - the assumption was that Putty emulates xTerm functionality. Perhaps incorrect
– DVK
Jan 23 at 13:25










1 Answer
1






active

oldest

votes

















up vote
1
down vote













There is no difference between setting the value explicitly or letting the terminal program set the value; both result in the TERM variable getting set. That said, letting the terminal program set the value is the best way to get a sane setting – the terminal knows the terminal type it supports. If the terminal doesn't support the specified terminal type, then it's hard to predict what the output will look like when rendered by the terminal.



As @JdeBP points out in the comments, the values used by putty and xterm differ; it is not safe to assume that everything will support xterm-256.






share|improve this answer






















  • infocmp xterm-256color putty-256color will tell you that there are a lot more differences than that.
    – JdeBP
    Jan 23 at 6:53










  • Note that I was addressing the question of "is there a difference between setting TERM directly instead of from the terminal program" and not addresses any differences between specific terminal types.
    – Andy Dalton
    Jan 23 at 15:00










  • By claiming that the main difference will be that colour control sequences will display as "garbage". Ironically, that won't really happen, and one of the actual main differences is in fact something that turned up within hours of this very answer at unix.stackexchange.com/questions/419068 , as revealed by infocmp as I said.
    – JdeBP
    Jan 23 at 19:16











  • @JdeBP You're right, that portion of my answer was wrong/misleading -- thank you. I've updated my answer to try to make it more correct.
    – Andy Dalton
    Jan 23 at 19:44










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f418905%2fis-there-a-difference-between-declaring-a-terminal-e-g-xterm-256colors-via-t%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













There is no difference between setting the value explicitly or letting the terminal program set the value; both result in the TERM variable getting set. That said, letting the terminal program set the value is the best way to get a sane setting – the terminal knows the terminal type it supports. If the terminal doesn't support the specified terminal type, then it's hard to predict what the output will look like when rendered by the terminal.



As @JdeBP points out in the comments, the values used by putty and xterm differ; it is not safe to assume that everything will support xterm-256.






share|improve this answer






















  • infocmp xterm-256color putty-256color will tell you that there are a lot more differences than that.
    – JdeBP
    Jan 23 at 6:53










  • Note that I was addressing the question of "is there a difference between setting TERM directly instead of from the terminal program" and not addresses any differences between specific terminal types.
    – Andy Dalton
    Jan 23 at 15:00










  • By claiming that the main difference will be that colour control sequences will display as "garbage". Ironically, that won't really happen, and one of the actual main differences is in fact something that turned up within hours of this very answer at unix.stackexchange.com/questions/419068 , as revealed by infocmp as I said.
    – JdeBP
    Jan 23 at 19:16











  • @JdeBP You're right, that portion of my answer was wrong/misleading -- thank you. I've updated my answer to try to make it more correct.
    – Andy Dalton
    Jan 23 at 19:44














up vote
1
down vote













There is no difference between setting the value explicitly or letting the terminal program set the value; both result in the TERM variable getting set. That said, letting the terminal program set the value is the best way to get a sane setting – the terminal knows the terminal type it supports. If the terminal doesn't support the specified terminal type, then it's hard to predict what the output will look like when rendered by the terminal.



As @JdeBP points out in the comments, the values used by putty and xterm differ; it is not safe to assume that everything will support xterm-256.






share|improve this answer






















  • infocmp xterm-256color putty-256color will tell you that there are a lot more differences than that.
    – JdeBP
    Jan 23 at 6:53










  • Note that I was addressing the question of "is there a difference between setting TERM directly instead of from the terminal program" and not addresses any differences between specific terminal types.
    – Andy Dalton
    Jan 23 at 15:00










  • By claiming that the main difference will be that colour control sequences will display as "garbage". Ironically, that won't really happen, and one of the actual main differences is in fact something that turned up within hours of this very answer at unix.stackexchange.com/questions/419068 , as revealed by infocmp as I said.
    – JdeBP
    Jan 23 at 19:16











  • @JdeBP You're right, that portion of my answer was wrong/misleading -- thank you. I've updated my answer to try to make it more correct.
    – Andy Dalton
    Jan 23 at 19:44












up vote
1
down vote










up vote
1
down vote









There is no difference between setting the value explicitly or letting the terminal program set the value; both result in the TERM variable getting set. That said, letting the terminal program set the value is the best way to get a sane setting – the terminal knows the terminal type it supports. If the terminal doesn't support the specified terminal type, then it's hard to predict what the output will look like when rendered by the terminal.



As @JdeBP points out in the comments, the values used by putty and xterm differ; it is not safe to assume that everything will support xterm-256.






share|improve this answer














There is no difference between setting the value explicitly or letting the terminal program set the value; both result in the TERM variable getting set. That said, letting the terminal program set the value is the best way to get a sane setting – the terminal knows the terminal type it supports. If the terminal doesn't support the specified terminal type, then it's hard to predict what the output will look like when rendered by the terminal.



As @JdeBP points out in the comments, the values used by putty and xterm differ; it is not safe to assume that everything will support xterm-256.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 23 at 19:40

























answered Jan 22 at 18:54









Andy Dalton

4,7561520




4,7561520











  • infocmp xterm-256color putty-256color will tell you that there are a lot more differences than that.
    – JdeBP
    Jan 23 at 6:53










  • Note that I was addressing the question of "is there a difference between setting TERM directly instead of from the terminal program" and not addresses any differences between specific terminal types.
    – Andy Dalton
    Jan 23 at 15:00










  • By claiming that the main difference will be that colour control sequences will display as "garbage". Ironically, that won't really happen, and one of the actual main differences is in fact something that turned up within hours of this very answer at unix.stackexchange.com/questions/419068 , as revealed by infocmp as I said.
    – JdeBP
    Jan 23 at 19:16











  • @JdeBP You're right, that portion of my answer was wrong/misleading -- thank you. I've updated my answer to try to make it more correct.
    – Andy Dalton
    Jan 23 at 19:44
















  • infocmp xterm-256color putty-256color will tell you that there are a lot more differences than that.
    – JdeBP
    Jan 23 at 6:53










  • Note that I was addressing the question of "is there a difference between setting TERM directly instead of from the terminal program" and not addresses any differences between specific terminal types.
    – Andy Dalton
    Jan 23 at 15:00










  • By claiming that the main difference will be that colour control sequences will display as "garbage". Ironically, that won't really happen, and one of the actual main differences is in fact something that turned up within hours of this very answer at unix.stackexchange.com/questions/419068 , as revealed by infocmp as I said.
    – JdeBP
    Jan 23 at 19:16











  • @JdeBP You're right, that portion of my answer was wrong/misleading -- thank you. I've updated my answer to try to make it more correct.
    – Andy Dalton
    Jan 23 at 19:44















infocmp xterm-256color putty-256color will tell you that there are a lot more differences than that.
– JdeBP
Jan 23 at 6:53




infocmp xterm-256color putty-256color will tell you that there are a lot more differences than that.
– JdeBP
Jan 23 at 6:53












Note that I was addressing the question of "is there a difference between setting TERM directly instead of from the terminal program" and not addresses any differences between specific terminal types.
– Andy Dalton
Jan 23 at 15:00




Note that I was addressing the question of "is there a difference between setting TERM directly instead of from the terminal program" and not addresses any differences between specific terminal types.
– Andy Dalton
Jan 23 at 15:00












By claiming that the main difference will be that colour control sequences will display as "garbage". Ironically, that won't really happen, and one of the actual main differences is in fact something that turned up within hours of this very answer at unix.stackexchange.com/questions/419068 , as revealed by infocmp as I said.
– JdeBP
Jan 23 at 19:16





By claiming that the main difference will be that colour control sequences will display as "garbage". Ironically, that won't really happen, and one of the actual main differences is in fact something that turned up within hours of this very answer at unix.stackexchange.com/questions/419068 , as revealed by infocmp as I said.
– JdeBP
Jan 23 at 19:16













@JdeBP You're right, that portion of my answer was wrong/misleading -- thank you. I've updated my answer to try to make it more correct.
– Andy Dalton
Jan 23 at 19:44




@JdeBP You're right, that portion of my answer was wrong/misleading -- thank you. I've updated my answer to try to make it more correct.
– Andy Dalton
Jan 23 at 19:44












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f418905%2fis-there-a-difference-between-declaring-a-terminal-e-g-xterm-256colors-via-t%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay