Is there a difference between declaring a terminal (e.g. xterm-256colors) via $TERM vs. from terminal program?
Clash 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).
xterm putty termcap
add a comment |Â
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).
xterm putty termcap
The correct terminfo types for PuTTY areputty
andputty-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
add a comment |Â
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).
xterm putty termcap
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).
xterm putty termcap
asked Jan 22 at 17:10
DVK
15118
15118
The correct terminfo types for PuTTY areputty
andputty-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
add a comment |Â
The correct terminfo types for PuTTY areputty
andputty-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
add a comment |Â
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.
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 byinfocmp
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
add a comment |Â
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.
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 byinfocmp
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
add a comment |Â
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.
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 byinfocmp
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
add a comment |Â
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.
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.
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 byinfocmp
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
add a comment |Â
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 byinfocmp
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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
The correct terminfo types for PuTTY are
putty
andputty-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