SSH to Linux host with an incompatible Terminal Size
I use SSH from MacOS within its built-in Terminal program to login to a CentOS server. For some reasons, after login, this server has some setting that makes it 80 column only. If my Terminal is wider than 80 columns, strange things will happen. Like if I type a bunch of characters, the strings will break at the 80 col mark and then resume on the first character of the same line.
I researched on this issue and the best I can come up with is using xterm escape sequence:
echo -e "e[8;30;90t";
Which resizes my Terminal to 30x90. I change my terminal size frequently and I don't want to keep track of my current terminal size. I also don't want my terminal to resize.
Is there a better way to fix that?
linux ssh xterm
add a comment |
I use SSH from MacOS within its built-in Terminal program to login to a CentOS server. For some reasons, after login, this server has some setting that makes it 80 column only. If my Terminal is wider than 80 columns, strange things will happen. Like if I type a bunch of characters, the strings will break at the 80 col mark and then resume on the first character of the same line.
I researched on this issue and the best I can come up with is using xterm escape sequence:
echo -e "e[8;30;90t";
Which resizes my Terminal to 30x90. I change my terminal size frequently and I don't want to keep track of my current terminal size. I also don't want my terminal to resize.
Is there a better way to fix that?
linux ssh xterm
This seems crazy but common. It is usually caused by the Terminal connection type that can be adjusted in macOS. Open up Terminal, go to “Preferences” and then—in whatever profile you are in—go to the “Advanced” tab and under “Terminfo” change the value of “Declare terminal as:” to something other than what it is set to. In macOS Mojave I have:xterm-256color
. So try something like just plainxterm
or evenvt102
. Look at this answer as well.
– JakeGould
Jan 26 at 0:53
add a comment |
I use SSH from MacOS within its built-in Terminal program to login to a CentOS server. For some reasons, after login, this server has some setting that makes it 80 column only. If my Terminal is wider than 80 columns, strange things will happen. Like if I type a bunch of characters, the strings will break at the 80 col mark and then resume on the first character of the same line.
I researched on this issue and the best I can come up with is using xterm escape sequence:
echo -e "e[8;30;90t";
Which resizes my Terminal to 30x90. I change my terminal size frequently and I don't want to keep track of my current terminal size. I also don't want my terminal to resize.
Is there a better way to fix that?
linux ssh xterm
I use SSH from MacOS within its built-in Terminal program to login to a CentOS server. For some reasons, after login, this server has some setting that makes it 80 column only. If my Terminal is wider than 80 columns, strange things will happen. Like if I type a bunch of characters, the strings will break at the 80 col mark and then resume on the first character of the same line.
I researched on this issue and the best I can come up with is using xterm escape sequence:
echo -e "e[8;30;90t";
Which resizes my Terminal to 30x90. I change my terminal size frequently and I don't want to keep track of my current terminal size. I also don't want my terminal to resize.
Is there a better way to fix that?
linux ssh xterm
linux ssh xterm
asked Jan 26 at 0:24
some usersome user
1,18231327
1,18231327
This seems crazy but common. It is usually caused by the Terminal connection type that can be adjusted in macOS. Open up Terminal, go to “Preferences” and then—in whatever profile you are in—go to the “Advanced” tab and under “Terminfo” change the value of “Declare terminal as:” to something other than what it is set to. In macOS Mojave I have:xterm-256color
. So try something like just plainxterm
or evenvt102
. Look at this answer as well.
– JakeGould
Jan 26 at 0:53
add a comment |
This seems crazy but common. It is usually caused by the Terminal connection type that can be adjusted in macOS. Open up Terminal, go to “Preferences” and then—in whatever profile you are in—go to the “Advanced” tab and under “Terminfo” change the value of “Declare terminal as:” to something other than what it is set to. In macOS Mojave I have:xterm-256color
. So try something like just plainxterm
or evenvt102
. Look at this answer as well.
– JakeGould
Jan 26 at 0:53
This seems crazy but common. It is usually caused by the Terminal connection type that can be adjusted in macOS. Open up Terminal, go to “Preferences” and then—in whatever profile you are in—go to the “Advanced” tab and under “Terminfo” change the value of “Declare terminal as:” to something other than what it is set to. In macOS Mojave I have:
xterm-256color
. So try something like just plain xterm
or even vt102
. Look at this answer as well.– JakeGould
Jan 26 at 0:53
This seems crazy but common. It is usually caused by the Terminal connection type that can be adjusted in macOS. Open up Terminal, go to “Preferences” and then—in whatever profile you are in—go to the “Advanced” tab and under “Terminfo” change the value of “Declare terminal as:” to something other than what it is set to. In macOS Mojave I have:
xterm-256color
. So try something like just plain xterm
or even vt102
. Look at this answer as well.– JakeGould
Jan 26 at 0:53
add a comment |
1 Answer
1
active
oldest
votes
Try typing
reset
after launching the terminal (maybe add to your .bashrc file). This should clear the screen and reset the terminal size information used by the shell to something appropriate.
That didn't work. I suspectresize
will work but there is noresize
on that host.
– some user
Jan 26 at 6:12
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1398612%2fssh-to-linux-host-with-an-incompatible-terminal-size%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try typing
reset
after launching the terminal (maybe add to your .bashrc file). This should clear the screen and reset the terminal size information used by the shell to something appropriate.
That didn't work. I suspectresize
will work but there is noresize
on that host.
– some user
Jan 26 at 6:12
add a comment |
Try typing
reset
after launching the terminal (maybe add to your .bashrc file). This should clear the screen and reset the terminal size information used by the shell to something appropriate.
That didn't work. I suspectresize
will work but there is noresize
on that host.
– some user
Jan 26 at 6:12
add a comment |
Try typing
reset
after launching the terminal (maybe add to your .bashrc file). This should clear the screen and reset the terminal size information used by the shell to something appropriate.
Try typing
reset
after launching the terminal (maybe add to your .bashrc file). This should clear the screen and reset the terminal size information used by the shell to something appropriate.
edited Jan 26 at 0:54
JakeGould
32k1098140
32k1098140
answered Jan 26 at 0:31
davidgodavidgo
44.3k75292
44.3k75292
That didn't work. I suspectresize
will work but there is noresize
on that host.
– some user
Jan 26 at 6:12
add a comment |
That didn't work. I suspectresize
will work but there is noresize
on that host.
– some user
Jan 26 at 6:12
That didn't work. I suspect
resize
will work but there is no resize
on that host.– some user
Jan 26 at 6:12
That didn't work. I suspect
resize
will work but there is no resize
on that host.– some user
Jan 26 at 6:12
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1398612%2fssh-to-linux-host-with-an-incompatible-terminal-size%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
This seems crazy but common. It is usually caused by the Terminal connection type that can be adjusted in macOS. Open up Terminal, go to “Preferences” and then—in whatever profile you are in—go to the “Advanced” tab and under “Terminfo” change the value of “Declare terminal as:” to something other than what it is set to. In macOS Mojave I have:
xterm-256color
. So try something like just plainxterm
or evenvt102
. Look at this answer as well.– JakeGould
Jan 26 at 0:53