EternalTerminal: Doesn't work with with non sh-like shells

When using a shell that doesn’t allow the VAR=val command syntax, et fails to start etserver. This is the error message:

fish: Unsupported use of '='. In fish, please use 'set SERVER_TMP_DIR $TMPDIR:-$TMP:-$TEMP:-/tmp'.
SERVER_TMP_DIR=${TMPDIR:-${TMP:-${TEMP:-/tmp}}};TMPFILE=$(mktemp $SERVER_TMP_DIR/et-server.XXXXXXXXXXXX);PASSKEY=xxx;ID=yyy;printf "%s/%s\n" "$ID" "$PASSKEY" > "${TMPFILE}";export TERM=st-256color;etserver --idpasskeyfile="${TMPFILE}";true

and the fix probably consist in running /bin/sh -c ... instead of relying on the default shell.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 68 (22 by maintainers)

Commits related to this issue

Most upvoted comments

This project can’t be considered serious if it silently depends on a user’s shell choice. @tbodt solution makes sense. If etserver is not in the PATH, then allow specifying its full path as an etclient option.

https://github.com/MisterTea/EternalTerminal/tree/add_fish_support

This branch adds support for fish and should also support almost any shell. It uses the idea mentioned on this thread to pass in the data through stdin.

Because this changes the protocol between client/server, both of them need to be running this branch for it to work.

Can someone with fish confirm that this works?

A user can have any kind of shell, I think it’s wrong to assume anything more than the existance of /bin/sh. If you recognize this as an issue, and it is not fixed, I think it should be left open.

It’s hard (impossible?) to write some if/then/else that runs a fish script or a bash script. I tried this:

 fish -lc 'printf "${0}"' || echo "failed"

but even though the fish command failed, it didn’t return exit code 127 as advertised. Someone who knows more about fish than me will have to write some shell script that runs one set of commands for fish and a different set for everyone else.

Alternatively, you can run fish by doing et -c=“fish” (hostname).

I’m going to close this because I don’t expect anyone to implement it, but if someone does and submits a PR I’d be happy to reopen.

chrismac:~% $(echo $0) --version
GNU bash, version 4.4.12(1)-release (x86_64-apple-darwin16.3.0)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
chrismac:~% et --version
et version 5.1.9
chrismac:~% et
Error starting ET process through ssh, please make sure your ssh works first

Just installed ET. Not working for me and getting error Error starting ET process through ssh, please make sure your ssh works first. No idea about any of this. Using iTerm on latest macos.

ssh dev works just fine. The ssh command is not aliased.

(And thanks for the quick update!)

% et alien phiber@alien’s password: Unknown option: `-lc’ Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument … ]. Error starting ET process through ssh, please make sure your ssh works first

Not everyone uses the same shell, as illustrated several times.