Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERL-162: "erl -remsh" malfunctions when TERM is set to "dumb" #4220

Closed
OTP-Maintainer opened this issue Jun 13, 2016 · 4 comments
Closed

ERL-162: "erl -remsh" malfunctions when TERM is set to "dumb" #4220

OTP-Maintainer opened this issue Jun 13, 2016 · 4 comments
Labels
enhancement help wanted Issue not worked on by OTP; help wanted from the community priority:low team:VM Assigned to OTP team VM
Milestone

Comments

@OTP-Maintainer
Copy link

Original reporter: pho
Affected version: OTP-18.2.1
Component: erts
Migrated from: https://bugs.erlang.org/browse/ERL-162


{{erl -remsh}} malfunctions when {{TERM}} is set to {{dumb}}. When this happens the Erlang shell won't start in the context of the remote node but instead it runs on the local node.

{noformat}
% erl -name 'foo@127.0.0.1'
Erlang/OTP 18 [erts-7.2.1] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.2.1  (abort with ^G)
(foo@127.0.0.1)1> 
{noformat}
 
In another terminal:
{noformat}
% erl -name 'bar@127.0.0.1' -remsh 'foo@127.0.0.1'
Erlang/OTP 18 [erts-7.2.1] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe]
 [kernel-poll:false]

Eshell V7.2.1  (abort with ^G)
(foo@127.0.0.1)1>
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution
% TERM=dumb erl -name 'bar@127.0.0.1' -remsh 'foo@127.0.0.1'
Eshell V7.2.1  (abort with ^G)
(bar@127.0.0.1)1>
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution
%
{noformat}

@OTP-Maintainer
Copy link
Author

egil said:

The shell expects that user input can be read from arrow keys, i.e. new-shell (ttysl driver), otherwise a "dumb" user is started which will not handle remote shell.

This is not a bug per-se but a feature request.

@OTP-Maintainer
Copy link
Author

maxlapshin said:

Problem is not in the bad shell. Problem is that if TERM is not good, then remsh does not connect and remains on local shell.

So one needs to be very careful with looking at nodename. 

@OTP-Maintainer
Copy link
Author

maxlapshin said:

More details about how to compile ncurses if you want to have it everywhere and working.

 

NOT WORKING  (remote shell will not work if you compile libtinfo with such options):

 

CPPFLAGS="-P" ./configure --prefix=/root/ --without-ada --without-cxx
--without-cxx-binding --without-manpages --without-progs --without-tests
--disable-db-install --without-curses-h --without-static --with-shared --without-debug
--enable-overwrite --with-termlib


 

WORKING:

 

CPPFLAGS="-P" ./configure --prefix=/root/ --without-ada --without-cxx
--without-cxx-binding --without-manpages --without-progs --without-tests
--disable-db-install --without-curses-h --without-static --with-shared --without-debug
--disable-termcap --with-default-terminfo-dir=/etc/terminfo
--with-terminfo-dirs="/etc/terminfo:/lib/terminfo:/usr/share/terminfo" --with-ticlib=tic
--with-termlib=tinfo
--enable-overwrite

@OTP-Maintainer OTP-Maintainer added enhancement help wanted Issue not worked on by OTP; help wanted from the community team:VM Assigned to OTP team VM priority:low labels Feb 10, 2021
@garazdawi garazdawi added this to the OTP-26.0 milestone Apr 7, 2022
@garazdawi
Copy link
Contributor

Fixed in #6279

weiss added a commit to processone/eturnal that referenced this issue May 24, 2023
This reverts commit 2ca2a82.

The issue in question has been fixed in Erlang/OTP 26.0, see:

erlang/otp#4220

Also, building Erlang/OTP 26.0 against GNU Termcap fails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted Issue not worked on by OTP; help wanted from the community priority:low team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

2 participants