* [gentoo-user] remote ssh session does not reflect my keyboard inputs @ 2007-05-07 14:31 Mick 2007-05-07 15:55 ` Ryan Sims 0 siblings, 1 reply; 8+ messages in thread From: Mick @ 2007-05-07 14:31 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 545 bytes --] Hi All, I am not sure how this works: When I ssh into a Ubuntu server certain keyboard actions (like pressing the Up or Left arrows) are not translated on the remote box, but give ASCII responses; e.g. pressing Left Arrow, gives $ ^[[D which is annoying as I have to delete part of the command I just typed to be able to correct it. How can I set it up so that my Gentoo keyboard presses and behaviour is reflected on the remote box? Is it a matter of copying over the .bashrc file from the Gentoo box? -- Regards, Mick [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] remote ssh session does not reflect my keyboard inputs 2007-05-07 14:31 [gentoo-user] remote ssh session does not reflect my keyboard inputs Mick @ 2007-05-07 15:55 ` Ryan Sims 2007-05-07 22:12 ` Mick 0 siblings, 1 reply; 8+ messages in thread From: Ryan Sims @ 2007-05-07 15:55 UTC (permalink / raw To: gentoo-user On 5/7/07, Mick <michaelkintzios@gmail.com> wrote: > When I ssh into a Ubuntu server certain keyboard actions (like pressing the Up > or Left arrows) are not translated on the remote box, but give ASCII > responses; e.g. pressing Left Arrow, gives $ ^[[D which is annoying as I have > to delete part of the command I just typed to be able to correct it. > > How can I set it up so that my Gentoo keyboard presses and behaviour is > reflected on the remote box? Is it a matter of copying over the .bashrc file > from the Gentoo box? I *think* this is a termcap/terminfo issue rather than a bash issue. What does 'echo $TERM' say in your ssh session? -- Ryan W Sims -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] remote ssh session does not reflect my keyboard inputs 2007-05-07 15:55 ` Ryan Sims @ 2007-05-07 22:12 ` Mick 2007-05-08 3:36 ` Ryan Sims 2007-05-08 11:53 ` Hans-Werner Hilse 0 siblings, 2 replies; 8+ messages in thread From: Mick @ 2007-05-07 22:12 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 901 bytes --] On Monday 07 May 2007 16:55, Ryan Sims wrote: > On 5/7/07, Mick <michaelkintzios@gmail.com> wrote: > > When I ssh into a Ubuntu server certain keyboard actions (like pressing > > the Up or Left arrows) are not translated on the remote box, but give > > ASCII responses; e.g. pressing Left Arrow, gives $ ^[[D which is annoying > > as I have to delete part of the command I just typed to be able to > > correct it. > > > > How can I set it up so that my Gentoo keyboard presses and behaviour is > > reflected on the remote box? Is it a matter of copying over the .bashrc > > file from the Gentoo box? > > I *think* this is a termcap/terminfo issue rather than a bash issue. > What does 'echo $TERM' say in your ssh session? Thanks Ryan, ================= $ echo $TERM rxvt $ sudo echo $TERM rxvt ================= which is the same like my Gentoo box. -- Regards, Mick [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] remote ssh session does not reflect my keyboard inputs 2007-05-07 22:12 ` Mick @ 2007-05-08 3:36 ` Ryan Sims 2007-05-08 11:53 ` Hans-Werner Hilse 1 sibling, 0 replies; 8+ messages in thread From: Ryan Sims @ 2007-05-08 3:36 UTC (permalink / raw To: gentoo-user On 5/7/07, Mick <michaelkintzios@gmail.com> wrote: > On Monday 07 May 2007 16:55, Ryan Sims wrote: > > On 5/7/07, Mick <michaelkintzios@gmail.com> wrote: > > > When I ssh into a Ubuntu server certain keyboard actions (like pressing > > > the Up or Left arrows) are not translated on the remote box, but give > > > ASCII responses; e.g. pressing Left Arrow, gives $ ^[[D which is annoying > > > as I have to delete part of the command I just typed to be able to > > > correct it. > > > > > > How can I set it up so that my Gentoo keyboard presses and behaviour is > > > reflected on the remote box? Is it a matter of copying over the .bashrc > > > file from the Gentoo box? > > > > I *think* this is a termcap/terminfo issue rather than a bash issue. > > What does 'echo $TERM' say in your ssh session? > > Thanks Ryan, > ================= > $ echo $TERM > rxvt > > $ sudo echo $TERM > rxvt > ================= > which is the same like my Gentoo box. > > -- > Regards, > Mick Ok, I may be a little out of my depth here, but we'll muddle through. What does bind -p | grep history on each box tell you? You could also try 'set -o history' on the box that's giving you trouble. (I'm reneging on my idea re. termcap/info) -- Ryan W Sims -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] remote ssh session does not reflect my keyboard inputs 2007-05-07 22:12 ` Mick 2007-05-08 3:36 ` Ryan Sims @ 2007-05-08 11:53 ` Hans-Werner Hilse 2007-05-13 19:12 ` Mick 1 sibling, 1 reply; 8+ messages in thread From: Hans-Werner Hilse @ 2007-05-08 11:53 UTC (permalink / raw To: gentoo-user Hi, On Mon, 7 May 2007 23:12:31 +0100 Mick <michaelkintzios@gmail.com> wrote: > ================= > $ echo $TERM > rxvt > > $ sudo echo $TERM > rxvt > ================= > which is the same like my Gentoo box. That doesn't matter. Question is rather whether the target machine has an entry in its terminfo db (/usr/share/terminfo). On ubuntu, this is provided by ncurses-base (so I would suspect it might be installed). You can also try to set TERM to "vt102" or "vt100": $ export TERM=vt102 But if it works this way, that would mean /usr/share/terminfo/r/rxvt is borked. Note that there might be terminfo databases w/ higher precedence in /etc/terminfo and /lib/terminfo. -hwh -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] remote ssh session does not reflect my keyboard inputs 2007-05-08 11:53 ` Hans-Werner Hilse @ 2007-05-13 19:12 ` Mick 2007-05-13 21:10 ` Etaoin Shrdlu 0 siblings, 1 reply; 8+ messages in thread From: Mick @ 2007-05-13 19:12 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1300 bytes --] On Tuesday 08 May 2007 12:53, Hans-Werner Hilse wrote: > Hi, > > On Mon, 7 May 2007 23:12:31 +0100 Mick <michaelkintzios@gmail.com> > > wrote: > > ================= > > $ echo $TERM > > rxvt > > > > $ sudo echo $TERM > > rxvt > > ================= > > which is the same like my Gentoo box. > > That doesn't matter. Question is rather whether the target machine has > an entry in its terminfo db (/usr/share/terminfo). On ubuntu, this is > provided by ncurses-base (so I would suspect it might be installed). > > You can also try to set TERM to "vt102" or "vt100": > $ export TERM=vt102 > > But if it works this way, that would mean /usr/share/terminfo/r/rxvt is > borked. Note that there might be terminfo databases w/ higher > precedence in /etc/terminfo and /lib/terminfo. I've tried bind -p | grep history and it did not work: ========================================== $ sudo bind -p | grep history Password: sudo: bind: command not found ========================================== I also tried changing the terminal once I logged in to the remote machine, but I am getting the same error: ========================================== $ export TERM=vt100 $ ^[[B^[[B ========================================== What else could I try? -- Regards, Mick [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] remote ssh session does not reflect my keyboard inputs 2007-05-13 19:12 ` Mick @ 2007-05-13 21:10 ` Etaoin Shrdlu 2007-05-14 8:02 ` Etaoin Shrdlu 0 siblings, 1 reply; 8+ messages in thread From: Etaoin Shrdlu @ 2007-05-13 21:10 UTC (permalink / raw To: gentoo-user On Sunday 13 May 2007 21:12, Mick wrote: > I've tried bind -p | grep history and it did not work: > ========================================== > $ sudo bind -p | grep history > Password: > sudo: bind: command not found > ========================================== bind is a builtin bash command, I'm not sure about how it behaves when invoked by sudo. However, it should work fine even when run as a regular user. > I also tried changing the terminal once I logged in to the remote > machine, but I am getting the same error: > ========================================== > $ export TERM=vt100 > $ ^[[B^[[B > ========================================== > > What else could I try? Could it possibly be related to the readline library and the inputrc file? It seems that some keys are undefined on the machine you are sshing to. In the case of the left arrow (but of course this holds for any key that is not working as expected), try $ bind -q backward-char on both boxes. On my computer, it outputs backward-char can be invoked via "\C-b", "\eOD", "\e[D". Of these, "\e[D" is the one that corresponds to the "left arrow" key. If your output for the non-working computer is different, then it means that the left arrow key is not bound to the same function (or is not bound at all). This could be due to a ~/.inputrc file that redefines some keys. See man bash, section READLINE to get more info about readline. (BTW, there are *lots* of things that can be customized regarding readline behavior, and creating your own inputrc file can be a great learning experience - or at least, it was for me when I did it for LFS). Verify that you are using the same editing mode (usually emacs) on both boxes, with the command set -o | grep '^vi\|^emacs' Check whether the INPUTRC environment variable points to some file. On gentoo, bash does not read /etc/inputrc, but perhaps on ubuntu it does. As a last resort, you can try to create your own ~/.inputrc on the ubuntu box and put there all the key bindings you need (using CTRL+V + key to find out the correct values, as suggested in the comments at the beginning of gentoo /etc/inputrc, or copying them directly from the gentoo output of bind -p). -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] remote ssh session does not reflect my keyboard inputs 2007-05-13 21:10 ` Etaoin Shrdlu @ 2007-05-14 8:02 ` Etaoin Shrdlu 0 siblings, 0 replies; 8+ messages in thread From: Etaoin Shrdlu @ 2007-05-14 8:02 UTC (permalink / raw To: gentoo-user On Sunday 13 May 2007 23:10, Etaoin Shrdlu wrote: > On gentoo, bash does not read /etc/inputrc, but perhaps on ubuntu it > does. Correction: it DOES read it on gentoo too. Sorry for the wrong info. -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-05-14 7:36 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-05-07 14:31 [gentoo-user] remote ssh session does not reflect my keyboard inputs Mick 2007-05-07 15:55 ` Ryan Sims 2007-05-07 22:12 ` Mick 2007-05-08 3:36 ` Ryan Sims 2007-05-08 11:53 ` Hans-Werner Hilse 2007-05-13 19:12 ` Mick 2007-05-13 21:10 ` Etaoin Shrdlu 2007-05-14 8:02 ` Etaoin Shrdlu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox