From owner-freebsd-questions@FreeBSD.ORG Mon Aug 13 06:45:55 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 6F60D16A417 for ; Mon, 13 Aug 2007 06:45:55 +0000 (UTC) (envelope-from dz902i@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id 4433713C49D for ; Mon, 13 Aug 2007 06:45:55 +0000 (UTC) (envelope-from dz902i@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so1888015waf for ; Sun, 12 Aug 2007 23:45:54 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SPso4M4YHooA2RDx6A6bbsi7XAsPg0rgW8LzBUfAnMiUlY2UtzhT8ms5KFXbYP2SaU99BtzG092YuFoLvREqdm4kSv7ZKojF8VIT0/jCwQBzk/0k2kpxqYEfGSt16CdFDHaiTwM1HDCXQDg2r6UxeluiwWyGFKLHstRBA2TvAaI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Ew7byXYRDrH5CVFFDA7gsFow3YO4HOCc2rV0vuG+zyynwKty0nbKcwArS2ZPEg9MJdRDe3DVl1dTyBLEPGjELk7er4K//jUCYFqno0TliPYvItS+mCxNjp+2t29vudxzCTALbnOhu2H8sjdpgL7FT8QLWRuAsAl0O3+CqcMWWEQ= Received: by 10.114.148.1 with SMTP id v1mr1410178wad.1186987554145; Sun, 12 Aug 2007 23:45:54 -0700 (PDT) Received: by 10.115.46.2 with HTTP; Sun, 12 Aug 2007 23:45:54 -0700 (PDT) Message-ID: <3e34b6550708122345m44ef52edla4ea01b54f6c8afe@mail.gmail.com> Date: Mon, 13 Aug 2007 16:45:54 +1000 From: d.Z. To: "Jerry McAllister" In-Reply-To: <20070812233107.GA95837@gizmo.acns.msu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3e34b6550708112054u332f6760we3181393dbbdfe18@mail.gmail.com> <6.0.0.22.2.20070812132652.026483b0@mail.computinginnovations.com> <20070812233107.GA95837@gizmo.acns.msu.edu> Cc: freebsd-questions@freebsd.org, Derek Ragona Subject: Re: Backspace 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: Mon, 13 Aug 2007 06:45:55 -0000 Thanks for helping everybody. But actually I'm using Bourne shell on FreeBSD 6.1 just like the Solaris in lab, and the FreeBSD is freshly installed, I have checked .shrc and .profile, but nothing related to key bindings or stty's there, so what I thought it should be is: after I login -> [press backspace] -> ^H appears -> [press DEL] -> ^? appears in emacs -> [press backspace] -> oops, help appears I think Solaris was just like the above. But in my FreeBSD, things go like: after I login -> [press backspace will erase last char] -> [press DEL does the same thing] no matter what have I done to "stty" like "stty erase ^H" and "stty erase2 ^H", the result is just the same, backspace and DEL still can be used to erase last char in shell. The only difference is in emacs, but I searched the net and found that emacs relies on its own definition of key bindings in ~/.emacs file (it is empty in this case), rather than the terminal key bindings. Totally confused. Any idea? Thanks again for you kind people. 2007/8/13, Jerry McAllister : > On Sun, Aug 12, 2007 at 01:31:36PM -0500, Derek Ragona wrote: > > > At 10:54 PM 8/11/2007, d.Z. wrote: > > >Hello, > > > > > >I'm a new user to FreeBSD and Unix. I used Solaris 10 last week in > > >lab, and found there is a difference between them. > > > > > >When Solaris is installed, press backspace will give you ^H, you'll > > >have to "stty erase ^H" to solve this problem. But with FreeBSD 6.1, > > >when first installed, backspace is always bounded to erase last > > >character, even I have "stty erase ^?" and "stty erase2 ^?", backspace > > >still deletes last character input. Does any body know why is this > > >happening? > > > > Solaris by default uses csh for user accounts. The backspace key > > assignment and for that matter, all key assignments are dependent on the > > both the shell and terminal definition. Reassigning keys is typical for > > your shell's startup profile file .cshrc for csh and .bashrc for bash. > > > > > > >And strange thing is with default setting (before stty erase and > > >erase2 to ^?), when I use Emacs, C-h will give me back space, instead > > >of help. I know this is desirable for experts, but I'm really new so > > >just want to follow the instruction first. > > > > Applications like the shell you use interpret the terminal definition and > > may or may not use the same key assignments. Most applications like the > > shells in UNIX environments have startup files to customize the key > > assignments and in the case of editors even define macros. > > And those startup files are: > > For csh and tcsh (tcsh is the most common one in FreeBSD) > the startup file is .cshrc in one's home directory. You can also > create a system-wide one. > > For SH and bash it is .profile and for them don't forget to export > any variables. > > ////jerry > > > > > Hope this helps. > > > > -Derek > > > > -- > > This message has been scanned for viruses and > > dangerous content by MailScanner, and is > > believed to be clean. > > MailScanner thanks transtec Computers for their support. > > > > _______________________________________________ > > 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" >