LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
 
Search this Thread
Old 02-19-2012, 06:17 AM   #16
error_401
LQ Newbie
 
Registered: Feb 2012
Location: Europe
Distribution: DEBIAN 6 Squeeze
Posts: 8
Blog Entries: 8

Rep: Reputation: Disabled

Just hitting the same problem today.

Logged in remotely to a server I need to edit a file on. Starting vi works, loads the file, editing is possible.

Unable to leave vi whatsoever. Something looks wrong with the key behaviour.
Hitting "ESC" produces a

Code:
^[
instead of the expected

Code:
:
so no way to leave vi and also no way of leaving the active ssh console

Any inputs on how to deal with that?

Workaround

How to get out of vi. (Careful, this is forcing something which could leave you with unwanted outcome! I assume no resonsability whatsoever!)

Open a second console window.
Open a second ssh connection to the affected host your stuck in vi
Do the following:

First list all processes. Find the affected vi process which should be pretty much at the bottom anyway with:
Code:
ps | more
and use the "space" bar to scroll pagewise through the process list.
Then use:
Code:
kill xxxx
where xxxx is the process number of the vi command in which you are stuck to kill the vi process. You should be back on the ssh prompt. Now you can normally exit the ssh shell on both consoles.

Last edited by error_401; 02-19-2012 at 06:30 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
difference between exit 1 and exit kushalkoolwal Programming 6 10-20-2005 03:56 PM
Exit X Risetaker2003 Linux - Software 5 09-30-2003 08:10 PM
exit X ? w00t Linux - Newbie 11 06-01-2003 08:04 PM
exit xlord Programming 7 11-03-2002 11:33 AM


All times are GMT -5. The time now is 06:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration