From owner-freebsd-questions@FreeBSD.ORG Sat Sep 15 21:24:57 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A76FC16A417 for ; Sat, 15 Sep 2007 21:24:56 +0000 (UTC) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.freebsd.org (Postfix) with ESMTP id EFD6013C468 for ; Sat, 15 Sep 2007 21:24:55 +0000 (UTC) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (localhost [127.0.0.1]) by tao.thought.org (8.13.8/8.13.1) with ESMTP id l8FLOtdM062498; Sat, 15 Sep 2007 14:24:55 -0700 (PDT) (envelope-from kline@tao.thought.org) Received: (from kline@localhost) by tao.thought.org (8.13.8/8.13.1/Submit) id l8FLOs5C062497; Sat, 15 Sep 2007 14:24:54 -0700 (PDT) (envelope-from kline) Date: Sat, 15 Sep 2007 14:24:54 -0700 From: Gary Kline To: Mel Message-ID: <20070915212454.GA62431@thought.org> References: <20070915010103.GA54302@thought.org> <46EC1D5C.3000208@u.washington.edu> <20070915202822.GA61976@thought.org> <200709152254.34731.fbsd.questions@rachie.is-a-geek.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200709152254.34731.fbsd.questions@rachie.is-a-geek.net> User-Agent: Mutt/1.4.2.2i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 21 of service to the Unix community. Cc: freebsd-questions@freebsd.org Subject: Re: remote [ssh] Backspace] key gives me "^?" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2007 21:24:57 -0000 On Sat, Sep 15, 2007 at 10:54:34PM +0200, Mel wrote: > On Saturday 15 September 2007 22:28:22 Gary Kline wrote: > > On Sat, Sep 15, 2007 at 10:58:52AM -0700, Garrett Cooper wrote: > > > Chad Perrin wrote: > > > >On Fri, Sep 14, 2007 at 06:01:03PM -0700, Gary Kline wrote: > > > >> Sometimes when I ssh from a remote server and edit a file with > > > >> vi, my [Backspace keys] are not interpretered correctly. > > > >> Instead of erasing characters and backing up one byte and > > > >> clearing that character my cursor moves forward. > > > >> > > > >> Example: typing "This" as "thos" and backspacing to the 'o' > > > >> I'll see "thos^?^?" Can anybody 'splain what idiot thing i'm > > > >> doing wrong and how to fix it? > > > >> > > > >> tia, > > > >> > > > >> gary > > > > > > > >I tend to guess you're using a terminal emulator from within X when > > > >logging in remotely -- probably aterm or another rxvt-based terminal > > > >emulator. I had similar problems. I don't recall my exact fix, but it > > > >involved a two-tiered approach: > > > > > > > > 1. set a behavior using stty > > > > Trying to use stty failed... . > > > > > > 2. change a setting in the aterm makefile before installing from ports > > > > > > > >My reference to the aterm makefile in part of the solution is because I > > > >suffered this problem when I used aterm as my terminal emulator of > > > >choice. I have since then switched to rxvt-unicode (also known as > > > > urxvt) as my preferred terminal emulator, however, and no longer have > > > > this problem (as well as no longer having funny broken ASCII spew on my > > > > screen when reading email that contains unicode characters). > > > > > > > >Best o' luck. Let us know if you think this pseudo-solution doesn't > > > >apply to you so we can help you brainstorm other diagnoses of your > > > >problem. > > > > > > It's because the TERM'inal emulation / keyboard layout's not > > > meshing. ^?--as I discovered after I asked the question ~8 months > > > ago--is a remnant DEC keyboard mapping, when if properly addressed by > > > setting TERM or fixing the keyboard layout to a standard ASCII keyboard > > > layout, the problem will go away. > > > > > > In shorter terms, if you... > > > 1. ... switch over to TERM=xterm (assuming that the terminal prog > > > you're using is xterm compatible) under the settings for the app (if > > > they exist) ... > > > 2. ... script in a fix so that it does this in your login shell [you > > > shouldn't use xterm systemwide for your TERM var, especially if you > > > login remotely via SSH and use CLI programs like pine (pine's stupid and > > > doesn't know how to emulate the xterm terminal properly without hacking > > > the source IIRC)] ... > > > > Ok, I have TERM Set everywhere, plus in ~./zlogin, I have stty > > set things correctly, so it must be 3. > > > > > 3. ... fix the keyboard layout ... > > > > Problem here is HOW? Many months ago my daughter spilled a > > glass of water on my working IBM keyboard. Surprise, the > > water washed away the rinted leads... . (*mumble*) Since I > > have a few others, (old, without the M$ cr*ap keys), I > > chose the best, least sticky keyboard and used it. > > > > I remapped my ~/.xmodmaprc file {{ "temporarily", ha, ha }}. > > How else do I fix the layout? IIRC, there was some place > > to set the keyboard: 101, 104, 105, &c. This old one is > > probably a 101-key model. It's a no-name deal. > > > > Clues please? > > > > gary > > > > > > PS: {{ WARNING}}: I'Ve got a beg-athon posting upcooming.... > > > > > ... '^?' will be replaced with backspaces. 3. is the best solution, but > > > I had to do 1. before, because I didn't have root access on the servers. > > Gosh, I had this on BSDi terminals for ages and had something in my .*_profile > to fix it. I think it was stty erase ^H where ^H was typed by ctrl+v followed > by 'H'. Should be able to execute that on terminal open vim and test it. In in ~/.zlogin (on all 5 machines) I've got eval `tset -e^H -i^C -s -Q -m 'dialup:?xterm'`; That did the job until recently. Somewhere in deep memory I remember the ^V^H stuff. Wasn't the '^' + 'H' ?? I think Garrett had the right solution, tho. gary > > > -- > Mel > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- Gary Kline kline@thought.org www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org