xxh-shell-zsh icon indicating copy to clipboard operation
xxh-shell-zsh copied to clipboard

fail to create directory on remote host

Open youzipi opened this issue 3 years ago • 4 comments

Local OS (where xxh is installed): macOS 10.15.7 Destination host OS: CentOS Linux release 7.9.2009 (Core) ## aws ec2 xxh version: 0.8.8 xxh-plugins installed: xxh-shell-zsh

Steps to Reproduce

  1. I run xxh remote-host +if +vv
  2. The output log:
debug1: Sending command: /home//.xxh/.xxh/shells/xxh-shell-zsh/build/entrypoint.sh   -v 2
/etc/profile.d/lang.sh: line 19: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
Something went wrong while running zsh on host:
./zsh.sh: line 14: /home/youzipi/.xxh/.xxh/shells/xxh-shell-zsh/build/zsh-bin/share/zsh/5.8/scripts/relocate: No such file or directory mkdir: cannot create directory '/zsh': Permission denied ./zsh.sh: line 28: /home/youzipi/.xxh/.xxh/shells/xxh-shell-zsh/build/zsh-bin/bin/zsh: No such file or directory
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
/home/youzipi/.xxh/.xxh/shells/xxh-shell-zsh/build/zsh.sh: line 28: /home/youzipi/.xxh/.xxh/shells/xxh-shell-zsh/build/zsh-bin/bin/zsh: No such file or directory
debug1: channel 0: free: client-session, nchannels 1
Connection to gate.zaihui.com.cn closed.
Transferred: sent 4472, received 3700 bytes, in 0.1 seconds
Bytes per second: sent 63788.2, received 52776.5
debug1: Exit status 127

if i create the dir mannually, then throw error:

mkdir: cannot create directory '/zsh': Permission denied ./zsh.sh: line 28: /home/youzipi/.xxh/.xxh/shells/xxh-shell-zsh/build/zsh-bin/bin/zsh: Is a directory
  1. What is the problem

For community: ⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

youzipi avatar Jan 07 '22 03:01 youzipi

hi! What if you will try to run zsh-bin manually on the target OS:

cd /tmp
tag=v3.0.1
distfile=zsh-5.8-linux-x86_64
url="https://github.com/romkatv/zsh-bin/releases/download/$tag/$distfile.tar.gz"
tarname=`basename $url`
wget --show-progress $url -O $tarname
tar -xzf $tarname
cd zsh-5.8-linux-x86_64
./share/zsh/5.8/scripts/relocate
./bin/zsh

Is it working?

anki-code avatar Jan 10 '22 18:01 anki-code

hi! What if you will try to run zsh-bin manually on the target OS:

cd /tmp
tag=v3.0.1
distfile=zsh-5.8-linux-x86_64
url="https://github.com/romkatv/zsh-bin/releases/download/$tag/$distfile.tar.gz"
tarname=`basename $url`
wget --show-progress $url -O $tarname
tar -xzf $tarname
cd zsh-5.8-linux-x86_64
./share/zsh/5.8/scripts/relocate
./bin/zsh

Is it working?

it seems create a plain zsh.

run xxh remote-host local, got same result. it did not bring my local zsh to remote as i expected.

youzipi avatar Jan 11 '22 02:01 youzipi

.xxh/.xxh/shells/xxh-shell-zsh/build/zsh.sh file the shell mkdir -p $XDG_DATA_HOME/zsh, the XDG_DATA_HOME environment variable empty....

thinkgos avatar Apr 03 '24 08:04 thinkgos

PR with fix is welcome!

anki-code avatar Apr 03 '24 08:04 anki-code