xxh / xxh-shell-zsh

Use zsh wherever you go through the SSH without installation on the host.
BSD 2-Clause "Simplified" License
34 stars 16 forks source link

fail to create directory on remote host #9

Open youzipi opened 2 years ago

youzipi commented 2 years ago

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 eow@openssh.com 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
  3. What is the problem

For community: ā¬‡ļø Please click the šŸ‘ reaction instead of leaving a +1 or šŸ‘ comment

anki-code commented 2 years ago

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?

youzipi commented 2 years ago

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.

thinkgos commented 8 months ago

.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....

anki-code commented 8 months ago

PR with fix is welcome!