You are not logged in.

#1 2009-07-09 16:42:47

diddi
Member
Registered: 2008-12-21
Posts: 18

[SOLVED] bash suddenly prints ^C when pressing it

Hi!

Recently I discovered that whenever I type ^C in a console, it actually prints it..
I'm not sure how long it's been there as I havn't really noticed it before.
I've seen it on several installations, and the only connection I can see is that all 2009.2 installs have this behaviour... earlier does not.
Also it's bash 4.x on the 2009.2 installs, while the older uses 3.x..

It's no big deal, but quite annoying having it printing that =P
(I can only see this happen with ^C)

Any hints on how to get rid of it?
Regards
/Diddi

Last edited by diddi (2009-07-10 15:15:52)

Offline

#2 2009-07-09 17:39:33

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: [SOLVED] bash suddenly prints ^C when pressing it

diddi wrote:

Any hints on how to get rid of it?

bar 2 item 3


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#3 2009-07-09 19:22:26

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: [SOLVED] bash suddenly prints ^C when pressing it

Is there anything in the changelog of new bash version ?

Offline

#4 2009-07-09 19:31:40

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: [SOLVED] bash suddenly prints ^C when pressing it

what's the output of your PS1 variable ?

│aron@deb-aron:~$ echo $PS1                                                                                                               
│${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$

This is mine.

Offline

#5 2009-07-09 20:59:46

enito
Member
Registered: 2009-02-17
Posts: 50

Re: [SOLVED] bash suddenly prints ^C when pressing it

i fixed installing a old one libreadline package, with bash3x ...

Offline

#6 2009-07-10 15:15:39

diddi
Member
Registered: 2008-12-21
Posts: 18

Re: [SOLVED] bash suddenly prints ^C when pressing it

Thanks enito for hinting with readline... that lead me to a post I found on stackoverflow.com about this.

Setting "-ctlecho" with the stty command actually solved the problem. (man stty)

Thanks all (:
/Diddi

Offline

#7 2009-07-13 18:58:56

enito
Member
Registered: 2009-02-17
Posts: 50

Re: [SOLVED] bash suddenly prints ^C when pressing it

Hi, thats look a nice fix, and how i setyp stty? for default get this -cltecho?
thx!

Offline

#8 2009-07-13 19:20:16

enito
Member
Registered: 2009-02-17
Posts: 50

Re: [SOLVED] bash suddenly prints ^C when pressing it

aa found apprently, adding this in /etc/profile can works..

thx!

Offline

#9 2009-07-13 22:20:51

quarkup
Member
From: Portugal
Registered: 2008-09-07
Posts: 497
Website

Re: [SOLVED] bash suddenly prints ^C when pressing it

actually works in ~/.bash_profile too

wink


edit: but does not work after restarting..

stty -ctlecho

Last edited by quarkup (2009-08-13 12:04:19)


If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.

Offline

#10 2009-08-19 22:18:44

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: [SOLVED] bash suddenly prints ^C when pressing it

or simply in ~/.bashrc.

Offline

#11 2009-08-19 23:00:35

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: [SOLVED] bash suddenly prints ^C when pressing it

diddi wrote:

Thanks enito for hinting with readline... that lead me to a post I found on stackoverflow.com about this.

Setting "-ctlecho" with the stty command actually solved the problem. (man stty)

Cool, learned something. Thanks!

Offline

Board footer

Powered by FluxBB