Hopefully someone here will know what's up with this:
I'm using putty to access a server via SSH. When I press 'up' on the keyboard, I expect to get back the line I previously entered. I don't - instead, I get ^[[A. This is not very helpful. I don't get this when accessing another server. Is this a setting the server makes, rather than the accessing client?
Madpandasuburbs west of chicagoRegistered Userregular
edited April 2010
Do you have different keyboard settings per host? In putty go to Terminal->Keyboard and see if anything is different from the problem host compared to your default settings.
Also it could be the terminal settings on the hosts itself, I just started getting back into linux so I can't tell you exactly where to go.
Hopefully someone here will know what's up with this:
I'm using putty to access a server via SSH. When I press 'up' on the keyboard, I expect to get back the line I previously entered. I don't - instead, I get ^[[A. This is not very helpful. I don't get this when accessing another server. Is this a setting the server makes, rather than the accessing client?
Try checking the TERMINFO environment variable (or "infocmp | head -n 2") on both machines and see what they return.
Barrakketh on
Rollers are red, chargers are blue....omae wa mou shindeiru
Do you have different keyboard settings per host? In putty go to Terminal->Keyboard and see if anything is different from the problem host compared to your default settings.
I thought this would have some effect, but it doesn't.
Hopefully someone here will know what's up with this:
I'm using putty to access a server via SSH. When I press 'up' on the keyboard, I expect to get back the line I previously entered. I don't - instead, I get ^[[A. This is not very helpful. I don't get this when accessing another server. Is this a setting the server makes, rather than the accessing client?
Try checking the TERMINFO environment variable (or "infocmp | head -n 2") on both machines and see what they return.
cs3% infocmp | head -n 2
# Reconstructed via infocmp from file: /usr/share/lib/terminfo/x/xterm
xterm|vs100|xterm terminal emulator,
It's probably a server side issue. In putty you can configure up/down/etc to send a different sequence of characters, but the other end still has to interpret them.
What operating system is the server running? What is your login shell?
End on
I wish that someway, somehow, that I could save every one of us
This has nothing to do with your terminal session, and therefore nothing to do with the client you're using (PuTTY, ssh, whatever). It's strictly an issue with the shell on the remote system. If you were logged in to a local terminal (i.e. using local keyboard and monitor) you'd probably encounter the same problem. This command should tell you what shell you're using on each system:
echo $SHELL
Since !! works, I'm pretty certain you're using either csh or tcsh, in which case you want to follow the directions here. Note that you still won't have the up-arrow functionality you're used to on the other server, where your shell is almost certainly bash. You'll have a bunch of less-slick but functionally-equivalent abilities.
Ah no; that's the un-fine one; this is the fine one:
# Reconstructed via infocmp from file: /usr/share/terminfo/x/xterm
xterm|xterm terminal emulator (X Window System),
I've also realised now that this means the left and right arrows don't work either. I get ^[[D and ^[[C instead of the cursor moving.
Try copying the /usr/share/terminfo/x/xterm file from the machine that works to ~/.terminfo/x/xterm on the problematic machine and see if it works after re-connecting.
Barrakketh on
Rollers are red, chargers are blue....omae wa mou shindeiru
This has nothing to do with your terminal session, and therefore nothing to do with the client you're using (PuTTY, ssh, whatever). It's strictly an issue with the shell on the remote system. If you were logged in to a local terminal (i.e. using local keyboard and monitor) you'd probably encounter the same problem. This command should tell you what shell you're using on each system:
echo $SHELL
Since !! works, I'm pretty certain you're using either csh or tcsh, in which case you want to follow the directions here. Note that you still won't have the up-arrow functionality you're used to on the other server, where your shell is almost certainly bash. You'll have a bunch of less-slick but functionally-equivalent abilities.
If I had to guess, I'd say csh.
Though, !! is supported by bash, at least on ubuntu.
bowen on
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
Oh I see, so I'm not actually using SSH at all! That will explain why the commands I'm used to don't work..
I don't actually have much write access to this server, so I'll have to suck it up and learn the CSH commands. Why on earth don't they have left and right set up to navigate through text on the command line though?
Oh I see, so I'm not actually using SSH at all! That will explain why the commands I'm used to don't work..
I don't actually have much write access to this server, so I'll have to suck it up and learn the CSH commands. Why on earth don't they have left and right set up to navigate through text on the command line though?
You're using SSH, but it's essentially just a transport protocol. You're still using a specific shell on the remote system, and putty (your terminal emulator) accepts the same control sequences as xterm plus some extras.
Anyway, I mentioned copying it to your home directory on the misbehaving machine (most people have write access there), but would you mind copying/pasting the full output of "infocmp" from both machines? I might test it myself later (sorta busy right now), but I want to do a comparison between the two. terminfo is used to determine what control sequences a terminal emulator will accept, and I think those two differ in more ways than just the description.
Barrakketh on
Rollers are red, chargers are blue....omae wa mou shindeiru
Well, those are obviously different, and most of the same commands are implemented differently. In fact, only one "command" is the same in both files (I sorted them with sort and used "comm -12" to only show the lines common to both).
I'll repeat my earlier suggestion: Try copying the /usr/share/terminfo/x/xterm file from the machine that works to ~/.terminfo/x/xterm on the problematic machine (in your home directory) and see if it works after re-connecting. The home directory entry should be used first and things should work as expected.
Barrakketh on
Rollers are red, chargers are blue....omae wa mou shindeiru
Posts
Also it could be the terminal settings on the hosts itself, I just started getting back into linux so I can't tell you exactly where to go.
Steam/PSN/XBL/Minecraft / LoL / - Benevicious | WoW - Duckwood - Rajhek
Try checking the TERMINFO environment variable (or "infocmp | head -n 2") on both machines and see what they return.
Do a google for "up arrow command history (shell)" and see if you get anything that'll help you.
That should at least give you the last commmand.
I thought this would have some effect, but it doesn't.
Zese words, they mean nothing to me.
I've also realised now that this means the left and right arrows don't work either. I get ^[[D and ^[[C instead of the cursor moving.
What operating system is the server running? What is your login shell?
Since !! works, I'm pretty certain you're using either csh or tcsh, in which case you want to follow the directions here. Note that you still won't have the up-arrow functionality you're used to on the other server, where your shell is almost certainly bash. You'll have a bunch of less-slick but functionally-equivalent abilities.
Try copying the /usr/share/terminfo/x/xterm file from the machine that works to ~/.terminfo/x/xterm on the problematic machine and see if it works after re-connecting.
If I had to guess, I'd say csh.
Though, !! is supported by bash, at least on ubuntu.
I don't actually have much write access to this server, so I'll have to suck it up and learn the CSH commands. Why on earth don't they have left and right set up to navigate through text on the command line though?
You're using SSH, but it's essentially just a transport protocol. You're still using a specific shell on the remote system, and putty (your terminal emulator) accepts the same control sequences as xterm plus some extras.
Anyway, I mentioned copying it to your home directory on the misbehaving machine (most people have write access there), but would you mind copying/pasting the full output of "infocmp" from both machines? I might test it myself later (sorta busy right now), but I want to do a comparison between the two. terminfo is used to determine what control sequences a terminal emulator will accept, and I think those two differ in more ways than just the description.
The one that works the way I'm used to:
And the other:
I'll repeat my earlier suggestion: Try copying the /usr/share/terminfo/x/xterm file from the machine that works to ~/.terminfo/x/xterm on the problematic machine (in your home directory) and see if it works after re-connecting. The home directory entry should be used first and things should work as expected.
previous line: ESC and then K, further history keep hitting K
To edit that line is L to move right, H to move right and then I to start an insert (like VI)
With this handy list you can change shells to any listed in the result set by using chsh.
For example: to change to bash on my machine.