1

I am using Putty to SSH remote Linux virtual machine. All is well except that I can't get Gnome terminal command work in Putty. Some of these commands are:

Ctrl + A or Home Moves the cursor to the start of a line.

Ctrl+ E or End Moves the cursor to the end of a line.

Esc + B Moves to the beginning of the previous or current word.

Ctrl + K Deletes from the current cursor position to the end of the line.

Ctrl + U Deletes from the start of the line to the current cursor position.

Ctrl + W Deletes the word before the cursor.

Alt + B Goes back one word at a time.

Alt + F Moves forward one word at a time.

Alt + C Capitalizes letter where cursor is and moves to end of word.

These shortcuts are in fact quite common among Linux users. Unfortunately, they do not function properly in Putty. For instance, whenever I press CTRL+A in putty, it prints out ^A instead of jumping to start of line.

Have you encountered the same situation or is it that this issue is never addressed? Yet if someone had found that basically it'd be a few steps, that'd be much appreciated.

EDIT: MOST of these commands are actually pretty much the same as shortcuts from EMACS.

1
  • Solved: Kenster pointed to a solution by simply running "set -o emacs" in putty. In this way, emacs shortcuts for text editing are applied to the terminal command line. PS: If you like shortcuts from vi, try "set -o vi", which should let you navigate your terminal command in a vi environment. Jan 29, 2015 at 2:12

4 Answers 4

1

Editing keystrokes like the ones you list are handled by the program which you're running inside the terminal program, not by the terminal program--putty or gnome-terminal--itself. The specific keystrokes which you list are part of the emacs command set. I suspect you're thinking of using bash or tcsh as your shell with emacs-style line editing.

Your problem may be that the account you're using to log in to this host may not have the expected shell as its login shell, or else the shell has been configured to disable emacs editing mode. The bash command to enable emacs mode is:

set -o emacs

The tcsh command is:

bindkey -e

If the account isn't set to use your desired shell, you can try running the chsh command to change the account's login shell:

chsh -s /bin/bash
1
  • Indeed, the commands correspond to emacs shortcuts. I got my problem solved using set -o emacs Thank you for pointing it out. Jan 29, 2015 at 2:02
2

ssh session are basically tunnelling from you to remote desktop so its not your actual terminal its something like subset of the gnome-terminal. I suggest to use MobaXterm if you are logging from windows. Its better than putty.

1
  • Does not answer the question. This is a termtype issue. Not a client issue. Jan 21, 2015 at 14:32
1

The reason is simple, you are not using the GNOME terminal. Putty is the one interpreting your keyboard combinations, not GNOME terminal. I doubt you even start gnome-terminal process since SSH sessions are based on command line interface while gnome-terminal is a graphical user interface. To "use" the gnome terminal, you must somehow use a xserver (with xming for example), forward it trough SSH to your client and execute gnome-terminal as if you were doing it locally.

Another option is configure Putty so it behaves like the gnome terminal, but I that options are not available in the keyboard shortcuts tab.

0

Your terminal type is probably mismatched. I use putty 0.62 with Linux(Ubuntu and CentOS) systems. I have a terminal type of xterm on both sides and I can use most of those features(They are terminal features, not terminal program features)

In Putty, open Connection->Data I believe the default is xterm

login, then run echo $TERM. This is what terminal type your server is using.

In my experience, linux systems use xterm for remote sessions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.