M J <[email protected]> writes: Hi,
> I'm trying to connect to host that doesn't have a `stty` binary > through tramp. Unfortunately, once it finds a shell, tramp tries to > run stty and fails, repeating this indefinitely. > > I have put an stty binary which works on the remote host when I login > with ssh, and have added it to PATH (root is on squashfs and > read-only, stty binary is in /storage/bin). But trying to get tramp to > also respect the PATH for stty is impossible. I have tried the > following and all fail. > > ======= > (setq tramp-verbose 10) > (add-to-list 'tramp-remote-process-environment > "PATH=/storage/bin:/usr/bin:/usr/sbin") > (add-to-list 'tramp-remote-process-environment > "ENV='PATH=/storage/bin:/usr/bin:/usr/sbin'") > (add-to-list 'tramp-remote-path 'tramp-own-remote-path) > (add-to-list 'tramp-remote-path "/storage/bin") When the remote shell is called, ENV is passed as argument. However, > 22:16:23.530987 tramp-send-command (6) # exec env TERM='dumb' > INSIDE_EMACS='26.3,tramp:2.3.5.26.3' > ENV='PATH=/storage/bin:/usr/bin:/usr/sbin;HOME=/storage' > HISTFILE=~/.tramp_history PROMPT_COMMAND='' PS1=\#\$\ PS2='' PS3='' > /bin/sh shows a different value of ENV, namely 'PATH=/storage/bin:/usr/bin:/usr/sbin;HOME=/storage'. Could you remove this ';HOME=/storage' part? > I would expect tramp to fail fast and fail hard when stty or any other > required binary is not available with an appropriate message. There is always a trade-off between testing everything, and performance. Tramp expects a valid ssty w/o further checks. I could improve this, of course, but with the penalty of decreasing performance. > Also being able to specify alternate PATH is important in this case to > find such binaries. Tramp gives you this feature, via tramp-remote-path. But maybe is must be set very early at the handshaking. OTOH, setting terminal options via stty is a must in order to speek properly with the shell. Hmm. > I'm not sure how to fix this issue and would appreciate any help. > fengshaun Best regards, Michael.
