Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Desktop Environments
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Desktop Environments
Support for your Ubuntu desktop. Including Gnome, KDE and XFCE.

 
Thread Tools Display Modes
Old November 16th, 2005   #1
unless
5 Cups of Ubuntu
 
Join Date: Nov 2005
Location: Lausanne, Switzerland
Beans: 18
Ubuntu Breezy 5.10
GNU screen: Backspace thinks it's delete

When I open GNU Screen, my backspace key doesn't work... It behaves like delete.

I tried adding the following line to my .screenrc...
Code:
bindkey -k kb stuff "177"
... But once I do that, I just get "177" echoed to the cmd line/screen every time I hit ^H (which is how I've been backspacing since the backspace key began its identity crisis).

"stty -a" outputs the following info (be it from within screen or not):
Code:
speed 38400 baud; rows 14; columns 144; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
This is driving me nuts. I'm tired of seeing "Wuff Wuff!" every time I hit the backspace key.

Thanks in advance for any pointers.
unless is offline   Reply With Quote
Old December 17th, 2005   #2
levity
First Cup of Ubuntu
 
Join Date: Dec 2005
Beans: 2
Re: GNU screen: Backspace thinks it's delete

i have this problem too and don't know how to handle it either. what's even weirder is that a lot of "terminal graphics" (ncurses?) applications display messed-up. so far i've found problems with aptitude and w3m. the corruption only happens when i'm inside screen.

i've used screen on a bunch of different platforms, and ubuntu is the first i've encountered to show either of these problems.
levity is offline   Reply With Quote
Old December 17th, 2005   #3
HermanAB
make bzImage, not war
 
Join Date: Oct 2005
Location: Al Ain
Beans: 5,535
Send a message via Skype™ to HermanAB
Re: GNU screen: Backspace thinks it's delete

Hmmm, have you tried:
$ stty sane

Cheers,

Herman
http://www.aerospacesoftware.com/linuxhowtos.html
HermanAB is offline   Reply With Quote
Old December 18th, 2005   #4
levity
First Cup of Ubuntu
 
Join Date: Dec 2005
Beans: 2
Re: GNU screen: Backspace thinks it's delete

Thanks for the suggestion, but that doesn't seem to change anything.
levity is offline   Reply With Quote
Old December 18th, 2005   #5
dare2dreamer
A Carafe of Ubuntu
 
Join Date: Oct 2004
Location: Dallas, TX
Beans: 111
Send a message via ICQ to dare2dreamer Send a message via AIM to dare2dreamer Send a message via MSN to dare2dreamer Send a message via Yahoo to dare2dreamer
Re: GNU screen: Backspace thinks it's delete

I've had several programs that run in screen get sorted out by the following:

export LANG=C

You might give it a shot. If it works, you can add it to .bashrc
__________________
--dare2dreamer
dare2dreamer is offline   Reply With Quote
Old January 9th, 2006   #6
zojas
Just Give Me the Beans!
 
zojas's Avatar
 
Join Date: Apr 2005
Location: Apache Junction, AZ, USA
Beans: 56
Re: GNU screen: Backspace thinks it's delete

no dice. man, this is annoying.
zojas is offline   Reply With Quote
Old January 10th, 2006   #7
zojas
Just Give Me the Beans!
 
zojas's Avatar
 
Join Date: Apr 2005
Location: Apache Junction, AZ, USA
Beans: 56
Re: GNU screen: Backspace thinks it's delete

to expand on my last comment a bit:

I use zsh, and have it set to use vim-style command line editing rather than the default (emacs-style?)

when I'm in a shell in xterm or Konsole but not in screen, backspace works fine.

when I'm in a shell inside screen in konsole or on one of the text consoles, it also works fine.

but when I'm in a shell inside screen attached to xterm, hitting the backspace key backs up the cursor one position and puts me in command mode. if I hit backspace again, the character the cursor is sitting on top of is deleted, and the cursor backs up one more position. so the cursor ends up sitting on top of a character. it doesn't matter if I create the screen session in the xterm or merely attach to an already existing screen session on the xterm.
zojas is offline   Reply With Quote
Old January 10th, 2006   #8
zojas
Just Give Me the Beans!
 
zojas's Avatar
 
Join Date: Apr 2005
Location: Apache Junction, AZ, USA
Beans: 56
Re: GNU screen: Backspace thinks it's delete

found my problem: in /etc/X11/app-defaults/XTerm, there is a 'debian customizations' section.

in there, they have this line:

Code:
*backarrowKeyIsErase: true
I simply added this line to my ~/.Xdefaults to turn that off:

Code:
*backarrowKeyIsErase: false
then ran

Code:
xrdb ~/.Xdefaults
launched a new xterm, re-attached to screen, and the backspace key worked as it should!!
zojas is offline   Reply With Quote
Old April 3rd, 2006   #9
zojas
Just Give Me the Beans!
 
zojas's Avatar
 
Join Date: Apr 2005
Location: Apache Junction, AZ, USA
Beans: 56
Re: GNU screen: Backspace thinks it's delete

normally I will attach to screen in an xterm.

I have recently found that if I have to type input to a program, the backspace key won't work. like if I type 'cat > /tmp/file', then type some text and hit backspace, it just echoes a ^H character.

however, if I attach to screen inside konsole (the kde terminal), the backspace works fine when typing to cat.

backspace works fine with either terminal when typing to the shell directly.
zojas is offline   Reply With Quote
Old August 12th, 2006   #10
hayalci
5 Cups of Ubuntu
 
hayalci's Avatar
 
Join Date: Nov 2004
Location: Ankara, Turkey
Beans: 43
Re: GNU screen: Backspace thinks it's delete

A simple solution from http://lists.gnu.org/archive/html/sc.../msg00048.html

Set the TERM variable to screen before running screen.
Code:
TERM=screen screen
You can define an alias in your ~/.bashrc file like
Code:
alias screen='TERM=screen screen'
hayalci is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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

Forum Jump


All times are GMT -4. The time now is 10:25 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry